/* ============================================
   Bida Saludabel - Base Styles
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
    --blue: #1B3A5C;
    --gold: #F5A623;
    --coral: #FF6B6B;
    --white: #FAFAFA;
    --charcoal: #2D2D2D;
    --blue-light: #2A5580;
    --blue-dark: #0F2440;
    --gold-light: #FFD080;
    --section-padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 4rem);
    --header-height: 70px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---------- Smooth Scroll ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

/* ---------- Body ---------- */
body {
    font-family: 'Inter', sans-serif;
    color: var(--charcoal);
    background-color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.2;
}

/* ---------- Links ---------- */
a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Lists ---------- */
ul, ol {
    list-style: none;
}

/* ---------- Images ---------- */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

/* ---------- Buttons ---------- */
button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(27, 58, 92, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    background: var(--blue-dark);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 clamp(1rem, 5vw, 4rem);
}

/* ---------- Logo ---------- */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.85;
}

/* ---------- Navigation ---------- */
.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    position: relative;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

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

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

/* ---------- Header Actions ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ---------- Language Toggle ---------- */
.lang-toggle {
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.4rem 1rem;
    border: 2px solid var(--gold);
    border-radius: 50px;
    transition: background 0.3s ease, color 0.3s ease;
}

.lang-toggle:hover {
    background: var(--gold);
    color: var(--blue-dark);
}

/* ---------- Hamburger ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    gap: 5px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--section-padding);
    padding-top: calc(var(--header-height) + 2rem);
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 50%, var(--blue-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 600px 400px at 20% 80%, rgba(245, 166, 35, 0.15) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 20%, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, var(--white) 0%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero-tagline {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(250, 250, 250, 0.8);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: var(--coral);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.45);
    background: #ff5252;
}

.cta-button:active {
    transform: translateY(-1px);
}

/* ============================================
   Mobile Navigation (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--blue-dark);
        padding: calc(var(--header-height) + 2rem) 2rem 2rem;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
        z-index: 999;
        overflow-y: auto;
    }

    .nav.open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-link {
        display: block;
        font-size: 1rem;
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .logo {
        font-size: 1.1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .lang-toggle {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }
}

/* ============================================
   Content Sections
   ============================================ */
.section {
    padding: var(--section-padding);
}

.section:nth-child(even) {
    background-color: #f0f4f8;
}

.section-content {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--blue);
    font-weight: 700;
}

.section-intro {
    font-size: 1.1rem;
    color: #555;
    max-width: 650px;
    margin-bottom: 2.5rem;
}

/* ---------- Card Grid ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.3rem;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

.info-card p {
    color: #555;
    font-size: 0.95rem;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Calculator Tools
   ============================================ */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.tool-card {
    background: #fff; border-radius: 16px; padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.tool-card h3 { font-size: 1.4rem; color: var(--blue); margin-bottom: 0.3rem; }
.tool-card > p { color: #777; margin-bottom: 1.5rem; }
.calc-form { display: flex; flex-direction: column; gap: 1rem; }
.input-group { display: flex; flex-direction: column; gap: 0.3rem; }
.input-group label { font-weight: 500; font-size: 0.9rem; color: var(--blue); }
.input-group input, .input-group select {
    padding: 0.75rem 1rem; border: 2px solid #e0e5ec; border-radius: 10px;
    font-size: 1rem; font-family: inherit; transition: border-color 0.2s;
}
.input-group input:focus, .input-group select:focus { border-color: var(--gold); outline: none; }
.calc-btn {
    padding: 0.85rem; background: var(--blue); color: #fff; border-radius: 10px;
    font-weight: 600; font-size: 1rem; transition: background 0.2s;
}
.calc-btn:hover { background: var(--blue-light); }
.calc-result { margin-top: 1.5rem; text-align: center; }

/* BMI Gauge */
.gauge-bar { height: 12px; background: #e0e5ec; border-radius: 6px; position: relative; overflow: visible; }
.gauge-fill { height: 100%; border-radius: 6px; transition: width 0.5s ease; }
.gauge-marker {
    position: absolute; top: -4px; width: 4px; height: 20px;
    background: var(--charcoal); border-radius: 2px; transform: translateX(-50%);
    transition: left 0.5s ease;
}
.gauge-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: #999; margin-top: 0.3rem; }
.bmi-value { font-size: 1.8rem; font-weight: 700; color: var(--blue); margin: 1rem 0 0.3rem; }
.bmi-category { font-size: 1.1rem; font-weight: 600; }

/* Water display */
.water-amount { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.water-liters { font-size: 3rem; font-weight: 800; color: var(--blue); font-family: 'Montserrat', sans-serif; }
.water-glasses { font-size: 1.1rem; color: #777; }
.water-icons { font-size: 1.5rem; margin: 1rem 0; letter-spacing: 4px; }
.water-note { font-size: 0.85rem; color: #999; }

/* ============================================
   Quiz
   ============================================ */
.quiz-container { max-width: 100%; }
.quiz-progress { height: 6px; background: #e0e5ec; border-radius: 3px; margin-bottom: 1.5rem; }
.quiz-progress-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.3s ease; }
.quiz-step { font-size: 0.85rem; color: #999; margin-bottom: 0.5rem; }
.quiz-question { font-size: 1.1rem; font-weight: 600; color: var(--blue); margin-bottom: 1.2rem; line-height: 1.4; }
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option {
    padding: 1rem 1.2rem; border: 2px solid #e0e5ec; border-radius: 12px;
    font-size: 1rem; text-align: left; transition: all 0.2s; background: #fff;
    cursor: pointer; font-family: inherit; width: 100%;
}
.quiz-option:hover { border-color: var(--gold); background: rgba(245,166,35,0.05); }
.quiz-option.selected { border-color: var(--blue); background: rgba(27,58,92,0.08); }
.quiz-result { text-align: center; padding: 1rem 0; }
.quiz-score { font-size: 3.5rem; font-weight: 800; font-family: 'Montserrat', sans-serif; }
.quiz-tier { font-size: 1.4rem; font-weight: 700; margin: 0.5rem 0 1.5rem; }
.quiz-tips { text-align: left; margin: 0 0 1.5rem; padding: 0; }
.quiz-tips li { padding: 0.75rem 0; border-bottom: 1px solid #eee; font-size: 0.95rem; color: #555; list-style: none; }
.quiz-tips li:last-child { border-bottom: none; }
.quiz-restart {
    padding: 0.75rem 2rem; background: var(--blue); color: #fff;
    border-radius: 10px; font-weight: 600; font-size: 1rem;
    cursor: pointer; border: none; font-family: inherit; transition: background 0.2s;
}
.quiz-restart:hover { background: var(--blue-light); }

/* ============================================
   Resource Library
   ============================================ */
.resource-controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; align-items: center; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-btn {
    padding: 0.5rem 1.2rem; border: 2px solid #e0e5ec; border-radius: 50px;
    font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
    cursor: pointer; background: #fff; font-family: inherit;
}
.filter-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.filter-btn:hover:not(.active) { border-color: var(--gold); }
.resource-search {
    flex: 1; min-width: 200px; padding: 0.6rem 1rem;
    border: 2px solid #e0e5ec; border-radius: 10px;
    font-size: 0.95rem; font-family: inherit;
}
.resource-search:focus { border-color: var(--gold); outline: none; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.resource-card {
    background: #fff; border-radius: 16px; padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); display: flex; flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.resource-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.resource-type { font-size: 1.5rem; margin-bottom: 0.5rem; }
.resource-card h4 { font-size: 1.1rem; color: var(--blue); margin-bottom: 0.3rem; }
.resource-card p { font-size: 0.9rem; color: #666; flex: 1; margin-bottom: 0.5rem; }
.resource-badge {
    display: inline-block; padding: 0.2rem 0.7rem; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    align-self: flex-start;
}
.badge-nutrition { background: #e8f5e9; color: #2e7d32; }
.badge-sunlight { background: #fff8e1; color: #f57f17; }
.badge-exercise { background: #e3f2fd; color: #1565c0; }
.badge-health { background: #fce4ec; color: #c62828; }
.resource-action {
    display: inline-block; margin-top: 0.8rem; padding: 0.5rem 1rem;
    background: var(--blue); color: #fff; border-radius: 8px;
    font-size: 0.85rem; font-weight: 600; text-align: center;
    transition: background 0.2s; align-self: flex-start;
}
.resource-action:hover { background: var(--blue-light); }
.no-results { text-align: center; padding: 3rem; color: #999; font-size: 1.1rem; grid-column: 1 / -1; }

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--blue-dark);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 3rem 3rem 2rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ---------- Curaçao Flag (CSS-only) ---------- */
.footer-flag {
    width: 80px;
    height: 50px;
    background: #002B7F;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.flag-stripe {
    position: absolute;
    bottom: 30%;
    left: 0;
    width: 100%;
    height: 15%;
    background: #F9E814;
}

.flag-star {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    clip-path: polygon(
        50% 0%,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 91%,
        50% 70%,
        21% 91%,
        32% 57%,
        2% 35%,
        39% 35%
    );
}

.flag-star-1 {
    top: 18%;
    left: 15%;
}

.flag-star-2 {
    top: 30%;
    left: 30%;
    width: 6px;
    height: 6px;
}

/* ---------- Footer Text ---------- */
.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
}

.footer-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: -0.5rem;
}

.footer-copyright {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 1rem;
}

/* ============================================
   Hero Entrance Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    animation: fadeInUp 0.8s ease forwards;
}

.hero-tagline {
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.cta-button {
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

/* ============================================
   Accessibility
   ============================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    background: var(--gold);
    color: var(--charcoal);
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 9999;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
