/* ==========================================================================
   Global & Typography
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #2c3e50;
    background-color: #ffffff;
    line-height: 1.7;
    margin: 0;
    padding-top: 80px;
}

h1, h2, h3, h4 {
    font-weight: 700;
    color: #1a237e; /* deep indigo for headings */
}

/* Containers */
.container {
    max-width: 1240px;
}

/* ==========================================================================
   Navbar – Light & Modern
   ========================================================================== */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
    padding: 1rem 0;
}

.navbar-brand img {
    max-height: 52px;
}

.nav-link {
    color: #2c3e50 !important;
    font-weight: 500;
    padding: 0.65rem 1.15rem !important;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #0288d1 !important; /* light blue hover */
}

/* Active item underline */
.nav-link.active {
    color: #0288d1 !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: #ff5722; /* orange accent */
    transition: width 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 65%;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background-color: #ffffff;
    padding: 0.5rem 0;
    margin-top: 8px;
}

.dropdown-item {
    color: #2c3e50;
    padding: 0.65rem 1.5rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #e3f2fd;
    color: #0288d1;
}

/* Contact Us button in navbar */
.nav-item .btn {
    background-color: #ff5722;
    border-color: #ff5722;
    color: white;
    border-radius: 50px;
    padding: 0.55rem 1.5rem;
    font-weight: 600;
}

.nav-item .btn:hover {
    background-color: #f4511e;
    border-color: #f4511e;
    transform: translateY(-2px);
}

/* ==========================================================================
   Hero – Lighter & Eye-friendly
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1a237e;
    padding: 9rem 0 7rem;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.6rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.45rem;
    max-width: 780px;
    margin: 0 auto 2rem;
    color: #37474f;
}

/* ==========================================================================
   Cards & Hover Effects
   ========================================================================== */
.card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.35s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.card img {
    transition: transform 0.45s ease;
}

.card:hover img {
    transform: scale(1.07);
}

/* ESSA logo size control */
img[src*="ESSA.png"],
.essa-logo {
    max-height: 160px !important;
    width: auto !important;
    display: block;
    margin: 1.5rem auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    background-color: #ff5722;
    border-color: #ff5722;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #f4511e;
    border-color: #f4511e;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255,87,34,0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: #1a237e;
    color: #b0bec5;
    padding: 4rem 0 2rem;
}

footer a {
    color: #b0bec5;
}

footer a:hover {
    color: #ffffff;
}

/* ==========================================================================
   Utility
   ========================================================================== */
.text-primary { color: #0288d1 !important; }
.text-accent { color: #ff5722 !important; }
.bg-light-blue { background-color: #e3f2fd; }
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    background-color: #f0f4f8; /* light placeholder if image fails */
}

/* Improve dropdown visibility & mobile experience */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    background-color: #ffffff;
    min-width: 220px;
    margin-top: 10px;
}

.dropdown-item {
    color: #2c3e50;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #e3f2fd;
    color: #0288d1;
}

/* Make dropdown arrow clear on mobile */
.dropdown-toggle::after {
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Mobile: make sure menu items are easy to tap */
@media (max-width: 991px) {
    .navbar-nav .nav-link {
        padding: 1rem 1.5rem !important;
        font-size: 1.1rem;
    }
    .dropdown-menu {
        border-radius: 0;
        box-shadow: none;
        background-color: #f8f9fa;
        margin: 0;
    }
    .dropdown-item {
        padding: 1rem 2rem;
    }
}
/* Enable hover dropdown on desktop only */
@media (min-width: 992px) {
    .dropdown:hover .dropdown-menu {
        display: block !important;
        margin-top: 0;
    }
    .dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }
}
/* Force navbar toggler (hamburger) always visible on mobile */
@media (max-width: 991.98px) {
    .navbar-toggler {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
        z-index: 9999 !important;
    }

    /* Make collapsed menu readable & scrollable if long */
    .navbar-collapse {
        background-color: #ffffff;
        box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        margin-top: 1rem;
        border-radius: 8px;
        padding: 1.5rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    .dropdown-menu {
        background-color: #f8f9fa;
        border: none;
        box-shadow: none;
        margin: 0.5rem 0;
    }

    .dropdown-item {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
    }
}
/* ================================================
   FORCE HAMBURGER MENU ALWAYS VISIBLE ON MOBILE
   ================================================ */

/* Ensure navbar & toggler are never hidden by AOS, opacity, or transform */
.navbar.fixed-top,
.navbar-toggler,
.navbar-brand {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    z-index: 99999 !important; /* very high to avoid overlap issues */
}

/* Mobile-specific fixes */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.8rem 1rem !important;
        min-height: 70px;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        font-size: 1.5rem;
        background: transparent;
        position: relative;
        z-index: 100000 !important;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    /* Collapsed menu styling for better mobile UX */
    .navbar-collapse {
        background-color: #ffffff;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15);
        margin-top: 0.5rem;
        border-radius: 8px;
        padding: 1.5rem 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.9rem 1.5rem !important;
    }

    .dropdown-menu {
        background-color: #f8f9fa;
        border: none;
        box-shadow: none;
        margin: 0.5rem 0 0 0;
    }

    .dropdown-item {
        padding: 0.9rem 1.5rem;
        font-size: 1.05rem;
    }
}

/* Hide back-to-top arrow until scrolled (prevents overlap on mobile) */
#backToTop {
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
}