/* ==========================================================================
   SATUKARIRINDONESIA — UNIFIED RESPONSIVE NAVBAR SYSTEM
   Consistent across Beranda, Artikel, Beasiswa, and all pages.
   Zero logo stretching on all screen sizes (flex-shrink: 0 & object-fit: contain)
   ========================================================================== */

/* Container */
.site-nav-container {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
    width: 100%;
}

/* Announcement Top Bar */
.site-announcement-bar {
    background: #25447B;
    color: #ffffff;
    font-size: 0.8125rem;
    padding: 0.45rem 0;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.announcement-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.announcement-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.announcement-badge {
    color: #ffffff;
}

.announcement-cta {
    color: #ffffff;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.15s ease;
}

.announcement-cta:hover {
    color: #93C5FD;
}

.announcement-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.announcement-divider {
    color: rgba(255, 255, 255, 0.4);
}

.announcement-admin {
    color: #93C5FD;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.announcement-admin:hover {
    text-decoration: underline;
    color: #bfdbfe;
}

/* Main Sticky Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #dce2f0;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 1rem;
    position: relative;
}

/* Brand Logo (Zero-Stretch Guarantee) */
.site-brand {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;        /* NEVER compressed or squeezed by siblings */
    min-width: 0 !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

.site-logo {
    display: block !important;
    height: 48px !important;          /* Canonical height on desktop */
    width: auto !important;           /* Width dynamically follows natural aspect ratio */
    max-width: 180px !important;      /* Bounded max width */
    object-fit: contain !important;   /* Ensures no distortion or squashing */
    aspect-ratio: auto !important;    /* Strictly preserve intrinsic proportions */
    flex-shrink: 0 !important;
    transition: height 0.2s ease;
}

/* Desktop Navigation Menu Links */
.site-nav-links {
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.8vw, 26px);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav-links .nav-item {
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.875rem, 0.95vw, 0.95rem);
    color: #4a5677;
    padding: 0.35rem 0;
    position: relative;
    white-space: nowrap;
    transition: color 0.18s ease;
}

.site-nav-links .nav-item:hover,
.site-nav-links .nav-item.active {
    color: #30569D;
    font-weight: 600;
}

.site-nav-links .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2.5px;
    background: #30569D;
    border-radius: 2px;
}

/* Primary Nav CTA */
.site-nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1.5px solid #30569D;
    background: #30569D;
    color: #ffffff !important;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(48, 86, 157, 0.22);
}

.site-nav-cta:hover {
    background: #25447B;
    border-color: #25447B;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 68, 123, 0.32);
}

/* Menu Toggle Button (Mobile & Tablet) */
.site-menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    background: #f3f6fc;
    border: 1.5px solid #dce2f0;
    border-radius: 10px;
    padding: 8px 14px;
    color: #30569D;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-menu-btn:hover {
    background: #e9effa;
    border-color: #30569D;
    color: #25447B;
}

.site-menu-btn[aria-expanded="true"] {
    background: #30569D;
    border-color: #30569D;
    color: #ffffff;
}

.site-menu-icon {
    display: block;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.site-menu-btn[aria-expanded="true"] .site-menu-icon {
    transform: rotate(90deg);
}

/* Medium Desktop Screens (1025px - 1240px) */
@media (min-width: 1025px) and (max-width: 1240px) {
    .site-nav-links {
        gap: 12px;
    }
    .site-nav-links .nav-item {
        font-size: 0.84rem;
    }
    .site-nav-cta {
        padding: 8px 14px;
        font-size: 0.84rem;
    }
    .site-logo {
        height: 44px;
    }
}

/* Mobile & Tablet Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
    .site-header {
        position: sticky;
    }

    .site-menu-btn {
        display: inline-flex;
    }

    .site-nav-links {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 2px solid #dce2f0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px clamp(16px, 4vw, 40px) 24px;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 999;
    }

    .site-nav-links.on {
        display: flex;
        animation: slideDownNav 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .site-nav-links .nav-item {
        padding: 13px 6px;
        border-bottom: 1px solid #eef2f9;
        font-size: 1rem;
        font-weight: 500;
        color: #14224a;
        display: flex;
        align-items: center;
        justify-content: space-between;
        white-space: normal;
    }

    .site-nav-links .nav-item:hover,
    .site-nav-links .nav-item.active {
        color: #30569D;
        background: #f8fafc;
        padding-left: 10px;
        font-weight: 600;
    }

    .site-nav-links .nav-item.active::after {
        display: none;
    }

    .site-nav-cta {
        margin-top: 16px;
        width: 100%;
        padding: 13px 20px;
        font-size: 1rem;
    }
}

@keyframes slideDownNav {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small Smartphone Breakpoint (<= 640px) */
@media (max-width: 640px) {
    .site-nav-inner {
        height: 66px;
    }
    .site-nav-links {
        top: 66px;
    }
    .site-logo {
        height: 38px;
    }
    .announcement-right {
        display: none;
    }
    .announcement-left {
        justify-content: center;
        text-align: center;
        width: 100%;
        font-size: 0.75rem;
    }
}
