/* Color Variables */
:root {
    --primary-color: #0056b3; /* Official Govt Blue */
    --secondary-color: #ff9900; /* Adjusted the orange slightly to match */
    --text-dark: #333333;
    --text-light: #ffffff;
}

/* Global Styles */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    padding: 15px 0;
    transition: all 0.3s ease;
}
.navbar-brand {
    color: var(--secondary-color) !important;
    font-size: 1.5rem;
    letter-spacing: 1px;
}
.nav-link {
    color: var(--text-light) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin: 0 10px;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--secondary-color) !important;
}
/* Active Menu Item Styling */
.navbar-nav .nav-link.active,
.navbar-nav .nav-item.dropdown > .nav-link.active {
    color: var(--secondary-color) !important; /* Forces the orange highlight */
}

/* Optional: Adds a sleek line under the active link for a premium look */
@media (min-width: 992px) {
    .navbar-nav .nav-link.active {
        position: relative;
    }
    .navbar-nav .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 10px;
        right: 10px;
        height: 2px;
        background-color: var(--secondary-color);
        border-radius: 2px;
    }
}
/* Dropdown Menu Styling */
.dropdown-menu {
    background-color: var(--primary-color); /* Navy blue background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-top: 10px;
}

.dropdown-item {
    color: var(--text-light); /* White text */
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 10px 20px;
    transition: all 0.3s;
}

.dropdown-item:hover, 
.dropdown-item:focus, 
.dropdown-item:active, 
.dropdown-item.active {
    background-color: var(--secondary-color) !important; /* Forces the orange highlight */
    color: var(--primary-color) !important; /* Forces the navy text */
}
.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Dropdown Fix */
@media (max-width: 991px) {
    .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.1); /* Slightly darker on mobile so it stands out */
        border: none;
        box-shadow: none;
    }
}


/* Hero Carousel Section */
.hero-slider, .carousel, .carousel-inner, .carousel-item {
    height: 100vh;
}

.carousel-item img {
    height: 100vh;
    object-fit: cover;
}

/* Dark overlay for images so text is easy to read */
.carousel-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 37, 69, 0.65); /* Uses your primary navy blue with transparency */
    z-index: 1;
}

.carousel-caption {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2; /* Places text above the dark overlay */
    padding-top: 80px; /* Accounts for the fixed navbar */
}

.carousel-caption h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.carousel-caption p {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    .carousel-caption p {
        font-size: 1rem;
    }
}
.btn-custom {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}
.btn-custom:hover {
    background-color: #e5940f;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Section Formatting */
.section-padding {
    padding: 80px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}
.section-title::after {
    content: '';
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

/* About Section */
.about-text {
    line-height: 1.8;
}
.stat-box {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}
.stat-box:hover {
    transform: translateY(-10px);
}
.stat-icon {
    font-size: 40px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

/* Projects Section */
.filter-btn {
    background: none;
    border: 2px solid var(--primary-color);
    padding: 8px 20px;
    margin: 0 5px;
    border-radius: 25px;
    font-weight: 600;
    color: var(--primary-color);
    transition: all 0.3s;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
}
.project-card {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}
.project-img {
    height: 250px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s;
}
.project-card:hover .project-img {
    transform: scale(1.1);
}
.project-info {
    padding: 20px;
    background: #fff;
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 50px 0 20px;
}
.footer-links a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--secondary-color);
}

/* =========================================
   Mobile Responsiveness Fixes
   ========================================= */

/* Tablet & Mobile Layout Adjustments */
@media (max-width: 991px) {
    /* Gives the mobile dropdown menu a solid background so it doesn't overlap text */
    .navbar-collapse {
        background-color: var(--primary-color);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }
    
    .nav-link {
        margin: 5px 0;
        text-align: center;
    }
}

/* Mobile-Specific Adjustments (Phones) */
@media (max-width: 768px) {
    /* 1. Fix Hero Slider Text Overflow */
    .carousel-caption {
        left: 5%;
        right: 5%; /* Expands the width the text is allowed to take up */
        padding-top: 60px;
    }
    
    .carousel-caption h1 {
        font-size: 2.2rem !important; /* Forces a smaller, mobile-friendly font size */
        margin-bottom: 15px;
        line-height: 1.2;
    }
    
    .carousel-caption p {
        font-size: 1rem !important;
        margin-bottom: 20px;
    }

    /* 2. Adjust Spacing */
    .section-padding {
        padding: 50px 0; /* Reduces massive empty gaps on small screens */
    }

    /* 3. Stack Project Filter Buttons neatly */
    .filter-btn {
        margin-bottom: 10px;
        display: inline-block;
        width: 100%; 
        max-width: 250px;
    }

    /* 4. Fix Button Sizing */
    .btn-custom {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* 5. About Section image spacing */
    .about-text {
        margin-top: 30px;
    }
}

/* Very Small Devices */
@media (max-width: 400px) {
    .carousel-caption h1 {
        font-size: 1.8rem !important;
    }
}
/* Reduce the height of the hero slideshow on mobile devices */
@media (max-width: 768px) {
    .hero-slider, 
    .carousel, 
    .carousel-inner, 
    .carousel-item {
        height: 60vh; /* Reduces height to 60% of the screen */
        min-height: 400px; /* Ensures it never gets too small on tiny phones */
    }

    .carousel-item img {
        height: 60vh;
        min-height: 400px;
        object-fit: cover;
    }

    /* Adjust the caption spacing so it stays centered in the shorter box */
    .carousel-caption {
        padding-top: 20px !important; 
        justify-content: center !important;
    }
}
/* =========================================
   Floating WhatsApp Button
   ========================================= */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366; /* Official WhatsApp Green */
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000; /* Ensures it sits on top of all other content */
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.whatsapp-float:hover, 
.whatsapp-float:focus, 
.whatsapp-float:active {
    background-color: #128C7E; /* Darker green on hover */
    color: #fff;
    transform: scale(1.1);
    animation: none; /* Stops pulsing when hovering */
}

/* Pulse Animation */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Mobile Adjustments for WhatsApp Button */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 30px;
    }
}
/* =========================================
   Inner Page Headers (Blurred Background)
   ========================================= */
.page-header {
    position: relative;
    padding: 150px 0 80px 0; /* Extra padding on top to clear the fixed navbar */
    color: var(--text-light);
    overflow: hidden; /* Keeps the blurred edges from spilling over the sides */
    z-index: 1;
}

/* 1. The Image Layer (This gets blurred) */
.page-header::before {
    content: '';
    position: absolute;
    /* We pull it out by 10px on all sides so the blurred edges don't show white gaps */
    top: -10px; 
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: url('images/header.jpg') center/cover no-repeat;
    filter: blur(6px); /* Adjust this number (e.g., 4px, 8px) to make it more or less blurry */
    z-index: -2;
}

/* 2. The Color Overlay (Ensures text is easy to read over the blur) */
.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 37, 69, 0.75); /* Your primary navy color with 75% transparency */
    z-index: -1;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.page-header p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
}
/* =========================================
   Vertical Timeline (About Page)
   ========================================= */
.timeline {
    border-left: 3px solid var(--primary-color);
    padding: 0 0 0 30px;
    margin: 20px 0 0 20px;
    position: relative;
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(10px);
    border-left: 4px solid var(--secondary-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -41px; /* Centers the dot on the line */
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-date {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
}
/* =========================================
   Vision & Mission Card Animations
   ========================================= */
.animated-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Lifts the card up and deepens the shadow when hovered */
.animated-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

/* Animates the icon inside the card */
.animated-card i {
    transition: transform 0.4s ease;
}

/* Makes the icon scale up slightly when the card is hovered */
.animated-card:hover i {
    transform: scale(1.2);
}
/* =========================================
   UX Polish: Preloader & Back to Top
   ========================================= */

/* Preloader Animation */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(11, 37, 69, 0.1);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 
    to { transform: rotate(360deg); } 
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 110px; /* Sits just above your WhatsApp button */
    right: 20px;
    background: var(--primary-color);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: none; /* Hidden until scrolled */
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 98;
    cursor: pointer;
    transition: all 0.3s ease;
}
#backToTop:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-4px);
}