/* =========================================================
   OFILANY - Estilos personalizados
   Ubicación: assets/style.css
   ========================================================= */

/* Smooth scrolling para enlaces ancla */
html {
    scroll-behavior: smooth;
}

/* Evitar scroll horizontal en móvil */
body {
    overflow-x: hidden;
}

/* Mejor renderizado de imágenes */
img {
    max-width: 100%;
    height: auto;
}

/* =========================================================
   ICONO MONOCROMÁTICO CON MASK
   La imagen SVG se usa como máscara y el background-color
   del elemento define el color visible. Así el mismo SVG
   puede cambiar de color (rosa → blanco) al hacer hover.
   ========================================================= */
.icon-mask {
    display: inline-block;
    -webkit-mask-image: var(--icon);
    mask-image: var(--icon);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* =========================================================
   PRICING TOGGLE (Mensual / Anual)
   ========================================================= */
#pricing-toggle.active {
    background-color: #ea2b90; /* ofilany-primary */
}

#pricing-toggle.active #toggle-circle {
    transform: translateX(2rem);
}

#toggle-circle {
    transition: transform 0.3s ease-in-out;
}

/* =========================================================
   ANIMACIONES SUTILES (opcionales)
   ========================================================= */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* =========================================================
   CARRUSEL DE TESTIMONIOS
   ========================================================= */

/* Dots indicadores */
.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.testimonial-dot:hover {
    background-color: rgba(234, 43, 144, 0.6);
}

.testimonial-dot.active {
    background-color: #ea2b90;
    width: 28px;
}

/* Evitar que el track genere overflow visible */
#testimonials-viewport {
    overflow: hidden;
}

#testimonials-track {
    will-change: transform;
}

/* Responsive: en móvil los slides ocupan 100% */
@media (max-width: 767px) {
    .testimonial-slide {
        width: 100%;
    }
}
/* =========================================================
   PÁGINA DE TÉRMINOS Y CONDICIONES
   ========================================================= */

/* Scroll suave ya está definido globalmente */

/* Estilos tipográficos para el contenido legal */
.prose-ofilany h2 {
    scroll-margin-top: 7rem;
}

.prose-ofilany p,
.prose-ofilany li {
    line-height: 1.75;
}

.prose-ofilany ul li::marker {
    color: #ea2b90;
}

.prose-ofilany a {
    transition: color 0.2s ease;
}

/* Resaltar la sección cuando se navega desde el índice */
.prose-ofilany section:target {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0% { background-color: rgba(234, 43, 144, 0.08); }
    100% { background-color: transparent; }
}
/* =========================================================
   WIDGET WHATSAPP FLOTANTE
   ========================================================= */

.wa-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

/* ---------- Burbuja flotante ---------- */
.wa-bubble {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ea2b90;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(234, 43, 144, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    animation: wa-pulse 2.5s infinite;
}

.wa-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(234, 43, 144, 0.55);
    background-color: #d12480;
}

.wa-bubble svg {
    width: 30px;
    height: 30px;
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.wa-bubble .wa-icon-close {
    position: absolute;
    width: 24px;
    height: 24px;
    opacity: 0;
    transform: rotate(-90deg);
}

/* Estado abierto */
.wa-widget.wa-open .wa-bubble {
    animation: none;
}

.wa-widget.wa-open .wa-icon-wa {
    opacity: 0;
    transform: rotate(90deg);
}

.wa-widget.wa-open .wa-icon-close {
    opacity: 1;
    transform: rotate(0deg);
}

.wa-widget.wa-open .wa-badge {
    opacity: 0;
    transform: scale(0);
}

/* Badge de notificación */
.wa-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #391f47;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Pulso sutil */
@keyframes wa-pulse {
    0%   { box-shadow: 0 8px 24px rgba(234, 43, 144, 0.45), 0 0 0 0 rgba(234, 43, 144, 0.6); }
    70%  { box-shadow: 0 8px 24px rgba(234, 43, 144, 0.45), 0 0 0 16px rgba(234, 43, 144, 0); }
    100% { box-shadow: 0 8px 24px rgba(234, 43, 144, 0.45), 0 0 0 0 rgba(234, 43, 144, 0); }
}

/* ---------- Popup ---------- */
.wa-popup {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 340px;
    max-width: calc(100vw - 32px);
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(57, 31, 71, 0.25);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    border: 1px solid rgba(57, 31, 71, 0.08);
}

.wa-widget.wa-open .wa-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header del popup */
.wa-popup-header {
    background: linear-gradient(135deg, #391f47 0%, #4d2a5d 100%);
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.wa-popup-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #ea2b90;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}

.wa-popup-info {
    flex: 1;
    min-width: 0;
}

.wa-popup-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.wa-popup-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wa-online-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    animation: wa-dot-pulse 1.5s infinite;
}

@keyframes wa-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.wa-popup-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.wa-popup-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Cuerpo del popup */
.wa-popup-body {
    padding: 18px;
    background-color: #f7f7f9;
    max-height: 380px;
    overflow-y: auto;
}

.wa-message {
    background-color: #ffffff;
    padding: 12px 14px;
    border-radius: 12px 12px 12px 2px;
    box-shadow: 0 2px 6px rgba(57, 31, 71, 0.06);
    margin-bottom: 16px;
    position: relative;
}

.wa-message p {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.wa-message-time {
    display: block;
    font-size: 10px;
    color: #9ca3af;
    text-align: right;
    margin-top: 4px;
}

/* Opciones rápidas */
.wa-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wa-quick-btn {
    background-color: #ffffff;
    border: 1.5px solid #ea2b90;
    color: #391f47;
    font-size: 13px;
    font-weight: 500;
    padding: 11px 14px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    line-height: 1.3;
}

.wa-quick-btn:hover {
    background-color: #ea2b90;
    color: #ffffff;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(234, 43, 144, 0.25);
}

.wa-quick-btn:active {
    transform: translateX(1px) scale(0.98);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .wa-widget {
        bottom: 18px;
        right: 18px;
    }

    .wa-bubble {
        width: 54px;
        height: 54px;
    }

    .wa-bubble svg {
        width: 26px;
        height: 26px;
    }

    .wa-popup {
        width: calc(100vw - 36px);
        bottom: 70px;
        right: 0;
    }

    .wa-popup-body {
        padding: 14px;
        max-height: 340px;
    }

    .wa-quick-btn {
        font-size: 12.5px;
        padding: 10px 12px;
    }
}

/* Respeto a usuarios que prefieren menos animaciones */
@media (prefers-reduced-motion: reduce) {
    .wa-bubble,
    .wa-popup,
    .wa-quick-btn,
    .wa-bubble svg {
        animation: none !important;
        transition: none !important;
    }
}