/* ============================================
   MODO OSCURO - WARM EARTH PALETTE
   ============================================ */

/* Variables para modo oscuro */
[data-theme="dark"] {
    /* Fondos */
    --color-light: #1c1c1e;
    --color-white: #2c2c2e;
    --color-dark: #f5f5f5;

    /* Colores principales */
    --color-primary: #9bce26;
    --color-secondary: #6b9b3d;
    --color-accent: #9bce26;

    /* Gradientes oscuros */
    --gradient-primary: linear-gradient(135deg, #2c2c2e 0%, #3d5a2c 100%);
    --gradient-accent: linear-gradient(135deg, #3d5a2c 0%, #6b9b3d 100%);

    /* Sombras más sutiles */
    --shadow-sm: 0 2px 4px 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);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Ajustes específicos para modo oscuro */
[data-theme="dark"] body {
    background-color: #1c1c1e;
    color: #f5f5f5;
}

[data-theme="dark"] .header {
    background: rgba(28, 28, 30, 0.95);
    border-bottom: 1px solid rgba(155, 206, 38, 0.2);
}

[data-theme="dark"] .nav-link {
    color: #f5f5f5;
}

[data-theme="dark"] .nav-link:hover {
    color: #9bce26;
}

[data-theme="dark"] .hero {
    background:
        linear-gradient(rgba(28, 28, 30, 0.85), rgba(28, 28, 30, 0.85)),
        url('hero-background.png') center/cover no-repeat;
}

[data-theme="dark"] .hero::before {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card {
    background: rgba(44, 44, 46, 0.98);
    border: 1px solid rgba(155, 206, 38, 0.2);
}

[data-theme="dark"] .card:hover {
    border-color: #9bce26;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .card-title {
    color: #9bce26;
}

[data-theme="dark"] .card-text {
    color: #aeaeb2;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #9bce26;
}

[data-theme="dark"] p {
    color: #aeaeb2;
}

[data-theme="dark"] .section-title::after {
    background: linear-gradient(135deg, #3d5a2c 0%, #6b9b3d 100%);
}

[data-theme="dark"] .badge {
    background: linear-gradient(135deg, #3d5a2c 0%, #6b9b3d 100%);
    color: #f5f5f5;
}

[data-theme="dark"] .table-container {
    background: #2c2c2e;
}

[data-theme="dark"] thead {
    background: linear-gradient(135deg, #2c2c2e 0%, #3d5a2c 100%);
}

[data-theme="dark"] td {
    border-bottom: 1px solid rgba(155, 206, 38, 0.1);
    color: #aeaeb2;
}

[data-theme="dark"] tbody tr:hover {
    background-color: rgba(155, 206, 38, 0.1);
}

[data-theme="dark"] .contact-card {
    background: rgba(44, 44, 46, 0.98);
    border: 1px solid rgba(155, 206, 38, 0.2);
}

[data-theme="dark"] .contact-card:hover {
    border-color: #9bce26;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .contact-icon {
    background: transparent;
    color: #6b9b3d;
}

[data-theme="dark"] .contact-card:hover .contact-icon {
    color: #9bce26;
}

[data-theme="dark"] .contact-title {
    color: #9bce26;
}

[data-theme="dark"] .contact-link {
    color: #aeaeb2;
}

[data-theme="dark"] .contact-link:hover {
    color: #9bce26;
    background: rgba(155, 206, 38, 0.1);
}

[data-theme="dark"] .footer {
    background: #2c2c2e;
    border-top: 1px solid rgba(155, 206, 38, 0.2);
}

[data-theme="dark"] .footer p {
    color: #aeaeb2;
}

/* Medidas cards en modo oscuro */
[data-theme="dark"] .medida-card {
    background: rgba(44, 44, 46, 0.98);
    border: 2px solid rgba(155, 206, 38, 0.2);
}

[data-theme="dark"] .medida-card:hover {
    border-color: #9bce26;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .medida-header {
    border-bottom-color: rgba(155, 206, 38, 0.2);
}

[data-theme="dark"] .medida-icon {
    background: linear-gradient(135deg, #3d5a2c 0%, #6b9b3d 100%);
    color: #f5f5f5;
}

[data-theme="dark"] .altura-numero {
    color: #9bce26;
}

[data-theme="dark"] .altura-unidad {
    color: #aeaeb2;
}

[data-theme="dark"] .medida-visual {
    background: linear-gradient(to top,
            rgba(155, 206, 38, 0.15) 0%,
            rgba(155, 206, 38, 0.08) 50%,
            rgba(155, 206, 38, 0.03) 100%);
    border: 1px solid rgba(155, 206, 38, 0.15);
}

[data-theme="dark"] .altura-bar {
    background: linear-gradient(180deg,
            #9bce26 0%,
            #6b9b3d 50%,
            #3d5a2c 100%);
    box-shadow:
        0 -2px 8px rgba(155, 206, 38, 0.4),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(61, 90, 44, 0.6);
}

[data-theme="dark"] .medida-card:hover .altura-bar {
    box-shadow:
        0 -4px 16px rgba(155, 206, 38, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .altura-label {
    background: rgba(44, 44, 46, 0.95);
    color: #aeaeb2;
}

[data-theme="dark"] .info-item {
    background: rgba(155, 206, 38, 0.1);
    color: #f5f5f5;
}

[data-theme="dark"] .info-item svg {
    color: #9bce26;
}

[data-theme="dark"] .uso-tag {
    background: rgba(44, 44, 46, 0.9);
    border: 1px solid rgba(155, 206, 38, 0.3);
    color: #f5f5f5;
}

[data-theme="dark"] .uso-tag:hover {
    background: rgba(155, 206, 38, 0.15);
    border-color: #9bce26;
}

[data-theme="dark"] .popular-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
}

[data-theme="dark"] .premium-badge {
    background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%);
    color: white;
}

/* ============================================
   TOGGLE SWITCH PARA MODO OSCURO
   ============================================ */
.theme-toggle {
    background: var(--color-white);
    border: 2px solid var(--color-accent);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 1rem;
    white-space: nowrap;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.theme-toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(20deg);
}

[data-theme="dark"] .theme-toggle {
    background: #2c2c2e;
    border-color: #9bce26;
    color: #9bce26;
}

/* Transición suave al cambiar de tema */
body,
.header,
.card,
.hero,
.contact-card,
.medida-card,
.footer {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Responsive para el toggle */
@media (max-width: 768px) {
    .theme-toggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .theme-toggle-icon {
        font-size: 1rem;
    }

    .theme-toggle-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .theme-toggle {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .theme-toggle-text {
        display: none;
    }
}