/* ===================================
   VITESA 6 AÑOS - Landing Page
   =================================== */

/* CSS Variables */
:root {
    --color-primary: #003366;
    --color-primary-light: #0066cc;
    --color-accent: #00a0dc;
    --color-accent-light: #4dc8f0;
    --color-text: #1a365d;
    --color-text-light: #4a5568;
    --color-bg: #f0f7ff;
    --color-bg-light: #f8fbff;
    --color-white: #ffffff;

    --font-family: 'Montserrat', sans-serif;

    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 51, 102, 0.1);
    z-index: 9999;
}

.progress-bar__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    transition: width 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: #edf2f8;
    overflow-x: hidden;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn--outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 51, 102, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.3);
}

.btn--outline:hover::before {
    left: 100%;
}

/* ===================================
   HEADER
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 30px rgba(0, 51, 102, 0.1);
    padding: 15px 0;
}

.header__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
    animation-delay: 0.2s;
}

.header__logo img {
    height: 45px;
    width: auto;
}

.header .btn {
    opacity: 0;
    animation: fadeInDown 0.8s ease forwards;
    animation-delay: 0.4s;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 70px 40px 20px;
    background: #edf2f8;
    overflow: hidden;
}

.hero__bg-picture {
    flex-shrink: 1;
}

.hero__content {
    flex-shrink: 0;
}

/* Pantallas con poca altura */
@media (max-height: 900px) {
    .hero {
        padding: 60px 40px 20px;
    }

    .hero__bg-picture {
        max-width: 550px;
    }

    .hero__content {
        margin-top: -50px;
    }

    .hero__title {
        font-size: clamp(24px, 4vw, 38px);
        margin-bottom: 12px;
    }

    .hero__description,
    .hero__cta-text {
        font-size: 13px;
        line-height: 1.5;
    }

    .hero__description {
        margin-bottom: 10px;
    }
}

@media (max-height: 750px) {
    .hero__bg-picture {
        max-width: 450px;
    }

    .hero__content {
        margin-top: -30px;
    }

    .hero__title {
        font-size: clamp(20px, 3.5vw, 32px);
        margin-bottom: 10px;
    }

    .hero__description {
        margin-bottom: 8px;
    }

    .hero__cta-text br {
        display: none;
    }
}

@media (max-height: 650px) {
    .hero__bg-picture {
        max-width: 350px;
    }

    .hero__title {
        font-size: 26px;
    }

    .hero__description,
    .hero__cta-text {
        font-size: 12px;
    }
}

/* Background Image - Full width */
.hero__bg-picture {
    display: block;
    width: 100%;
    max-width: min(950px, 95vh);
    margin: 0 auto;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: heroImageReveal 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.3s;
}

.hero__bg-img {
    width: 100%;
    height: auto;
    display: block;
    animation: imageFloat 6s ease-in-out infinite;
    animation-delay: 1.5s;
    -webkit-mask-image:
        linear-gradient(to right, black 0%, black 70%, transparent 95%);
    mask-image:
        linear-gradient(to right, black 0%, black 70%, transparent 95%);
}

/* Glow effect behind image */
.hero__glow {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(0, 160, 220, 0.15) 0%, transparent 70%);
    z-index: 1;
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

/* Particles */
.hero__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent-light);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
}

/* Hero Content */
.hero__content {
    max-width: 900px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 3;
    margin-top: -100px;
    padding: 0 20px;
}

.hero__title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--color-primary);
}

.hero__title-line {
    display: block;
    overflow: hidden;
}

.hero__title-line .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    animation: wordReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero__title-line--1 .word:nth-child(1) { animation-delay: 0.8s; }
.hero__title-line--1 .word:nth-child(2) { animation-delay: 0.9s; }
.hero__title-line--2 .word:nth-child(1) { animation-delay: 1.0s; }
.hero__title-line--2 .word:nth-child(2) { animation-delay: 1.1s; }
.hero__title-line--2 .word:nth-child(3) { animation-delay: 1.2s; }
.hero__title-line--3 .word:nth-child(1) { animation-delay: 1.3s; }
.hero__title-line--3 .word:nth-child(2) { animation-delay: 1.4s; }

.hero__title .word--highlight {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__description {
    font-size: clamp(14px, 1.6vw, 16px);
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.2s;
}

.hero__cta-text {
    font-size: clamp(14px, 1.5vw, 15px);
    color: var(--color-text);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 1.5s;
}

.hero__cta-text strong {
    color: var(--color-accent);
    font-weight: 700;
}

/* Scroll Indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 2.5s;
}

.hero__scroll-indicator span {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    animation: scrollBounce 2s ease-in-out infinite;
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wordReveal {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImageReveal {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes imageFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

@keyframes underlineReveal {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0.3;
    }
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

/* ===================================
   RESPONSIVE
   =================================== */
/* ===================================
   PARTICIPA SECTION
   =================================== */
.participa {
    position: relative;
    overflow: hidden;
    min-height: 600px;
}

/* Background image */
.participa__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.participa__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.participa__bg::after {
    display: none;
}

.participa__container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    min-height: 650px;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
}

/* Doctors image */
.participa__doctors {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: 40px;
    min-width: 0;
}

.participa__doctors-img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: bottom center;
    transform: translateY(50px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.participa__doctors.is-visible .participa__doctors-img {
    transform: translateY(0);
    opacity: 1;
}

.participa__content {
    flex: 0 0 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 50px;
    color: var(--color-white);
    transform: translateX(50px);
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.2s;
}

.participa__content.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.participa__title {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.1;
}

.participa__title .highlight {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.participa__text {
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.7;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.participa__text .highlight {
    color: var(--color-accent-light);
    font-weight: 600;
}

.participa__cta-text {
    font-size: clamp(15px, 1.5vw, 17px);
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--color-white);
}

.btn--outline-light {
    background: transparent;
    border: 2px solid var(--color-white);
    color: var(--color-white);
    width: fit-content;
}

.btn--outline-light:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===================================
   CONSULTORIO SECTION
   =================================== */
.consultorio {
    position: relative;
    overflow: hidden;
    background: #002C87;
}

.consultorio__container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Productos image */
.consultorio__productos {
    padding: 60px 20px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.consultorio__productos.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.consultorio__productos-img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 1100px;
    margin: 0 auto;
    animation: productsFloat 4s ease-in-out infinite;
}

@keyframes productsFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Content area */
.consultorio__content {
    padding: 40px 40px 80px;
}

.consultorio__text {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-white);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.2s;
}

.consultorio__text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.consultorio__title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin-bottom: 20px;
}

.consultorio__title .highlight {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.consultorio__subtitle {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.5;
    margin-bottom: 15px;
}

.consultorio__subtitle .highlight {
    color: var(--color-accent-light);
}

.consultorio__intro {
    font-size: clamp(15px, 1.5vw, 17px);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
}

.consultorio__description {
    font-size: clamp(14px, 1.4vw, 16px);
    line-height: 1.6;
    margin-bottom: 15px;
}

.consultorio__description--light {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    margin-bottom: 30px;
}

.consultorio__textarea-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.consultorio__textarea {
    width: 100%;
    min-height: 150px;
    padding: 25px;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-white);
    border: none;
    border-radius: 20px;
    outline: none;
    resize: vertical;
    transition: box-shadow var(--transition-fast);
}

.consultorio__textarea::placeholder {
    color: var(--color-text-light);
}

.consultorio__textarea:focus {
    box-shadow: 0 0 0 3px rgba(0, 160, 220, 0.3);
}

.consultorio__textarea:invalid:not(:placeholder-shown),
.consultorio__textarea.is-invalid {
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.3);
}

.consultorio__textarea:valid:not(:placeholder-shown) {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

.consultorio__counter {
    text-align: right;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    transition: color var(--transition-fast);
}

.consultorio__counter.is-near-limit {
    color: #fbbf24;
}

.consultorio__counter.is-at-limit {
    color: #ef4444;
    font-weight: 600;
}

/* Form error message */
.form__error {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

.form__error.is-visible {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ===================================
   ENVIAR SECTION
   =================================== */
.enviar {
    background: #e4ecf4;
    padding: 60px 40px 80px;
}

.enviar__container {
    max-width: 900px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.enviar__container.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.enviar__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 30px;
}

.enviar__checkboxes {
    margin-bottom: 35px;
}

.enviar__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    cursor: pointer;
    position: relative;
}

.enviar__checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.enviar__checkmark {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--color-white);
    border: 2px solid #c0ccd8;
    border-radius: 50%;
    transition: all var(--transition-fast);
    position: relative;
}

.enviar__checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.enviar__checkbox input:checked + .enviar__checkmark {
    border-color: var(--color-accent);
}

.enviar__checkbox input:checked + .enviar__checkmark::after {
    transform: translate(-50%, -50%) scale(1);
}

.enviar__checkbox-text {
    font-size: 15px;
    color: var(--color-text);
    line-height: 1.6;
    padding-top: 2px;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, #3bb8e0 100%);
    border: none;
    color: var(--color-white);
    font-weight: 600;
    padding: 16px 40px;
    box-shadow: 0 4px 15px rgba(0, 160, 220, 0.3);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 160, 220, 0.4);
}

.btn--primary:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

.btn--primary.is-loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn--primary.is-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpinner 0.8s linear infinite;
}

@keyframes btnSpinner {
    to {
        transform: rotate(360deg);
    }
}

.enviar__submit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.enviar__counter {
    font-size: 14px;
    color: var(--color-text-light);
    transition: color var(--transition-fast);
}

.enviar__counter.is-complete {
    color: #22c55e;
    font-weight: 600;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    overflow: hidden;
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Footer Top - Blue bar */
.footer__top {
    background: var(--color-primary);
    padding: 25px 0;
}

.footer__nav {
    display: flex;
    gap: 60px;
}

.footer__link {
    color: var(--color-white);
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-accent-light);
}

/* Footer Bottom - Light section */
.footer__bottom {
    background: #eef3f8;
    padding: 25px 0;
}

.footer__bottom .footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer__copyright {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.footer__credits {
    font-size: 13px;
    color: var(--color-text-light);
}

.footer__brands {
    display: flex;
    align-items: center;
    gap: 40px;
}

.footer__brand {
    height: 35px;
    width: auto;
    transition: transform var(--transition-fast);
}

.footer__brand:hover {
    transform: scale(1.05);
}

/* ===================================
   SUCCESS MODAL
   =================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.is-active {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 20, 60, 0.9);
    backdrop-filter: blur(10px);
}

.modal__content {
    position: relative;
    background: linear-gradient(145deg, #002C87 0%, #001a52 100%);
    padding: 50px 60px;
    border-radius: 24px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    transform: scale(0.8) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    border: 1px solid rgba(0, 160, 220, 0.3);
}

.modal__content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(0, 160, 220, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.modal.is-active .modal__content {
    transform: scale(1) translateY(0);
}

.modal__icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
    box-shadow: 0 10px 40px rgba(0, 160, 220, 0.4);
}

.modal__icon svg {
    width: 45px;
    height: 45px;
    color: white;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: checkDraw 0.5s ease 0.5s forwards;
}

@keyframes iconPop {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

@keyframes checkDraw {
    to {
        stroke-dashoffset: 0;
    }
}

.modal__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease 0.3s both;
}

.modal__text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 25px;
    animation: fadeInUp 0.5s ease 0.4s both;
    text-align: left;
}

.modal__text strong {
    color: var(--color-accent-light);
}

.modal__btn {
    animation: fadeInUp 0.5s ease 0.5s both;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
    border: none;
    box-shadow: 0 4px 20px rgba(0, 160, 220, 0.4);
}

.modal__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 160, 220, 0.5);
}

/* Confetti */
.modal__confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    opacity: 0;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(400px) rotate(720deg);
    }
}

/* ===================================
   FORMULARIO SECTION
   =================================== */
.formulario {
    position: relative;
    padding: 80px 40px;
    overflow: hidden;
}

.formulario__bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.formulario__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

@media (max-width: 768px) {
    .formulario__bg-img {
        object-position: 60% top;
    }
}

.formulario__container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}

.formulario__section {
    margin-bottom: 60px;
    text-align: center;
}

.formulario__title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 15px;
}

.formulario__subtitle {
    font-size: clamp(15px, 1.5vw, 17px);
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.formulario__subtitle--italic {
    font-style: normal;
    font-weight: 600;
    color: var(--color-primary);
}

.formulario__label {
    font-size: 15px;
    color: var(--color-text-light);
    margin-bottom: 25px;
}

/* Form Styles */
.form {
    max-width: 900px;
    margin: 0 auto;
}

.form__group {
    margin-bottom: 20px;
    flex: 1;
}

.form__group--full {
    width: 100%;
}

.form__row {
    display: flex;
    gap: 20px;
}

.form__input {
    width: 100%;
    padding: 18px 25px;
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-text);
    background: var(--color-white);
    border: 2px solid transparent;
    border-radius: 50px;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 20px rgba(0, 51, 102, 0.08);
}

.form__input::placeholder {
    color: var(--color-text-light);
}

.form__input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 4px 25px rgba(0, 160, 220, 0.15);
}

.form__input.is-invalid {
    border-color: #e53e3e;
    box-shadow: 0 4px 20px rgba(229, 62, 62, 0.1);
}

.form__input:not(.form__select):invalid:not(:placeholder-shown) {
    border-color: #e53e3e;
    box-shadow: 0 4px 20px rgba(229, 62, 62, 0.1);
}

.form__input:not(.form__select):valid:not(:placeholder-shown) {
    border-color: #22c55e;
}

.form__select.is-valid {
    border-color: #22c55e;
}

.form__select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

/* Technology Options */
.form__options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.form__option {
    position: relative;
    cursor: pointer;
}

.form__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.form__option-text {
    display: inline-block;
    padding: 15px 30px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-primary);
    background: rgba(200, 215, 235, 0.5);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all var(--transition-fast);
}

.form__option:hover .form__option-text {
    background: rgba(200, 215, 235, 0.8);
    transform: translateY(-2px);
}

.form__option input:checked + .form__option-text {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 5px 20px rgba(0, 51, 102, 0.3);
}

.form__option-otra {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--color-text-light);
}

.form__input-otra {
    width: 150px;
    padding: 10px 0;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--color-text);
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--color-text-light);
    outline: none;
    transition: border-color var(--transition-fast);
}

.form__input-otra:focus {
    border-bottom-color: var(--color-accent);
}

/* Animation for form sections */
.formulario__section {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.formulario__section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.formulario__section--tecnologia {
    transition-delay: 0.2s;
}

/* ===================================
   SCROLL ANIMATIONS
   =================================== */
.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.is-visible {
    opacity: 1;
}

/* Animated Titles - word by word */
.animate-title .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotateX(-20deg);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-title.is-visible .word {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

.animate-title.is-visible .word:nth-child(1) { transition-delay: 0.1s; }
.animate-title.is-visible .word:nth-child(2) { transition-delay: 0.15s; }
.animate-title.is-visible .word:nth-child(3) { transition-delay: 0.2s; }
.animate-title.is-visible .word:nth-child(4) { transition-delay: 0.25s; }
.animate-title.is-visible .word:nth-child(5) { transition-delay: 0.3s; }
.animate-title.is-visible .word:nth-child(6) { transition-delay: 0.35s; }

/* Animated Form Fields */
.animate-field {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: calc(var(--delay) * 0.1s);
}

.animate-field.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animated Options - bounce in */
.animate-option {
    opacity: 0;
    transform: scale(0.8) translateY(15px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: calc(var(--delay) * 0.08s);
}

.animate-option.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Animated Footer Brands */
.animate-brand {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: calc(var(--delay) * 0.15s);
}

.animate-brand.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Checkbox bounce animation */
.enviar__checkbox input:checked + .enviar__checkmark {
    animation: checkBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Submit button pulse */
.btn--primary {
    animation: subtlePulse 2s ease-in-out infinite;
}

.btn--primary:hover {
    animation: none;
}

@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 160, 220, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(0, 160, 220, 0.5); }
}

/* ===================================
   CLOSED PAGE
   =================================== */
.closed-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}

.header--closed {
    background: var(--color-white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.closed-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.closed-hero__image {
    max-width: 500px;
    width: 100%;
    margin-bottom: 40px;
}

.closed-hero__image img {
    width: 100%;
    height: auto;
}

.closed-hero__content h1 {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 20px;
}

.closed-hero__content p {
    font-size: 18px;
    color: var(--color-text-light);
    line-height: 1.6;
}

.closed-page .footer {
    margin-top: auto;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
    .hero__bg-picture {
        max-width: 650px;
    }

    .hero__title {
        font-size: clamp(28px, 4vw, 40px);
    }

    .participa__container {
        flex-direction: column;
    }

    .participa__doctors {
        flex: none;
        height: 450px;
        padding-top: 20px;
    }

    .participa__doctors-img {
        max-height: 100%;
        width: auto;
    }

    .participa__content {
        flex: none;
        padding: 50px;
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .header__container {
        padding: 0 20px;
    }

    .header__logo img {
        height: 35px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .hero {
        padding: 80px 20px 40px;
        min-height: auto;
    }

    .hero__bg-picture {
        max-width: 280px;
        margin: 0 auto;
    }

    .hero__content {
        margin-top: 20px;
    }

    .participa__container {
        display: flex;
        flex-direction: column-reverse;
    }

    .participa__doctors {
        flex: none;
        height: 400px;
        padding-top: 0;
        padding-bottom: 0;
        overflow: hidden;
    }

    .participa__doctors-img {
        width: 100%;
        max-width: none;
        object-fit: cover;
        object-position: top center;
    }

    .participa__content {
        flex: none;
        padding: 40px 30px;
    }

    .hero__title {
        font-size: 26px;
        margin-bottom: 15px;
    }

    .hero__description,
    .hero__cta-text {
        font-size: 14px;
    }

    .hero__cta-text br {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero__cta-text br {
        display: none;
    }

    .form__row {
        flex-direction: column;
        gap: 0;
    }

    .form__options {
        gap: 10px;
    }

    .form__option-text {
        padding: 12px 20px;
        font-size: 13px;
    }

    .formulario {
        padding: 60px 20px;
    }

    /* Consultorio mobile */
    .consultorio__productos {
        padding: 40px 15px 0;
    }

    .consultorio__productos-img {
        width: 100%;
        min-width: unset;
        animation: none;
    }

    .consultorio__content {
        padding: 30px 20px 60px;
    }

    .consultorio__subtitle br,
    .consultorio__description br {
        display: none;
    }

    .enviar {
        padding: 50px 20px 60px;
    }

    /* Footer mobile */
    .footer__container {
        padding: 0 20px;
    }

    .footer__nav {
        flex-direction: column;
        gap: 15px;
    }

    .footer__bottom .footer__container {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    .footer__info {
        align-items: center;
    }

    .footer__brands {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px 25px;
    }

    .footer__brand {
        height: 25px;
        max-width: 100px;
    }
}
