*,
*::before,
*::after {
    box-sizing: border-box;
}
:root {
    /* Dark Theme (Default) */
    --bg-dark: #020b18;
    --glass-bg: rgba(2, 11, 24, 0.7);
    --text-primary: #ffffff;
    --text-gold: #d4af37;
    --nav-idle: #ffffff;
    --nav-active: #d4af37;
    --accent-gold: #d4af37;
    --accent-gold-soft: rgba(212, 175, 55, 0.25);
    --hex-border: #d4af37;
    --hex-text: #d4af37;
    --hex-inner-bg: rgba(2, 11, 24, 0.85);
    --footer-bg: linear-gradient(180deg, #040b14, #02060c);
    --footer-text: #cfd6e0;
    --footer-border: rgba(255, 200, 80, 0.25);
    --footer-highlight: rgba(212, 175, 55, 0.05);
    
}

[data-theme="light"] {
    /* Light Theme */
    --bg-dark: #f0f4f8;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --text-primary: #002d5b; /* Logo Blue */
    --text-gold: #b8860b;
    --nav-idle: #002d5b; /* Blue in light mode */
    --nav-active: #b8860b; /* Golden when clicked */
    --accent-gold: #002d5b;
    --accent-gold-soft: #f0f4f8;
    --hex-border:#002d5b;
    --hex-text: #002d5b;
    --hex-inner-bg: #f0f4f8;
    --footer-bg: linear-gradient(180deg, #f7f9fc, #e9eef5);
    --footer-text: #002d5b;
    --footer-border: rgba(0, 45, 91, 0.2);
    --footer-highlight: rgba(0, 45, 91, 0.06);
}

body {
    margin: 0;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Segoe UI', sans-serif;
    transition: background 0.5s ease;
}

/* Glassmorphism Nav */
.glass-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px; /* Removed vertical padding */
    height: 70px;    /* Fixed height to keep it slim */
    position: fixed;
    top: 0; 
    width: 100%;
    backdrop-filter: blur(10px);
    background: var(--glass-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}
/* logo size */
.logo-box {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%; /* Ensures it respects header height */
}

.logo-box img {
    height: 100%;      /* Force the logo to a reasonable height */
    width: auto;       /* Maintain aspect ratio */
    object-fit: contain;
}

/* Nav Link Logic */
.nav-link {
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    color: var(--nav-idle);
    transition: 0.3s;
}
.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--nav-active);
    transition: width 0.3s ease;
}

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

/* Theme Toggle Button */
#theme-switch {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#theme-switch i {
    font-size: 18px;
    color: var(--nav-idle);
    transition: color 0.3s ease;
}
/* Smooth modern motion everywhere */
* {
    scroll-behavior: smooth;
}

body {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Active/Clicked State Logic */
.nav-link.active {
    font-weight: 800;
    color: var(--nav-active);
}
/* Header */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}


/* Hero image control */
.plant-visual-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 70px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    z-index: 1;
}

.base-plant {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-ticker-bar {
    position: fixed;
    top: 70px; /* navbar height */
    width: 100%;
    background: rgba(2, 11, 24, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    z-index: 900;
    overflow: hidden;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.market-ticker {
    white-space: nowrap;
    padding: 8px 0;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: #fff;
    animation: tickerScroll 20s linear infinite;
}

@keyframes tickerScroll {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

.market-ticker .up {
    color: #00ff9c;
}

.market-ticker .down {
    color: #ff4d4d;
}

/* Hidden state */
.market-ticker-bar.hide {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}


/* =========================
   Footer
=========================== */
.main-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
}

/* Top bar */
.footer-top {
    border-bottom: 1px solid rgba(255, 200, 80, 0.3);
    padding: 18px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.footer-top p {
    font-size: 0.95rem;
    color: #e6c35a;
}

.subscribe-box {
    display: flex;
    gap: 10px;
}

.subscribe-box input {
    padding: 10px 14px;
    background: var(--footer-bg);;
    border: 1px solid #2b3b55;
    color: var(--footer-text);
    border-radius: 4px;
}

.subscribe-box button {
    padding: 10px 18px;
    background: #e6b800;
    border: none;
    color: #000;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
}

.footer-col img {
    max-width: 75px;
    margin-bottom: 5px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}

/* Footer content */
.footer-content {
    padding: 50px 8%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: #e6b800;
    margin-bottom: 18px;
    font-size: 1rem;
}

.company-name {
    font-weight: 700;
    color: var(--footer-text);
    margin-bottom: 5px;
}

.footer-col p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    cursor: pointer;
}

.footer-col ul li:hover {
    color: #e6b800;
}

/* ===============================
   Footer Navigation Links
================================ */

.footer-link {
    position: relative;
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* underline animation (same as nav) */
.footer-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--text-gold);
    transition: width 0.3s ease;
}

/* hover effect */
.footer-link:hover {
    color: var(--text-gold);
}

.footer-link:hover::after {
    width: 100%;
}

/* active page */
.footer-link.active {
    font-weight: 700;
    color: var(--text-gold);
}

.footer-link.active::after {
    width: 100%;
}

/* Social icons */
.social-icons {
    display: flex;
    gap: 14px;
    margin-top: 18px;
}

.social-icons a {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(230, 184, 0, 0.7);
    color: #e6b800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: #e6b800;
    color: #000;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(230, 184, 0, 0.35);
}

/* Bottom bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 200, 80, 0.25);
    padding: 3px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.back-to-top {
    background: transparent;
    color: var(--footer-text);;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}
/* ================= MOBILE NAV FIX ================= */

/* Hide hamburger in desktop */
.menu-toggle {
    display: none;
    font-size: 22px;
    color: var(--nav-idle);
    background: none;
    border: none;
    cursor: pointer;
}

/* Mobile styles */
@media (max-width: 768px) {
    .nav-link {
        margin: 15px 0;      
        font-size: 18px;    
        letter-spacing: 1px; 
    }

    .glass-nav {
        padding: 0 15px;
    }

    /* Show hamburger */
    .menu-toggle {
        display: block;
    }

    /* Hide menu by default */
.nav-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);

    display: none;
    flex-direction: column;

    align-items: center;     /* ✅ horizontal center */
    justify-content: center; /* ✅ vertical center */

    text-align: center;      /* ✅ text center */
    padding: 25px 0;
}
    /* Show menu when active */
    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        margin: 12px 0;
        font-size: 16px;
    }

    /* Fix header right (clock + icon) */
    .header-right {
        gap: 8px;
        font-size: 12px;
    }

    #digital-clock {
        display: none; /* hide clock on mobile */
    }

    /* Resize logo */
    .logo-box img {
        height: 40px;
    }
}