/* Fuente Montserrat ya instalada en el sitio */

/* Aplicar Montserrat a todos los elementos del formulario */
.calificacion-form-container,
.calificacion-form-container *,
.calificacion-form-container *::before,
.calificacion-form-container *::after {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Prevenir scroll horizontal global */
html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Override para todos los contenedores WordPress comunes */
body .wp-site-blocks,
body .wp-block-group,
body main,
body article,
body .entry-content,
body .site-content,
body .content-area {
    overflow-x: visible !important;
}

.calificacion-form-container {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    min-height: 100vh;
    height: auto !important;
    margin: 0 !important;
    padding: 40px 40px;
    background-image: url('../img/elfondo.png') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-color: transparent !important;
    background-blend-mode: normal !important;
    border-radius: 0;
    box-shadow: none !important;
    position: relative;
    overflow: visible !important;
    overflow-x: hidden !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    transform: translateX(0);
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Prevenir scroll horizontal en toda la página */
html {
    overflow-x: hidden !important;
    width: 100% !important;
}

body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Overlay eliminado completamente para mostrar la imagen de fondo */


.calificacion-form-container > * {
    position: relative;
    z-index: 1;
    background: transparent !important;
}

.form-content-wrapper {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#calificacion-formulario {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
    padding: 20px 0;
}

.form-main-title {
    display: block;
    margin: 0 0 25px 0 !important;
    padding: 0;
    position: relative;
    z-index: 1;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

img.form-main-title {
    width: 70% !important;
    max-width: 300px !important;
    display: block !important;
}

.form-main-title::after {
    display: none;
}

.form-progress {
    width: 100%;
    max-width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 0 30px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    flex-shrink: 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF931E, #FFA64D);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 147, 30, 0.5);
}

.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
    min-height: auto;
    flex: 0 1 auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 15px 0;
    overflow: visible;
}

.form-step.active {
    display: flex;
}

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

.form-step h2 {
    color: #FF931E;
    margin-bottom: 30px;
    margin-top: 15px;
    font-size: 26px;
    font-weight: 600;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.3px;
    border-bottom: 3px solid #93278F;
    padding-bottom: 12px;
    display: inline-block;
    position: relative;
    text-align: center;
}

.form-step h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #93278F;
    box-shadow: 0 0 10px rgba(147, 39, 143, 0.6);
}

.form-group {
    margin-bottom: 30px;
    padding: 0 15px;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form-group label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: rgba(217, 217, 217, 0.9);
    font-size: 15px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
    text-align: center;
    width: 100%;
}

.required {
    color: #FF931E;
}

.form-group input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-sizing: border-box;
    background: rgba(9, 20, 28, 0.4);
    color: #D9D9D9;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

.form-group textarea {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-sizing: border-box;
    background: #09141C;
    color: #D9D9D9;
    box-shadow: none;
    resize: vertical;
    margin: 0 auto;
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
    color: rgba(217, 217, 217, 0.5);
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #FF931E;
    background: rgba(9, 20, 28, 0.5);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 147, 30, 0.4);
}

.form-group textarea:focus {
    outline: none;
    border: none;
    background: #09141C;
    box-shadow: none;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #93278F;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(147, 39, 143, 0.4);
}

.error-message {
    color: #93278F;
    font-size: 13px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    display: block;
    margin-top: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Sistema de Estrellas */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    margin: 25px auto;
    padding: 30px 10px 15px 10px;
    background: rgba(9, 20, 28, 0.4);
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.star-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    margin: 0 2px !important;
    cursor: pointer;
    font-size: 14px !important;
}

.star-item.selected .star-number {
    color: #FF931E !important;
    text-shadow: 0 0 8px rgba(255, 147, 30, 0.8) !important;
    font-weight: 700;
}

.star-item.hover .star-number {
    color: #FF931E !important;
    text-shadow: 0 0 8px rgba(255, 147, 30, 0.8) !important;
    font-weight: 700;
    transform: scale(1.2);
}

.star-number {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 1), 0 0 10px rgba(255, 255, 255, 0.5) !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    line-height: 1.2 !important;
    min-height: 24px !important;
    height: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: all 0.2s;
    cursor: pointer;
    user-select: none;
    position: relative !important;
    z-index: 10 !important;
    width: 100% !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: visible !important;
}

.star-item:hover .star-number {
    color: #FF931E;
    text-shadow: 0 0 8px rgba(255, 147, 30, 0.8);
    font-weight: 700;
    transform: scale(1.2);
}

.star-item input[type="radio"]:checked ~ label ~ .star-number,
.star-item input[type="radio"]:checked + label ~ .star-number,
.star-item input[type="radio"]:checked + label {
    /* Este estilo se manejará con JavaScript para mayor compatibilidad */
}

.star-item input[type="radio"]:checked ~ .star-number {
    color: #FF931E;
    text-shadow: 0 0 8px rgba(255, 147, 30, 0.8);
    font-weight: 700;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 32px !important;
    color: rgba(217, 217, 217, 0.3);
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 !important;
    margin-top: 0 !important;
    user-select: none;
    display: inline-block !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0));
    line-height: 1 !important;
}

.star-item:hover label,
.star-item.hover label {
    color: #FF931E;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255, 147, 30, 0.8));
}

.star-item.selected label {
    color: #FF931E;
    filter: drop-shadow(0 0 8px rgba(255, 147, 30, 0.8));
}

.star-rating label:hover,
.star-rating label.hover {
    color: #FF931E;
    transform: scale(1.15);
    filter: drop-shadow(0 0 8px rgba(255, 147, 30, 0.8));
}

.star-rating label.selected {
    color: #FF931E;
    filter: drop-shadow(0 0 8px rgba(255, 147, 30, 0.8));
}

.star-rating input[type="radio"]:checked + label {
    color: #FF931E;
    filter: drop-shadow(0 0 8px rgba(255, 147, 30, 0.8));
}

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

.rating-value {
    text-align: center;
    margin: 15px auto 10px auto;
    font-size: 18px;
    font-weight: 600;
    color: #FF931E;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.rating-value .rating-number {
    font-size: 24px;
    color: #FF931E;
    text-shadow: 0 0 10px rgba(255, 147, 30, 0.8);
    font-weight: 700;
}

.rating-label {
    display: flex;
    justify-content: space-between;
    margin: 15px auto;
    font-size: 13px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    color: rgba(217, 217, 217, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
}

.rating-min {
    color: #93278F;
}

.rating-max {
    color: #5cb85c;
}

/* Radio buttons personalizados */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
    width: 100%;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(9, 20, 28, 0.4);
    color: #D9D9D9;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.radio-label:hover {
    border-color: #FF931E;
    background: rgba(255, 147, 30, 0.2);
    box-shadow: 0 4px 15px rgba(255, 147, 30, 0.4);
    transform: translateY(-2px);
}

.radio-label input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
    font-weight: 600;
    color: #FF931E;
}

.radio-label input[type="radio"]:checked ~ span,
.radio-label:has(input[type="radio"]:checked) {
    border-color: #FF931E;
    background: rgba(255, 147, 30, 0.3);
    box-shadow: 0 4px 15px rgba(255, 147, 30, 0.5);
}

/* Checkboxes personalizados */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(9, 20, 28, 0.4);
    color: #D9D9D9;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.checkbox-label:hover {
    border-color: #FF931E;
    background: rgba(255, 147, 30, 0.2);
    box-shadow: 0 4px 15px rgba(255, 147, 30, 0.4);
    transform: translateY(-2px);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #FF931E;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #FF931E;
    background: rgba(255, 147, 30, 0.3);
    box-shadow: 0 4px 15px rgba(255, 147, 30, 0.5);
}

/* Input de fecha */
.form-group input[type="date"],
.form-group input[type="number"] {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-sizing: border-box;
    background: rgba(9, 20, 28, 0.4);
    color: #D9D9D9;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 2px 10px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #FF931E;
    background: rgba(9, 20, 28, 0.5);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 147, 30, 0.4);
}

/* Input de texto para "Otro" */
.form-group input[type="text"].otro-input {
    margin-top: 10px;
    width: 100%;
    max-width: 400px;
}

/* Navegación */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 25px;
    padding-bottom: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 450px;
    align-self: center;
    min-height: 60px;
}

.form-navigation .nav-spacer {
    width: 130px;
    min-width: 130px;
    flex: 0 0 130px;
    visibility: hidden;
    height: 0;
    padding: 0;
    margin: 0;
}

.form-navigation > div:first-child:not(.nav-spacer) {
    flex: 0 0 auto;
}

.btn-next,
.btn-back,
.btn-submit {
    padding: 15px 35px;
    border: none !important;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    min-width: 130px;
    text-align: center;
    box-sizing: border-box;
}

.btn-next {
    margin-left: auto;
    margin-right: 0;
}

.btn-back {
    margin-left: 0;
    margin-right: auto;
}

.btn-next,
.btn-submit {
    background: #FF931E;
    color: #ffffff;
    font-weight: 700;
    border: none !important;
    transition: all 0.3s ease;
}

.btn-next:hover,
.btn-submit:hover {
    background: #FFA64D;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 147, 30, 0.6);
    border: none !important;
}

.btn-back {
    background: #2d2d2d;
    color: #ffffff;
    border: none !important;
}

.btn-back:hover {
    background: #3d3d3d;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(45, 45, 45, 0.5);
    border: none !important;
}

.btn-submit:disabled {
    background: #FF931E;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none !important;
    opacity: 0.7;
}

/* Mensajes */
.form-message {
    padding: 50px 60px;
    border-radius: 12px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    min-width: 400px;
    max-width: 600px;
    z-index: 10;
    display: none;
}

.form-message.success {
    background: rgba(9, 20, 28, 0.4);
    border: none;
    color: #D9D9D9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.form-message.error {
    background: rgba(147, 39, 143, 0.2);
    border: 2px solid #93278F;
    color: #D9D9D9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.form-message h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 36px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #FF931E;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.form-message p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .calificacion-form-container {
        margin: 0 !important;
        padding: 40px 20px 120px 20px;
        min-height: 100vh;
        left: 50% !important;
        margin-left: -50vw !important;
    }
    
    #calificacion-formulario {
        max-width: 100%;
    }
    
    .form-main-title {
        width: 100%;
        max-width: 100%;
        margin: 0 auto 25px auto;
        text-align: center;
    }
    
    .form-progress {
        max-width: 100%;
    }
    
    .form-step {
        min-height: auto;
    }
    
    .form-step h2 {
        font-size: 24px;
    }
    
    .star-rating label {
        font-size: 28px;
        margin: 0 3px;
    }
    
    .star-number {
        font-size: 16px !important;
        margin-bottom: 8px;
    }
    
    .star-item {
        margin: 0 1px;
    }
    
    .form-navigation {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        padding: 0 15px;
        padding-bottom: 30px;
        margin-bottom: 40px;
        width: 100%;
    }
    
    .btn-next,
    .btn-back,
    .btn-submit {
        flex: 0 0 auto;
        min-width: 130px;
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }
    
    .btn-back {
        margin-right: auto;
    }
    
    .btn-next,
    .btn-submit {
        margin-left: auto;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .form-message {
        min-width: 300px;
        max-width: 90%;
        padding: 30px 25px;
    }
}
