/* =========================================================
   BASE.CSS
   Shared on EVERY page: palette, reset, body, navbar,
   hamburger, footer. Load this FIRST on every page.
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* =========================================================
   COLOR PALETTE
   ========================================================= */
:root {
    /* ===== PALETTE ===== */
    --primary-100: #ECF3E7;
    --primary-200: #c8f9c7;
    --primary-300: #B7CDBA;
    --primary-500: #84A98C;
    --primary-700: #527953;
    --secondary-100: #56e85d;
    --secondary-300: #2e7d32;
    --tertiary-100: #ff0000;
    --tertiary-200: #222;

    /* ===== SEMANTIC / SURFACES ===== */
    --color-1-background: var(--primary-100);
    --color-2-background: var(--primary-300);
    --color-3-background: var(--primary-500);
    --color-4-background: var(--primary-700);
    --color-accents: var(--tertiary-100);
    --color-boxes: var(--primary-200);
    --color-send-box: var(--secondary-300);
    --color-sent-box: var(--secondary-100);
    --color-footer: var(--tertiary-200);

    /* ===== NAVBAR =====
       NOTE: made opaque on purpose (no alpha channel). The
       translucent version of this color was the root cause of
       the navbar being unreadable over page content on every
       interior page. */
    --color-navbar:var(--color-3-background);
    --color-navbar-about: rgba(255, 255, 255, 0.85);

    /* ===== TEXT ===== */
    --color-text-dark: #1e1e1e;
    --color-text-medium: #666;
    --color-text-light: #ffffff;
}

/* ===== BASE ===== */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--color-1-background);
    color: var(--color-text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h2, h3 {
    text-align: center;
    margin-bottom: 25px;
}

/* =========================================================
   NAVBAR
   Default = solid, opaque brand green. Always readable on
   every interior page, regardless of what's behind it.
   Only the homepage (body.home) makes it transparent, because
   the homepage has a big hero image directly behind the nav.
   ========================================================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--color-navbar);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

/* Logo â€” capped so it can never overflow the navbar again.
   (Source value was 150px, which is taller than the whole
   70px navbar â€” that mismatch is what was pushing the nav
   over your page content.) */
nav .logo-img {
    height: 150px;
    width: auto;
    display: block;
    object-fit: contain;
    padding-top: 5px;
}

.nav-links {
    display: flex;
    gap: 25px;
    margin-left: auto;
}

.nav-links a {
    display: inline-block;
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-text-light);
    border: 1px solid var(--color-4-background);
    background-color: var(--color-2-background);
}

/* Active / current page link â€” always wins, even on hover */
nav a.current {
    font-weight: bold;
    text-decoration: underline;
    color: var(--color-accents) !important;
}

/* Homepage: transparent nav over the hero image */
body.home nav {
    background: transparent;
    box-shadow: none;
}

/* Homepage, once scrolled past the hero: light, blurred, readable */
/* Homepage: blur transition */
nav.nav-blur {
    background: var(--color-navbar-about);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Homepage: text colour transition */
nav.nav-scrolled .nav-links a {
    color: var(--color-text-dark);
}

nav.nav-scrolled .hamburger span {
    background: var(--color-text-dark);
}

/* Every non-home page: push content below the fixed navbar */
body:not(.home) main {
    padding-top: 90px;
}

/* =========================================================
   HAMBURGER (mobile menu button)
   ========================================================= */
.hamburger {
    display: none; /* hidden on desktop */
    position: relative;
    margin-left: auto;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--color-text-light);
    margin: 5px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =========================================================
   FOOTER
   ========================================================= */
#footer {
    background: var(--color-footer);
    color: var(--color-text-light);
    padding: 25px 0 15px;
    text-align: center;
    margin-top: auto;
    font-size: 0.85rem;
}

#footer h2 {
    color: var(--color-text-light);
    margin-bottom: 15px;
}

#footer .Social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#footer .social-icon i,
#footer .social-img {
    transition: transform 0.3s, color 0.3s;
}

#footer .social-icon i {
    font-size: 40px;
    color: #C13584;
}

#footer .social-icon i:hover {
    transform: scale(1.3);
    color: #E1306C;
}

#footer .social-img {
    height: 60px;
}

#footer .social-img:hover {
    transform: scale(1.3);
}

/* =========================================================
   RESPONSIVE â€” shared navbar behaviour under 768px
   ========================================================= */
@media (max-width: 768px) {

    .nav-container {
        height: 60px;
        justify-content: space-between;
        padding: 0 15px;
    }

    nav .logo-img {
        height: 40px;
        max-height: 40px;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        margin-left: auto;
        z-index: 1100;
    }

    /* Slide-in mobile menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -260px;      /* hidden off-screen */
        height: 100vh;
        width: 260px;
        background: rgba(40, 40, 40, 0.98);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 90px 25px;
        gap: 0;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.25);
    }

    .nav-links.show {
        right: 0;
    }

    .nav-links a {
        margin-bottom: 25px;
        font-size: 18px;
        color: var(--color-text-light) !important;
    }

    .nav-links a:hover,
    .nav-links a:focus {
        color: var(--color-accents) !important;
    }

    .nav-links a.current {
        color: var(--color-accents) !important;
    }

    body:not(.home) main {
        padding-top: 80px;
    }
}