:root {
    /* ==========================
       PALETA MINECO (PRINCIPAL)
       ========================== */
    --mineco-navy: #192854;
    --mineco-blue: #4993CC;
    --mineco-light: #88C0D5;

    /* ==========================
       PALETA RPSC (SECUNDARIA)
       ========================== */
    --rpsc-primary: #007A96;
    --rpsc-secondary: #009EDE;

    /* ==========================
       NEUTROS
       ========================== */
    --white: #FFFFFF;
    --gray-100: #F8FAFC;
    --gray-200: #E2E8F0;
    --gray-500: #64748B;
    --gray-700: #334155;

    /* ==========================
       SOMBRAS
       ========================== */
    --shadow-soft: 0 4px 20px -5px rgba(25, 40, 84, 0.10);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 28px 72px rgba(0, 0, 0, 0.18);

    /* ==========================
       RADIOS
       ========================== */
    --radius-panel: 28px;
    --radius-input: 14px;
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.contact-section {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F4F7FA;
    color: var(--gray-700);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
}

/* Decoración de fondo sutil */
.contact-section::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 10% 20%, var(--mineco-light), transparent 70%);
    top: -250px;
    left: -250px;
    z-index: 0;
    opacity: 0.15;
    border-radius: 50%;
    pointer-events: none;
}
.contact-section::after {
    content: '';
    position: fixed;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle at 90% 80%, var(--rpsc-secondary), transparent 70%);
    bottom: -200px;
    right: -200px;
    z-index: 0;
    opacity: 0.12;
    border-radius: 50%;
    pointer-events: none;
}

.contact-wrap {
    position: relative;
    z-index: 1;
    max-width: 820px;
    width: 100%;
}

/* ============================================================
   ENCABEZADO
   ============================================================ */
.contact-header {
    text-align: center;
    margin-bottom: 2.8rem;
}

.contact-header .badge-institutional {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 122, 150, 0.06);
    border: 1px solid rgba(0, 122, 150, 0.10);
    color: var(--rpsc-primary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    padding: 0.4rem 1.4rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.contact-header h1 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--mineco-navy);
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.contact-header p {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================================
   PANEL PRINCIPAL — solo formulario
   ============================================================ */
.contact-panel {
    background: var(--white);
    border-radius: var(--radius-panel);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 2.8rem 3rem 2.5rem;
}

.contact-panel:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ============================================================
   FORMULARIO
   ============================================================ */
.contact-form-panel {
    background: var(--white);
}

/* Alertas */
.alert {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-input);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.8rem;
    font-size: 0.9rem;
    background: var(--gray-100);
    border-left: 4px solid transparent;
}

.alert-success {
    border-left-color: #22c55e;
    color: #166534;
    background: #f0fdf4;
}

.alert-danger {
    border-left-color: #ef4444;
    color: #991b1b;
    background: #fef2f2;
}

.alert-danger ul {
    margin: 0;
    padding-left: 1.2rem;
}
.alert-danger ul li {
    list-style: none;
}

/* Formulario */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 1.8rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 0.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #CBD5E1;
    border-radius: var(--radius-input);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--gray-100);
    color: var(--gray-700);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--rpsc-primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 150, 0.10);
    background: var(--white);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    font-size: 0.75rem;
    color: #ef4444;
    display: none;
}

.form-group small.error-visible {
    display: block;
    margin-top: 0.15rem;
}

/* Título sección encuesta */
.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--mineco-navy);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1.5px solid var(--gray-200);
    padding-bottom: 0.5rem;
    margin: 0.2rem 0 0.2rem 0;
}

.form-section-title i {
    color: var(--rpsc-primary);
    font-size: 1.2rem;
}

/* Radio buttons estilo píldora */
.radio-question {
    display: flex;
    flex-direction: column; /* Apila etiqueta y opciones verticalmente */
    align-items: flex-start; /* Alinea todo a la izquierda */
    gap: 0.5rem;             /* Espacio entre la pregunta y las opciones */
}

.radio-question>label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin: 0;
}

.radio-options-group {
    display: inline-flex;
    background: var(--gray-100);
    border-radius: 50px;
    border: 1px solid var(--gray-200);
    padding: 2px;
    flex-shrink: 0;
    justify-content: flex-start;
}

.radio-options-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-options-group label {
    padding: 0.3rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    user-select: none;
    white-space: nowrap;
}

.radio-options-group label:hover {
    background: rgba(0, 122, 150, 0.06);
    color: var(--rpsc-primary);
}

.radio-options-group input[type="radio"]:checked+label {
    background: var(--white);
    color: var(--rpsc-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-weight: 600;
}

/* Estrellas rating */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.15rem;
    padding: 0.15rem 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 2rem;
    color: var(--gray-200);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label {
    color: #f5a623;
    transform: scale(1.1);
}

.star-rating label:active {
    transform: scale(0.9);
}

.btn-visual-action {
    padding: 11px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 6px; /* Ajustado a tu requerimiento */
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Colores de marca */
.btn-rpsc-secondary-color {
    background: var(--rpsc-primary);
    border-color: var(--rpsc-primary);
    color: var(--white) !important;
}

.btn-rpsc-secondary-color:hover {
    background: var(--mineco-navy);
    border-color: var(--mineco-navy);
    transform: translateX(10px); /* Movimiento de invitación */
    box-shadow: var(--shadow-soft);
}

/* Animación del ícono (sobre) para el movimiento diagonal */
.btn-visual-action i {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
}

.btn-visual-action:hover i {
    transform: translate(6px, -4px); /* Movimiento hacia esquina superior derecha */
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .contact-section {
        padding: 1rem 0.8rem;
    }
    .contact-header h1 {
        font-size: 1.8rem;
    }
    .contact-header p {
        font-size: 0.95rem;
    }
    .contact-panel {
        padding: 1.5rem 1.2rem;
        border-radius: 20px;
    }
    .input-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .radio-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .radio-options-group {
        width: 100%;
        justify-content: stretch;
    }
    .radio-options-group label {
        flex: 1;
        text-align: center;
        padding: 0.4rem 0.6rem;
    }
    .btn-primary {
        width: 100%;
        min-width: unset;
    }
    .star-rating label {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .contact-panel {
        padding: 1rem 0.8rem;
        border-radius: 16px;
    }
    .form-group label {
        font-size: 0.8rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    .radio-options-group label {
        font-size: 0.75rem;
        padding: 0.3rem 0.4rem;
    }
    .star-rating label {
        font-size: 1.5rem;
    }
    .btn-primary {
        font-size: 0.9rem;
        padding: 0.7rem 1.5rem;
    }
}

/* Landscape en móviles */
@media (max-height: 600px) and (orientation: landscape) {
    .contact-panel {
        padding: 1rem 1.2rem;
    }
    .modern-form {
        gap: 0.8rem;
    }
    .input-grid {
        gap: 0.6rem 1rem;
    }
    .form-group label {
        font-size: 0.75rem;
    }
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    .form-section-title {
        font-size: 0.9rem;
        padding-bottom: 0.3rem;
        margin: 0.1rem 0;
    }
    .radio-question>label {
        font-size: 0.75rem;
    }
    .radio-options-group label {
        padding: 0.2rem 0.8rem;
        font-size: 0.7rem;
    }
    .star-rating label {
        font-size: 1.3rem;
    }
    .btn-primary {
        padding: 0.4rem 1.2rem;
        font-size: 0.8rem;
        min-width: 120px;
    }
    .form-group textarea {
        min-height: 60px;
    }
}

