/* ==========================================================================
   CSS Variables & Global Resets
   ========================================================================== */
:root {
    --primary: #0a192f;      /* Midnight Blue */
    --primary-dark: #060d1a;
    --accent: #c5a059;       /* Luxury Gold */
    --accent-hover: #b08d4a;
    --text-light: #e6f1ff;
    --white: #ffffff;
    --transition-speed: 0.3s;
}

body { 
    font-family: 'Poppins', sans-serif; 
    background-color: var(--white); 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .navbar-brand { 
    font-family: 'Montserrat', sans-serif; 
}

.fw-black { font-weight: 900; }
.tracking-widest { letter-spacing: 2px; }

/* --- WEBKIT CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--primary-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.top-nav { 
    background: var(--primary-dark); 
    color: var(--accent); 
    font-size: 13px; 
    padding: 10px 0; 
    border-bottom: 1px solid rgba(197, 160, 89, 0.2); 
}

.navbar { 
    background: rgba(10, 25, 47, 0.85); 
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    -webkit-transition: all var(--transition-speed) ease;
    transition: all var(--transition-speed) ease;
    padding: 15px 0;
}

.navbar.scrolled {
    background: var(--primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    padding: 10px 0;
}

/* --- COMBINED LOGO STYLING --- */
.navbar-brand { 
    line-height: 1;
    padding: 0;
}

.brand-logo { 
    max-height: 50px; 
    width: auto; 
    display: block; 
}

.text-logo {
    text-align: left;
}

.text-logo .logo-main {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 2px;
}

.text-logo .logo-sub {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 1px;
    line-height: 1.2;
    margin-top: 2px;
}

.custom-link { 
    color: var(--text-light) !important; 
    font-size: 0.9rem;
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-left: 1.5rem; 
    position: relative;
    -webkit-transition: color var(--transition-speed);
    transition: color var(--transition-speed);
}

.custom-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    -webkit-transition: width 0.3s ease;
    transition: width 0.3s ease;
}

.custom-link:hover { color: var(--accent) !important; }
.custom-link:hover::after { width: 100%; }

/* --- Custom Buttons --- */
.custom-btn {
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
.custom-btn:hover {
    background-color: var(--accent);
    color: var(--primary-dark) !important;
    -webkit-box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
}
.custom-btn-solid {
    background-color: var(--accent);
    border: none;
    color: var(--primary-dark);
    font-weight: 700;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
.custom-btn-solid:hover {
    background-color: var(--accent-hover);
    color: var(--primary-dark);
    -webkit-box-shadow: 0 8px 20px rgba(197, 160, 89, 0.4);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.4);
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
}

/* ==========================================================================
   Hero Slider
   ========================================================================== */
.hero-slider .carousel-item { 
    height: 100vh; 
    min-height: 500px; 
}
.hero-img { 
    height: 100%; 
    width: 100%; 
    object-fit: cover; 
    -webkit-filter: brightness(0.4);
    filter: brightness(0.4); 
}
.carousel-caption { 
    bottom: 30%; 
    text-align: left; 
    max-width: 800px; 
    left: 10%; 
    right: 10%;
    z-index: 10; 
}
.carousel-caption h1 { 
    font-size: 4.5rem; 
    font-weight: 900;
    line-height: 1.1; 
    margin-bottom: 20px; 
    text-shadow: 2px 4px 15px rgba(0,0,0,0.7); 
}
.carousel-caption p { 
    font-size: 1.2rem; 
    border-left: 4px solid var(--accent); 
    padding-left: 20px; 
    color: var(--text-light);
    font-weight: 300;
}

.webkit-gradient-text {
    background: -webkit-linear-gradient(45deg, var(--accent), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Stats Section (Glassmorphism)
   ========================================================================== */
.stats-section { 
    background: -webkit-linear-gradient(135deg, var(--primary), #112240);
    background: linear-gradient(135deg, var(--primary), #112240); 
    padding: 50px 30px; 
    margin-top: -80px; 
    border-radius: 20px; 
}
.stat-card { 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    padding: 30px 15px; 
    border-radius: 15px; 
    color: var(--white); 
    -webkit-transition: -webkit-transform 0.4s ease, border-color 0.4s ease;
    transition: transform 0.4s ease, border-color 0.4s ease; 
}
.webkit-glass {
    background: rgba(255, 255, 255, 0.03);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.stat-card:hover { 
    -webkit-transform: translateY(-10px);
    transform: translateY(-10px); 
    border-color: var(--accent); 
    background: rgba(197, 160, 89, 0.05);
}
.stat-card h2 { color: var(--accent); font-size: 3rem; font-weight: 800; }

/* ==========================================================================
   About Section
   ========================================================================== */
.experience-badge { 
    background: var(--accent); 
    color: var(--primary); 
    width: 160px; 
    height: 160px; 
    border-radius: 50%; 
    border: 8px solid var(--white); 
    position: absolute;
    top: -30px;
    left: -30px;
}
.section-title { 
    font-size: 2.5rem; 
    color: var(--primary); 
    font-weight: 800;
    position: relative; 
    margin-bottom: 30px; 
    padding-bottom: 15px;
}
.section-title::after { 
    content: ''; 
    width: 60px; 
    height: 4px; 
    background: var(--accent); 
    position: absolute; 
    bottom: 0; 
    left: 0; 
}
.hover-lift {
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}
.hover-lift:hover {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
}
.webkit-box-shadow {
    -webkit-box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* ==========================================================================
   Portfolio Container
   ========================================================================== */
.portfolio-container { 
    padding: 80px 0; 
    background: #f8f9fa; 
}
.portfolio-container .section-title::after { left: 50%; -webkit-transform: translateX(-50%); transform: translateX(-50%); }

.portfolio-item { 
    position: relative; 
    overflow: hidden; 
    border-radius: 12px; 
    height: 320px; 
    -webkit-box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
}
.portfolio-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    -webkit-transition: -webkit-transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
}
.portfolio-overlay { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: -webkit-linear-gradient(bottom, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0.2) 100%);
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0.2) 100%); 
    display: flex; flex-direction: column; justify-content: flex-end; 
    padding: 30px 20px; 
    opacity: 0; 
    -webkit-transition: all 0.5s ease;
    transition: all 0.5s ease; 
    -webkit-transform: translateY(20px);
    transform: translateY(20px);
}
.portfolio-item:hover img { 
    -webkit-transform: scale(1.08);
    transform: scale(1.08); 
}
.portfolio-item:hover .portfolio-overlay { 
    opacity: 1; 
    -webkit-transform: translateY(0);
    transform: translateY(0); 
}
.portfolio-overlay h4 { color: var(--accent); font-weight: 700; font-size: 1.2rem; margin-bottom: 5px; }
.portfolio-overlay p { color: #ccc; font-size: 0.9rem; margin-bottom: 15px; }

/* ==========================================================================
   Video Section
   ========================================================================== */
.video-section { 
    background: var(--primary); 
    padding: 80px 0; 
    color: white; 
}
.video-wrapper { 
    border: 2px solid rgba(197, 160, 89, 0.3); 
    border-radius: 15px; 
    overflow: hidden; 
    -webkit-box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6); 
    padding: 8px;
    background: rgba(255,255,255,0.02);
}
.video-wrapper .ratio { border-radius: 10px; overflow: hidden; }

/* ==========================================================================
   Certifications & Govt Partner
   ========================================================================== */
.cert-box { 
    padding: 25px 15px; 
    border: 1px solid #eaeaea; 
    border-radius: 12px; 
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease; 
    background: white; 
}
.cert-box i, .cert-box .bi { 
    font-size: 2.5rem; 
    margin-bottom: 15px; 
    -webkit-transition: -webkit-transform 0.3s ease; 
    transition: transform 0.3s ease;
}
.cert-box:hover { 
    background: var(--accent); 
    color: white; 
    border-color: var(--accent); 
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
}
.cert-box:hover h5, .cert-box:hover p { color: white !important; }
.cert-box:hover i, .cert-box:hover .bi { 
    color: white !important; 
    -webkit-transform: scale(1.1); 
    transform: scale(1.1); 
}

.govt-strip { 
    background: #f4f5f7; 
    padding: 50px 0; 
    border-top: 4px solid var(--accent); 
}

/* --- Brand Card Custom Styles --- */
.brand-card {
    border-radius: 12px;
    border: 1px solid transparent;
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease;
}

.brand-card:hover {
    border-color: var(--accent);
}

.govt-logo { 
    max-height: 60px; 
    -webkit-filter: grayscale(1);
    filter: grayscale(1); 
    opacity: 0.5; 
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease; 
}

.govt-text {
    -webkit-transition: all 0.4s ease;
    transition: all 0.4s ease; 
}

/* Card Hover activates child elements */
.brand-card:hover .govt-logo { 
    -webkit-filter: grayscale(0);
    filter: grayscale(0); 
    opacity: 1; 
}

.brand-card:hover .govt-text {
    color: var(--primary) !important;
    opacity: 1 !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer { background: var(--primary-dark); padding: 60px 0 20px; }
footer h4 { 
    color: var(--white); 
    font-size: 1.2rem; 
    border-bottom: 2px solid var(--accent); 
    display: inline-block; 
    padding-bottom: 8px; 
    margin-bottom: 20px; 
}

.footer-brand {
    font-weight: 900;
    font-size: 1.2rem;
    line-height: 1.4;
}

.text-light-muted { color: #8892b0; font-size: 0.95rem; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { 
    color: #8892b0; 
    text-decoration: none; 
    font-size: 0.95rem;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease; 
    display: inline-block;
}
.footer-links a:hover { 
    color: var(--accent); 
    -webkit-transform: translateX(6px);
    transform: translateX(6px); 
}
.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.05);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    -webkit-transition: background 0.3s ease, -webkit-transform 0.3s ease;
    transition: background 0.3s ease, transform 0.3s ease;
}
.social-icons a:hover {
    background: var(--accent);
    -webkit-transform: translateY(-3px);
    transform: translateY(-3px);
}

/* ==========================================================================
   Mobile Bottom Navigation
   ========================================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    justify-content: space-around;
    align-items: center;
    height: 70px;
    z-index: 1030; /* Ensure this is lower than offcanvas */
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav .nav-item {
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.5rem;
    margin-bottom: 3px;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item:active {
    color: var(--accent); 
}

/* ==========================================================================
   Professional Mobile Sidebar (Offcanvas)
   ========================================================================== */
.professional-sidebar {
    background-color: var(--primary-dark) !important;
    border-left: 2px solid var(--accent);
    width: 300px;
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    z-index: 1045 !important; /* Ensure sidebar is above everything */
}

.sidebar-nav .nav-link {
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.sidebar-nav .nav-link i {
    color: var(--accent);
    font-size: 1.3rem;
    margin-right: 15px;
    width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:active,
.sidebar-nav .nav-link:focus {
    background-color: rgba(197, 160, 89, 0.1);
    color: var(--accent);
    transform: translateX(5px);
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.1);
}

/* ==========================================================================
   Mobile Responsiveness (Media Queries)
   ========================================================================== */

/* Tablet & Smaller Desktop */
@media (max-width: 991px) {
    body {
        padding-bottom: 75px; 
    }
    
    .navbar-collapse {
        background: var(--primary);
        padding: 20px;
        border-radius: 10px;
        margin-top: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    .custom-link { 
        margin-left: 0; 
        margin-bottom: 15px; 
        display: inline-block;
    }
    .hero-slider .carousel-item { height: 75vh; min-height: 500px; }
    .carousel-caption { bottom: 20%; left: 5%; right: 5%; text-align: center; }
    .carousel-caption h1 { font-size: 3.5rem; }
    
    .section-title::after { 
        left: 50%; 
        -webkit-transform: translateX(-50%); 
        transform: translateX(-50%); 
    }
    .experience-badge { 
        width: 130px; 
        height: 130px; 
        left: 50%; 
        top: -40px; 
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
        border-width: 6px; 
    }
    .experience-badge span.display-4 { font-size: 2.5rem !important; }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .stats-section { padding: 30px 15px; margin-top: -50px;}
    .stat-card { padding: 20px 10px; }
    .stat-card h2 { font-size: 2rem; }
    
    .carousel-caption h1 { font-size: 2.5rem; }
    .carousel-caption p { font-size: 1rem; border-left: none; padding-left: 0; }
    
    .section-title { font-size: 2rem; }
    .portfolio-item { height: 280px; }
    
    .video-section { padding: 60px 0; }
    footer { padding: 50px 0 20px; }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    .carousel-caption h1 { font-size: 2.2rem; margin-bottom: 15px; }
    .custom-btn-solid { width: 100%; max-width: 250px; }
    
    .stat-card h2 { font-size: 1.5rem; }
    .stat-card p { font-size: 0.75rem; }
    
    .section-title { font-size: 1.75rem; }
    .experience-badge { width: 110px; height: 110px; top: -30px; }
    .experience-badge span.display-4 { font-size: 2rem !important; }
    .experience-badge span.tracking-widest { font-size: 0.8rem; }
    
    .govt-logo { max-height: 45px; }
    .govt-strip { padding: 40px 0; }
}