/* === Color Variables === */
:root {
    --primary: #16633e;
    --primary-dark: #0d3b28;
    --accent: #3fa46b;
    --bg: #0b0b0c;
    --fg: #f6f7fb;
    --muted: #a8acb3;
    --card: #131418;
}

/* === Base Styles === */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial;
    background: var(--bg);
    color: var(--fg);
}

/* === Fixed Header + Hero Section === */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--primary);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-radius: 0 0 24px 24px;
    padding-bottom: 0.5rem;
}

/* Hero area (green section) */
.hero {
    text-align: center;
    padding: 1rem 1rem 1rem;
    margin-bottom: 0;
    background-color: var(--primary);
    color: #f6f7fb;
}

.hero h1 {
    margin: 0.3em 0 0.1em;
    font-size: 2rem;
}

.hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.hero-title-link {
    color: inherit;
    text-decoration: none;
}

.hero-title-link:hover,
.hero-title-link:focus {
    color: inherit;
    text-decoration: none;
}

/* === Main Navigation (Black Bar) === */
.main-nav {
    width: 92%;
    max-width: 1100px;
    margin: 0.8rem auto 0.8rem;
    background: rgba(10, 10, 10, 0.96);
    border-radius: 16px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
}

/* === Left Button === */
.menu-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg);
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* === Right Section (Nav links + Theme toggle) === */
.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Nav Links */
.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links li a {
    color: #f6f7fb;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.25s, transform 0.25s;
}

.nav-links li a:hover {
    opacity: 0.85;
    transform: scale(1.05);
    color: var(--accent);
}

/* === Theme Toggle === */
.theme-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg);
    font-size: 18px;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

main.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 20px;
    max-width: 1100px;
    margin: var(--header-height, 260px) auto 0;
    scroll-margin-top: var(--header-height, 260px);
    transition: margin 0.25s ease;
}


/* Card container */
.card {
    border-radius: 16px;
    background: var(--card);
    padding: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

/* Card image fix */
.card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    cursor: pointer;
}

/* Card text */
.card h3 {
    margin: 12px 0 6px;
}

.card p {
    margin: 0 0 12px;
    color: var(--muted);
}

/* Card button */
.card a.button {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--accent);
    color: #0b0b0c;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease;


}

.card a.button:hover {
    background: #56c57e;
    transform: translateY(-2px);
}


/* === Dark Mode Card Elevation === */
body:not(.light-mode) .card {
    /* background: #141517;  */
    /* slightly lighter than bg */
    background: linear-gradient(180deg, #18191c 0%, #121314 100%);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.5),
        /* subtle base shadow */
        0 4px 12px rgba(0, 0, 0, 0.4),
        /* diffuse soft shadow */
        0 0 6px rgba(255, 255, 255, 0.05);
    /* faint outer glow for lift */
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* edge definition */
    transition: box-shadow 0.3s ease, transform 0.25s ease;
}

body:not(.light-mode) .card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.6),
        0 0 10px rgba(255, 255, 255, 0.08);
}


/* === Timezone Display and Footer === */
.timezone,
.footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 0.9em;
}

/* === Light Mode === */
body.light-mode {
    --bg: #f5f6f7;
    --fg: #0b0b0c;
    --card: #ffffff;
    --muted: #555;
    --accent: #2f8b5d;
    background: var(--bg);
    color: var(--fg);
}

body.light-mode .hero {
    background-color: #16633e !important;
    color: #f6f7fb;
}

body.light-mode .main-nav {
    background: rgba(255, 255, 255, 0.9);
}

body.light-mode .nav-links li a {
    color: #0b0b0c;
}

body.light-mode .nav-links li a:hover {
    color: var(--primary);
    /* color: #0b5134; */
}


/* === Hamburger btn hide on wider screen === */
@media (min-width: 1025px) {
    .menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex !important;
        justify-content: center;
        flex: 1;
        gap: 24px;
    }

    .main-nav {
        justify-content: center;
    }
}

/* === Responsive === */
@media (max-width: 1024px) {
    .main-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 94%;
    }

    .main-nav.expanded .nav-links {
        display: flex;
    }

    
  /* .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-radius: 0 0 16px 16px;
    padding: 10px 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
  } */







    /* === Nav Links (Desktop) === */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        
        list-style: none;
        /* margin: 0;
        padding: 0; */
        align-items: stretch;
        /* background: rgba(15, 15, 15, 0.58); */
        background: #3fa46bdd;

        gap: 12px;

        border-radius: 0 0 16px 16px;
        padding: 10px 12px;
        box-shadow: 0 6px 14px hexa(0, 0, 0, 0.3);
    }

    .nav-links li a {
        color: #f6f7fb;
        text-decoration: none;
        font-weight: 600;
        transition: opacity 0.25s, transform 0.25s;
    }

    .nav-links li a:hover {
        opacity: 0.85;
        transform: scale(1.05);
        color: var(--accent);
    }





} 








/* ------------------------------------------------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------------------------------------------ */

/* === Login Section === */
.login-section {
  max-width: 400px;
  margin: 200px auto 40px;
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  text-align: center;
}

.login-section h2 {
  margin-bottom: 16px;
}

.login-section input {
  width: 90%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid var(--muted);
  font-size: 1em;
}

.login-section button {
  width: 95%;
  padding: 10px;
  margin-top: 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #0b0b0c;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-section button:hover {
  background: #56c57e;
}

.error-message {
  color: #ff6b6b;
  margin-top: 10px;
}

.logout-btn {
  position: fixed;
  top: 12px;
  right: 16px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #e74c3c;
  color: white;
  cursor: pointer;
  font-weight: 600;
  display: none;
}
