/* ========================================
   RESPONSIVE STYLES FOR IKBSH THEME
   ======================================== */

/* ========================================
   GLOBAL — Prevent horizontal overflow (mobile menu fix)
   ======================================== */
/* Prevent ANY horizontal overflow — clip works on fixed elements unlike hidden */
html {
    overflow-x: clip;
}

/* Sticky footer layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: clip;
}

.site-main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

/* ========================================
   MAIN CONTENT SPACING
   ======================================== */
.site-main {
    padding-top: 3rem;
}

/* Page Header Spacing */
.page-header,
.archive-header {
    margin-bottom: 2.5rem;
}

/* ========================================
   HEADER & NAVIGATION - MODERN DESIGN
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.navbar {
    padding: 0.75rem 0;
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

/* Brand/Logo - Larger and More Prominent */
.navbar-brand {
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.brand-link:hover {
    transform: scale(1.02);
}

.site-logo,
.custom-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.site-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary-navy);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.site-tagline {
    font-size: 0.875rem;
    color: var(--color-dark-gray);
    line-height: 1.2;
    font-weight: 400;
}

/* Navigation Menu - Modern Spacing */
.navbar-menu {
    flex-grow: 1;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.875rem 1.5rem;
    color: var(--color-text-dark);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: var(--color-primary-gold);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--color-primary-navy);
    background: rgba(30, 58, 95, 0.05);
}

.nav-link:hover::before,
.nav-item.current-menu-item .nav-link::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-item.current-menu-item .nav-link {
    color: var(--color-primary-navy);
    background: rgba(30, 58, 95, 0.08);
}

/* Dropdown Menu - Clean and Modern */
.nav-item.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle::after {
    content: '▾';
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--color-primary-gold);
}

.nav-item.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--color-white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 240px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.875rem 1.25rem;
    color: var(--color-text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--gradient-gold);
    color: var(--color-white);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(244, 164, 48, 0.3);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 28px;
}

.hamburger .bar {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-primary-navy);
    border-radius: 3px;
    transition: var(--transition-fast);
}

.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   FOOTER STYLES
   ======================================== */
.site-footer {
    background: var(--gradient-navy);
    color: var(--color-white);
    margin-top: var(--spacing-xl);
}

.footer-main {
    padding: var(--spacing-lg) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary-gold);
    margin-bottom: 0.5rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.footer-logo .custom-logo {
    width: 80px;
    height: auto;
    margin-top: 1rem;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--color-primary-gold);
    transform: translateX(5px);
}

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

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.footer-contact .icon {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: var(--color-primary-gold);
}

.footer-contact a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--color-primary-gold);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-white);
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--color-primary-gold);
    color: var(--color-white);
    transform: translateY(-3px);
}

/* Footer Bottom */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.heart {
    color: var(--color-primary-gold);
    animation: pulse 1.5s infinite;
}

/* ========================================
   MOBILE RESPONSIVE (TABLET)
   ======================================== */
@media (max-width: 1024px) {
    .nav-list {
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }

    .site-logo,
    .custom-logo {
        width: 50px;
        height: 50px;
    }

    .site-name {
        font-size: 1.3rem;
    }
}

/* ========================================
   MOBILE RESPONSIVE (PHONE)
   ======================================== */
@media (max-width: 768px) {

    /* Adjust content spacing for mobile */
    .site-main {
        padding-top: 2rem;
    }

    .page-header,
    .archive-header {
        margin-bottom: 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* Mobile menu overlay (separate element created by JS) */
    .navbar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 998;
    }

    .navbar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .navbar-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        max-width: 80vw;
        height: 100%;
        background: var(--color-white);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        padding: 5rem 0 2rem;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.35s;
        overflow-y: auto;
        z-index: 999;
    }

    .navbar-menu.active {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 1rem;
    }

    .nav-item {
        margin-bottom: 0.5rem;
    }

    .nav-link {
        padding: 1rem 1.25rem;
        border-radius: 8px;
        font-size: 1rem;
        color: var(--color-text-dark);
        background: transparent;
        border: none;
    }

    .nav-link::before {
        display: none;
    }

    .nav-link:hover,
    .nav-item.current-menu-item .nav-link {
        background: rgba(244, 164, 48, 0.1);
        color: var(--color-primary-gold);
    }

    /* Dropdown Styling for Mobile */
    .nav-item.dropdown .dropdown-toggle {
        justify-content: space-between;
        width: 100%;
    }

    .nav-item.dropdown .dropdown-toggle::after {
        transition: transform 0.3s ease;
        color: var(--color-primary-gold);
    }

    .nav-item.dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 8px;
        background: var(--color-light-gray);
        border: none;
        padding: 0;
        margin-top: 0.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-item.dropdown.active .dropdown-menu {
        max-height: 300px;
        padding: 0.5rem;
    }

    .dropdown-item {
        padding: 0.875rem 1.25rem;
        border-radius: 6px;
        margin-bottom: 0.25rem;
        font-size: 0.95rem;
        background: transparent;
    }

    .dropdown-item:hover {
        background: var(--gradient-gold);
        color: var(--color-white);
        transform: translateX(0);
    }

    /* Logo dan Brand Text dalam mode mobile */
    .brand-text {
        display: flex !important;
        flex-direction: column;
        gap: 0;
    }

    .site-name {
        font-size: 1.25rem;
        text-transform: uppercase;
        font-weight: 700;
    }

    .site-tagline {
        display: none;
    }

    .site-logo,
    .custom-logo {
        width: 50px;
        height: 50px;
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

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

@media (max-width: 480px) {
    .navbar-menu {
        width: 85vw;
        max-width: 320px;
    }

    .site-logo,
    .custom-logo {
        width: 45px;
        height: 45px;
    }
}