/* =========================================
   1. CSS VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #218096;      /* Teal brand color */
    --primary-dark: #175d6d;
    --secondary-color: #2563eb;    /* Blue for specific buttons */
    --bg-color: #f3f4f6;           /* Light gray background */
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --text-light: #9ca3af;
    --success-color: #16a34a;      /* Green for price drops/success */
    --danger-color: #dc2626;       /* Red for price hikes/errors */
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   2. SPA ROUTING UTILITIES (The Magic!)
   ========================================= */
.hidden {
    display: none !important;
}

.page {
    display: none; /* Hide all pages by default */
    animation: fadeIn 0.4s ease-in-out;
    flex: 1; /* Pushes footer to the bottom */
}

.page.active {
    display: block; /* Only show the active page */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   3. NAVIGATION BAR
   ========================================= */
.navbar {
    background-color: var(--primary-color);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar__brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar__menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.navbar__link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.navbar__link:hover,
.navbar__link.active {
    color: white;
    border-bottom: 2px solid white;
}

.navbar__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.navbar__toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

/* =========================================
   4. HEADER & HERO SECTIONS
   ========================================= */
.header, .page-header {
    background-color: white;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.header__title, .page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.header__subtitle, .page-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.header__meta {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* =========================================
   5. PRICE CARDS GRID
   ========================================= */
.prices-dashboard h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-main);
}

.price-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.price-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.price-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.price-card__header h3 {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.price-change {
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.price-change--up { background: #fee2e2; color: var(--danger-color); } /* Red for price hikes */
.price-change--down { background: #dcfce7; color: var(--success-color); } /* Green for price drops */

.price-card__price {
    margin-bottom: 0.5rem;
}

.price-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-currency {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.price-card__previous {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* =========================================
   6. FORMS & CALCULATOR
   ========================================= */
.calculator-section, .contact-section {
    margin: 4rem 0;
}

.calculator-card, .contact-form-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.btn--primary {
    background-color: var(--primary-color);
    color: white;
}

.btn--primary:hover {
    background-color: var(--primary-dark);
}

.btn--full-width {
    width: 100%;
}

.calculator-result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* =========================================
   7. ABOUT, PRIVACY & SEO CONTENT
   ========================================= */
.seo-content, .about-section, .privacy-section {
    margin: 4rem 0;
    background: white;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.seo-content h2, .about-card h3, .privacy-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.seo-content p, .about-card p, .privacy-card p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 3rem 0 2rem;
    margin-top: auto; /* Pushes footer to bottom of screen */
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: #9ca3af;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #d1d5db;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* =========================================
   9. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .navbar__toggle {
        display: flex; /* Show hamburger icon on mobile */
    }

    .navbar__menu {
        display: none; /* Hide menu by default on mobile */
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .navbar__menu.active {
        display: flex; /* Show menu when toggled */
    }

    .navbar__link {
        padding: 1rem 2rem;
        display: block;
        border-bottom: none !important;
    }
    
    .navbar__link:hover {
        background-color: var(--primary-dark);
    }

    .header__title, .page-header h1 {
        font-size: 2rem;
    }
}