/* ===== CONTACT PAGE STYLES ===== */

/* Contact Section */
.contact-section {
    min-height: 100vh;
    padding: 8em 2em 4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 4em;
}

.contact-title {
    font-size: 3em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1em;
    line-height: 1.2;
}

.contact-title .highlight {
    background: linear-gradient(135deg, #a78bfa, #e0aaff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-description {
    font-size: 1.2em;
    color: #d1d5db;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4em;
    align-items: start;
}

/* Contact Info Cards */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.info-card {
    background: rgba(46, 21, 86, 0.4);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 1.2em;
    padding: 2em;
    text-align: center;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 15px 35px rgba(167, 139, 250, 0.1);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 0.6em;
    border-radius: 12px;
    background: rgba(167, 139, 250, 0.06);
}

.info-icon i {
    font-size: 1.6rem;
    color: var(--accent-morado-claro);
    line-height: 1;
    transition: transform 0.18s ease, color 0.18s ease;
}

.info-card:hover .info-icon i {
    transform: translateY(-4px) scale(1.02);
    color: #e0aaff;
}

.info-card h3 {
    color: #e0aaff;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 0.5em;
}

.info-card p {
    color: #d1d5db;
    font-size: 1em;
}

/* Contact Form */
.contact-form {
    background: rgba(46, 21, 86, 0.3);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 1.5em;
    padding: 3em;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 2em;
}

.form-label {
    display: block;
    color: #e0aaff;
    font-weight: 600;
    margin-bottom: 0.8em;
    font-size: 0.95em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 1em 1.2em;
    background: rgba(167, 139, 250, 0.1);
    border: 2px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.8em;
    color: #fff;
    font-size: 1em;
    font-family: 'Nunito', sans-serif;
    transition: all 0.25s ease;
    box-sizing: border-box;
    background-repeat: no-repeat;
    background-position: right 1.0em center;
}

/* Filled state - transparent background */
.form-input:not(:placeholder-shown),
.form-select:not([value=""]):valid,
.form-textarea:not(:placeholder-shown) {
    background-color: transparent !important;
    border-color: rgba(167, 139, 250, 0.4);
}

.form-input {
    height: 3.6em;
    line-height: 1.2;
    padding-right: 1.6em;
    display: inline-block;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    padding-top: 0.9em;
    padding-bottom: 0.9em;
    line-height: 1.4;
    padding-right: 1.6em;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-input:hover,
.form-textarea:hover {
    border-color: rgba(167, 139, 250, 0.35);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.85);
    background: rgba(167, 139, 250, 0.12);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.06);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: rgba(167, 139, 250, 0.06);
}

/* ===== Fixed Custom Select Styling ===== */
.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 3.6em;
    height: 3.6em;
    line-height: 1.2;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.0em center;
    background-size: 14px 14px;
}

/* Select filled state */
.form-select:not([value=""]):valid {
    background-color: transparent;
    border-color: rgba(167, 139, 250, 0.4);
}

/* Hide native arrow in IE/Edge */
.form-select::-ms-expand {
    display: none;
}

/* Options styling */
.form-select option {
    background: #2e1556;
    color: #fff;
    padding: 0.5em;
}

.form-select option:checked,
.form-select option:hover {
    background: rgba(167, 139, 250, 0.2);
}

.form-select:hover {
    border-color: rgba(167, 139, 250, 0.35);
}

.form-select:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.85);
    background-color: rgba(167, 139, 250, 0.12);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.06);
}

/* ===== Estados de validación: colores suaves y morado claro para success ===== */
/* Variables de color: morado claro y rojo suave */
:root {
    --accent-morado-claro: #cdb8ff; /* borde morado claro */
    --accent-morado-strong: #a78bfa; /* para icono/flecha */
    --soft-red: rgba(239, 68, 68, 0.22); /* borde suave roja */
    --soft-red-bg: rgba(239, 68, 68, 0.04);
}

/* Error ligero (más suave) - mantener transparente cuando está lleno */
.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--soft-red);
    background-color: var(--soft-red-bg);
    box-shadow: 0 6px 18px rgba(239,68,68,0.04);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4'/%3E%3Ccircle cx='12' cy='17' r='1'/%3E%3Cpath d='M10.29 3.86l-7 12.14c-.66 1.14.15 2.5 1.45 2.5h14.52c1.3 0 2.11-1.36 1.45-2.5l-7-12.14c-.65-1.12-2.24-1.12-2.9 0z'/%3E%3C/svg%3E");
    background-position: right 2.2em center;
    background-repeat: no-repeat;
}

/* Error state with filled content - override to transparent */
.form-input.error:not(:placeholder-shown),
.form-textarea.error:not(:placeholder-shown) {
    background-color: transparent !important;
}

.form-select.error:not([value=""]):valid {
    background-color: transparent !important;
}

/* Success = morado clarito - mantener transparente cuando está lleno */
.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: var(--accent-morado-claro);
    background-color: transparent !important;
    box-shadow: 0 8px 30px rgba(167,139,250,0.06);
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-position: right 2.2em center;
    background-repeat: no-repeat;
}

/* Ajustes especiales para select (combinar icono + flecha) */
.form-select.error {
    /* primer icono = aviso, segunda = flecha (ya definida en .form-select) */
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 9v4'/%3E%3Ccircle cx='12' cy='17' r='1'/%3E%3Cpath d='M10.29 3.86l-7 12.14c-.66 1.14.15 2.5 1.45 2.5h14.52c1.3 0 2.11-1.36 1.45-2.5l-7-12.14c-.65-1.12-2.24-1.12-2.9 0z'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: right 2.6em center, right 1.0em center;
    background-size: 12px 12px, 14px 14px;
    background-repeat: no-repeat, no-repeat;
}

.form-select.success {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: right 2.6em center, right 1.0em center;
    background-size: 12px 12px, 14px 14px;
    background-repeat: no-repeat, no-repeat;
}

/* Asegurar que inputs con icono tengan suficiente padding a la derecha */
.form-input.error,
.form-input.success,
.form-textarea.error,
.form-textarea.success {
    padding-right: 2.4em;
}

/* Pequeños ajustes responsivos para inputs y select */
@media (max-width: 480px) {
    .form-input {
        height: 3.2em;
        padding-right: 1rem;
    }
    .form-select {
        height: 3.2em;
        padding-right: 3.2em;
        background-position: right 0.9em center;
    }
    .form-textarea {
        min-height: 100px;
    }
}

/* Error States - Override for empty fields only */
.form-input.error:placeholder-shown,
.form-select.error[value=""],
.form-textarea.error:placeholder-shown {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Success States - Always transparent */
.form-input.success,
.form-select.success,
.form-textarea.success {
    border-color: #10b981;
    background: transparent !important;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.8em;
    cursor: pointer;
    line-height: 1.5;
    font-size: 0.9em;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(167, 139, 250, 0.1);
    border: 2px solid rgba(167, 139, 250, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #a78bfa;
    border-color: #a78bfa;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: #140c24;
    font-weight: bold;
    font-size: 12px;
}

.checkbox-container a {
    color: #a78bfa;
    text-decoration: underline;
}

.checkbox-container a:hover {
    color: #e0aaff;
}

/* reCAPTCHA */
.recaptcha-container {
    display: flex;
    justify-content: center;
    margin: 1em 0;
}

/* Submit Button */
.form-actions {
    text-align: center;
    margin-top: 2.5em;
}

.submit-btn {
    background: linear-gradient(135deg, #a78bfa, #e0aaff);
    color: #140c24;
    border: none;
    padding: 1.2em 3em;
    border-radius: 0.8em;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(167, 139, 250, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Message Modal */
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #2e1556;
    border-radius: 1.2em;
    max-width: 500px;
    width: 90%;
    border: 1px solid rgba(167, 139, 250, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2em 2em 1em;
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
}

.modal-header h3 {
    color: #e0aaff;
    margin: 0;
    font-size: 1.3em;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0.2em;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(167, 139, 250, 0.2);
}

.modal-body {
    padding: 1.5em 2em;
    color: #d1d5db;
    line-height: 1.6;
}

.modal-footer {
    padding: 1em 2em 2em;
    text-align: center;
}

.modal-btn {
    background: linear-gradient(135deg, #a78bfa, #e0aaff);
    color: #140c24;
    border: none;
    padding: 0.8em 2em;
    border-radius: 0.6em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active navigation link */
.active {
    color: #e0aaff !important;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3em;
    }
    
    .contact-info {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .info-card {
        flex: 1;
        padding: 1.5em;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 6em 1em 3em;
    }
    
    .contact-title {
        font-size: 2.2em;
    }
    
    .contact-description {
        font-size: 1em;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 1em;
    }
    
    .info-card {
        padding: 1.2em;
    }
    
    .info-icon {
        font-size: 2em;
    }
    
    .contact-form {
        padding: 2em 1.5em;
    }
    
    .form-group {
        margin-bottom: 1.5em;
    }
    
    .checkbox-container {
        font-size: 0.85em;
    }
    
    .submit-btn {
        width: 100%;
        padding: 1em 2em;
    }
    
    .modal-content {
        margin: 1em;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1.5em;
        padding-right: 1.5em;
    }
}

@media (max-width: 480px) {
    .contact-title {
        font-size: 1.8em;
    }
    
    .contact-form {
        padding: 1.5em 1em;
    }
    
    .textarea-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5em;
    }
}