/* ═════════════════════════════════════════════
   Encuesta de Satisfacción SAC – Estilos
   Omnisalud – Imagen Corporativa
   ═════════════════════════════════════════════ */

/* ── RESET & VARIABLES ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-omnisalud: #1C75BB;
    --rosa-omnisalud: #E22084;
    --azul-oscuro: #0D5F8F;
    --azul-claro: #E8F4F9;
    --gris-texto: #333333;
    --gris-claro: #F5F9FC;
    --blanco: #FFFFFF;
    --sombra-suave: 0 2px 8px rgba(0, 0, 0, 0.06);
    --sombra-media: 0 8px 24px rgba(0, 0, 0, 0.12);
    --sombra-fuerte: 0 20px 60px rgba(0, 0, 0, 0.25);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--gris-texto);
    background: linear-gradient(135deg, var(--azul-omnisalud) 0%, var(--azul-oscuro) 50%, #084468 100%);
    min-height: 100vh;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
}

/* ── CONTENEDOR PRINCIPAL ── */
.container {
    max-width: 820px;
    margin: 0 auto;
    background: var(--blanco);
    border-radius: 20px;
    box-shadow: var(--sombra-fuerte);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

/* ── HEADER ── */
.header {
    background: linear-gradient(135deg, var(--azul-omnisalud) 0%, var(--azul-oscuro) 100%);
    color: var(--blanco);
    padding: 20px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -15%;
    width: 250px;
    height: 250px;
    background: rgba(226, 32, 132, 0.08);
    border-radius: 50%;
}

.logo-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    background: var(--blanco);
    padding: 10px 20px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 1;
}

.logo {
    max-height: 50px;
    width: auto;
}

.logo-container.logo-large {
    padding: 12px 24px;
}

.logo-container.logo-large .logo {
    max-height: 85px;
    width: auto;
    object-fit: contain;
}

.logo-container.logo-transparent {
    background: transparent;
    box-shadow: none;
    padding: 10px 0;
}

.header h1 {
    font-size: 1.4em;
    margin-bottom: 5px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.header p {
    opacity: 0.92;
    font-size: 0.9em;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto;
}

/* ── CONTENIDO ── */
.content {
    padding: 25px 35px 35px 35px;
    background: var(--gris-claro);
}

/* ── INTRO BOX ── */
.intro-box {
    background: var(--blanco);
    padding: 22px 26px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    border-left: 5px solid var(--rosa-omnisalud);
    box-shadow: var(--sombra-suave);
    animation: fadeIn 0.5s ease 0.2s both;
}

.intro-box h2 {
    color: var(--azul-omnisalud);
    margin-bottom: 8px;
    font-size: 1.15em;
    font-weight: 700;
}

.intro-box p {
    color: #555;
    line-height: 1.65;
    font-size: 0.93em;
}

/* ── SECCIONES ── */
.section {
    margin-bottom: 26px;
    padding: 26px;
    background: var(--blanco);
    border-radius: var(--radius);
    box-shadow: var(--sombra-suave);
    animation: fadeIn 0.5s ease 0.3s both;
}

.section-title {
    font-size: 1.08em;
    color: var(--azul-omnisalud);
    margin-bottom: 20px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--azul-omnisalud);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--rosa-omnisalud);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── FORMULARIO ── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 6px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gris-texto);
    margin-bottom: 7px;
    font-size: 0.9em;
}

.required {
    color: var(--rosa-omnisalud);
    margin-left: 3px;
    font-weight: 700;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0E6ED;
    border-radius: 10px;
    font-size: 0.9em;
    font-family: inherit;
    color: #333;
    background: var(--blanco);
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--azul-omnisalud);
    box-shadow: 0 0 0 4px rgba(28, 117, 187, 0.12);
}

.form-input::placeholder {
    color: #adb5bd;
}

.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: '▾';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--azul-omnisalud);
    font-size: 1.1em;
    pointer-events: none;
}

.form-select {
    padding-right: 38px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ── PREGUNTAS ── */
.question {
    margin-bottom: 22px;
    padding: 24px;
    background: var(--blanco);
    border-radius: var(--radius);
    box-shadow: var(--sombra-suave);
    transition: var(--transition);
    animation: fadeIn 0.5s ease both;
}

.question:hover {
    box-shadow: var(--sombra-media);
}

.q-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--azul-omnisalud), var(--azul-oscuro));
    color: var(--blanco);
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95em;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(28, 117, 187, 0.3);
}

.question-text {
    font-size: 1em;
    font-weight: 600;
    color: var(--gris-texto);
    line-height: 1.55;
    padding-top: 5px;
}

/* ── OPCIONES RADIO ── */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    background: var(--azul-claro);
    border: 2px solid #D0E7F2;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.93em;
    color: var(--gris-texto);
    font-weight: 500;
}

.option:hover .option-label {
    background: var(--blanco);
    border-color: var(--azul-omnisalud);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(28, 117, 187, 0.1);
}

.option input[type="radio"]:checked + .option-label {
    background: linear-gradient(135deg, var(--azul-omnisalud) 0%, var(--azul-oscuro) 100%);
    color: var(--blanco);
    border-color: var(--azul-omnisalud);
    font-weight: 600;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(28, 117, 187, 0.25);
}

.radio-dot {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--azul-omnisalud);
    border-radius: 50%;
    margin-right: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blanco);
    transition: var(--transition);
}

.option input[type="radio"]:checked + .option-label .radio-dot {
    border-color: var(--blanco);
}

.option input[type="radio"]:checked + .option-label .radio-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--rosa-omnisalud);
    border-radius: 50%;
    animation: popIn 0.25s ease;
}

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

/* ── TEXTAREA ── */
.question textarea {
    width: 100%;
    height: 120px;
    padding: 14px 16px;
    border: 2px solid #E0E6ED;
    border-radius: 10px;
    resize: none;
    font-family: inherit;
    font-size: 0.93em;
    transition: var(--transition);
    line-height: 1.5;
}

.question textarea::placeholder {
    color: #adb5bd;
}

.question textarea:focus {
    outline: none;
    border-color: var(--azul-omnisalud);
    box-shadow: 0 0 0 4px rgba(28, 117, 187, 0.12);
}

/* ── TRATAMIENTO DE DATOS ── */
.datos-box {
    background: var(--blanco);
    border: 2px solid #D0E7F2;
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-top: 8px;
    margin-bottom: 26px;
}

.datos-text {
    font-size: 0.83em;
    color: #666;
    line-height: 1.55;
    margin-bottom: 18px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 12px;
}

.datos-text a {
    color: var(--azul-omnisalud);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.datos-text a:hover {
    text-decoration: underline;
}

.check-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.check-row input[type="checkbox"] {
    display: none;
}

.custom-check {
    width: 22px;
    height: 22px;
    border: 2.5px solid var(--azul-omnisalud);
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blanco);
    transition: var(--transition);
}

.check-row input[type="checkbox"]:checked + .custom-check {
    background: var(--azul-omnisalud);
    border-color: var(--azul-omnisalud);
}

.check-row input[type="checkbox"]:checked + .custom-check::after {
    content: '✓';
    color: var(--blanco);
    font-size: 14px;
    font-weight: bold;
    animation: popIn 0.25s ease;
}

.check-label {
    font-size: 0.89em;
    color: var(--gris-texto);
    font-weight: 500;
    line-height: 1.4;
}

/* ── FOOTER / BOTÓN ── */
.footer {
    margin-top: 35px;
    text-align: center;
    padding: 0 20px;
}

.submit-note {
    color: #666;
    font-size: 0.87em;
    margin-bottom: 18px;
    line-height: 1.5;
}

.submit-btn {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, var(--azul-omnisalud) 0%, var(--azul-oscuro) 100%);
    color: var(--blanco);
    border: none;
    padding: 16px 40px;
    font-size: 1.05em;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(28, 117, 187, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.submit-btn:hover:not(:disabled)::after {
    width: 400px;
    height: 400px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(28, 117, 187, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
}

.submit-btn.sending {
    pointer-events: none;
}

/* ── ÉXITO ── */
.success {
    display: none;
    text-align: center;
    padding: 60px 40px;
    animation: fadeIn 0.6s ease;
}

.success-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: popIn 0.5s ease 0.2s both;
}

.success h2 {
    color: #16a34a;
    font-size: 1.9em;
    margin-bottom: 14px;
    font-weight: 800;
}

.success p {
    color: #555;
    font-size: 1.02em;
    line-height: 1.65;
    max-width: 450px;
    margin: 0 auto;
}

.btn-new {
    margin-top: 28px;
    display: inline-block;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--azul-omnisalud), var(--azul-oscuro));
    color: var(--blanco);
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(28, 117, 187, 0.25);
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(28, 117, 187, 0.35);
}

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

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 16px;
    }

    .header {
        padding: 25px 20px;
    }

    .header h1 {
        font-size: 1.4em;
    }

    .content {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 20px;
    }

    .question {
        padding: 18px;
    }

    .option-label {
        padding: 11px 14px;
        font-size: 0.88em;
    }

    .submit-btn {
        padding: 14px 30px;
        font-size: 0.98em;
    }
}
