/* styles.css - Diseño profesional moderno */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #FF8C42;
    --primary-orange-dark: #E67E3C;
    --primary-orange-light: #FFB380;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray-medium: #E8E8E8;
    --gray-dark: #6B7280;
    --gray-darker: #374151;
    --success-green: #10B981;
    --error-red: #EF4444;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-light);
    color: var(--gray-darker);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    flex: 1;
    width: 100%;
}

/* ============ SURVEY WRAPPER ============ */
.survey-wrapper {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: 30px;
}

.survey-header {
    background: url(../banner_encuesta.jpeg);
    color: var(--white);
    padding: 50px 40px;
    text-align: center;
    background-size: cover;
}

.survey-header h1 {
    font-size: 2.5em;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.survey-header p {
    font-size: 1.1em;
    opacity: 0.95;
    font-weight: 400;
}

.survey-form {
    padding: 40px;
}

/* ============ FORM SECTIONS ============ */
.form-section {
    margin-bottom: 45px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--gray-medium);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    color: var(--gray-darker);
    font-size: 1.5em;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* ============ FORM GROUPS ============ */
.form-group {
    margin-bottom: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--gray-darker);
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-medium);
    border-radius: 10px;
    font-size: 0.95em;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

/* ============ QUESTION GROUPS ============ */
#bloque_preguntas {
    display: none;
}

.question-group {
    margin-bottom: 35px;
    padding: 25px;
    background: var(--gray-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary-orange);
    transition: var(--transition);
}

.question-group:hover {
    background: #fafafa;
}

.question-title {
    display: block;
    font-size: 1em;
    font-weight: 700;
    color: var(--gray-darker);
    margin-bottom: 20px;
    cursor: pointer;
}

/* ============ RADIO/CHECKBOX STYLES ============ */
.rating-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.rating-option {
    position: relative;
    cursor: pointer;
}

.rating-option input[type="radio"],
.rating-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.rating-badge {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    border: 2px solid var(--gray-medium);
    transition: var(--transition);
    cursor: pointer;
    background: var(--white);
    font-size: 0.9em;
    color: var(--gray-darker);
}

.rating-option input:checked + .rating-badge {
    border-color: var(--primary-orange);
    background: rgba(255, 140, 66, 0.08);
    color: var(--primary-orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
    font-weight: 700;
}

.rating-badge.excellent {
    color: #10B981;
}

.rating-option input:checked + .rating-badge.excellent {
    border-color: #10B981;
    background: rgba(16, 185, 129, 0.08);
}

.rating-badge.good {
    color: #3B82F6;
}

.rating-option input:checked + .rating-badge.good {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.08);
}

.rating-badge.regular {
    color: var(--primary-orange);
}

.rating-option input:checked + .rating-badge.regular {
    border-color: var(--primary-orange);
    background: rgba(255, 140, 66, 0.08);
}

.rating-badge.bad {
    color: #F97316;
}

.rating-option input:checked + .rating-badge.bad {
    border-color: #F97316;
    background: rgba(249, 115, 22, 0.08);
}

.rating-badge.terrible {
    color: #EF4444;
}

.rating-option input:checked + .rating-badge.terrible {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.08);
}

/* ============ COMMENT FIELD ============ */
.comment-field {
    margin-top: 15px;
    padding: 16px;
    background: var(--white);
    border-radius: 10px;
    border: 2px dashed var(--primary-orange);
    display: none;
    animation: slideDown 0.3s ease;
}

.comment-field.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-field label {
    font-size: 0.9em;
    margin-bottom: 10px;
    color: var(--gray-darker);
}

.comment-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-medium);
    border-radius: 8px;
    font-size: 0.9em;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.comment-field textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.full-width-textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 16px;
    border: 2px solid var(--gray-medium);
    border-radius: 10px;
    font-size: 0.95em;
    font-family: inherit;
    resize: vertical;
}

.full-width-textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

/* ============ BUTTONS ============ */
.form-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 40px;
    border: none;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--gray-darker);
    border: 2px solid var(--gray-medium);
}

.btn-secondary:hover {
    background: var(--gray-medium);
    transform: translateY(-3px);
}

/* ============ MESSAGES ============ */
.success-message,
.error-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.success-content,
.error-content {
    background: var(--white);
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-content h2 {
    color: var(--success-green);
    margin-bottom: 15px;
    font-size: 1.8em;
}

.error-content h2 {
    color: var(--error-red);
    margin-bottom: 15px;
    font-size: 1.8em;
}

.success-content p,
.error-content p {
    color: var(--gray-darker);
    margin-bottom: 25px;
    font-size: 1em;
}

/* ============ FOOTER ============ */
.footer {
    background: var(--gray-darker);
    color: var(--gray-light);
    text-align: center;
    padding: 30px;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .survey-header {
        padding: 30px 20px;
    }

    .survey-header h1 {
        font-size: 1.8em;
    }

    .survey-form {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .rating-options {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 10px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        min-width: auto;
        width: 100%;
    }

    .form-section h2 {
        font-size: 1.2em;
    }

    .question-title {
        font-size: 0.95em;
    }

    .success-content,
    .error-content {
        padding: 30px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .survey-header h1 {
        font-size: 1.5em;
    }

    .form-section h2 {
        font-size: 1em;
    }

    .question-title {
        font-size: 0.9em;
    }

    .rating-options {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.85em;
    }
}