:root {
    --primary: #1e5631;
    --primary-light: #2d7a46;
    --primary-lighter: #3d9a5c;
    --primary-bg: #e8f5e9;
    --secondary: #0d2818;
    --accent: #c8e6c9;

    /* Improved Light Mode - Warm, Easy on Eyes */
    --bg-main: #f8f6f3;
    /* Warm off-white */
    --bg-section: #f0ede8;
    /* Warmer section bg */
    --bg-card: #fefefe;
    /* Almost white */

    --text-primary: #1a1a1a;
    /* Deep black for readability */
    --text-secondary: #4a4a4a;
    /* Medium gray */
    --text-muted: #7a7a7a;
    /* Muted gray */

    --border: #d4d0c8;
    /* Warm border */
    --border-light: #e8e4dc;

    /* Enhanced Shadows for Depth */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.06);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --glass: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(200, 195, 185, 0.5);
    --footer-bg: var(--secondary);
}

[data-theme="dark"] {
    --primary: #4caf50;
    --primary-light: #66bb6a;
    --primary-lighter: #81c784;
    --primary-bg: #1b2e20;
    --secondary: #e8f5e9;
    --accent: #2e7d32;
    --bg-main: #121212;
    --bg-section: #1e1e1e;
    --bg-card: #252525;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border: #333333;
    --border-light: #444444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --glass: rgba(30, 30, 30, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --footer-bg: #050806;
}

/* Theme Toggle Button Styles */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
    margin-left: 0.5rem;
}

.theme-toggle-btn:hover {
    background: var(--bg-section);
}

.theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.5s ease;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
    display: none;
}

:not([data-theme="dark"]) .theme-toggle-btn .sun-icon {
    display: none;
}

:not([data-theme="dark"]) .theme-toggle-btn .moon-icon {
    display: block;
}

/* Mobile Theme Toggle - Floating Button */
@media (max-width: 768px) {
    .theme-toggle-btn {
        position: fixed;
        bottom: 80px;
        /* Above WhatsApp button */
        right: 20px;
        z-index: 1000;
        background: var(--bg-card);
        box-shadow: var(--shadow-md);
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 1px solid var(--border);
    }

    .theme-toggle-btn svg {
        width: 24px;
        height: 24px;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
}

/* Ticker Bar */
.ticker-wrap {
    position: fixed;
    top: 0;
    width: 100%;
    height: 32px;
    background: #064e3b;
    /* Consistent Darker Green */
    color: white;
    z-index: 1001;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode .ticker-wrap {
    background: #0f172a;
    /* Dark Blue for Dark Mode */
}

.ticker-title {
    color: #fca5a5;
    /* Reddish for CBOT */
    font-weight: 700;
    margin-right: 1.5rem;
    white-space: nowrap;
    background: inherit;
    position: relative;
    z-index: 5;
    padding-right: 1rem;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    gap: 4rem;
    white-space: nowrap;
    animation: ticker-slow-scroll 45s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-slow-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
}

.ticker-item .tick-zs,
.ticker-item .tick-zc,
.ticker-item .tick-zw,
.ticker-item .tick-dolar,
.ticker-item .tick-riesgo {
    font-weight: 700;
    color: #4ade80;
    /* Default green */
}

.ticker-item.separator {
    color: rgba(255, 255, 255, 0.2);
}

/* Input Badge */
.input-badge {
    display: inline-block;
    background: var(--primary-light);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: 700;
}

.text-xs {
    font-size: 0.7rem;
}


/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--secondary);
}

h1 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

h3 {
    font-size: 1.1rem;
}

h4 {
    font-size: 0.95rem;
}

p {
    color: var(--text-secondary);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 3.5rem 0;
}

.section-alt {
    background: var(--bg-section);
}

/* MVP Section Modules */
#precios>.container,
#clima>.container,
#noticias>.container,
#calculadora>.container {
    background: var(--bg-card);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-header p {
    max-width: 500px;
    margin: 0 auto;
    font-size: 0.95rem;
}

.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.5rem;
    background: var(--primary-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.75rem;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.status-badge.online {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-badge.online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-badge.offline {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.status-badge.offline::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    margin-right: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Navbar adjustment for Ticker */
.navbar {
    position: fixed;
    top: 32px;
    /* Height of ticker */
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-light);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.125rem;
}

.nav-links a {
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--primary-bg);
}

.nav-cta {
    display: flex;
    gap: 0.5rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text-primary);
}

/* Hero */
.hero {
    position: relative;
    padding: 8rem 0 5rem;
    background: url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    color: white;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-light);
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 50px;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 480px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.hero-buttons .btn-outline {
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

.hero-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hero-visual {
    position: relative;
}

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.hero-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.hero-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mini-prices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mini-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
}

.mini-price-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.mini-price-value {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.95rem;
}

.mini-price-info {
    display: flex;
    flex-direction: column;
}

.mini-price-source {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
}

.mini-price-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mini-price-change {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: 500;
}

.mini-price-change.up {
    background: #d4edda;
    color: #155724;
}

.mini-price-change.down {
    background: #f8d7da;
    color: #721c24;
}

/* Ad Slots */
.ad-container {
    padding: 1rem 0;
    background: var(--bg-section);
}

.ad-leaderboard {
    border-bottom: 1px solid var(--border-light);
}

.ad-slot {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 0.25rem;
    left: 0.5rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.ad-placeholder {
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.ad-rectangle {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-banner-mid .ad-placeholder {
    padding: 1rem;
}

.clima-with-ad,
.noticias-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.ad-sidebar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.ad-sidebar .ad-slot {
    min-height: 150px;
}

/* Precios */
.precios-tabs {
    display: flex;
    gap: 0.375rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.precio-tab {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg-card);
    color: var(--text-secondary);
}

.precio-tab:hover,
.precio-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.precios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.precio-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.15s;
}

.precio-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-lighter);
}

.precio-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.precio-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-bg);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--primary);
}

.precio-info h3 {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.precio-mercado {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.precio-expand-icon {
    display: none;
    margin-left: auto;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.precio-card.expanded .precio-expand-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.precio-main {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
}

.precio-currency {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.precio-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.precio-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.precio-change {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.precio-change.up {
    background: #d4edda;
    color: #155724;
}

.precio-change.down {
    background: #f8d7da;
    color: #721c24;
}

.precio-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
    padding-top: 0.625rem;
    border-top: 1px solid var(--border-light);
}

.precio-detail {
    font-size: 0.75rem;
}

.precio-detail-label {
    color: var(--text-muted);
    display: block;
}

.precio-detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Mobile Carousel and Compact Cards */
@media (max-width: 767px) {
    .precios-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding: 0.5rem 0.25rem 1.5rem;
        scrollbar-width: none;
        /* Hide scrollbar Firefox */
        scroll-behavior: smooth;
    }

    .precios-grid::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar Chrome/Safari */
    }

    .precio-card {
        flex: 0 0 280px;
        /* Uniform width for carousel */
        scroll-snap-align: center;
        cursor: pointer;
        user-select: none;
    }

    .precio-expand-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .precio-details {
        display: none;
        /* Compact by default */
        margin-top: 1rem;
    }

    .precio-card.expanded .precio-details {
        display: grid;
        animation: slideDown 0.3s ease-out;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.precios-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.precios-source {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Clima */
.clima-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1rem;
}

.clima-main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.clima-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clima-location {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clima-location svg {
    width: 14px;
    height: 14px;
}

.clima-current {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.clima-icon-large {
    font-size: 3rem;
    line-height: 1;
}

.clima-temp {
    display: flex;
    align-items: flex-start;
}

.clima-temp-value {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
}

.clima-temp-unit {
    font-size: 1rem;
    color: var(--text-muted);
}

.clima-desc h3 {
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.clima-desc p {
    font-size: 0.85rem;
}

/* MVP Clima Widget */
.clima-widget-mvp {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem 0;
    /* Vertical padding only, logical areas handle horizontal */
    box-shadow: none;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.clima-main-mvp {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Alignment start as requested */
    gap: 2rem;
}

.clm-left {
    text-align: left;
    flex: 1;
    padding: 0.5rem 1.5rem;
    /* Standard px-6 spacing */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* EVA Super Style */
.calc-result-value-big {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    letter-spacing: -1px;
    line-height: 1;
    margin: 0.5rem 0;
}

.clm-temp-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.clm-temp-large {
    font-size: 38px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.clm-status-icon {
    color: var(--primary);
    display: flex;
    align-items: center;
}

.clm-location-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clm-location {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* GPS Locate Button (Apple Style) */
.gps-locate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gps-locate-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

.gps-locate-btn:active {
    transform: scale(0.95);
}

/* GPS Loading State */
.gps-locate-btn.loading svg {
    animation: gpsSpinPulse 1.5s ease-in-out infinite;
}

@keyframes gpsSpinPulse {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: rotate(180deg);
        opacity: 0.5;
    }

    100% {
        transform: rotate(360deg);
        opacity: 1;
    }
}

/* GPS Active State (Location Found) */
.gps-locate-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.gps-locate-btn.active:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* GPS Error State */
.gps-locate-btn.error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Light Theme Adjustments */
[data-theme="light"] .gps-locate-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

[data-theme="light"] .gps-locate-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .gps-locate-btn.active {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* GPS Toast Notification */
.gps-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.gps-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.gps-toast.success {
    background: rgba(16, 185, 129, 0.95);
}

.gps-toast.error {
    background: rgba(239, 68, 68, 0.95);
}

.clm-right {
    flex: 2;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: space-around;
    padding-right: 1.5rem;
    /* Symmetry with clm-left */
}

.clm-detail-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-section);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.clm-detail-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    color: var(--primary);
}

.clm-detail-info {
    display: flex;
    flex-direction: column;
}

.clm-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.clm-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Alerts and colors */
.clm-value.alert-blue {
    color: #1e40af;
}

.clm-detail-icon.alert-blue {
    color: #1e40af;
}

.clm-value.alert-orange {
    color: #ea580c;
}

.clm-detail-item.alert-orange {
    border: 1px solid #fdba74;
    background: #fff7ed;
}

@media (max-width: 992px) {
    .clima-main-mvp {
        flex-direction: column;
        gap: 1.5rem;
    }

    .clm-right {
        flex-direction: column;
        width: 100%;
    }

    .clm-divider {
        width: 80%;
        height: 1px;
        display: none;
    }
}

/* ===== WEATHER ALERT BANNER (Central de Inteligencia Meteorológica) ===== */
.weather-alert-banner {
    width: 100%;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: alertSlideIn 0.5s ease-out;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-alert-banner:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-xl);
}

/* Severity Levels */
.weather-alert-banner.alert-critical {
    border-color: #ef4444;
    background: rgba(127, 29, 29, 0.2);
}

.weather-alert-banner.alert-high {
    border-color: #f97316;
    background: rgba(124, 45, 18, 0.2);
}

.weather-alert-banner.alert-medium {
    border-color: #eab308;
    background: rgba(113, 63, 18, 0.2);
}

.weather-alert-banner.alert-cold {
    border-color: #06b6d4;
    background: rgba(8, 51, 68, 0.2);
}

.weather-alert-banner.alert-rain {
    border-color: #3b82f6;
    background: rgba(30, 58, 138, 0.2);
}

.alert-content {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-icon-container {
    padding: 0.75rem;
    border-radius: 50%;
    animation: alertPulse 2s infinite;
    flex-shrink: 0;
}

@keyframes alertPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.alert-critical .alert-icon-container {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-high .alert-icon-container {
    background: rgba(249, 115, 22, 0.2);
    color: #fdba74;
}

.alert-medium .alert-icon-container {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
}

.alert-cold .alert-icon-container {
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
}

.alert-rain .alert-icon-container {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.alert-text-container {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-action {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.alert-critical .alert-action {
    color: #fca5a5;
}

.alert-high .alert-action {
    color: #fdba74;
}

.alert-medium .alert-action {
    color: #fde047;
}

.alert-cold .alert-action {
    color: #67e8f9;
}

.alert-rain .alert-action {
    color: #93c5fd;
}

.alert-action-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: dotPing 2s infinite;
}

@keyframes dotPing {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.alert-critical .alert-action-dot {
    background: #ef4444;
}

.alert-high .alert-action-dot {
    background: #f97316;
}

.alert-medium .alert-action-dot {
    background: #eab308;
}

.alert-cold .alert-action-dot {
    background: #06b6d4;
}

.alert-rain .alert-action-dot {
    background: #3b82f6;
}

.alert-description {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0.5rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alert-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
}

.alert-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.alert-badge {
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.7);
}

.alert-severity-badge {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
}

@media (min-width: 640px) {
    .alert-severity-badge {
        display: flex;
    }
}

.alert-severity-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
}

.alert-severity-value {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.alert-critical .alert-severity-value {
    color: #fca5a5;
}

.alert-high .alert-severity-value {
    color: #fdba74;
}

.alert-medium .alert-severity-value {
    color: #fde047;
}

.alert-cold .alert-severity-value {
    color: #67e8f9;
}

.alert-rain .alert-severity-value {
    color: #93c5fd;
}

.clima-forecast-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.clima-forecast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    flex: 1;
}

.clima-forecast h4 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.forecast-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.forecast-day {
    display: grid;
    grid-template-columns: 70px 40px 55px 1fr 60px;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.625rem;
    background: var(--bg-section);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.forecast-name {
    font-weight: 500;
}

.forecast-icon {
    text-align: center;
}

.forecast-temp {
    font-weight: 600;
}

.forecast-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.forecast-rain {
    color: #2563eb;
    text-align: right;
    font-size: 0.8rem;
}

/* Extended Forecast */
.clm-forecast-extended {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    margin-top: 0 !important;
    /* Managed by wrapper */
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
    width: max-content;
    min-width: 100%;
}


.clm-forecast-day {
    text-align: center;
    padding: 1.25rem 1rem;
    background: var(--bg-section);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 1px solid transparent;
    min-width: 110px;
    flex: 0 0 auto;
}

.clm-forecast-day:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    background: var(--bg-card);
}

.clm-forecast-day.active {
    background: var(--primary-bg);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.clm-fc-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.clm-fc-icon {
    font-size: 1.5rem;
    margin: 0.25rem 0;
}

.clm-fc-temps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.fc-max {
    color: var(--text-primary);
}

.fc-min {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.clm-fc-rain {
    font-size: 0.75rem;
    color: #3b82f6;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

/* ===== CLIMA HOURLY BREAKDOWN (The Precision Strip) ===== */
.clm-hourly-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.03);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: none;
    /* Controlled by JS */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.clm-hourly-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

[data-theme="dark"] .clm-hourly-container {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.clm-hourly-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clm-hourly-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.clm-hourly-scroll::-webkit-scrollbar {
    display: none;
}

.clm-hourly-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 75px;
    padding: 1rem 0.5rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.clm-hourly-slot:hover {
    background: rgba(255, 255, 255, 0.1);
}

.clm-hourly-slot.highlight-rain {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.clm-h-time {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.clm-h-icon {
    font-size: 1.5rem;
    margin: 0.25rem 0;
}

.clm-h-temp {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.clm-h-pop {
    font-size: 0.7rem;
    font-weight: 700;
    color: #3b82f6;
    margin-top: 0.5rem;
}

.clm-h-rain-mm {
    font-size: 0.7rem;
    font-weight: 600;
    color: #60a5fa;
    margin-top: 1px;
}

/* Rain Intensity Bar */
.clm-h-precip-bar {
    width: 5px;
    height: 35px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 0.75rem auto 0;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .clm-h-precip-bar {
    background: rgba(255, 255, 255, 0.1);
}

.clm-h-precip-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #3b82f6;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.clm-h-wind {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
}

.clm-h-wind-arrow {
    font-size: 0.75rem;
    color: var(--text-primary);
}

.clm-h-wind-speed {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .clma-forecast-wrapper {
        padding-left: 1.25rem;
    }

    .clm-forecast-extended {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 10px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .clm-forecast-day {
        min-width: 90px;
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 0.75rem 0.5rem;
    }

    .clm-compass-container {
        width: 100px;
        height: 100px;
        margin-left: 0;
    }
}

.clima-alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-md);
    padding: 1rem;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.alert-icon {
    width: 20px;
    height: 20px;
    background: #ffc107;
    color: #856404;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.alert-header h5 {
    font-size: 0.85rem;
    color: #856404;
    margin: 0;
}

.clima-alert p {
    font-size: 0.8rem;
    color: #856404;
    margin: 0;
}

/* Calculator */
/* Clean UI Calculator */
.calc-container-clean {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-top: 1rem;
}

.calc-form-clean {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row-clean {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group-clean {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group-clean label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group-clean input,
.form-group-clean select,
.newsletter-form input,
.contacto-form input,
.contacto-form select,
.contacto-form textarea,
#comentarioTexto {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    /* Prevents iOS zoom */
    background: #f9fafb;
    transition: border-color 0.2s;
    width: 100%;
}

.form-group-clean input:focus,
.form-group-clean select:focus,
.newsletter-form input:focus,
.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus,
#comentarioTexto:focus {
    border-color: var(--primary);
    outline: none;
    background: white;
}

.btn-calc-clean {
    padding: 1rem;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.calc-result-clean {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    align-self: center;
    /* Center vertically within the row height if it expands */
}

.calc-result-clean.positive {
    border: 1px solid #22c55e;
}

.calc-result-clean.negative {
    border: 1px solid #ef4444;
}

.result-placeholder-clean {
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
    font-style: italic;
}

.result-header-clean {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-title-clean {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.05em;
}

.result-columns-clean {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.res-mini-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.result-main-usd {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.calc-result-clean.positive .result-main-usd {
    color: #166534;
}

.calc-result-clean.negative .result-main-usd {
    color: #991b1b;
}

.result-sub-ars {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1;
    letter-spacing: -0.01em;
}

@media (max-width: 767px) {
    .calc-container-clean {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .form-row-clean {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calc-result-clean {
        order: 2;
        width: 100%;
    }

    .calc-form-clean {
        order: 1;
    }

    .result-main-usd {
        font-size: 24px;
    }

    #imprimirBtn {
        width: 100%;
    }

    .container {
        padding: 0 15px;
    }
}

/* Font size is now handled globally above */



/* End of Clean UI Calculator Styles - Removing legacy calculator code below */

/* Legacy calculator styles removed */

/* ===== VALUE SEMAPHORE STYLES ===== */
.value-semaphore {
    margin-bottom: 1.25rem;
    animation: fadeInSlide 0.4s ease;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.semaphore-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
}

.semaphore-indicator.semaphore-green {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.semaphore-indicator.semaphore-yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #f59e0b;
}

.semaphore-indicator.semaphore-red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #ef4444;
}

.semaphore-emoji {
    font-size: 1.5rem;
    line-height: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.semaphore-label {
    flex: 1;
}

/* ===== EVA RESULT STYLES ===== */
.eva-result {
    margin-top: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1px solid #14b8a6;
    border-radius: var(--radius-md);
    animation: fadeInSlide 0.5s ease 0.1s backwards;
}

.eva-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.eva-header svg {
    stroke: #0f766e;
}

.eva-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: #0f766e;
    letter-spacing: -0.02em;
}

.eva-result.negative {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.eva-result.negative .eva-header,
.eva-result.negative .eva-header svg {
    color: #991b1b;
    stroke: #991b1b;
}

.eva-result.negative .eva-value {
    color: #991b1b;
}

/* ===== INVISIBLE COST BOX STYLES ===== */
.invisible-cost-box {
    margin-top: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 2px dashed #eab308;
    border-radius: var(--radius-md);
    animation: fadeInSlide 0.5s ease 0.2s backwards;
}

.invisible-cost-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
}

.invisible-cost-icon {
    font-size: 1.25rem;
}

.invisible-cost-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #a16207;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex: 1;
}

.invisible-cost-tooltip {
    cursor: help;
    color: #ca8a04;
    font-size: 0.9rem;
}

.invisible-cost-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.invisible-cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #fcd34d;
}

.invisible-cost-item:last-of-type {
    border-bottom: none;
}

.ic-label {
    font-size: 0.8rem;
    color: #78716c;
    font-weight: 500;
}

.ic-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #a16207;
}

.invisible-cost-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #fef08a;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.ic-label-total {
    font-size: 0.75rem;
    font-weight: 800;
    color: #a16207;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ic-value-total {
    font-size: 1.1rem;
    font-weight: 900;
    color: #854d0e;
}

/* Dark mode adjustments */
[data-theme="dark"] .value-semaphore .semaphore-indicator.semaphore-green {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    color: #6ee7b7;
}

[data-theme="dark"] .value-semaphore .semaphore-indicator.semaphore-yellow {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    color: #fde68a;
}

[data-theme="dark"] .value-semaphore .semaphore-indicator.semaphore-red {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    color: #fca5a5;
}

[data-theme="dark"] .eva-result {
    background: linear-gradient(135deg, #134e4a 0%, #115e59 100%);
    border-color: #2dd4bf;
}

[data-theme="dark"] .eva-header,
[data-theme="dark"] .eva-value {
    color: #5eead4;
}

[data-theme="dark"] .invisible-cost-box {
    background: linear-gradient(135deg, #422006 0%, #713f12 100%);
    border-color: #ca8a04;
}

[data-theme="dark"] .invisible-cost-title,
[data-theme="dark"] .ic-value,
[data-theme="dark"] .ic-label-total,
[data-theme="dark"] .ic-value-total {
    color: #fde68a;
}

[data-theme="dark"] .invisible-cost-total {
    background: #854d0e;
}

[data-theme="dark"] .invisible-cost-item {
    border-color: #a16207;
}

[data-theme="dark"] .ic-label {
    color: #d6d3d1;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .semaphore-indicator {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .eva-value {
        font-size: 1.5rem;
    }

    .ic-value-total {
        font-size: 1rem;
    }
}

/* Toggle Switch Styles */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0;
    padding: 0.75rem;
    background: var(--bg-section);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: var(--primary);
}

input:focus+.toggle-slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.toggle-slider:before {
    transform: translateX(26px);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .toggle-row {
        margin: 1rem 0;
    }
}

/* Noticias */
.noticias-featured {
    margin-bottom: 1.5rem;
}

.noticia-main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.noticia-main-image {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.noticia-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.noticia-main-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.noticia-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.625rem;
    align-items: center;
}

.noticia-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
}

.noticia-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.noticia-main-content h3 {
    font-size: 1.15rem;
    margin-bottom: 0.625rem;
    line-height: 1.4;
}

.noticia-main-content p {
    flex: 1;
    font-size: 0.9rem;
    margin-bottom: 0.875rem;
}

.noticia-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.noticia-link {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.85rem;
}

.noticia-link:hover {
    text-decoration: underline;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .noticias-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .noticias-grid {
        grid-template-columns: 1fr;
    }
}

.noticia-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.15s;
}

.noticia-card:hover {
    box-shadow: var(--shadow-md);
}

.noticia-card-content span {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.375rem;
}

.noticia-card-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.noticia-card-content p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Recursos */
.recursos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.recurso-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    transition: all 0.15s;
}

.recurso-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-lighter);
}

.recurso-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.875rem;
}

.recurso-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.recurso-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.375rem;
}

.recurso-card p {
    font-size: 0.8rem;
    margin-bottom: 0.625rem;
}

/* Newsletter */
.newsletter-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    margin-bottom: 1.25rem;
}

.newsletter-form {
    display: flex;
    gap: 0.625rem;
    max-width: 450px;
    margin: 0 auto 0.875rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.newsletter-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Contacto */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
}

.contacto-info h3 {
    margin-bottom: 0.75rem;
}

.contacto-info>p {
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.contacto-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contacto-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem;
    background: var(--bg-section);
    border-radius: var(--radius-md);
}

.contacto-card-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contacto-card-icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.contacto-card-info h4 {
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

.contacto-card-info p {
    font-size: 0.8rem;
}

.contacto-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.contacto-form h3 {
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: white;
    padding: 2.5rem 0 1.25rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    color: white;
}

.footer-logo .logo-icon {
    background: rgba(255, 255, 255, 0.2);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-top: 0.625rem;
    max-width: 260px;
}

.footer-col h4 {
    font-size: 0.85rem;
    color: white;
    margin-bottom: 0.875rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.375rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Popup */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.popup-overlay.active {
    display: flex;
}

.popup {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: popupIn 0.3s ease;
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.875rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

.popup-close:hover {
    color: var(--text-primary);
}

.popup-content {
    padding: 2rem;
    text-align: center;
}

.popup-content h3 {
    margin-bottom: 0.625rem;
    font-size: 1.15rem;
}

.popup-content>p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.popup-form {
    margin-bottom: 0.875rem;
}

.popup-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.625rem;
    font-size: 0.9rem;
}

.popup-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.popup-disclaimer {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {

    .hero-container,
    .clima-grid,
    .calc-container,
    .contacto-grid,
    .noticia-main {
        grid-template-columns: 1fr;
    }

    .clima-with-ad,
    .noticias-layout {
        flex-direction: column;
    }

    .ad-sidebar {
        grid-template-columns: 1fr;
    }

    .ad-sidebar .ad-slot {
        min-height: 150px;
    }

    .recursos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .noticias-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 0.625rem 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .hero {
        padding: 5rem 0 2.5rem;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 2.5rem 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .recursos-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand p {
        text-align: center;
    }

    .ad-sidebar {
        flex-direction: column;
    }

    .ad-sidebar .ad-slot {
        min-height: 200px;
    }

    /* === Herramientas Tabs === */
    .tools-tabs {
        display: flex;
        gap: 1rem;
        margin-bottom: 1.5rem;
        border-bottom: 2px solid var(--border);
        padding-bottom: 0.5rem;
    }

    .tool-tab {
        background: none;
        border: none;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-secondary);
        cursor: pointer;
        position: relative;
        transition: all 0.2s;
    }

    .tool-tab:hover {
        color: var(--primary);
    }

    .tool-tab.active {
        color: var(--primary);
    }

    .tool-tab.active::after {
        content: '';
        position: absolute;
        bottom: -0.6rem;
        left: 0;
        width: 100%;
        height: 3px;
        background: var(--primary);
        border-radius: 3px 3px 0 0;
    }

    .tool-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .tool-content.active {
        display: block;
    }

    /* Calculadora Canje */
    .canje-result-big {
        text-align: center;
        padding: 1.5rem;
        background: var(--bg-section);
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
    }

    .canje-value {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--primary);
        display: block;
        line-height: 1.2;
    }

    .canje-label {
        font-size: 0.9rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

}

/* === News Images Support === */
.noticia-main-image {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.noticia-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.noticia-main:hover .noticia-main-image img {
    transform: scale(1.05);
}

.noticia-main-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.noticia-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.noticia-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.noticia-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.noticia-card-image-small {
    height: 160px;
    overflow: hidden;
    background: var(--bg-section);
    position: relative;
}

.noticia-card-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.noticia-card:hover .noticia-card-image-small img {
    transform: scale(1.1);
}

.noticia-card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.noticia-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.noticia-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.noticia-link:hover {
    color: var(--secondary);
    text-decoration: none;
}

/* === News Filters === */
.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.filter-btn {
    background: var(--bg-section);
    border: 1px solid var(--border);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-lighter);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* === Navbar Theme Fix === */
.navbar {
    background: var(--bg-card);
    /* Replaces rgba hardcoded */
    border-bottom: 1px solid var(--border);
}

/* === Responsive Design === */
@media (max-width: 900px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .mini-prices {
        display: none;
    }

    .hero-visual {
        display: none;
    }

    .hero {
        padding: 4rem 0 2rem;
    }

    .calc-container {
        grid-template-columns: 1fr;
    }

    .noticias-layout {
        flex-direction: column;
    }

    .ad-sidebar {
        width: 100%;
        display: flex;
        gap: 1rem;
        overflow-x: auto;
    }

    .noticia-main {
        grid-template-columns: 1fr;
    }

    .clima-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.2s ease-out;
    }

    .nav-cta {
        display: none;
    }

    /* Simplify navbar on mobile */

    .form-row {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .section-header h1 {
        font-size: 2rem;
    }

    /* Theme toggle in mobile menu? Ideally yes, but sticking to desktop logic for simplicity or adding it to menu via JS if needed. For now, nav-cta is hidden, so button is hidden. I should maybe add it to nav-links or keep nav-cta visible but styled differently. Let's keep it simple. */
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for dark mode inputs */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
    background: var(--bg-section);
    color: var(--text-primary);
    border-color: var(--border);
}

[data-theme="dark"] .noticia-card-image-small {
    background: #333;
}

/* New Component Styles Added by Antigravity */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.modal-lg {
    max-width: 800px;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.modal-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.modal-form {
    display: none;
}

.modal-form.active {
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions .btn {
    flex: 1;
}

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25d366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
}

.comunidad-container {
    max-width: 800px;
    margin: 0 auto;
}

.comunidad-form {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.comunidad-form textarea {
    width: 100%;
    height: 100px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    resize: none;
    font-family: inherit;
    background: var(--bg-section);
    color: var(--text-primary);
}

.comunidad-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comentario {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comentario-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.comentario-content {
    flex: 1;
}

.comentario-content h4 {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.comentario-date {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comentario-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.news-detail-header h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.news-detail-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.news-detail-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.news-detail-body {
    line-height: 1.8;
}

.news-detail-body p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.news-source-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.result-services {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--border-light);
}

.result-services h4 {
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
}

.partners-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.service-promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid var(--primary-lighter);
    transition: transform 0.2s;
}

.service-promo:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.service-promo-info strong {
    display: block;
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.service-promo-info p {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-secondary);
}

.guia-promo {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-lg);
    color: white;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.guia-promo h3 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.guia-promo p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.guia-promo .btn-outline {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.guia-promo .btn-outline:hover {
    background: white;
    color: var(--primary);
}

.navbar,
.btn-primary,
.precio-card,
.calc-form,
.calc-results,
.noticia-main {
    backdrop-filter: blur(8px);
}

.precio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.precios-cta {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

@media (max-width: 600px) {
    .form-actions {
        flex-direction: column;
    }

    .news-detail-image {
        height: 200px;
    }

    .precio-amount {
        font-size: 1.75rem;
    }
}

/* PDF Report Styles (Virtual) */
#report-container {
    display: none;
}

.report-page {
    width: 210mm;
    min-height: 297mm;
    padding: 20mm;
    background: white;
    color: #000;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.report-logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: #000;
}

.report-meta {
    text-align: right;
    font-size: 0.85rem;
    color: #333;
}

.report-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    text-decoration: underline;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 3rem;
}

.report-table tr {
    border-bottom: 1px dashed #ccc;
}

.report-table td {
    padding: 1rem 0;
    font-size: 1rem;
}

.report-table td:last-child {
    text-align: right;
    font-weight: 700;
}

.report-result-box {
    border: 3px solid #000;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.report-result-box.negative {
    background: #f0f0f0;
}

.report-analysis {
    padding: 1.5rem;
    border: 1px solid #000;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: auto;
}

.report-footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

/* Institutional Footer */
.footer-corp {
    background: #111827;
    color: #f9fafb;
    padding: 5rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 4rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-identity .footer-logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
}

.footer-identity p {
    color: #9ca3af;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.85rem;
    margin-top: 2rem;
}

.disclaimer-mini {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
    border-left: 2px solid var(--primary);
}

/* Partners Section */
.partners-section {
    padding: 4rem 0;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
}

.partners-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.partner-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
    cursor: pointer;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-5px);
}

.partner-logo img {
    height: 50px;
    margin-bottom: 0.5rem;
}

.partner-logo span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Skeletons */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.news-featured-skeleton {
    width: 100%;
    height: 400px;
}

.news-card-skeleton {
    width: 100%;
    height: 300px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media print {
    body>*:not(#report-container) {
        display: none !important;
    }

    #report-container {
        display: block !important;
    }
}

/* CSS Update for Alert Banner & New Inputs */

.alert-banner {
    background-color: #fef9c3;
    border-left: 4px solid #eab308;
    color: #854d0e;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: fadeIn 0.5s ease;
}

.alert-banner.severe {
    background-color: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.alert-banner-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.alert-banner-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    color: inherit;
    font-weight: 700;
}

.alert-banner-content p {
    margin: 0;
    font-size: 0.85rem;
    color: inherit;
    line-height: 1.4;
}

/* Calculator New Inputs */
.toggle-switch.small {
    width: 36px;
    height: 20px;
}

.toggle-switch.small .toggle-slider:before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
}

.toggle-switch.small input:checked+.toggle-slider:before {
    transform: translateX(16px);
}

.input-tooltip {
    cursor: help;
    font-size: 0.8em;
    color: var(--text-muted);
    margin-left: 4px;
}

.input-group-append {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 0.5rem;
}

.input-group-append input {
    border: none;
    padding: 0.25rem 0;
    width: 100%;
    text-align: right;
    outline: none;
    background: transparent;
    color: var(--text-primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* VIENTO COMPASS UI */
.clm-wind-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.clm-wind-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 4px;
}

.clm-wind-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.clm-wind-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.clm-compass-container {
    width: 130px;
    height: 130px;
    margin-left: 20px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.compass-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15), inset 0 0 10px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .compass-ring {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.compass-ticks {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    pointer-events: none;
}

.compass-tick {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
}

.compass-tick-mark {
    width: 2px;
    border-radius: 4px;
}

.compass-tick-mark.major {
    height: 8px;
    background: rgba(100, 116, 139, 0.5);
}

.compass-tick-mark.minor {
    height: 4px;
    margin-top: 2px;
    background: rgba(100, 116, 139, 0.2);
}

.compass-ring span {
    position: absolute;
    font-weight: 700;
    font-size: 0.8rem;
    color: #64748b;
    z-index: 5;
    transition: color 0.3s ease;
}

.c-n {
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    color: #ef4444 !important;
    /* North Highlight */
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.c-e {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.c-s {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.c-o {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-center {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100 !important;
    pointer-events: none !important;
    width: 80px !important;
    /* Larger container */
    height: 80px !important;
    gap: 8px !important;
    /* Force explicit gap between children */
}

.compass-center span {
    position: relative !important;
    /* CRITICAL: DISABLE ABSOLUTE FROM RING */
    font-size: 2.2rem !important;
    /* Bold impact */
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1 !important;
    display: block !important;
    margin: 0 !important;
}

.compass-center small {
    position: relative !important;
    display: block !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    /* Rely on gap */
    letter-spacing: 0.15em !important;
}

[data-theme="dark"] .compass-center span {
    color: #ffffff !important;
}

[data-theme="dark"] .compass-center small {
    color: rgba(255, 255, 255, 0.8) !important;
}

.compass-arrow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.arrow-pointer {
    width: 4px;
    height: 40%;
    background: linear-gradient(to bottom, #ef4444, rgba(239, 68, 68, 0.2));
    position: absolute;
    top: 10%;
    left: calc(50% - 2px);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.arrow-pointer:after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 15px solid #ef4444;
    filter: drop-shadow(0 -2px 5px rgba(239, 68, 68, 0.6));
}

.arrow-pointer:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 1px;
    filter: blur(1px);
}

.arrow-dot {
    width: 10px;
    height: 10px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: absolute;
    top: calc(50% - 5px);
    left: calc(50% - 5px);
    z-index: 2;
}

/* HORIZONTAL FORECAST REFINEMENT (Strict) */
.clima-forecast-wrapper {
    width: auto !important;
    margin: 1.5rem -1.5rem 0 !important;
    /* Negative margin trick for edge-to-edge scroll */
    padding: 0 1.5rem !important;
    /* Internal padding for alignment */
    overflow-x: auto !important;
    display: block !important;
    scrollbar-width: none;
}

.clima-forecast-wrapper::-webkit-scrollbar {
    display: none;
}

.clm-forecast-extended {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    /* Reduced gap for better mobile fit */
    padding: 10px 0 !important;
    min-width: 100% !important;
    /* Symmetry fix: Center items if they don't overflow */
    justify-content: space-between !important;
}

.clm-forecast-day {
    flex: 1 0 auto !important;
    /* Allow growing to fill space symmetrically */
    min-width: 90px !important;
    max-width: 140px !important;
    min-height: 120px !important;
}

/* ==========================================
   SMART TOUR STYLES (v4.1) - RESTORED
   ========================================== */
.tour-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    transition: opacity 0.5s ease;
}

/* Highlighted Element (Elevated above backdrop) */
.tour-highlight {
    position: relative !important;
    z-index: 100000 !important;
    background: white !important;
    box-shadow: 0 0 0 4px var(--primary), 0 0 30px rgba(0, 0, 0, 0.5) !important;
    border-radius: 6px !important;
    pointer-events: none !important;
    /* Prevent interaction during ghost typing */
}

/* Tooltip Card */
.tour-tooltip {
    position: absolute;
    z-index: 100001;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    max-width: 340px;
    width: 90vw;
    animation: fadeInUp 0.4s ease forwards;
}

.tour-tooltip p {
    margin: 0 0 1.25rem 0;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #1e293b !important;
    /* Force dark text for readability */
    font-weight: 500;
}

.tour-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Welcome & Success Modal */
.tour-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    z-index: 200000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.tour-modal-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-top: 8px solid var(--primary);
    transform: translateY(0);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto !important;
}

.tour-modal-card.success-card {
    border-top-color: #10b981;
    /* Green for success */
}

.tour-modal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.tour-modal-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0f172a;
    font-weight: 700;
}

.tour-modal-card p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: #475569;
    line-height: 1.6;
}

/* Updated Buttons within Modal */
.btn-tour-primary {
    background: var(--primary);
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-tour-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    filter: brightness(1.1);
}

.btn-tour-text {
    background: transparent;
    color: #64748b;
    padding: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.5rem;
    border: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Gtos Com Input Styling (No Spinners) ===== */
.input-gastos-clean {
    -moz-appearance: textfield;
    appearance: none;
    /* Firefox */
}

.input-gastos-clean::-webkit-outer-spin-button,
.input-gastos-clean::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-gastos-clean:focus {
    outline: none;
    background-color: rgba(0, 0, 0, 0.02) !important;
}


/* ===== Resource Cards Grid (3 columns) ===== */
.recursos-grid-pro {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.recurso-card-pro {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.recurso-card-pro:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.recurso-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
}

.recurso-card-pro h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.recurso-card-pro p {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.recurso-card-pro .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    font-size: 0.85rem;
}

@media (max-width: 1024px) {
    .recursos-grid-pro {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .recursos-grid-pro {
        grid-template-columns: 1fr;
    }

}

/* =====================================
   SMART TOUR STYLES
   ===================================== */

/* Welcome & Finish Modal Overlay */
.tour-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: tourFadeIn 0.3s ease-out;
}

@keyframes tourFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tour-modal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: tourSlideUp 0.4s ease-out;
}

@keyframes tourSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tour-modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tour-modal-card h2 {
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
}

.tour-modal-card p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* Tour Primary Button */
.btn-tour-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-tour-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 86, 49, 0.3);
}

/* Tour Text Button */
.btn-tour-text {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-tour-text:hover {
    color: var(--primary);
}

/* Tour Backdrop */
.tour-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    pointer-events: none;
}

/* Tour Tooltip */
.tour-tooltip {
    position: absolute;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    max-width: 340px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: tourFadeIn 0.25s ease-out;
}

.tour-tooltip-content {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tour-tooltip-content strong {
    color: var(--primary);
}

/* Tour Next Button */
.tour-next-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    transition: all 0.2s ease;
}

.tour-next-btn:hover {
    background: var(--primary-light);
}

/* Tour Highlight */
.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px var(--primary), 0 0 20px rgba(30, 86, 49, 0.4);
    border-radius: var(--radius-sm);
}

/* Success Screen */
.tour-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: tourFadeIn 0.3s ease-out;
}

.tour-success-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.tour-success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.tour-success-card h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin: 0 0 0.75rem;
}

.tour-success-card p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* =====================================================
   MOBILE RESULT DOCK (Smart Bottom Sheet)
   Apple-style sticky footer for calculator results
   ===================================================== */

.mobile-result-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Show only on mobile */
@media (max-width: 768px) {
    .mobile-result-dock {
        display: block;
    }

    /* Hide desktop result card on mobile */
    .calc-result-clean {
        display: none !important;
    }
}

/* Collapsed Bar */
.dock-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.dock-bar:active {
    background: rgba(30, 41, 59, 0.98);
}

.dock-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dock-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dock-sublabel {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.dock-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dock-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.dock-value.positive {
    color: #4ade80;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.3);
}

.dock-value.negative {
    color: #f87171;
    text-shadow: 0 0 20px rgba(248, 113, 113, 0.3);
}

.dock-chevron {
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-result-dock.expanded .dock-chevron {
    transform: rotate(180deg);
}

/* Expanded Panel */
.dock-panel {
    max-height: 0;
    overflow: hidden;
    background: white;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-result-dock.expanded .dock-panel {
    max-height: 70vh;
    overflow-y: auto;
}

.dock-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.dock-panel-header span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.dock-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dock-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.dock-panel-content {
    padding: 1rem 1.25rem 2rem;
}

.dock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.dock-row span:first-child {
    color: var(--text-secondary);
}

.dock-row span:last-child {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.dock-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.dock-row.dock-total {
    border-bottom: none;
    padding: 1rem 0;
    background: rgba(30, 86, 49, 0.05);
    margin: 0 -1.25rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.dock-row.dock-total span:last-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.dock-row.dock-eva {
    padding: 1rem 0 0;
    border-bottom: none;
}

.dock-row.dock-eva span:last-child {
    font-size: 1rem;
    font-weight: 700;
}

/* Backdrop when expanded */
.dock-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.dock-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   Mobile PDF Button & Mobile Dock Updates
   ========================================= */
.dock-pdf-btn {
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    background-color: #dc2626;
    /* red-600 */
    color: white;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.5rem;
    /* rounded-lg */
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    /* shadow-lg */
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dock-pdf-btn:hover {
    background-color: #b91c1c;
    /* red-700 */
}

body.tutorial-active .mobile-result-dock {
    transition: transform 0.3s ease;
}

body.tutorial-active .mobile-result-dock.tour-dock-visible {
    transform: translateY(0) !important;
    pointer-events: auto !important;
    z-index: 10000 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Z-Index Fixes */
.tour-modal-overlay {
    z-index: 2000 !important;
}



.tour-highlight-inner {
    animation: tour-pulse-inner 1.5s ease-in-out infinite;
    position: relative;
    z-index: 10001;
}

@keyframes tour-pulse-inner {

    0%,
    100% {
        outline-color: #4ade80;
    }

    50% {
        outline-color: #22c55e;
        box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
    }
}

/* Weather Widget Margins (Apple Style Fixes) */
.clm-hourly-title {
    padding-left: 1.5rem !important;
    /* pl-6 */
}

.clm-hourly-slot.first-item {
    margin-left: 1.5rem !important;
}

.clm-hourly-slot.last-item {
    margin-right: 1.5rem !important;
}

.clm-hourly-scroll {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Mobile Dock Dark Mode */
[data-theme="dark"] .dock-panel {
    background-color: #1e293b !important;
    /* slate-800 */
    color: #e2e8f0 !important;
    /* slate-200 */
}

[data-theme="dark"] .dock-panel-content span {
    color: #e2e8f0;
}

/* Weather Widget Daily Forecast Fixes */
.clm-temp-header {
    padding-left: 1.5rem !important;
    /* pl-6 */
}

.clm-forecast-day.first-item {
    margin-left: 1.5rem !important;
}

.clm-forecast-day.last-item {
    margin-right: 1.5rem !important;
}

/* Ensure wrapper has no padding to allow edge-to-edge scroll */
.clima-forecast-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* =========================================
   Weather Widget Fixes (Structural Spacer Technique)
   ========================================= */
.clima-forecast-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
    scroll-padding-left: 0 !important;
    width: 100% !important;
}

.clm-hourly-scroll {
    padding-left: 0 !important;
    padding-right: 0 !important;
    scroll-padding-left: 0 !important;
    width: 100% !important;
}

/* Fix Icon/Text Spacing */
.clm-temp-header {
    display: flex;
    align-items: center;
    gap: 1.5rem !important;
    /* gap-6 */
    padding-left: 1.5rem !important;
    /* pl-6 container */
}

/* Ensure spacers work */
.w-6 {
    width: 1.5rem !important;
}

.flex-shrink-0 {
    flex-shrink: 0 !important;
}

.clm-forecast-day,
.clm-hourly-slot {
    flex-shrink: 0 !important;
}

/* =========================================
   Mobile Markets Grid (Zero Scroll)
   ========================================= */
@media (max-width: 768px) {
    .precios-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }

    .precio-card {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        height: 5.5rem !important;
        /* Compact h-22/h-24 */
        background-color: #1e293b !important;
        /* slate-800 */
        border: 1px solid #334155 !important;
        /* slate-700 */
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
        padding: 0.75rem !important;
        border-radius: 0.5rem !important;
        position: relative !important;
        width: 100% !important;
        min-height: 0 !important;
    }

    /* Hide redundant elements */
    .precio-icon,
    .precio-expand-icon,
    .precio-details,
    .precio-info h3,
    /* We use pseudo-element or direct styling */
    .precio-mercado,
    .precio-currency,
    .precio-unit {
        display: none !important;
    }

    /* 1. HEADER (Top Left) - Grain Name */
    /* Using Name from JS or DOM. Current DOM has `precio-info h3`. 
       We hid it above. Let's SHOW it but styled. */
    .precio-info h3 {
        display: block !important;
        font-size: 0.7rem !important;
        font-weight: 800 !important;
        text-transform: uppercase !important;
        color: #94a3b8 !important;
        /* slate-400 */
        letter-spacing: 0.05em !important;
        margin: 0 !important;
    }

    .precio-header {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
    }

    .precio-info {
        display: block !important;
    }

    /* 2. CHANGE (Top Right) */
    .precio-change {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        font-size: 0.65rem !important;
        font-weight: 700 !important;
        padding: 0.1rem 0.4rem !important;
        border-radius: 0.25rem !important;
    }

    .precio-change.up {
        background-color: rgba(22, 163, 74, 0.1) !important;
        color: #4ade80 !important;
    }

    .precio-change.down {
        background-color: rgba(220, 38, 38, 0.1) !important;
        color: #f87171 !important;
    }

    /* 3. PRICE (Bottom Left/Center) */
    .precio-main {
        display: block !important;
        margin-top: auto !important;
        padding-top: 0.5rem !important;
    }

    .precio-amount {
        font-size: 1.125rem !important;
        /* text-lg */
        font-weight: 700 !important;
        color: #f8fafc !important;
        /* text-slate-50 */
        letter-spacing: -0.025em !important;
    }
}

/* Tutorial Super Z-Index */
.tour-modal-overlay {
    z-index: 9999 !important;
}

.tour-backdrop {
    z-index: 9998 !important;
}

.tour-tooltip {
    z-index: 10000 !important;
}

/* Placeholder para noticias sin imagen */
.news-placeholder {
    width: 100%;
    height: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #0c4a1e 0%, #1a472a 50%, #0f3318 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.news-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 60%);
}

.news-placeholder span {
    font-size: 3rem;
    opacity: 0.4;
    z-index: 1;
}

.news-placeholder-sm {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(135deg, #0c4a1e 0%, #1a472a 50%, #0f3318 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.news-placeholder-sm::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 60%);
}

.news-placeholder-sm span {
    font-size: 1.8rem;
    opacity: 0.4;
    z-index: 1;
}