/**
 * ESTILOS DEL FORMULARIO DE CONTACTO
 * Fuente: San Francisco / System UI
 * Color principal: #D33F3D
 */

/* Reset y base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    padding: 40px 20px;
    line-height: 1.6;
    color: #333;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Form Wrapper */
.form-wrapper {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 50px;
}

@media (max-width: 768px) {
    .form-wrapper {
        padding: 30px 20px;
    }
}

/* Títulos */
.form-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #D33F3D;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #D33F3D;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.section-title:first-child {
    margin-top: 0;
}

/* Alertas */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mensaje de bienvenida */
.welcome-message {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border-radius: 12px;
    border: 1px solid #ffe0e0;
}

.welcome-message h2 {
    color: #D33F3D;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.welcome-message p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Selector de tipo de formulario */
.form-type-selector {
    background: #fafbfc;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px dashed #e1e4e8;
}

.form-type-selector .section-title {
    text-align: center;
    margin-top: 0;
    border-bottom: none;
}

/* Radio Group */
.radio-group {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 15px 25px;
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #e1e4e8;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: #D33F3D;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 63, 61, 0.15);
}

.radio-input {
    display: none;
}

.radio-input:checked + .radio-custom {
    border-color: #D33F3D;
    background: #D33F3D;
}

.radio-input:checked + .radio-custom::after {
    transform: scale(1);
}

.radio-input:checked ~ .radio-text {
    color: #D33F3D;
    font-weight: 600;
}

.radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5da;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.radio-text {
    font-size: 1.1rem;
    color: #586069;
    transition: all 0.3s ease;
}

/* Formulario */
.contact-form {
    animation: fadeIn 0.5s ease;
}

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

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #24292e;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.required {
    color: #D33F3D;
    font-weight: 600;
}

/* Inputs */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e4e8;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: #24292e;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #D33F3D;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(211, 63, 61, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #959da5;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23586069' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

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

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

@media (max-width: 500px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e1e4e8;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: #f0f3f6;
    border-color: #D33F3D;
}

.checkbox-input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5da;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.checkbox-input:checked + .checkbox-custom {
    border-color: #D33F3D;
    background: #D33F3D;
}

.checkbox-input:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-text {
    font-size: 0.95rem;
    color: #586069;
    transition: color 0.2s ease;
}

.checkbox-input:checked ~ .checkbox-text {
    color: #24292e;
}

/* Checkbox Single */
.checkbox-single {
    margin-top: 20px;
}

.checkbox-single .checkbox-label {
    display: inline-flex;
    background: transparent;
    border: none;
    padding: 0;
}

.checkbox-single .checkbox-label:hover {
    background: transparent;
}

.checkbox-single .checkbox-text {
    font-weight: 500;
    color: #24292e;
}

/* Botón Submit */
.btn-submit {
    display: block;
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #D33F3D 0%, #c23634 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #c23634 0%, #a82d2b 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(211, 63, 61, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(211, 63, 61, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    .form-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .radio-group {
        gap: 15px;
    }

    .radio-label {
        padding: 12px 18px;
    }

    .radio-text {
        font-size: 1rem;
    }

    .checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }

    .btn-submit {
        font-size: 1rem;
    }
}

/* ============================================
   ESTILOS CAPTCHA VISUAL
   ============================================ */

.captcha-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: center;
}

.captcha-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #D33F3D;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.captcha-title::before {
    content: '🛡️';
}

.captcha-instruction {
    color: #495057;
    font-size: 1rem;
    margin: 0 0 20px 0;
}

.captcha-target {
    color: #D33F3D;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    background: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    border: 2px solid #D33F3D;
    display: inline-block;
    margin-left: 5px;
}

.captcha-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.captcha-option {
    cursor: pointer;
    padding: 20px 25px;
    background: #ffffff;
    border-radius: 12px;
    border: 3px solid #dee2e6;
    transition: all 0.3s ease;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.captcha-option:hover {
    border-color: #666666;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.captcha-option input[type="radio"] {
    display: none;
}



.captcha-option:has(input[type="radio"]:checked) {
    border-color: #333333;
    background: #f5f5f5;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.captcha-emoji {
    font-size: 3rem;
    line-height: 1;
    transition: all 0.3s ease;
    /* Efecto contorno/outline */
    color: transparent;
    -webkit-text-stroke: 2px #666666;
    text-shadow: 
        2px 2px 0 rgba(102, 102, 102, 0.1),
        -1px -1px 0 rgba(102, 102, 102, 0.1);
    filter: grayscale(100%) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Efecto hover - contorno más pronunciado */
.captcha-option:hover .captcha-emoji {
    -webkit-text-stroke: 2.5px #444444;
    transform: scale(1.05);
    filter: grayscale(100%) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Estado seleccionado - solo contorno más pronunciado */
.captcha-option input[type="radio"]:checked + .captcha-emoji {
    color: transparent;
    -webkit-text-stroke: 3px #333333;
    transform: scale(1.15);
    filter: grayscale(100%) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.captcha-label {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
    transition: color 0.2s ease;
}

.captcha-option:hover .captcha-label {
    color: #333;
}

.captcha-option input[type="radio"]:checked ~ .captcha-label {
    color: #333;
    font-weight: 600;
}

/* Responsive CAPTCHA */
@media (max-width: 480px) {
    .captcha-container {
        padding: 20px 15px;
    }
    
    .captcha-options {
        gap: 12px;
    }
    
    .captcha-option {
        min-width: 70px;
        padding: 15px;
    }
    
    .captcha-emoji {
        font-size: 2.5rem;
        -webkit-text-stroke: 1.5px #666666;
    }
    
    .captcha-option:hover .captcha-emoji {
        -webkit-text-stroke: 2px #444444;
    }
    
    .captcha-target {
        display: block;
        margin: 8px auto 0;
        width: fit-content;
    }
}
