@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --cobalt-blue: #0047AB;
    --snow-white: #FFFAFA;
    --lime-green: #32CD32;
    --solar-yellow: #FFD700;
    --dark-gray: #333333;
    --light-gray: #f4f7f6;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

    /* Semántica de Colores del Tema */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7f6;
    --text-primary: #0f172a; /* Slate 900 - Color oscuro de alto contraste */
    --text-secondary: #475569; /* Slate 600 */
    --card-bg: #ffffff;
    --card-border: rgba(0, 71, 171, 0.04);
    --tabs-bg: #f1f5f9; /* Slate 100 - A distinct background for the tabs frame */
    --header-bg: rgba(255, 255, 255, 0.97); /* 97% Opacidad para contraste perfecto en scroll */
    --dropdown-bg: rgba(255, 255, 255, 0.98);
    --input-bg: #ffffff;
    --input-border: #cbd5e1;
    --scrollbar-track: #f1f5f9;
    --scrollbar-thumb: #0047AB;
    --scrollbar-thumb-hover: #003380;
}

body.dark-mode {
    --bg-primary: #0f172a; /* Slate 900 */
    --bg-secondary: #1e293b; /* Slate 800 */
    --text-primary: #f8fafc; /* Slate 50 - Alto contraste */
    --text-secondary: #cbd5e1; /* Slate 300 */
    --card-bg: #1e293b;
    --card-border: rgba(255, 255, 255, 0.06);
    --tabs-bg: #0f172a; /* Slate 900 - A dark background that stands out on var(--card-bg) */
    --header-bg: rgba(15, 23, 42, 0.97);
    --dropdown-bg: rgba(30, 41, 59, 0.98);
    --input-bg: #1e293b;
    --input-border: #334155;
    --scrollbar-track: #0f172a;
    --scrollbar-thumb: #32CD32;
    --scrollbar-thumb-hover: #28a428;
    
    /* Variables generales redefinidas para el modo oscuro */
    --light-gray: #1e293b;
    --dark-gray: #f8fafc;
    --snow-white: #0f172a;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 2px solid var(--scrollbar-track);
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
    font-weight: 700;
    color: var(--cobalt-blue);
    transition: color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 100px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
    position: relative;
}

.btn::after {
    content: '\2192'; /* arrow character '→' */
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

.btn:hover {
    padding-right: 40px;
    padding-left: 30px;
}

.btn:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.btn-primary {
    background-color: var(--cobalt-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #003380;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 71, 171, 0.3);
}

.btn-action {
    background-color: var(--lime-green);
    color: white;
}

.btn-action:hover {
    background-color: #28a428;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(50, 205, 50, 0.3);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 71, 171, 0.04);
    transition: all 0.3s ease, background 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--cobalt-blue);
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 15px;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 8px 0;
    margin: 0 12px;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--cobalt-blue);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-links a:hover::after,
.nav-links li.active > a::after,
.nav-links li.active > .dropdown-link-wrapper > a::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links li.active > a,
.nav-links li.active > .dropdown-link-wrapper > a {
    color: var(--cobalt-blue);
}

/* Dropdowns */
.dropdown-link-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.dropdown-toggle-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 8px 4px;
    cursor: pointer;
    font-size: 0.72rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.dropdown-toggle-btn:hover {
    color: var(--cobalt-blue);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dropdown-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 71, 171, 0.08);
    border-radius: 14px;
    list-style: none;
    min-width: 290px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 0;
    border: 1px solid rgba(0, 71, 171, 0.05);
    border-top: 4px solid var(--cobalt-blue);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    padding: 11px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    transition: all 0.25s ease;
}

.dropdown-menu li a::after {
    display: none;
}

.dropdown-menu li a:hover {
    background-color: rgba(0, 71, 171, 0.04);
    color: var(--cobalt-blue);
    padding-left: 30px;
}

/* Desktop Hover & Indicator */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown:hover .dropdown-toggle-btn {
        transform: rotate(180deg);
        color: var(--cobalt-blue);
    }
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    background: linear-gradient(rgba(0, 71, 171, 0.6), rgba(0, 71, 171, 0.3)), url('hero_solar_toluca_1777856211376.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    padding-top: 80px;
}

.hero-content h2 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    border-bottom: 5px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.01);
    border-bottom-color: var(--cobalt-blue);
    box-shadow: 0 20px 40px rgba(0, 71, 171, 0.12);
}

.product-image {
    height: 250px;
    background-size: cover;
    background-position: center;
}

.product-content {
    padding: 30px;
}

.product-content h3 {
    margin-bottom: 15px;
}

/* Step Cards and Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
    border: 1px solid var(--card-border);
    border-top: 4px solid var(--solar-yellow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.step-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 71, 171, 0.12);
    border-top-color: var(--cobalt-blue);
}

.step-card.highlight-card {
    border-top-color: var(--lime-green);
}

.step-card.highlight-card:hover {
    border-top-color: var(--cobalt-blue);
}

/* Calculator Section */
.calculator {
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

.calc-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.calc-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    text-align: center;
}

.result-item {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.result-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lime-green);
}

/* Trust Section */
.trust-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.trust-card {
    text-align: center;
    padding: 40px;
}

.trust-card i {
    font-size: 3rem;
    color: var(--cobalt-blue);
    margin-bottom: 20px;
}

/* Form Section */
.quote-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

/* Sticky WhatsApp */
.whatsapp-sticky {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: var(--transition);
}

.wa-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: whatsapp-radar 3s infinite linear;
    opacity: 0;
    pointer-events: none;
}

.wa-ripple-1 {
    animation-delay: 0s;
}

.wa-ripple-2 {
    animation-delay: 0.75s;
}

.wa-ripple-3 {
    animation-delay: 1.5s;
}

.wa-ripple-4 {
    animation-delay: 2.25s;
}

.whatsapp-sticky:hover {
    transform: scale(1.18);
    background-color: #20ba5a;
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

.whatsapp-sticky:hover .wa-ripple {
    animation-play-state: paused;
}

@keyframes whatsapp-radar {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        background: #0a192f !important; /* Deep aesthetic dark blue - forced */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
        padding: 20px;
        align-items: stretch;
        gap: 8px;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-links.active {
        max-height: 80vh;
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        margin: 0;
        padding: 12px 10px;
        color: #ffffff !important; /* White text forced for both modes */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: color 0.3s ease;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover,
    .nav-links li.active > a,
    .nav-links li.active > .dropdown-link-wrapper > a {
        color: var(--solar-yellow); /* Contrast accent color on hover/active */
    }

    .dropdown-link-wrapper {
        justify-content: space-between;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .dropdown-toggle-btn {
        color: rgba(255, 255, 255, 0.7);
        transition: color 0.3s ease, transform 0.3s ease;
    }

    .dropdown-toggle-btn:hover {
        color: var(--solar-yellow);
    }

    .nav-links > li > a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.04); /* Translucent item background */
        border-radius: 8px;
        min-width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 5px 0 5px 20px;
        border-left: 3px solid var(--solar-yellow); /* Yellow left accent border */
        border-top: none;
        border-right: none;
        border-bottom: none;
    }

    .dropdown-menu.open {
        display: block;
    }

    .dropdown-menu li a {
        border-bottom: none;
        color: rgba(255, 255, 255, 0.85);
    }

    .dropdown-menu li a:hover {
        color: #ffffff;
        background: transparent;
        padding-left: 15px;
    }

    .dropdown-toggle-btn.open i {
        transform: rotate(180deg);
        color: var(--solar-yellow);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .trust-cards {
        grid-template-columns: 1fr;
    }
    
    .calc-results {
        grid-template-columns: 1fr;
    }

    .panel-tabs {
        flex-direction: column;
        border-radius: 20px;
        width: 100%;
        max-width: 450px;
        gap: 10px;
        padding: 12px;
    }

    .panel-tab {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .input-tabs {
        flex-direction: column;
        border-radius: 20px;
        width: 100%;
        max-width: 320px;
        gap: 8px;
        padding: 8px;
    }

    .input-tab {
        width: 100%;
        text-align: center;
        padding: 10px 15px;
    }
}

/* Premium Calculator Styles */
.premium-calc-container {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

@media (max-width: 768px) {
    .premium-calc-container {
        padding: 0;
    }
}

/* ===== STEP PROGRESS WIZARD ===== */
.calc-steps-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    position: relative;
}

.calc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 180px;
}

.step-bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    border: 3px solid transparent;
    transition: all 0.4s ease;
    position: relative;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.calc-step:nth-child(1) .step-bubble {
    background: linear-gradient(135deg, #0047AB, #2563EB);
    color: white;
}
.calc-step:nth-child(3) .step-bubble {
    background: linear-gradient(135deg, #16A34A, #32CD32);
    color: white;
}
.calc-step:nth-child(5) .step-bubble {
    background: linear-gradient(135deg, #D97706, #FBBF24);
    color: white;
}

.step-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-sublabel {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
    margin-top: -4px;
}

.step-connector {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #2563EB, #16A34A);
    max-width: 80px;
    position: relative;
    top: -18px;
    opacity: 0.4;
}

.step-connector:last-of-type {
    background: linear-gradient(90deg, #16A34A, #FBBF24);
}

/* Step section headers with vivid color bands */
.calc-step-section {
    border-radius: 16px;
    padding: 6px 20px 6px 12px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.calc-step-section.step-1 {
    background: linear-gradient(135deg, rgba(0,71,171,0.12), rgba(37,99,235,0.08));
    border-left: 4px solid #2563EB;
    color: #1D4ED8;
}

.calc-step-section.step-2 {
    background: linear-gradient(135deg, rgba(22,163,74,0.12), rgba(50,205,50,0.08));
    border-left: 4px solid #16A34A;
    color: #15803D;
}

.calc-step-section.step-3 {
    background: linear-gradient(135deg, rgba(217,119,6,0.12), rgba(251,191,36,0.08));
    border-left: 4px solid #FBBF24;
    color: #B45309;
}

.dark-mode .calc-step-section.step-1 { color: #60A5FA; }
.dark-mode .calc-step-section.step-2 { color: #4ADE80; }
.dark-mode .calc-step-section.step-3 { color: #FCD34D; }

.step-num-badge {
    background: currentColor;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
    filter: brightness(1.1);
}

@media (max-width: 576px) {
    .calc-steps-header {
        gap: 0;
    }
    .step-label { font-size: 0.65rem; }
    .step-sublabel { display: none; }
    .step-bubble { width: 44px; height: 44px; font-size: 1.1rem; }
    .step-connector { max-width: 30px; }
}



.calc-slider-box {
    margin-bottom: 60px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.slider-header .label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.slider-value-wrapper {
    background: var(--cobalt-blue);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 1.8rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 71, 171, 0.3);
}

.range-container {
    position: relative;
}

.premium-range {
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background: #eef2f5;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.premium-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    background: var(--cobalt-blue);
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 71, 171, 0.4);
    transition: var(--transition);
}

.premium-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #999;
}

.premium-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .premium-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .premium-results-grid {
        grid-template-columns: 1fr;
    }
}

.premium-card {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid rgba(0, 71, 171, 0.08);
    box-shadow: 0 10px 30px rgba(0, 71, 171, 0.04);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.premium-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 71, 171, 0.2);
    box-shadow: 0 20px 40px rgba(0, 71, 171, 0.12);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 71, 171, 0.06);
    color: var(--cobalt-blue);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.premium-card:hover .card-icon {
    background: rgba(0, 71, 171, 0.12);
    transform: scale(1.05);
}

.card-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.card-unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Modo oscuro específico para las cajas de resultados */
body.dark-mode .premium-card {
    background: var(--bg-primary); /* Slate 900, que resalta contra el fondo Slate 800 de la sección */
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body.dark-mode .premium-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.1);
}

body.dark-mode .card-icon {
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8; /* Color cian vibrante de alto contraste para modo oscuro */
}

body.dark-mode .premium-card:hover .card-icon {
    background: rgba(56, 189, 248, 0.2);
}

/* Panel Selector */
.panel-selector-wrapper {
    margin-bottom: 40px;
    text-align: center;
}

.selector-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.panel-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    background: var(--tabs-bg);
    border: 1px solid var(--card-border);
    padding: 8px;
    border-radius: 100px;
    width: fit-content;
    margin: 0 auto;
    transition: var(--transition);
}

.panel-tab {
    padding: 14px 28px;
    border-radius: 100px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.panel-tab.active {
    background: var(--cobalt-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 71, 171, 0.25);
}

.panel-tab.active .tab-badge {
    background: white;
    color: var(--cobalt-blue);
}

.panel-tab:hover, .input-tab:hover {
    color: var(--text-primary);
    animation: hover-pulse 1s infinite ease-in-out;
}

@keyframes hover-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
    100% {
        transform: scale(1);
    }
}

.tab-badge {
    background: var(--lime-green);
    color: white;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Input Type Selector */
.input-type-selector {
    margin-bottom: 40px;
    text-align: center;
}

.input-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: var(--tabs-bg);
    border: 1px solid var(--card-border);
    padding: 6px;
    border-radius: 100px;
    width: fit-content;
    margin: 0 auto;
    transition: var(--transition);
}

.input-tab {
    padding: 12px 24px;
    border-radius: 100px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
    color: var(--text-secondary);
    font-size: 1rem;
}

.input-tab.active {
    background: var(--cobalt-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 71, 171, 0.2);
}

/* Advanced Settings Accordion */
.advanced-settings-wrapper {
    margin-bottom: 40px;
}

.advanced-toggle {
    background: transparent;
    border: 1px solid var(--input-border);
    width: 100%;
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.advanced-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--cobalt-blue);
    color: var(--text-primary);
}

body.dark-mode .advanced-toggle:hover {
    border-color: #38bdf8;
    color: #38bdf8;
}

/* Estilos de campos de ajustes avanzados */
.setting-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-field label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.setting-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.setting-field input:focus {
    border-color: var(--cobalt-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 71, 171, 0.15);
}

body.dark-mode .setting-field input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

.advanced-toggle i {
    font-size: 1rem;
}

.advanced-toggle .chevron {
    transition: transform 0.3s ease;
}

.advanced-toggle.active .chevron {
    transform: rotate(180deg);
}

.advanced-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.advanced-content.open {
    max-height: 300px;
    margin-top: 20px;
}

.settings-grid-advanced {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 15px;
    transition: background-color 0.3s ease;
}

@media (max-width: 576px) {
    .settings-grid-advanced {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--card-bg);
    color: var(--text-primary);
    margin: 3vh auto;
    padding: 24px 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    animation: slideIn 0.4s ease-out;
    max-height: 94vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--dark-gray);
}

.modal-header {
    text-align: center;
    margin-bottom: 12px;
}

.modal-header h3 {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: var(--cobalt-blue);
}

.modal-header p {
    font-size: 0.9rem;
    opacity: 0.7;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-primary);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--cobalt-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 71, 171, 0.15);
}

.form-note {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 20px;
    text-align: center;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 1;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox-modal.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f5f9;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2010;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--solar-yellow);
    text-decoration: none;
}

.lightbox-caption {
    margin-top: 20px;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Zoom cursor on clickable diagrams */
.zoomable-image {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zoomable-image:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 71, 171, 0.15) !important;
}

/* Wave Divider Styling */
.hero-wave-divider {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

.hero-wave-divider svg {
    transform: scaleY(1.15);
    transform-origin: top;
}

.hero-wave-divider svg path {
    fill: var(--hero-wave-fill, var(--bg-primary));
    transition: fill 0.3s ease;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 8px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease, color 0.3s ease;
    margin-left: 10px;
}

.dark-mode-toggle-btn:hover {
    color: var(--cobalt-blue);
    transform: scale(1.1) rotate(15deg);
}

body.dark-mode .dark-mode-toggle-btn:hover {
    color: var(--lime-green);
}

@media (max-width: 768px) {
    .dark-mode-toggle-btn {
        margin: 10px 0;
        align-self: flex-start;
    }
}
