/* Modern Navbar Styles - OPTIMIZED FOR PERFORMANCE */

/* Header - MILITARY GREEN - NO HEAVY EFFECTS */
.header {
    background: linear-gradient(135deg, #2d5016 0%, #1a2f0a 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 3px solid #d4af37;
    transition: padding 0.2s ease;
}

/* Header saat scroll */
.header.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Logo Styles - SIMPLIFIED */
.header .logo {
    transition: transform 0.2s ease;
}

.header .logo:hover {
    transform: scale(1.02);
}

.header .logo img {
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.header .logo h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #d4af37 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5),
                 0 0 15px rgba(212, 175, 55, 0.5) !important;
    margin: 0;
    letter-spacing: 0.5px;
}

.header .logo i {
    font-size: 6rem;
    color: #d4af37 !important;
    filter: drop-shadow(0 2px 6px rgba(212, 175, 55, 0.5));
}

.header .logo img {
    width: 536px;
    height: 69px;
    margin-right: 15px;
    object-fit: contain;
}

/* Navigation Menu - SIMPLIFIED */
.navmenu {
    overflow: visible !important;
}

.navmenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    overflow: visible !important;
}

.navmenu a {
    color: #f5f3ed !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: 30px;
    background: rgba(107, 142, 35, 0.4) !important;
    transition: all 0.2s ease;
    display: inline-block;
    line-height: 1.5;
    border: 1px solid rgba(107, 142, 35, 0.5) !important;
}

.navmenu a:hover {
    background: rgba(107, 142, 35, 0.6) !important;
    border-color: rgba(107, 142, 35, 0.8) !important;
    transform: translateY(-2px);
}

/* Active menu item */
.navmenu a.active {
    background: linear-gradient(135deg, #d4af37 0%, #c9a02c 100%) !important;
    color: #1a2f0a !important;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4);
    border-color: #d4af37 !important;
    font-weight: 700;
}

.navmenu a.active:hover {
    color: #1a2f0a !important;
    background: linear-gradient(135deg, #c9a02c 0%, #b8941f 100%) !important;
}

/* Kontak Button - Special CTA Style */
.navmenu ul li:last-child a {
    background: linear-gradient(135deg, #d4af37 0%, #c9a02c 100%) !important;
    color: #1a2f0a !important;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px !important;
    border: 2px solid #d4af37 !important;
}

.navmenu ul li:last-child a i {
    margin: 0;
    font-size: 1.2rem;
}

.navmenu ul li:last-child a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.6);
    color: #1a2f0a !important;
    background: linear-gradient(135deg, #c9a02c 0%, #b8941f 100%) !important;
}

/* Icon dalam menu */
.navmenu a i {
    margin-right: 8px;
    vertical-align: middle;
    line-height: 1;
    font-size: 1.2rem;
}

/* Mobile Navigation Toggle - SIMPLIFIED */
.mobile-nav-toggle {
    background: linear-gradient(135deg, #d4af37 0%, #c9a02c 100%);
    border: none;
    color: #1a2f0a;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    z-index: 10000;
    flex-shrink: 0;
}

.mobile-nav-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.6);
}

.mobile-nav-toggle:active {
    transform: scale(0.95);
}

.mobile-nav-toggle i {
    font-size: 2rem;
    font-weight: bold;
}

/* Offcanvas Mobile Menu - MILITARY THEME */
.offcanvas-mobile {
    background: linear-gradient(135deg, #2d5016 0%, #1a2f0a 100%);
    border-left: 4px solid #d4af37;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4),
                -5px 0 20px rgba(212, 175, 55, 0.3);
    z-index: 9999;
}

/* Force offcanvas to always appear from right */
.offcanvas-mobile.offcanvas-end {
    right: 0 !important;
    left: auto !important;
    transform: translateX(100%) !important;
}

.offcanvas-mobile.offcanvas-end.show {
    transform: translateX(0) !important;
}

.offcanvas-mobile.offcanvas-end.showing {
    transform: translateX(0) !important;
}

.offcanvas-mobile.offcanvas-end.hiding {
    transform: translateX(100%) !important;
}

.offcanvas-mobile .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    background: rgba(0, 0, 0, 0.2);
}

.offcanvas-mobile .offcanvas-title {
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.offcanvas-mobile .offcanvas-title i {
    background: linear-gradient(135deg, #3498db 0%, #9b59b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
}

.offcanvas-mobile .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: all 0.3s;
}

.offcanvas-mobile .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Mobile Menu Items */
.offcanvas-mobile .mobile-menu {
    list-style: none;
    padding: 20px;
    margin: 0;
}

.offcanvas-mobile .mobile-menu li {
    margin-bottom: 8px;
}

.offcanvas-mobile .mobile-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.offcanvas-mobile .mobile-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #3498db, #9b59b6);
    transform: scaleY(0);
    transition: transform 0.4s;
}

.offcanvas-mobile .mobile-menu a:hover::before,
.offcanvas-mobile .mobile-menu a.active::before {
    transform: scaleY(1);
}

.offcanvas-mobile .mobile-menu a i {
    font-size: 1.3rem;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s;
}

.offcanvas-mobile .mobile-menu a:hover i,
.offcanvas-mobile .mobile-menu a.active i {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    transform: rotate(10deg) scale(1.1);
}

.offcanvas-mobile .mobile-menu a:hover,
.offcanvas-mobile .mobile-menu a.active {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(155, 89, 182, 0.2) 100%);
    color: white;
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.2);
}

/* Kontak Menu Item - Special Style in Mobile */
.offcanvas-mobile .mobile-menu li:nth-last-child(1) a {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2) 0%, rgba(46, 204, 113, 0.2) 100%);
    border: 2px solid rgba(39, 174, 96, 0.3);
}

.offcanvas-mobile .mobile-menu li:nth-last-child(1) a i {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.offcanvas-mobile .mobile-menu li:nth-last-child(1) a:hover,
.offcanvas-mobile .mobile-menu li:nth-last-child(1) a.active {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.3) 0%, rgba(46, 204, 113, 0.3) 100%);
    border-color: rgba(39, 174, 96, 0.6);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.3);
}

.offcanvas-mobile .mobile-menu li:nth-last-child(1) a::before {
    background: linear-gradient(180deg, #27ae60, #2ecc71);
}

/* Mobile Menu Footer Buttons */
.offcanvas-mobile .btn {
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s;
}

.offcanvas-mobile .btn-light {
    background: linear-gradient(135deg, #3498db, #9b59b6);
    border: none;
    color: white;
}

.offcanvas-mobile .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.offcanvas-mobile .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.offcanvas-mobile .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-2px);
}

/* Backdrop Fix - Force remove when offcanvas is closed */
.offcanvas-backdrop {
    transition: opacity 0.3s ease !important;
}

.offcanvas-backdrop.fade {
    opacity: 0;
}

.offcanvas-backdrop.show {
    opacity: 0.5;
}

/* Force hide backdrop when body doesn't have offcanvas-open class */
body:not(.offcanvas-open) .offcanvas-backdrop {
    display: none !important;
    opacity: 0 !important;
}

/* Responsive */
@media (max-width: 991px) {
    .navmenu {
        display: none !important;
    }
    
    .mobile-nav-toggle {
        display: flex !important;
    }
    
    /* Header lebih compact di mobile */
    .header {
        padding: 10px 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .header.scrolled {
        padding: 8px 0;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
    }
    
    .header .container {
        padding-left: 15px;
        padding-right: 15px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .header .logo {
        flex: 1;
        min-width: 0;
    }
    
    .header .logo h1 {
        font-size: 0.9rem;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header .logo img {
        width: 400px !important;
        height: 52px !important;
        margin-right: 12px !important;
    }
    
    .header .logo i {
        font-size: 4.5rem;
        margin-right: 12px;
    }
}

@media (min-width: 992px) {
    .mobile-nav-toggle {
        display: none !important;
    }
    
    .navmenu {
        display: block !important;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575px) {
    .header {
        padding: 8px 0;
    }
    
    .header .container {
        padding-left: 10px;
        padding-right: 10px;
        gap: 8px;
    }
    
    .header .logo {
        min-width: 0;
    }
    
    .header .logo h1 {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .header .logo img {
        width: 320px !important;
        height: 41px !important;
        margin-right: 10px !important;
    }
    
    .header .logo i {
        font-size: 3.8rem;
        margin-right: 10px;
    }
    
    .mobile-nav-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
    }
    
    .mobile-nav-toggle i {
        font-size: 1.6rem;
    }
    
    .mobile-nav-toggle:hover {
        box-shadow: 0 3px 12px rgba(212, 175, 55, 0.6);
    }
}
/* Very small devices */
@media (max-width: 375px) {
    .header .logo h1 {
        font-size: 0.7rem;
    }
    
    .header .logo img {
        width: 268px !important;
        height: 35px !important;
        margin-right: 8px !important;
    }
    
    .header .logo i {
        font-size: 3.5rem;
        margin-right: 8px;
    }
    
    .mobile-nav-toggle {
        width: 42px;
        height: 42px;
    }
    
    .mobile-nav-toggle i {
        font-size: 1.5rem;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Remove gap between navbar and content */
body {
    margin: 0;
    padding: 0;
}

.main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure no spacing after header */
.header + .main {
    margin-top: 0 !important;
}
