/* =============================================
   ACAVEM / Leclinvet - Registro de Interesados
   Base: mobile-first → tablet → desktop
   ============================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px; /* base para rem */
}

/* ================================================
   HEADER
   ================================================ */
.site-header {
    background: #ffffff;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid #1b6ca8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Móvil: logos más chicos */
.site-header .logo-acavem {
    height: 44px;
    width: auto;
    max-width: 45%;
}

.site-header .logo-mdv {
    height: 34px;
    width: auto;
    max-width: 45%;
}

/* ================================================
   HERO / FONDO
   ================================================ */
.hero-wrap {
    flex: 1;
    background: linear-gradient(135deg, #1b6ca8 0%, #0e4272 55%, #071f40 100%);
    display: flex;
    align-items: flex-start;  /* mobile: no centrar verticalmente */
    justify-content: center;
    padding: 20px 12px;
}

/* ================================================
   CARD DEL FORMULARIO
   ================================================ */
.form-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
    width: 100%;
    max-width: 760px;
    padding: 20px 16px 24px; /* móvil: compacto */
}

.form-card .card-title {
    font-size: 1.3rem; /* móvil */
    font-weight: 700;
    color: #1b6ca8;
    margin-bottom: 4px;
    line-height: 1.2;
}

.form-card .card-subtitle {
    font-size: 0.84rem;
    color: #6c7a85;
    margin-bottom: 20px;
    line-height: 1.4;
}

/* ================================================
   FILAS Y GRUPOS DE CAMPO
   ================================================ */
.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap; /* colapsa a columna en móvil */
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%; /* móvil: siempre ancho completo */
    min-width: 0;   /* evita overflow en flex */
}

.form-group.full {
    flex: 1 1 100%;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.form-group label .req {
    color: #e53e3e;
    margin-left: 2px;
}

/* ================================================
   CONTROLES — táctil-friendly (min 44px altura)
   ================================================ */
.form-control {
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 11px 12px;    /* más alto para tacto */
    font-size: 1rem;       /* 16px evita zoom automático en iOS */
    color: #2d3748;
    background: #f7fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    min-height: 44px;      /* guía Apple/Google para touch targets */
}

.form-control:focus {
    outline: none;
    border-color: #1b6ca8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(27, 108, 168, 0.18);
}

.form-control.is-invalid {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231b6ca8' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Multi-select: más alto en móvil para facilitar selección táctil */
select[multiple].form-control {
    background-image: none;
    padding-right: 12px;
    height: 140px;
}

.form-hint {
    font-size: 0.76rem;
    color: #718096;
    margin-top: 5px;
    line-height: 1.4;
}

kbd {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 0.74rem;
    font-family: inherit;
}

/* ================================================
   RADIO CÉDULA
   ================================================ */
.radio-group {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 10px 0 2px;
    flex-wrap: wrap;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 400;
    color: #2d3748;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    min-height: 44px; /* touch target */
}

.radio-group input[type="radio"] {
    accent-color: #1b6ca8;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ================================================
   DIVIDER Y ETIQUETA DE SECCIÓN
   ================================================ */
.section-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 6px 0 18px;
}

.section-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #1b6ca8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

/* ================================================
   BOTÓN ENVIAR
   ================================================ */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: #2d8a3e;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
    margin-top: 10px;
    min-height: 48px; /* touch target generoso */
}

.btn-submit:hover  { background: #236e30; }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

/* ================================================
   ALERTAS
   ================================================ */
.alert {
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: none;
    line-height: 1.5;
}

.alert-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

.alert-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
}

.alert.show { display: block; }

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
    background: #0e4272;
    color: #a8c4e0;
    text-align: center;
    font-size: 0.76rem;
    padding: 10px 12px;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

.site-footer strong { color: #ffffff; }


/* ================================================
   UTILIDAD
   ================================================ */
.sp-hidden { display: none !important; }


/* ================================================
   SPLASH SCREEN
   ================================================ */
#splash {
    position: fixed;
    inset: 0;
    background: linear-gradient(145deg, #071f40 0%, #0e4272 48%, #1b6ca8 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* fadeOut arranca a los 4.5 s y dura 0.6 s → total ~5 s */
    animation: spFadeOut 0.6s ease-in 4.5s forwards;
}

@keyframes spFadeOut {
    to { opacity: 0; pointer-events: none; }
}

/* ── Patas flotantes en el fondo ── */
.sp-paws {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.sp-paw {
    position: absolute;
    opacity: 0;
    font-size: 1.4rem;
    animation: spFloatPaw 2.4s ease-in-out forwards;
    will-change: transform, opacity;
}

.sp-paw-1  { top:  8%; left:  6%;  animation-delay: 0.05s; font-size: 1.1rem; }
.sp-paw-2  { top: 18%; right:10%;  animation-delay: 0.25s; font-size: 1.7rem; }
.sp-paw-3  { top: 62%; left:  4%;  animation-delay: 0.15s; font-size: 1.0rem; }
.sp-paw-4  { top: 74%; right: 7%;  animation-delay: 0.40s; font-size: 1.4rem; }
.sp-paw-5  { top: 83%; left: 22%;  animation-delay: 0.10s; font-size: 1.1rem; }
.sp-paw-6  { top: 12%; left: 42%;  animation-delay: 0.50s; font-size: 0.9rem; }
.sp-paw-7  { top: 78%; right:28%;  animation-delay: 0.20s; font-size: 1.6rem; }
.sp-paw-8  { top: 42%; left:  2%;  animation-delay: 0.35s; font-size: 1.2rem; }
.sp-paw-9  { top: 32%; right: 3%;  animation-delay: 0.45s; font-size: 1.0rem; }
.sp-paw-10 { top: 55%; right: 3%;  animation-delay: 0.08s; font-size: 1.5rem; }

@keyframes spFloatPaw {
    0%   { opacity: 0;    transform: translateY(18px)  scale(0.8); }
    25%  { opacity: 0.30; }
    70%  { opacity: 0.20; }
    100% { opacity: 0;    transform: translateY(-22px) scale(1.1); }
}

/* ── Centro ── */
.sp-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
    width: 100%;
}

/* ── Íconos animales / vet ── */
.sp-icons {
    display: flex;
    gap: clamp(12px, 4vw, 28px);
}

.sp-icon {
    font-size: clamp(2rem, 7vw, 2.8rem);
    opacity: 0;
    display: inline-block;
    animation: spPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    will-change: transform, opacity;
}
.sp-icon-1 { animation-delay: 0.25s; }
.sp-icon-2 { animation-delay: 0.45s; }
.sp-icon-3 { animation-delay: 0.65s; }
.sp-icon-4 { animation-delay: 0.85s; }
.sp-icon-5 { animation-delay: 1.05s; }

@keyframes spPopIn {
    0%   { opacity: 0; transform: scale(0.3) translateY(16px); }
    100% { opacity: 1; transform: scale(1)   translateY(0);    }
}

/* ── Letras ACAVEM ── */
.sp-brand {
    display: flex;
    align-items: baseline;
    gap: clamp(2px, 1vw, 6px);
}

.sp-letter {
    font-size: clamp(2.2rem, 9vw, 4.2rem);
    font-weight: 900;
    color: #ffffff;
    opacity: 0;
    display: inline-block;
    text-shadow: 0 0 28px rgba(255,255,255,0.35);
    animation: spLetterDrop 0.38s ease-out forwards;
    will-change: transform, opacity;
}
/* letras A y M en verde para romper monotonía */
.sp-letter-0 { animation-delay: 1.05s; }
.sp-letter-1 { animation-delay: 1.15s; }
.sp-letter-2 { animation-delay: 1.25s; color: #7ecb8f; }
.sp-letter-3 { animation-delay: 1.35s; }
.sp-letter-4 { animation-delay: 1.45s; }
.sp-letter-5 { animation-delay: 1.55s; color: #7ecb8f; }

@keyframes spLetterDrop {
    0%   { opacity: 0; transform: translateY(-28px) rotateX(40deg); }
    60%  { transform: translateY(4px)  rotateX(0deg); }
    100% { opacity: 1; transform: translateY(0)    rotateX(0deg); }
}

/* ── Texto debajo del logo ── */
.sp-tagline {
    color: #a8d4f0;
    font-size: clamp(0.72rem, 2.4vw, 0.95rem);
    letter-spacing: 0.4px;
    opacity: 0;
    animation: spSlideUp 0.55s ease-out 1.7s forwards;
}

.sp-sub {
    color: #7ecb8f;
    font-size: clamp(0.65rem, 1.8vw, 0.78rem);
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    opacity: 0;
    animation: spSlideUp 0.55s ease-out 1.9s forwards;
}

@keyframes spSlideUp {
    0%   { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0);    }
}

/* ── Sección alianza MiDoctorVet ── */
.sp-alliance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin-top: 2px;
}

.sp-alliance-sep {
    width: 52px;
    height: 1px;
    background: rgba(255,255,255,0.28);
    opacity: 0;
    animation: spSlideUp 0.5s ease-out 2.5s forwards;
}

.sp-alliance-label {
    color: rgba(200,220,240,0.80);
    font-size: clamp(0.60rem, 1.6vw, 0.72rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: spSlideUp 0.5s ease-out 2.8s forwards;
}

/* Pastilla blanca que enmarca el logo en sus colores reales */
.sp-mdv-wrap {
    background: rgba(255,255,255,0.93);
    border-radius: 8px;
    padding: 5px 16px;
    display: inline-flex;
    align-items: center;
    opacity: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    animation: spPopIn 0.55s cubic-bezier(0.34,1.56,0.64,1) 3.2s forwards;
}

.sp-mdv-logo {
    height: clamp(22px, 4.5vw, 34px);
    width: auto;
}

/* ── Línea ECG ── */
.sp-ecg {
    width: min(400px, 88vw);
    height: 46px;
    margin-top: 4px;
    opacity: 0;
    animation: spSlideUp 0.4s ease-out 0.4s forwards;
    overflow: visible;
}

.sp-ecg-track {
    fill: none;
    stroke: rgba(255,255,255,0.08);
    stroke-width: 1.5;
}

.sp-ecg-line {
    fill: none;
    stroke: #7ecb8f;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    filter: drop-shadow(0 0 4px #7ecb8f);
    animation: spDrawEcg 3.5s ease-out 0.5s forwards;
}

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

/* ── Barra de progreso ── */
.sp-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.08);
}

.sp-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #7ecb8f 0%, #1b6ca8 100%);
    animation: spProgress 4.5s linear 0s forwards;
}

@keyframes spProgress {
    to { width: 100%; }
}

/* ── Reducción de movimiento (accesibilidad) ── */
@media (prefers-reduced-motion: reduce) {
    #splash { animation: spFadeOut 0.1s ease-in 4.5s forwards; }
    .sp-paw, .sp-icon, .sp-letter,
    .sp-tagline, .sp-sub, .sp-ecg { animation: spSlideUp 0.1s ease-out 0s forwards; opacity: 1; }
    .sp-ecg-line { animation: none; stroke-dashoffset: 0; }
    .sp-progress-bar { animation: spProgress 4.5s linear 0s forwards; }
}


/* ================================================
   BREAKPOINT: TABLET  (≥ 600px)
   ================================================ */
@media (min-width: 600px) {

    .site-header {
        padding: 10px 24px;
    }

    .site-header .logo-acavem { height: 56px; }
    .site-header .logo-mdv    { height: 44px; }

    .hero-wrap {
        align-items: center;
        padding: 32px 20px;
    }

    .form-card {
        padding: 28px 32px 28px;
    }

    .form-card .card-title    { font-size: 1.45rem; }
    .form-card .card-subtitle { font-size: 0.86rem; }

    /* En tablet los campos van en pares */
    .form-group {
        flex: 1 1 220px;
    }

    select[multiple].form-control {
        height: 120px;
    }
}


/* ================================================
   BREAKPOINT: DESKTOP  (≥ 900px)
   ================================================ */
@media (min-width: 900px) {

    .site-header {
        padding: 10px 28px;
    }

    .site-header .logo-acavem { height: 64px; }
    .site-header .logo-mdv    { height: 52px; }

    .hero-wrap {
        padding: 40px 24px;
    }

    .form-card {
        padding: 36px 40px 32px;
    }

    .form-card .card-title    { font-size: 1.6rem; }
    .form-card .card-subtitle { font-size: 0.88rem; }

    .form-row { gap: 16px; }

    select[multiple].form-control {
        height: 110px;
    }

    .form-hint { font-size: 0.76rem; }
}
