/* BLOQUE: VARIABLES Y BASE */
:root {
    --violeta-1: #8400e7;
    --violeta-2: #8662e9;
    --naranja: #f49d2a;
    --gris: #6d6d6d;
    --fondo: #ebeae5;
    --blanco: #ffffff;
    --whatsapp-green: #25D366;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--fondo);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

:focus-visible {
    outline: 3px solid var(--naranja);
    outline-offset: 4px;
}

/* BLOQUE: CONTENEDOR PRINCIPAL */
.content-wrapper {
    max-width: 1200px;
    width: 90%;
    border-radius: 40px;
    box-shadow: 0 40px 40px rgba(184, 182, 171, 0.5);
    position: relative;
    background: var(--blanco);
    overflow: visible; 
}

.main-card {
    display: flex;
    flex-wrap: wrap;
    min-height: 600px;
}

/* BLOQUE: IZQUIERDO - INFORMACIÓN */
.info-content {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px;
    gap: 45px;
}

.info-content > header,
.info-content > nav,
.info-content > section,
.info-content > footer {
    width: 100%;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* BLOQUE: TÍTULOS */
.main-title {
    color: var(--violeta-1);
    line-height: 0.95;
    margin: 40px 0 0 0;
    letter-spacing: -1px;
}

.main-title i {
    font-style: italic;
    font-weight: 700;
    font-size: 3.5rem;
}

.main-title span {
    font-weight: 300;
    font-style: normal;
    display: block;
    font-size: 3rem;
}

.subtitle {
    color: var(--naranja);
    font-size: 1.4rem;
    font-weight: 500;
}

/* BLOQUE: BOTONES ACCIÓN */
.actions {
    display: flex;
    gap: 15px;
}

.btn {
    flex: 1;
    text-decoration: none;
    padding: 14px 10px;
    border-radius: 8px;
    font-size: 1.2rem;
    color: white;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(45deg, var(--violeta-1) 0%, var(--violeta-2) 100%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease-in-out;
}

.btn:hover {
    transform: scale(0.97);
}

.btn-whatsapp .btn-content-default,
.btn-whatsapp .btn-content-hover {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.btn-content-hover {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--whatsapp-green);
    transform: translateY(100%);
}

.btn-whatsapp:hover .btn-content-default { transform: translateY(-100%); }
.btn-whatsapp:hover .btn-content-hover { transform: translateY(0); }

.btn-commerce:hover {
    background: #f1f0ec;
    color: var(--violeta-1);
    outline: 2px solid var(--violeta-2);
}

/* BLOQUE: CONTACTO */
.contact-data {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-box {
    background-color: #f1f0ec;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.4s ease-in-out;
    text-decoration: none;
}

.contact-box:hover {
    background-color: #e8e6e1;
    transform: scale(0.98);
}

.contact-link {
    text-decoration: none;
    color: var(--gris);
    font-size: 1rem;
}

.contact-box:hover .contact-link,
.contact-box:hover .phone-number {
    color: var(--violeta-1);
}

.phone-number {
    color: var(--naranja);
    font-weight: 700;
}

/* BLOQUE: FOOTER / LEGAL */
.footer-links {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    justify-content: center;
}

.social-media {
    display: flex;
    gap: 15px;
}

.social-link {
    color: var(--violeta-1);
    font-size: 1.8rem;
    opacity: 0.5;
    transition: all 0.4s ease-in-out;
}

.social-link:hover {
    opacity: 1;
    transform: scale(1.1);
}

.legal {
    display: flex;
    flex-direction: column;
}

.legal-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-legal {
    color: var(--naranja);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    transition: color 0.4s ease-in-out;
}

.btn-legal:hover { color: var(--violeta-1); }

.legal-info, .separator {
    font-size: 0.65rem;
    color: var(--gris);
    line-height: 1.2;
    font-style: normal;
}

/* BLOQUE: DERECHO - IMAGEN */
.visual-content {
    flex: 0 0 40%;
    background-color: var(--fondo);
    position: relative;
    display: flex;
    align-items: flex-end;
}

.hero-container {
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: entradaLarga 2.5s cubic-bezier(0.1, 0.9, 0.2, 1) forwards 1.2s;
}

.hero-image {
    position: absolute;
    right: -50px;
    bottom: -15px;
    width: 135%;
    z-index: 10;
    pointer-events: none;
    animation: flotarLateral 8s ease-in-out infinite;
    will-change: transform;
}

/* BLOQUE: ANIMACIONES ESCRITORIO */
@keyframes entradaLarga {
    0% { opacity: 0; transform: translateX(200px); filter: blur(10px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes flotarLateral {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-25px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.info-content > .bloque-secundario {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.info-content > .intro { animation-delay: 0.4s; }
.info-content > .actions { animation-delay: 1s; }
.info-content > .contact-data { animation-delay: 1.4s; }
.info-content > .footer-links { animation-delay: 2s; }

/* BLOQUE: RESPONSIVE (MÓVIL) */
@media (max-width: 850px) {
    /* En móvil usamos layout en bloque para evitar comportamientos de flex que generan overflow */
    .main-card { display: block; overflow: hidden; }
    .main-card > * { width: 100%; box-sizing: border-box; }

    .contact-box {
        padding: 15px 5px;
    }

    .subtitle {
        width: 14rem;
        margin: 6px auto;
        line-height: 1.1;
    }
    
    .info-content {
        flex: 0 0 100%;
        padding: 40px 20px;
        text-align: center;
        align-items: center;
    }

    .visual-content { 
        flex: 0 0 100%;
        padding: 0;
        background-color: var(--fondo);
        overflow: hidden;
    }

    .hero-container {
        opacity: 1; /* Reset para manejar por JS */
        animation: none; 
        margin-bottom: -10px;
    }

    .hero-image {
        position: relative;
        width: 100%;
        right: 0;
        bottom: 0;
        margin-bottom: -5px;
        animation: vaivenMovil 6s ease-in-out infinite;
    }

    .main-title i { font-size: clamp(2.2rem, 10vw, 3.5rem); }
    .main-title span { font-size: clamp(1.8rem, 8vw, 3rem); }

    .footer-links {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding-bottom: 30px;
    }

    .legal-btns, .social-media { justify-content: center; width: 100%; display: flex; }

    /* Lógica de ocultamiento para Scroll en Móvil */
    .info-content > .bloque-secundario, 
    .hero-container {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
        animation: none; /* Desactivamos animaciones automáticas de escritorio */
    }

    /* Clase activada por el Script */
    .aparecer-scroll {
        opacity: 1 !important;
        transform: translateY(0) !important;
        filter: blur(0) !important;
        transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    }

    /* Reducir tamaño de la fuente del email y permitir quiebre en móvil */
    .contact-link {
        font-size: 0.8rem !important;
    }
}

@keyframes vaivenMovil {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}