/* ============================================================
   secciones-nuevas.css — Transformaciones, Contadores, Mapa, Simulador
   Disfruta Saludable Juchitán
   ============================================================ */

/* ===== BOTÓN FLOTANTE WHATSAPP ===== */
.btn-wa-flotante {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 999;
    background: #25D366;
    color: #fff;
    border-radius: 50px;
    padding: 14px 22px 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulseWa 2.5s infinite;
}

.btn-wa-flotante:hover {
    transform: scale(1.07);
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.6);
}

.btn-wa-flotante svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

@keyframes pulseWa {

    0%,
    100% {
        box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
    }

    50% {
        box-shadow: 0 6px 40px rgba(37, 211, 102, 0.7);
    }
}

/* ===== SECCIÓN TRANSFORMACIONES REALES ===== */
.transformaciones {
    background: #fff;
    padding: 7rem 0 5rem;
}

.transformaciones .section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.transform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* === SLIDER COMPARADOR === */
.comparador-wrap {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 36px rgba(46, 125, 50, 0.12);
    position: relative;
    background: #111;
    cursor: ew-resize;
    user-select: none;
}

.comparador-wrap:hover .comparador-handle {
    opacity: 1;
}

.comparador-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.comp-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.comp-after {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.05s linear;
}

.comparador-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #fff;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.comparador-handle::before,
.comparador-handle::after {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid rgba(46, 125, 50, 0.7);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    top: 50%;
    transform: translateY(-50%);
}

.comparador-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    background: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    border: 2px solid #2e7d32;
    color: #2e7d32;
    font-weight: 800;
}

/* Labels ANTES / DESPUÉS */
.comp-label {
    position: absolute;
    bottom: 1rem;
    z-index: 4;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.comp-label-antes {
    left: 0.8rem;
    background: rgba(0, 0, 0, 0.55);
}

.comp-label-despues {
    right: 0.8rem;
    background: rgba(46, 125, 50, 0.85);
}

/* Resultado badge */
.comparador-meta {
    background: #fff;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
}

.meta-item {
    text-align: center;
}

.meta-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2e7d32;
}

.meta-label {
    font-size: 0.78rem;
    color: #777;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== CONTADORES ANIMADOS ===== */
.contadores {
    background: linear-gradient(135deg, #1b5e20, #2e7d32 50%, #388e3c);
    padding: 6rem 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.contadores::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.contadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.contador-item {
    padding: 2rem 1rem;
}

.contador-icono {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: block;
}

.contador-num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #a5d6a7;
}

.contador-desc {
    font-size: 1rem;
    opacity: 0.88;
    font-weight: 500;
}

/* Calorias */
.calorias-section {
    background: #f9fdfa;
    padding: 5rem 0;
    text-align: center;
}

.calorias-num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 700;
    color: #2e7d32;
    line-height: 1;
}

.calorias-label {
    font-size: 1.1rem;
    color: #555;
    margin-top: 0.5rem;
}

.calorias-bar-wrap {
    max-width: 600px;
    margin: 2rem auto 0;
    background: #e8f5e9;
    border-radius: 50px;
    height: 16px;
    overflow: hidden;
}

.calorias-bar {
    height: 100%;
    background: linear-gradient(90deg, #66bb6a, #2e7d32);
    border-radius: 50px;
    width: 0;
    transition: width 2s ease;
}

/* ===== SIMULADOR PESO IDEAL ===== */
.simulador {
    background: linear-gradient(160deg, #f0f9f1, #e8f5e9);
    padding: 7rem 0 5rem;
}

.simulador .section-title {
    color: #0a3d0a !important;
    font-weight: 800;
}

.simulador .section-description {
    color: #0a3d0a !important;
    font-weight: 600;
}

.simulador .section-subtitle {
    color: #0a3d0a !important;
    background: rgba(46, 125, 50, 0.12);
    border: 1px solid rgba(46, 125, 50, 0.25);
    font-weight: 700;
}

/* Labels de inputs */
.sim-input-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #0a3d0a !important;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.simulador-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(46, 125, 50, 0.1);
    padding: 3rem;
    max-width: 700px;
    margin: 0 auto;
}

.simulador-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.sim-input-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sim-input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e8f5e9;
    border-radius: 12px;
    font-size: 1rem;
    color: #1a1a1a;
    transition: border-color 0.2s;
    background: #f9fdfa;
}

.sim-input-group input:focus {
    outline: none;
    border-color: #2e7d32;
    background: #fff;
}

.sim-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 1.5rem;
}

.sim-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
}

.sim-resultado {
    display: none;
    animation: fadeIn 0.4s ease;
}

.sim-resultado.visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sim-rango-bar {
    height: 20px;
    border-radius: 50px;
    background: linear-gradient(90deg, #f44336 0%, #ff9800 33%, #4caf50 66%, #2196f3 100%);
    margin: 0.8rem 0;
    position: relative;
}

.sim-indicador {
    position: absolute;
    top: -8px;
    width: 4px;
    height: 36px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sim-resultado-texto {
    background: #f0f9f1;
    border-left: 4px solid #2e7d32;
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    font-size: 0.97rem;
    color: #333;
    line-height: 1.6;
}

/* ===== MAPA ===== */
.mapa-section {
    background: linear-gradient(160deg, #071a09 0%, #0d2812 40%, #111f12 100%);
    padding: 7rem 0 5rem;
    position: relative;
}

.mapa-section::before {
    content: '';
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    height: 120px;
    background: #fff;
    clip-path: ellipse(55% 100% at 50% 0%);
    pointer-events: none;
}

/* Header sobre fondo oscuro */
.mapa-section .section-subtitle {
    background: rgba(255, 255, 255, 0.12);
    color: #a5d6a7;
    border: 1px solid rgba(165, 214, 167, 0.3);
}

.mapa-section .section-title {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.mapa-section .section-description {
    color: rgba(255, 255, 255, 0.70);
}

.mapa-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    align-items: start;
}

.mapa-iframe-wrap {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    aspect-ratio: 1;
}

.mapa-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Tarjeta de info sobre fondo oscuro */
.mapa-info {
    background: #ffffff;
    border-radius: 24px;
    padding: 2rem 2rem 2.2rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mapa-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #1b5e20;
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8f5e9;
}

.mapa-detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.97rem;
    color: #333;
    line-height: 1.6;
}

.mapa-detail .icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
    background: #e8f5e9;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-como-llegar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.40);
    transition: all 0.25s ease;
}

.btn-como-llegar:hover {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.50);
}

/* ===== MÚSICA ===== */
.musica-btn {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 999;
    background: #fff;
    border: 2px solid #2e7d32;
    color: #2e7d32;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
}

.musica-btn:hover {
    background: #2e7d32;
    color: #fff;
}

/* scroll-reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .mapa-container {
        grid-template-columns: 1fr;
    }

    .mapa-iframe-wrap {
        aspect-ratio: 4/3;
    }

    .transform-grid {
        grid-template-columns: 1fr;
    }

    .simulador-card {
        padding: 1.5rem;
    }

    .btn-wa-flotante span {
        display: none;
    }

    .btn-wa-flotante {
        padding: 14px;
        border-radius: 50%;
    }
}