/* Responsive Header CSS - Full Mobile Optimization */
/* Memastikan header responsif dan full sesuai semua dimensi mobile */

/* ===== BASE HEADER STYLES ===== */
.main-header {
    position: relative;
    z-index: 1030;
}

.top-info-bar {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #0d6efd 0%, #0056b3 100%);
    position: relative;
    overflow: hidden;
}

.top-info-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.top-info-bar .small {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.top-info-bar .small:hover {
    color: white;
}

.top-info-bar i {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 0.3rem;
}

.navbar {
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #ffffff !important;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
}

.navbar-brand-section {
    flex: 1;
}

.navbar-brand {
    font-weight: 700;
    color: #333 !important;
    transition: all 0.3s ease;
    padding: 0;
    margin-right: 2rem;
}

.navbar-brand:hover {
    color: #0d6efd !important;
    text-decoration: none;
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
}

.brand-text {
    flex: 1;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d6efd;
    line-height: 1.2;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
}

/* ===== LARGE SCREENS (Desktop) ===== */
@media (min-width: 992px) {
    .navbar {
        padding: 1rem 0;
        min-height: 80px;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        font-weight: 500;
        color: #333 !important;
        transition: all 0.3s ease;
        border-radius: 5px;
        margin: 0 0.2rem;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(13, 110, 253, 0.1);
        color: #0d6efd !important;
    }
    
    .navbar-nav .nav-link.active {
        background-color: #0d6efd;
        color: white !important;
    }
}

/* ===== TABLET SCREENS (768px - 991px) ===== */
@media (max-width: 991.98px) and (min-width: 768px) {
    .navbar {
        padding: 0.8rem 0;
        min-height: 70px;
    }

    .navbar-logo {
        height: 45px;
    }

    .brand-title {
        font-size: 1.3rem;
    }

    .brand-subtitle {
        font-size: 0.85rem;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .mobile-menu-toggle {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
        min-height: 44px;
        min-width: 44px;
        border-radius: 6px;
    }
}

/* ===== LARGE MOBILE (576px - 767px) ===== */
@media (max-width: 767.98px) and (min-width: 576px) {
    .top-info-bar {
        display: none !important;
    }

    .navbar {
        padding: 0.6rem 0;
        min-height: 60px;
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    .navbar-brand-section {
        flex: 1;
        max-width: calc(100% - 100px);
    }

    .navbar-logo {
        height: 40px;
        margin-right: 0.8rem;
    }

    .brand-title {
        font-size: 1.1rem;
        line-height: 1.1;
    }

    .brand-subtitle {
        display: none;
    }

    .container {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    .mobile-menu-toggle {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
        min-height: 44px;
        min-width: 80px;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .mobile-menu-toggle i {
        margin-right: 0.3rem;
    }
}

/* ===== STANDARD MOBILE (375px - 575px) ===== */
@media (max-width: 575.98px) and (min-width: 375px) {
    .top-info-bar {
        display: none !important;
    }

    .navbar {
        padding: 0.5rem 0;
        min-height: 56px;
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    .navbar-brand-section {
        flex: 1;
        max-width: calc(100% - 90px);
    }

    .navbar-logo {
        height: 36px;
        margin-right: 0.6rem;
    }

    .brand-title {
        font-size: 1rem;
        line-height: 1.1;
    }

    .brand-subtitle {
        display: none;
    }

    .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .mobile-menu-toggle {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
        min-height: 40px;
        min-width: 75px;
        border-radius: 5px;
        flex-shrink: 0;
    }

    .mobile-menu-toggle i {
        margin-right: 0.25rem;
        font-size: 0.8rem;
    }
}

/* ===== SMALL MOBILE (320px - 374px) ===== */
@media (max-width: 374.98px) {
    .top-info-bar {
        display: none !important;
    }

    .navbar {
        padding: 0.4rem 0;
        min-height: 52px;
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    .navbar-brand-section {
        flex: 1;
        max-width: calc(100% - 80px);
    }

    .navbar-logo {
        height: 32px;
        margin-right: 0.5rem;
    }

    .brand-title {
        font-size: 0.9rem;
        line-height: 1.1;
    }

    .brand-subtitle {
        display: none;
    }

    .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .mobile-menu-toggle {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
        min-height: 36px;
        min-width: 65px;
        border-radius: 4px;
        flex-shrink: 0;
    }

    .mobile-menu-toggle i {
        margin-right: 0.2rem;
        font-size: 0.75rem;
    }

    .mobile-menu-toggle span {
        display: none; /* Hide "Menu" text on very small screens */
    }
}

/* ===== EXTRA SMALL MOBILE (< 320px) ===== */
@media (max-width: 319.98px) {
    .navbar {
        padding: 0.3rem 0;
        min-height: 48px;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
        padding: 0.15rem 0;
        max-width: calc(100% - 60px);
    }
    
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .mobile-menu-toggle {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
        min-height: 32px;
        min-width: 50px;
        border-radius: 3px;
    }
    
    .mobile-menu-toggle i {
        margin-right: 0;
        font-size: 0.7rem;
    }
    
    .mobile-menu-toggle span {
        display: none;
    }
}

/* ===== BANNER/HEADER CONTENT RESPONSIVENESS ===== */
@media (max-width: 767.98px) {
    /* Banner height adjustments */
    .fade-banner-container,
    .banner-carousel .carousel-item,
    .hero-section {
        height: 300px !important;
        min-height: 300px !important;
    }
    
    /* Banner text responsiveness */
    .fade-banner-title,
    .banner-title,
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.8rem !important;
    }
    
    .fade-banner-subtitle,
    .banner-subtitle,
    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.6rem !important;
    }
    
    .fade-banner-description,
    .banner-description,
    .hero-section .lead {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.2rem !important;
    }
    
    .fade-banner-button,
    .banner-button,
    .hero-section .btn {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.9rem !important;
        border-radius: 20px !important;
    }
}

@media (max-width: 575.98px) {
    .fade-banner-container,
    .banner-carousel .carousel-item,
    .hero-section {
        height: 250px !important;
        min-height: 250px !important;
    }
    
    .fade-banner-title,
    .banner-title,
    .hero-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.6rem !important;
    }
    
    .fade-banner-subtitle,
    .banner-subtitle,
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .fade-banner-description,
    .banner-description,
    .hero-section .lead {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    .fade-banner-button,
    .banner-button,
    .hero-section .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 374.98px) {
    .fade-banner-container,
    .banner-carousel .carousel-item,
    .hero-section {
        height: 220px !important;
        min-height: 220px !important;
    }
    
    .fade-banner-title,
    .banner-title,
    .hero-title {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .fade-banner-subtitle,
    .banner-subtitle,
    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .fade-banner-description,
    .banner-description,
    .hero-section .lead {
        font-size: 0.85rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .fade-banner-button,
    .banner-button,
    .hero-section .btn {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }
}

/* ===== ACCESSIBILITY & TOUCH OPTIMIZATION ===== */
@media (max-width: 767.98px) {
    /* Ensure all clickable elements are touch-friendly */
    .navbar-brand,
    .mobile-menu-toggle,
    .btn,
    a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve focus visibility */
    .navbar-brand:focus,
    .mobile-menu-toggle:focus {
        outline: 2px solid #0d6efd;
        outline-offset: 2px;
    }
    
    /* Prevent horizontal scroll */
    body, html {
        overflow-x: hidden;
    }
    
    /* Optimize scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== LOGO OPTIMIZATION ===== */
.navbar-logo {
    height: 50px;
    width: auto;
    margin-right: 1rem;
    transition: all 0.3s ease;
    object-fit: contain;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.05);
}

/* ===== BRAND TEXT OPTIMIZATION ===== */
.brand-title {
    color: #0d6efd !important;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.brand-subtitle {
    color: #6c757d;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
    font-style: italic;
}

.navbar-brand:hover .brand-title {
    color: #0056b3 !important;
}

@media (max-width: 767.98px) {
    .navbar-logo {
        height: 40px;
        margin-right: 0.8rem;
    }

    .brand-title {
        font-size: 1.1rem;
    }

    .brand-subtitle {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-logo {
        height: 36px;
        margin-right: 0.6rem;
    }

    .brand-title {
        font-size: 1rem;
    }
}

@media (max-width: 374.98px) {
    .navbar-logo {
        height: 32px;
        margin-right: 0.5rem;
    }

    .brand-title {
        font-size: 0.9rem;
    }
}

/* ===== STICKY HEADER BEHAVIOR ===== */
@media (max-width: 767.98px) {
    .navbar.sticky-top {
        position: sticky;
        top: 0;
        z-index: 1030;
        background-color: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .navbar.scrolled {
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
        background-color: rgba(255, 255, 255, 0.98) !important;
    }
}
