/* ========================================
   FREEDOM - Landing Page Mayoristas
   Mobile-First Design
   ======================================== */

/* CSS Variables */
:root {
    --color-primary: #C4001A;
    --color-primary-dark: #A80015;
    --color-white: #FFFFFF;
    --color-text: #2B2B2B;
    --color-bg-light: #F5F5F5;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ========================================
   FRANJA SUPERIOR (TOP BANNER)
   ======================================== */
.top-banner {
    background-color: var(--color-primary);
    padding: 12px 0;
}

.banner-text {
    text-align: center;
    margin: 0;
}

.banner-text span {
    color: var(--color-white);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@media (max-width: 767px) {
    .banner-text span {
        font-size: 14px;
    }
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   ALTERNANCIA AUTOMÁTICA DE FONDOS
   ======================================== */
section:nth-of-type(odd) {
    background-color: var(--color-white);
}

section:nth-of-type(even) {
    background-color: var(--color-bg-light);
}

/* Secciones con fondo fijo (no alternan) */
section.cta-final {
    background-color: var(--color-primary) !important;
}

/* Cards en secciones pares (fondo gris) tienen fondo blanco */
section:nth-of-type(even) .beneficio-card,
section:nth-of-type(even) .galeria-card,
section:nth-of-type(even) .faq-item {
    background-color: var(--color-white);
}

/* Cards en secciones impares (fondo blanco) tienen fondo gris */
section:nth-of-type(odd) .beneficio-card,
section:nth-of-type(odd) .galeria-card,
section:nth-of-type(odd) .faq-item,
section:nth-of-type(odd) .formulario-box {
    background-color: var(--color-bg-light);
}

/* Cards en secciones pares (fondo gris) - formulario box blanco */
section:nth-of-type(even) .formulario-box {
    background-color: var(--color-white);
}

/* ========================================
   BAJADAS AUTOMÁTICAS (h2 + p)
   ======================================== */
section h2 + p {
    text-align: center;
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 5px auto 40px !important;
}

section h2 {
    margin-bottom: 0 !important;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(196, 0, 26, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(196, 0, 26, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 4px 15px rgba(196, 0, 26, 0.3);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* Pulse animation for CTA buttons */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(196, 0, 26, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(196, 0, 26, 0.5), 0 0 0 10px rgba(196, 0, 26, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(196, 0, 26, 0.3);
    }
}

.btn-primary {
    animation: pulse 2s infinite;
}

.btn-primary:hover {
    animation: none;
}

.btn-full {
    width: 100%;
}

/* Section CTA */
.section-cta {
    text-align: center;
    margin-top: 40px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    padding: 40px 0 60px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero-text {
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero h1 + p {
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 30px;
    line-height: 1.7;
}

.hero-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* ========================================
   BENEFICIOS SECTION
   ======================================== */
.beneficios {
    padding: 60px 0;
}

.beneficios h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0;
    line-height: 1.1;
}

.beneficios-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.beneficio-card {
    background-color: var(--color-white);
    padding: 30px 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.beneficio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.beneficio-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(196, 0, 26, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--color-primary);
    font-size: 28px;
}

.beneficio-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

.beneficio-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ========================================
   CONFIANZA SECTION
   ======================================== */
.confianza {
    padding: 60px 0;
}

.confianza-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.confianza-images {
    display: block;
    position: relative;
    max-width: 500px;
}

.confianza-images img {
    width: 100%;
    height: auto;
    min-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.badge-tendencia {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 15px 25px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    font-style: italic;
    transform: rotate(15deg);
    box-shadow: 0 4px 15px rgba(196, 0, 26, 0.4);
}

.confianza-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
    line-height: 1.1;
}

.confianza-text h2 + p {
    text-align: left;
    margin-left: 0;
    margin-bottom: 20px;
}

.confianza-text > p {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 25px;
}

.confianza-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.confianza-lista li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text);
}

.confianza-lista svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ========================================
   GALERÍA SECTION
   ======================================== */
.galeria {
    padding: 60px 0;
}

.galeria h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0;
    line-height: 1.1;
}

.galeria-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.galeria-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.galeria-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.galeria-img {
    overflow: hidden;
}

.galeria-img img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.galeria-card:hover .galeria-img img {
    transform: scale(1.05);
}

.galeria-info {
    padding: 25px;
}

.galeria-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 10px;
}

.galeria-info p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .galeria {
        padding: 80px 0;
    }

    .galeria h2 {
        font-size: 34px;
    }

    .galeria-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

}

/* ========================================
   FORMULARIO SECTION
   ======================================== */
.formulario-section {
    padding: 60px 0;
}

.formulario-box {
    padding: 40px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    margin: 0 auto;
}

.formulario-box h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 10px;
    line-height: 1.1;
}

.formulario-box h2 + p {
    margin-bottom: 30px;
}

.formulario {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input,
.form-group select {
    padding: 14px 18px;
    font-size: 16px;
    font-family: var(--font-family);
    border: 2px solid #E0E0E0;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    background-color: var(--color-white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(196, 0, 26, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.form-disclaimer {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin-top: 5px;
}

/* ========================================
   WHATSAPP SECTION
   ======================================== */
.whatsapp-section {
    padding: 60px 0;
    text-align: center;
}

.whatsapp-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0;
    line-height: 1.1;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: var(--color-white);
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-whatsapp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-whatsapp:hover::before {
    left: 100%;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg {
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .whatsapp-section {
        padding: 80px 0;
    }

    .whatsapp-section h2 {
        font-size: 34px;
    }
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq {
    padding: 60px 0;
}

.faq h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0;
    line-height: 1.1;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--color-primary);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 20px 18px;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .faq {
        padding: 80px 0;
    }

    .faq h2 {
        font-size: 34px;
    }

    .faq-question {
        font-size: 17px;
        padding: 20px 25px;
    }

    .faq-answer p {
        padding: 0 25px 20px;
    }
}

/* ========================================
   CTA FINAL SECTION
   ======================================== */
.cta-final {
    background-color: var(--color-primary);
    padding: 60px 0;
    text-align: center;
}

.cta-final h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 12px;
    line-height: 1.1;
}

.cta-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 30px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background-color: var(--color-text);
    padding: 25px 0;
    text-align: center;
}

.footer-logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.footer-logo img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

.footer-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.footer-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   CREDITS BAR
   ======================================== */
.credits-bar {
    background-color: #1a1a1a;
    padding: 15px 0;
    text-align: center;
}

.credits-bar p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.credits-bar a {
    color: var(--color-primary);
    font-weight: 500;
    transition: var(--transition);
}

.credits-bar a:hover {
    color: #ff4d6a;
    text-decoration: underline;
}

/* ========================================
   TABLET STYLES (768px+)
   ======================================== */
@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }

    /* Hero */
    .hero {
        padding: 60px 0 80px;
    }

    .hero-content {
        flex-direction: row;
        align-items: center;
        gap: 60px;
    }

    .hero-text {
        flex: 1;
        text-align: left;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-image {
        flex: 1;
    }

    .hero-image img {
        height: 400px;
    }

    /* Beneficios */
    .beneficios {
        padding: 80px 0;
    }

    .beneficios h2 {
        font-size: 34px;
        margin-bottom: 50px;
    }

    .beneficios-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .beneficio-card {
        padding: 35px 30px;
    }

    /* Confianza */
    .confianza {
        padding: 80px 0;
    }

    .confianza-content {
        flex-direction: row;
        align-items: center;
        gap: 60px;
    }

    .confianza-images {
        flex: 1;
    }

    .confianza-images img {
        height: 300px;
    }

    .confianza-text {
        flex: 1;
    }

    .confianza-text h2 {
        font-size: 34px;
    }

    /* Formulario */
    .formulario-section {
        padding: 80px 0;
    }

    .formulario-box {
        padding: 50px 40px;
    }

    .formulario-box h2 {
        font-size: 30px;
    }

    /* CTA Final */
    .cta-final {
        padding: 80px 0;
    }

    .cta-final h2 {
        font-size: 32px;
    }
}

/* ========================================
   DESKTOP STYLES (1024px+)
   ======================================== */
@media (min-width: 1024px) {
    /* Hero */
    .hero h1 {
        font-size: 48px;
    }

    .hero-image img {
        height: 450px;
    }

    /* Beneficios */
    .beneficios-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }

    .beneficio-card {
        padding: 30px 20px;
    }

    .beneficio-card h3 {
        font-size: 16px;
    }

    /* Confianza */
    .confianza-images img {
        height: 320px;
    }

    /* CTA Final */
    .cta-final h2 {
        font-size: 36px;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 35px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text,
.hero-image,
.beneficio-card,
.confianza-content,
.formulario-box {
    animation: fadeInUp 0.6s ease-out forwards;
}

.beneficio-card:nth-child(1) { animation-delay: 0.1s; }
.beneficio-card:nth-child(2) { animation-delay: 0.2s; }
.beneficio-card:nth-child(3) { animation-delay: 0.3s; }
.beneficio-card:nth-child(4) { animation-delay: 0.4s; }
.beneficio-card:nth-child(5) { animation-delay: 0.5s; }

/* ========================================
   FORM SUCCESS STATE
   ======================================== */
.form-success {
    text-align: center;
    padding: 40px 20px;
}

.form-success svg {
    color: #28a745;
    margin-bottom: 20px;
}

.form-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 15px;
}

.form-success p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* ========================================
   LOADING STATE
   ======================================== */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   BOTÓN SUBIR
   ======================================== */
.btn-subir {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(196, 0, 26, 0.4);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.btn-subir.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-subir:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(196, 0, 26, 0.5);
}

.btn-subir:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .btn-subir {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
