/* Padding only for non-home pages, includes safe area */
body.page-content {
    /* Adjust 82px based on actual final navbar height if needed */
    padding-top: calc(82px + var(--safe-top));
}

/* ======== Hero Section (Static Image) ======== */
.hero {
    height: 100vh; /* <<-- Adjusted height to fit screen */
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('/images/Banner.jpg');
    background-size: cover;
    background-position: center top; /* Align image to top */
    background-repeat: no-repeat;
    opacity: var(--hero-bg-opacity, 1);
    transition: opacity 0.4s ease-out;
}

.hero-content {
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    margin-top: var(--safe-top); /* Offset for notch on mobile */
}

.hero-content h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ======== Footer ======== */
.footer {
    background-color: #212529;
    color: #ccc;
    padding: 3rem 0 2rem;
}

.footer h5 {
    color: white;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer p {
    color: #ccc;
    margin-bottom: 0.5rem;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.footer a:hover {
    color: #fff;
}

.footer .footer-links a {
    display: block;
    margin-bottom: 0.5rem;
}

.footer-logo {
    height: 30px;
    filter: brightness(0) invert(1);
}

.footer-divider {
    border-color: #444 !important;
    margin: 2rem 0 1rem;
}

.footer p i {
    width: 25px;
    text-align: center;
    margin-right: 5px;
}

/* ======== Morphing Navbar Styles ======== */
header {
    position: absolute; /* Starts absolute ONLY on homepage */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    transition: background-color 0.4s ease, border 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease, position 0s linear 0.4s;
    /* NO padding-top here initially */
}

/* Apply safe area padding ONLY when fixed/sticky */
body.page-content header,
header.sticky-active {
    padding-top: var(--safe-top);
}

/* Fixed state for content pages */
body.page-content header {
    position: fixed; /* Starts fixed */
    background: rgba(255, 255, 255, 0.85); /* Slightly less transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* Lighter border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* Softer shadow */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    transition: justify-content 0.5s ease-in-out, gap 0.5s ease-in-out, padding 0.4s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    margin-bottom: 0;
    padding-left: 0;
}

.logo-placeholder {
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

.logo-placeholder img {
    height: 40px;
    display: block;
}

/* Glass effect only on hero (not sticky, not content page) */
body.page-home header:not(.sticky-active) .nav-links {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: background-color 0.4s ease, border 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-links li {
    margin: 0 1rem;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    display: block;
}

body.page-home header:not(.sticky-active) .nav-links a.active {
    color: #d4ffb2;
}

body.page-home header:not(.sticky-active) .nav-links a:hover {
    color: #006400;
}

/* ======== Sticky/Morphed State Styles ======== */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header.sticky-active {
    position: fixed;
    transform: translateY(0);
    animation: slideDown 0.4s ease-out forwards;
    /* Styles match body.page-content header */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

header.sticky-active .navbar,
body.page-content header .navbar {
    justify-content: center;
    gap: 2rem;
    padding: 1rem 3rem;
}

header.sticky-active .logo-placeholder,
body.page-content header .logo-placeholder {
    opacity: 1;
    transform: scale(1);
}

header.sticky-active .nav-links,
body.page-content header .nav-links {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
}

header.sticky-active .nav-links a,
body.page-content header .nav-links a {
    color: #333;
    text-shadow: none;
}

header.sticky-active .nav-links a.active,
body.page-content header .nav-links a.active {
    color: var(--green);
}

header.sticky-active .nav-links a:hover,
body.page-content header .nav-links a:hover {
    color: #006400;
}


/* ======== Mobile Sidebar ======== */
.hamburger-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    color: white; /* Default color */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.page-content header .hamburger-menu,
header.sticky-active .hamburger-menu {
    color: #333; /* Dark icon */
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    max-width: 80%;
    height: 100dvh;
    z-index: 9999;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.3);
    transition: left 0.4s ease-in-out;
    padding-top: var(--safe-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.sidebar-close:hover {
    color: white;
}

.sidebar-links {
    list-style: none;
    padding: 1.5rem;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 0.5rem;
}

.sidebar-links a {
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease, background-color 0.3s ease;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 5px;
}

.sidebar-links a:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-links a.active {
    color: #a0e0a0;
    font-weight: 600;
    background-color: rgba(160, 224, 160, 0.1);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}