/* ==========================================================================
   International Journal for Research in Gynecologic Oncology (IJRGO)
   Global Header & Footer Stylesheet
   Applied across all pages with responsive mobile toggle & dropdowns
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

/* Reset and box sizing for header/footer */
.ijrgo-topbar,
.ijrgo-main-header,
.ijrgo-site-footer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    width: 100%;
}

.ijrgo-topbar *,
.ijrgo-main-header *,
.ijrgo-site-footer * {
    box-sizing: border-box;
}

/* Hide legacy PKP default header styles when our custom structure is active */
.pkp_structure_page > .pkp_structure_head#headerNavigationContainer {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* ==========================================================================
   1. TOP UTILITY BAR (#052646)
   ========================================================================== */
.ijrgo-topbar {
    background-color: #052646;
    color: #e2e8f0;
    font-size: 13px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 102;
}

.ijrgo-topbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ijrgo-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ijrgo-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ijrgo-topbar-link {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.ijrgo-topbar-link:hover {
    color: #f472b6 !important;
}

.ijrgo-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.ijrgo-topbar-sep {
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
}

/* ==========================================================================
   2. MAIN NAVIGATION HEADER (#FFFFFF)
   ========================================================================== */
.ijrgo-main-header {
    background: #ffffff;
    border-bottom: 1px solid #f0e2e7;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 101;
}

.ijrgo-nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo & Brand */
.ijrgo-logo-wrapper {
    flex-shrink: 0;
}

.ijrgo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
}

.ijrgo-brand > img {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

.ijrgo-brand-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ijrgo-brand-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ijrgo-brand-titles {
    display: flex;
    flex-direction: column;
}

.ijrgo-brand-acronym {
    font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #1e2640;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.ijrgo-brand-sub {
    font-size: 10.5px;
    font-weight: 500;
    color: #64748b;
    line-height: 1.25;
    max-width: 210px;
}

/* Navigation Links */
.ijrgo-navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

/* PKP Loaded Menu Styling */
.ijrgo-primary-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 10px;
    flex-wrap: nowrap;
}

.ijrgo-primary-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.ijrgo-primary-menu > li > a {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b !important;
    text-decoration: none !important;
    padding: 8px 3px 6px 3px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.ijrgo-primary-menu > li > a:hover {
    color: #d81b60 !important;
}

.ijrgo-primary-menu > li.active > a,
.ijrgo-primary-menu > li.current > a {
    color: #d81b60 !important;
    font-weight: 600;
    border-bottom-color: #d81b60;
}

.ijrgo-caret {
    display: none !important;
}

/* Dropdown Menu */
.ijrgo-primary-menu > li > ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1e2e7;
    border-radius: 8px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 105;
}

.ijrgo-primary-menu > li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ijrgo-primary-menu > li > ul > li > a {
    display: block;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: #334155 !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ijrgo-primary-menu > li > ul > li > a:hover {
    background-color: #fff0f5;
    color: #d81b60 !important;
}

/* Search Trigger - Modern Pink Tinted Pill matching reference mockup */
.ijrgo-nav-search-wrapper {
    flex-shrink: 0;
    margin-left: 6px;
}

.ijrgo-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b !important;
    text-decoration: none !important;
    padding: 7px 16px;
    background: #fff3f7;
    border: 1px solid #fce4ec;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ijrgo-search-btn svg {
    color: #d81b60;
    transition: transform 0.2s ease;
}

.ijrgo-search-btn:hover {
    color: #d81b60 !important;
    background: #ffe6f0;
    border-color: #f8bbd0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(216, 27, 96, 0.1);
}

.ijrgo-search-btn:hover svg {
    transform: scale(1.1);
}

/* Mobile Hamburger Toggle */
.ijrgo-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 105;
}

.ijrgo-hamburger-bar {
    width: 24px;
    height: 2.5px;
    background-color: #1e2640;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.ijrgo-mobile-toggle.active .ijrgo-hamburger-bar:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.ijrgo-mobile-toggle.active .ijrgo-hamburger-bar:nth-child(2) {
    opacity: 0;
}

.ijrgo-mobile-toggle.active .ijrgo-hamburger-bar:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ==========================================================================
   3. FOOTER (#052646)
   ========================================================================== */
.ijrgo-site-footer {
    background-color: #052646;
    color: #cbd5e1;
    padding: 60px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ijrgo-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.ijrgo-footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 2fr;
    gap: 40px;
    padding-bottom: 50px;
}

.ijrgo-footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ijrgo-footer-logo-dynamic {
    max-width: 240px;
    background: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.ijrgo-footer-logo-dynamic img {
    max-height: 48px;
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.ijrgo-footer-logo-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ijrgo-footer-logo-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ijrgo-footer-title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.ijrgo-footer-sub {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.25;
    display: block;
    max-width: 240px;
}

.ijrgo-footer-mission {
    font-size: 13.5px;
    line-height: 1.65;
    color: #94a3b8;
    margin: 0 0 24px 0;
    max-width: 320px;
}

/* Social Buttons */
.ijrgo-footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ijrgo-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: background-color 0.2s, transform 0.2s, color 0.2s;
}

.ijrgo-social-btn:hover {
    background: #d81b60;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Footer Navigation Columns */
.ijrgo-footer-heading {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: -0.2px;
}

.ijrgo-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ijrgo-footer-links li {
    margin-bottom: 10px;
}

.ijrgo-footer-links a {
    font-size: 13.5px;
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.ijrgo-footer-links a:hover {
    color: #f472b6 !important;
    padding-left: 3px;
}

/* Footer Contact Info */
.ijrgo-footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ijrgo-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #94a3b8;
}

.ijrgo-contact-item svg {
    color: #f472b6;
    flex-shrink: 0;
    margin-top: 3px;
}

.ijrgo-contact-item a {
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.ijrgo-contact-item a:hover {
    color: #f472b6 !important;
}

/* Sub-Footer */
.ijrgo-footer-bottom {
    background-color: #031c34;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 0;
    font-size: 12.5px;
    color: #64748b;
}

.ijrgo-footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ijrgo-footer-copy a,
.ijrgo-footer-pkp a {
    color: #94a3b8 !important;
    text-decoration: none !important;
}

.ijrgo-footer-copy a:hover,
.ijrgo-footer-pkp a:hover {
    color: #f472b6 !important;
}

/* ==========================================================================
   4. RESPONSIVE MEDIA QUERIES (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 1180px) {
    .ijrgo-mobile-toggle {
        display: flex;
        z-index: 106;
        position: relative;
    }

    .ijrgo-mobile-toggle.active {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 10000;
    }

    .ijrgo-mobile-toggle.active .ijrgo-hamburger-bar {
        background-color: #d81b60;
    }

    /* Off-canvas / Mobile Dropdown Navigation */
    .ijrgo-navbar-nav {
        position: fixed;
        top: 0;
        right: -340px;
        width: 310px;
        max-width: 86vw;
        height: 100vh;
        background: #ffffff;
        box-shadow: -8px 0 35px rgba(0, 0, 0, 0.25);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 72px 20px 30px 20px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        overflow-y: auto;
        box-sizing: border-box;
    }

    .ijrgo-navbar-nav.active {
        right: 0;
    }

    .ijrgo-primary-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .ijrgo-primary-menu > li {
        width: 100%;
        position: relative;
        margin: 0;
        padding: 0;
    }

    .ijrgo-primary-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 13px 4px;
        font-size: 15px;
        font-weight: 600;
        color: #1e293b !important;
        border-bottom: 1px solid #f1f5f9;
        text-decoration: none;
        transition: color 0.2s ease;
        box-sizing: border-box;
    }

    .ijrgo-primary-menu > li > a:hover {
        color: #d81b60 !important;
    }

    /* Submenu indicator chevron on parent items */
    .ijrgo-primary-menu > li.has-submenu > a::after {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 2px solid #94a3b8;
        border-bottom: 2px solid #94a3b8;
        transform: rotate(45deg);
        transition: transform 0.25s ease, border-color 0.25s ease;
        margin-left: 10px;
        display: inline-block;
        flex-shrink: 0;
    }

    .ijrgo-primary-menu > li.has-submenu.open > a::after {
        transform: rotate(-135deg);
        border-color: #d81b60;
    }

    /* Seamless Nested Submenu inside mobile menu */
    .ijrgo-primary-menu > li > ul {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2.5px solid #f8bbd0;
        background: #fdf2f8;
        border-radius: 0 8px 8px 0;
        padding: 6px 0 6px 14px;
        margin: 4px 0 10px 4px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        width: calc(100% - 4px);
        box-sizing: border-box;
        list-style: none;
    }

    .ijrgo-primary-menu > li.has-submenu.open > ul {
        display: block;
    }

    .ijrgo-primary-menu > li > ul > li {
        width: 100%;
    }

    .ijrgo-primary-menu > li > ul > li > a {
        display: block;
        padding: 8px 6px;
        font-size: 13.5px;
        font-weight: 500;
        color: #334155 !important;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .ijrgo-primary-menu > li > ul > li > a:hover {
        color: #d81b60 !important;
        background: transparent;
    }

    .ijrgo-nav-search-wrapper {
        margin-top: 18px;
        width: 100%;
    }

    .ijrgo-search-btn {
        width: 100%;
        justify-content: center;
        background: #fff0f5;
        color: #d81b60 !important;
        padding: 10px 16px;
        font-weight: 600;
        border: 1px solid #fce4ec;
        border-radius: 20px;
    }
}

@media (max-width: 991px) {
    .ijrgo-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .ijrgo-topbar {
        padding: 8px 0;
    }

    .ijrgo-topbar-container {
        flex-direction: column;
        gap: 6px;
        padding: 0 16px;
        text-align: center;
    }

    .ijrgo-topbar-left {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 12px;
        font-size: 12px;
    }

    .ijrgo-topbar-right {
        gap: 10px;
        font-size: 12.5px;
    }

    .ijrgo-brand > img {
        max-height: 38px;
    }

    .ijrgo-footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .ijrgo-footer-bottom-inner {
        flex-direction: column;
        text-align: center;
    }
}
