:root {
    --brand-green: #0f6b4f;
    --brand-green-dark: #094333;
    --brand-gold: #f4bc2f;
    --ink: #1d2522;
    --soft-bg: #f6f8f5;
}

* {
    letter-spacing: 0;
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--soft-bg);
}

.hero-banner {
    min-height: 430px;
    background-image: linear-gradient(90deg, rgba(9, 36, 27, .86), rgba(9, 36, 27, .48) 48%, rgba(9, 36, 27, .18)), url("../img/banner-encuesta.webp?v=1");
    background-position: center;
    background-size: cover;
}

.hero-overlay {
    min-height: inherit;
    color: #fff;
}

.min-vh-hero {
    min-height: 430px;
}

.hero-banner .badge {
    color: var(--brand-green-dark);
    font-weight: 600;
}

.hero-banner .lead {
    max-width: 620px;
    color: rgba(255, 255, 255, .88);
}

.survey-section {
    background: linear-gradient(180deg, #fff 0%, var(--soft-bg) 100%);
}

.survey-form {
    padding: clamp(1.25rem, 3vw, 2.5rem);
    border: 1px solid rgba(15, 107, 79, .14);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(21, 35, 30, .08);
}

.error-detail {
    margin-top: .65rem;
    padding: .75rem;
    border-radius: 8px;
    color: #721c24;
    background: rgba(255, 255, 255, .72);
    white-space: pre-wrap;
    word-break: break-word;
}

.form-control,
.btn {
    border-radius: 8px;
}

.form-control:focus {
    border-color: var(--brand-green);
    box-shadow: 0 0 0 .25rem rgba(15, 107, 79, .14);
}

.btn-primary {
    --bs-btn-bg: var(--brand-green);
    --bs-btn-border-color: var(--brand-green);
    --bs-btn-hover-bg: var(--brand-green-dark);
    --bs-btn-hover-border-color: var(--brand-green-dark);
    --bs-btn-active-bg: var(--brand-green-dark);
    --bs-btn-active-border-color: var(--brand-green-dark);
    font-weight: 600;
}

.rating-list {
    display: grid;
    gap: 1rem;
}

.rating-item {
    display: grid;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid rgba(29, 37, 34, .1);
    border-radius: 8px;
    background: #fbfcfb;
}

.choice-item {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid rgba(29, 37, 34, .1);
    border-radius: 8px;
    background: #fbfcfb;
}

.rating-item legend {
    float: none;
    width: auto;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.choice-item legend {
    float: none;
    width: auto;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.rating-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(128px, 1fr));
    gap: .6rem;
}

.choice-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .6rem;
}

.choice-label {
    display: flex;
    min-height: 48px;
    align-items: center;
    padding: .65rem .85rem;
    border: 1px solid rgba(29, 37, 34, .14);
    border-radius: 8px;
    color: #4c5854;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.choice-label:hover {
    border-color: rgba(15, 107, 79, .45);
    box-shadow: 0 10px 24px rgba(15, 107, 79, .1);
    transform: translateY(-1px);
}

.btn-check:checked + .choice-label {
    border-color: var(--brand-green);
    color: var(--brand-green-dark);
    background: rgba(15, 107, 79, .07);
}

.check-options {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem .6rem;
    align-items: center;
}

.check-options .form-control,
.check-options .form-label {
    grid-column: span 2;
}

.rating-label {
    display: flex;
    min-width: 0;
    min-height: 112px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    padding: .85rem .55rem;
    border: 1px solid rgba(29, 37, 34, .14);
    border-radius: 8px;
    color: #4c5854;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.rating-label:hover {
    border-color: rgba(15, 107, 79, .45);
    box-shadow: 0 10px 24px rgba(15, 107, 79, .1);
    transform: translateY(-1px);
}

.btn-check:checked + .rating-label {
    border-color: var(--brand-green);
    color: var(--brand-green-dark);
    background: rgba(15, 107, 79, .07);
}

.stars {
    min-width: 0;
    color: var(--brand-gold);
    font-size: clamp(.95rem, 1.4vw, 1.12rem);
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.rating-text {
    color: inherit;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
}

@media (max-width: 1199.98px) {
    .rating-options {
        grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .hero-banner,
    .min-vh-hero {
        min-height: 360px;
    }

    .hero-banner {
        background-image: linear-gradient(180deg, rgba(9, 36, 27, .86), rgba(9, 36, 27, .52)), url("../img/banner-encuesta.webp?v=1");
    }

    .rating-options {
        grid-template-columns: 1fr;
    }

    .rating-label {
        min-height: 76px;
        flex-direction: row;
        justify-content: space-between;
    }

    .stars {
        text-align: left;
    }

    .rating-text {
        text-align: right;
    }
}
