/* Common CSS for Medical Clinic Site */

:root {
    --sidebar-width: 180px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #2c2c2c;
    background-color: #ffffff;
    font-size: 16px;
    padding: 1.5rem;
    margin: 0;
}

h1, h2, h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    color: #2c2c2c;
    line-height: 1.4;
    margin-top: 0;
    font-stretch: semi-condensed;
}

h1 {
    font-size: 1.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

.banner-title, .banner-column-heading, .banner-location {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: normal;
}

/* Flag container */
.flag {
    min-width: 600px;
    width: 100%;
    display: block;
    padding: 2rem;
    overflow: visible;
    background:
        linear-gradient(to right, #ffffff 0%, #f0f0f0 15%, #ffffff 28%, #e8e8e8 42%, #f0f0f0 58%, #e8e8e8 72%, #f0f0f0 85%, #ffffff 100%),
        linear-gradient(to right, #0048C7 0%, #0055d5 12%, #0048C7 25%, #0066ff 38%, #0055d5 52%, #0078ff 68%, #0066ff 82%, #0078ff 100%),
        linear-gradient(to right, #D62718 0%, #e02d1f 14%, #D62718 27%, #ff4d3d 41%, #e6392a 56%, #ff4d3d 71%, #e6392a 86%, #ff4d3d 100%);
    background-size: 100% 33.33%, 100% 33.33%, 100% 33.33%;
    background-position: top, center, bottom;
    background-repeat: no-repeat;
}

.white-only {
    background:
        linear-gradient(to right, #ffffff 0%, #f0f0f0 15%, #ffffff 28%, #e8e8e8 42%, #f0f0f0 58%, #e8e8e8 72%, #f0f0f0 85%, #ffffff 100%);
    background-position: top;
    background-repeat: no-repeat;
    margin: 0 auto 0.5rem;
    max-width: 100%;
}

/* Banner with Russian flag colors */
.banner {
    display: grid;
    grid-auto-rows: 1fr;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.5);
    font-stretch: semi-condensed;
}

.banner-stripe {
    width: 100%;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.banner-stripe.white {
    background: transparent;
    justify-content: center;
    position: relative;
    gap: 0.5rem;
}

.banner-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.banner-stripe.blue {
    background: transparent;
    color: #ffffff;
}

.banner-stripe.red {
    background: transparent;
    color: #ffffff;
}

.banner-title {
    font-size: 2.2rem;
    font-weight: 500;
    text-align: center;
    color: #2a2a2aee;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, padding 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.banner-title:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #2a2a2a;
}

.banner-columns {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    line-height: 1.2;
}

.banner-column {
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.banner-column:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.banner-column:nth-child(1) {
    margin: 0 0 4rem 0;
}

.banner-column:nth-child(2) {
    margin: 2rem 0 2rem 0;
}

.banner-column:nth-child(3) {
    margin: 4rem 0 0 0;
}

.banner-column-heading {
    font-size: 1.8rem;
    font-weight: 500;
    color: #e0e8f5;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 3px rgba(0, 72, 199, 0.5);
    text-align: left;
    width: 80%;
}

.banner-column:hover .banner-column-heading {
    color: #ffffff;
    text-shadow: 0 0 3px rgba(0, 72, 199, 0.6);
}

.banner-column-sub {
    font-size: 1.6rem;
    font-style: italic;
    color: #e0e8f5;
    text-shadow: 0 0 3px rgba(0, 72, 199, 0.5);
    text-align: right;
    width: 80%;
}

.banner-column:hover .banner-column-sub {
    color: #ffffff;
    text-shadow: 0 0 3px rgba(0, 72, 199, 0.6);
}

.banner-location {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 2.0rem;
    font-weight: 500;
    color: #f5e4e4;
    text-align: center;
    text-shadow: 0 0 3px rgba(213, 39, 24, 0.5);
    text-decoration: none;
    transition: background-color 0.2s ease, padding 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.banner-location:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #f5e0e0;
    text-shadow: 0 0 3px rgba(213, 39, 24, 0.6);
}

/* Links - Standard styling for medical site */
a {
    color: #3e72c1;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

a:hover {
    color: #1e3f73;
    text-decoration: none;
}

/* Main Content */
main {
    max-width: 2000px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
}

/* PureCSS Grid Layout for Content Pages */
.content-layout {
    position: relative;
    margin-top: 0.5rem;
}

.sidebar-left,
.sidebar-right {
    position: sticky;
    top: 2rem;
    align-self: start;
    padding: 0 1rem;
}

.content-main {
    padding: 0 1.5rem;
}

/* Reduce vertical gaps around headers in content-main */
.content-main h1,
.content-main h2,
.content-main h3,
.content-main h4,
.content-main h5,
.content-main h6 {
    margin-top: 0.75rem;
    margin-bottom: 0.4rem;
    line-height: 1.15;
}

.content-main h1:first-child,
.content-main h2:first-child,
.content-main h3:first-child {
    margin-top: 0;
}

/* News date styling - less visible and smaller than title */
.news-date {
    font-weight: 400;
    font-size: 0.75em;
    color: #666;
    margin-right: 0.5em;
}

.news-date:before {
    content: "📅";
    margin-right: 0.25em;
    font-size: 0.9em;
    vertical-align: middle;
    color:rgba(0, 0, 0, 0.5)
}

@media (min-width: 769px) {
    .content-layout.pure-g {
        display: flex;
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .sidebar-left.pure-u-md-1-5 {
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        max-width: var(--sidebar-width);
        flex: 0 0 var(--sidebar-width);
        padding: 0;
    }

    .content-main.pure-u-md-3-5 {
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .sidebar-right.pure-u-md-1-5 {
        width: var(--sidebar-width);
        min-width: var(--sidebar-width);
        max-width: var(--sidebar-width);
        flex: 0 0 var(--sidebar-width);
        padding: 0;
    }
}

/* Vertical Menu Styling */
.sidebar-menu {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

@media (min-width: 769px) {
    .sidebar-menu {
        width: 100%;
    }
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    margin-bottom: 0.125rem;
}

.menu-item:last-child {
    margin-bottom: 0;
}

.menu-link {
    display: block;
    padding: 0.5rem 0.875rem;
    color: #2c2c2c;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
}

.menu-link:hover {
    background-color: #f0f4f8;
    color: #3e72c1;
    transform: translateX(2px);
}

.menu-link:focus {
    outline: 2px solid #3e72c1;
    outline-offset: 2px;
}

.menu-item.active > .menu-link {
    background-color: rgba(80, 140, 220, 0.85);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(62, 114, 193, 0.3);
}

.menu-item.active > .menu-link:hover {
    background-color: rgba(100, 160, 240, 0.9);
    transform: translateX(0);
}

.menu-children {
    list-style: none;
    margin: 0.25rem 0 0 0;
    padding-left: 0.75rem;
    border-left: 2px solid #e9ecef;
    margin-left: 0.5rem;
}

.menu-children .menu-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: #495057;
}

.menu-children .menu-link:hover {
    background-color: #e7f1ff;
    color: #2d5a9e;
    transform: translateX(1px);
    font-weight: 500;
}

.menu-children .menu-item.active > .menu-link {
    background-color: rgba(231, 241, 255, 0.7);
    color: #3e72c1;
    font-weight: 500;
    box-shadow: none;
    border-left: 3px solid rgba(62, 114, 193, 0.8);
    padding-left: 0.625rem;
}

/* Contacts Module Styling */
.contacts-module {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.contacts-module h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    font-weight: 500;
    color: #2c2c2c;
    border-bottom: 1px solid rgba(62, 114, 193, 0.4);
    padding-bottom: 0.4rem;
}

.contacts-module .contact-info {
    margin: 0;
    padding: 0;
}

.contacts-module .contact-info p {
    margin-bottom: 0.5rem;
    padding: 0;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
}

.contacts-module .contact-info p:last-child {
    margin-bottom: 0;
}

.contacts-module .contact-info strong {
    font-weight: 500;
}

.contacts-module .phone-number {
    display: block;
    margin-bottom: 0;
    font-weight: 400;
    white-space: nowrap;
}

.contacts-module .address {
    font-size: 0.85rem;
    line-height: 1.5;
    font-weight: 400;
}

/* Sections */
section {
    margin: 0;
    padding: 0;
}

section:not(:last-child) {
    margin-bottom: 2.5rem;
}

section h1 {
    font-size: 1.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

section h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    margin-top: 2rem;
}

section h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

/* Global paragraph and list item spacing */
p {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

li {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

section p {
    margin-bottom: 0.6rem;
    color: #2c2c2c;
    font-size: 1rem;
    line-height: 1.7;
    padding: 0;
}

section ul {
    margin-left: 2rem;
    margin-bottom: 0.6rem;
    margin-top: 0;
    padding-left: 0;
}

section li {
    margin-bottom: 0.4rem;
    color: #2c2c2c;
    line-height: 1.7;
}

/* Images in sections within content-main - override PureCSS defaults */
.content-main section img,
div.content-main section img,
.pure-u-md-3-5.content-main section img {
    border-radius: 16px !important;
    -webkit-border-radius: 16px !important;
    -moz-border-radius: 16px !important;
    max-width: 90% !important;
    max-height: 400px !important;
    height: auto !important;
    width: auto !important;
}

/* Link sections */
.link-section {
    margin: 2rem 0;
}

.link-section-heading {
    background-color: #2d7a32;
    color: #ffffff;
    padding: 1rem 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: inline-block;
    text-decoration: none;
}

.link-section-heading:hover {
    color: #ffffff;
    background-color: #1b5e20;
}

.link-section-sub {
    margin-left: 1.5rem;
    font-size: 1.1rem;
    color: #2c2c2c;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Contact information */
.contact-info {
    margin: 1.5rem 0;
    padding: 0;
}

.contact-info p {
    margin-bottom: 0.6rem;
    padding: 0;
}

.phone-number {
    font-weight: 600;
    color: #2c2c2c;
    position: relative;
    padding-left: 1.2em;
    white-space: nowrap;
}

.phone-number::before {
    content: "☎";
    position: absolute;
    left: 0;
    font-size: 1.0em;
}

.address, .technology {
    line-height: 1.8;
    margin: 1rem 0;
    padding: 0;
    font-weight: 600;
    color: #2c2c2c;
}

.nohover:hover {
    background-color: transparent;
}

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .flag {
        padding: 1.5rem 1rem;
        min-width: auto;
    }

    .white-only {
        margin: 0 auto 1rem;
    }

    .banner-stripe {
        padding: 1rem 1.5rem;
    }

    .banner-title {
        font-size: 1.8rem;
    }

    .banner-columns {
        flex-direction: column;
        gap: 1.5rem;
        line-height: 1.2;
    }

    .banner-column:nth-child(1),
    .banner-column:nth-child(2),
    .banner-column:nth-child(3) {
        margin: 0;
    }

    .banner-column-heading {
        font-size: 1.6rem;
    }

    .banner-column-sub {
        font-size: 1.4rem;
    }

    .banner-location {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        font-size: 1.6rem;
    }

    main {
        padding: 1.5rem 1rem;
    }

    .content-layout {
        margin-top: 0.5rem;
    }

    .sidebar-left,
    .sidebar-right {
        position: static;
        padding: 0;
        margin-bottom: 2rem;
    }

    .content-main {
        padding: 0;
    }

    section p {
        margin-bottom: 0.6rem;
    }

    section h1 {
        font-size: 1.6rem;
    }

    section h2 {
        font-size: 1.3rem;
    }

    section h3 {
        font-size: 1.15rem;
    }
}
