/* BRAND_THEME_V1 — palette matches institute logo */

:root {
    --photo-bg: #eaf2f5;
    --photo-white: #ffffff;
    --photo-line: #d4e0e8;
    --photo-dark: #1a2b3c;
    --photo-gold: #2558a8;
    --photo-accent: #2558a8;
    --photo-accent-2: #2f9e63;
    --photo-coral: #e07a5f;
    --photo-teal: #5aa99c;
    --photo-muted: #5b6b78;
    --font-base: "Noto Sans", "Segoe UI", "DejaVu Sans", sans-serif;
    --radius-md: 14px;
    --shadow-soft: 0 12px 28px rgba(26, 43, 60, 0.08);
}

body {
    margin: 0;
    background:
        radial-gradient(1200px 420px at 10% -10%, rgba(37, 88, 168, 0.10), transparent 55%),
        radial-gradient(900px 380px at 100% 0%, rgba(47, 158, 99, 0.10), transparent 50%),
        var(--photo-bg);
    color: var(--photo-dark);
    font-family: var(--font-base);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.photo-site-header {
    position: relative;
    z-index: 4000;
    background: transparent;
    border-bottom: 0;
}

.photo-header-wrap {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: none;
    border: 1px solid rgba(212, 224, 232, 0.9);
    border-bottom: 0;
    border-radius: 0;
    overflow: hidden;
}

.photo-main-nav {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(212, 224, 232, 0.9);
    border-top: 1px solid var(--photo-line);
    border-radius: 0 0 18px 18px;
    box-shadow: var(--shadow-soft);
    overflow: visible;
    padding: 0 12px;
}

.photo-header-top {
    min-height: 86px;
    padding: 12px 24px;
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    background:
        linear-gradient(105deg, rgba(255,255,255,0.98) 0%, rgba(234,245,242,0.92) 48%, rgba(244,239,236,0.95) 100%);
    border-bottom: 1px solid var(--photo-line);
}

.photo-header-top.has-header-bg {
    background-image:
        linear-gradient(105deg, rgba(255,255,255,0.88) 0%, rgba(234,245,242,0.78) 48%, rgba(244,239,236,0.82) 100%),
        var(--header-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.photo-logo {
    width: 78px;
    height: 78px;
    position: relative;
    display: block;
    text-decoration: none;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 3px rgba(37, 88, 168, 0.12);
}

.photo-logo-sun {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e07a5f;
    position: absolute;
    top: 0;
    left: 15px;
    box-shadow: 0 0 0 4px rgba(224, 122, 95, 0.22);
}

.photo-logo-book {
    width: 58px;
    height: 32px;
    border: 4px solid #2558a8;
    border-top: 0;
    border-radius: 0 0 30px 30px;
    position: absolute;
    left: 3px;
    bottom: 0;
}

.photo-site-title {
    display: block;
    text-decoration: none !important;
    color: var(--photo-dark) !important;
    min-width: 0;
}

.photo-site-title strong {
    display: block;
    color: #1a2b3c;
    font-size: 20px;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.photo-site-title span {
    display: block;
    margin-top: 4px;
    color: #2558a8;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.photo-language {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--photo-muted);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    background: #f3f7fa;
    border: 1px solid var(--photo-line);
    border-radius: 999px;
    padding: 6px 10px;
}

.photo-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.photo-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.photo-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(37, 88, 168, 0.28);
    background: linear-gradient(135deg, #2558a8, #2f9e63);
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(37, 88, 168, 0.18);
    cursor: pointer;
}

.photo-search-btn:hover {
    filter: brightness(1.05);
    color: #ffffff !important;
}

.photo-search-icon {
    font-size: 16px;
    line-height: 1;
}

.photo-header-search {
    display: none;
    align-items: center;
    gap: 6px;
    min-width: min(320px, 70vw);
    padding: 4px;
    border: 1px solid var(--photo-line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(26, 43, 60, 0.12);
}

.photo-search-wrap.is-open .photo-search-btn {
    display: none;
}

.photo-search-wrap.is-open .photo-header-search,
.photo-header-search:not([hidden]) {
    display: inline-flex;
}

.photo-header-search[hidden] {
    display: none !important;
}

.photo-header-search input[type="search"] {
    flex: 1;
    min-width: 0;
    min-height: 34px;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 12px;
    font: inherit;
    font-size: 14px;
    color: var(--photo-dark);
}

.photo-header-search-go,
.photo-header-search-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.photo-header-search-go {
    background: linear-gradient(135deg, #2558a8, #2f9e63);
    color: #ffffff;
}

.photo-header-search-close {
    background: #f1f5f9;
    color: #475569;
}

.photo-mobile-search {
    display: none;
}

.photo-language a {
    color: var(--photo-muted) !important;
    text-decoration: none !important;
    padding: 2px 4px;
    border-radius: 6px;
}

.photo-language a.active {
    color: #fff !important;
    background: linear-gradient(135deg, #2558a8, #2f9e63);
}

.photo-main-nav a {
    padding: 0 12px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    color: #2558a8 !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 999px;
    border-bottom: 0;
    transition: background .2s ease, color .2s ease;
}

.photo-main-nav a:visited {
    color: #2558a8 !important;
}

.photo-main-nav a:hover,
.photo-main-nav a.active {
    background: linear-gradient(135deg, rgba(37,88,168,.12), rgba(47,158,99,.12));
    color: #2558a8 !important;
    border-bottom-color: transparent;
}

.page-section,
.news-v2,
.articles-v2,
.announcements-v2,
.documents-v2,
.gallery-v2,
.contact-v2,
.search-v2,
.specialties-v2,
.specialty-detail-v2,
.news-detail-v2,
.article-detail-v2,
.announcement-detail-v2,
.journal-page {
    padding-top: 34px;
}

.photo-logo.has-real-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.photo-logo.has-real-logo img {
    display: block;
    max-width: 100%;
    max-height: 78px;
    width: auto;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1100px) {
    .photo-header-wrap,
    .photo-main-nav {
        width: 100%;
        border-radius: 0;
    }

    .photo-header-top {
        grid-template-columns: 64px minmax(0, 1fr) auto auto;
        padding: 10px 16px;
    }

    .photo-site-title strong {
        font-size: 17px;
    }

    .photo-site-title span {
        font-size: 12px;
    }

    .photo-main-nav {
        justify-content: flex-start;
        gap: 6px;
        padding: 0 14px;
    }
}

@media (max-width: 650px) {
    .photo-header-top {
        padding: 10px 12px;
    }

    .photo-logo {
        width: 52px;
        height: 52px;
    }

    .photo-logo.has-real-logo img {
        max-height: 52px;
    }

    .photo-site-title strong {
        font-size: 14px;
        line-height: 1.15;
    }

    .photo-site-title span {
        font-size: 11px;
    }
}

/* === Photo header submenus === */
.photo-main-nav {
    overflow: visible;
    position: relative;
    z-index: 40;
}

.photo-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.photo-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 50px;
    padding: 0 12px;
    color: var(--photo-dark) !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    border-radius: 10px;
    transition: color .2s ease, background .2s ease;
}

.photo-nav-link:hover,
.photo-nav-link.active,
.photo-nav-item.is-active > .photo-nav-link {
    color: #2558a8 !important;
    background: rgba(37, 88, 168, 0.08);
}

.photo-nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    transition: transform .2s ease;
}

.photo-submenu-toggle {
    display: none;
}

.photo-submenu {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--photo-line);
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(26, 43, 60, 0.14);
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 60;
}

.photo-submenu a {
    display: block !important;
    height: auto !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    white-space: normal !important;
    text-align: left !important;
    color: #1a2b3c !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.photo-submenu a:hover,
.photo-submenu a.active {
    background: rgba(37, 88, 168, 0.10) !important;
    color: #2558a8 !important;
}

.photo-nav-item.has-submenu:hover > .photo-submenu,
.photo-nav-item.has-submenu:focus-within > .photo-submenu {
    display: flex;
}

.photo-nav-item.has-submenu:hover > .photo-nav-link .photo-nav-caret,
.photo-nav-item.has-submenu:focus-within > .photo-nav-link .photo-nav-caret {
    transform: rotate(180deg);
}

@media (max-width: 900px) {
    .photo-nav-item {
        display: block !important;
        width: 100% !important;
        position: relative !important;
    }

    .photo-nav-item.has-submenu {
        display: block !important;
    }

    .photo-nav-item.has-submenu > .photo-nav-link {
        width: 100% !important;
        height: auto !important;
        min-height: 48px !important;
        justify-content: space-between !important;
        padding-right: 14px !important;
    }

    .photo-submenu-toggle {
        display: none !important;
    }

    .photo-nav-caret {
        display: inline-block !important;
        margin-left: auto;
        flex-shrink: 0;
    }

    .photo-nav-item.is-open > .photo-nav-link .photo-nav-caret {
        transform: rotate(180deg);
    }

    .photo-submenu {
        position: static !important;
        left: auto !important;
        top: auto !important;
        min-width: 0 !important;
        width: 100% !important;
        margin-top: 6px !important;
        margin-bottom: 4px !important;
        padding: 6px !important;
        box-shadow: none !important;
        background: #eef4f8 !important;
        border: 1px solid #d4e0e8 !important;
        border-radius: 12px !important;
        display: none !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    /* Do not open on hover/focus on mobile */
    .photo-nav-item.has-submenu:hover > .photo-submenu,
    .photo-nav-item.has-submenu:focus-within > .photo-submenu {
        display: none !important;
    }

    .photo-nav-item.has-submenu.is-open > .photo-submenu {
        display: flex !important;
    }

    .photo-submenu a {
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Submenu above hero / page content */
.photo-site-header {
    position: relative;
    z-index: 4000;
}

.photo-main-nav {
    overflow: visible !important;
    position: relative;
    z-index: 4001;
}

.photo-nav-item.has-submenu {
    z-index: 4002;
}

.photo-submenu {
    z-index: 4003 !important;
}
