/* =====================================================
   CONTACTO STYLES
   Estilos para la página de contacto
===================================================== */

/* Header específico de contacto */
.contact-header {
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
    color: white;
    padding: 3rem 0 2rem;
    margin-bottom: -2rem;
    position: relative;
    overflow: hidden;
}

.contact-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="contact-pattern" patternUnits="userSpaceOnUse" width="100" height="20"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="5" r="0.5" fill="white" opacity="0.1"/><circle cx="50" cy="15" r="0.8" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="20" fill="url(%23contact-pattern)"/></svg>');
    animation: contactPatternMove 20s linear infinite;
}

@keyframes contactPatternMove {
    from { transform: translateX(-100px); }
    to { transform: translateX(0); }
}

.contact-icon-header {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-icon-header i {
    font-size: 2.5rem;
    color: white;
}

.contact-stats .stat-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
}

.contact-stats .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.contact-stats .stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenedor principal */
.contact-wrapper {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.contact-main-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    background: white;
}

/* Sidebar de contacto */
.contact-sidebar {
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.sidebar-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.contact-icon-container {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

/* Navegación del sidebar */
.contact-nav {
    margin-top: 1.5rem;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: #495057;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.side-nav-link:hover {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
    transform: translateX(5px);
}

.side-nav-link.active {
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
}

.side-nav-link i {
    font-size: 1.1rem;
    width: 20px;
}

.sidebar-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 1.5rem 0;
}

/* Contacto rápido */
.quick-contact {
    margin-top: 1.5rem;
}

.quick-contact h6 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: rgba(111, 66, 193, 0.05);
    transform: scale(1.02);
}

.contact-method-icon {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-method-info p {
    margin: 0;
    line-height: 1.3;
}

.contact-method-info .fw-bold {
    color: #495057;
    font-size: 0.85rem;
}

.contact-method-info .text-muted {
    color: #6c757d !important;
    font-size: 0.8rem;
}

/* Contenido principal */
.contact-content {
    padding: 2rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: contactFadeIn 0.5s ease-in-out;
}

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

.section-header {
    margin-bottom: 2rem;
}

.section-header h5 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

/* Formularios */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #6f42c1;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.15);
    transform: translateY(-1px);
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236f42c1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
}

.form-select:focus {
    border-color: #6f42c1;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.15);
}

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

/* Checkbox personalizado */
.form-check {
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.25rem;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    background-color: white;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #6f42c1;
    border-color: #6f42c1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    border-color: #6f42c1;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.15);
}

.form-check-label {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

.form-check-label a {
    color: #6f42c1;
    text-decoration: none;
    font-weight: 500;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Botones de sección */
.section-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a359a 0%, #4c2a5e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 66, 193, 0.3);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 0.65rem 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
}

/* Validación de formularios */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15) !important;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* FAQ Section */
.accordion {
    margin-top: 2rem;
}

.accordion-item {
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px !important;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header {
    border: none;
}

.accordion-button {
    background: white;
    border: none;
    padding: 1.25rem;
    font-weight: 600;
    color: #495057;
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    border: none;
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.15);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236f42c1'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 1.25rem;
    background: #f8f9fa;
    color: #6c757d;
    line-height: 1.6;
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading .btn {
    position: relative;
}

.loading .btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: contactSpin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes contactSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 991.98px) {
    .contact-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .quick-contact {
        display: none;
    }
    
    .contact-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .side-nav-link {
        flex: 1;
        min-width: 150px;
        justify-content: center;
        padding: 0.75rem 0.5rem;
        margin-bottom: 0;
    }
    
    .side-nav-link span {
        display: none;
    }
    
    .side-nav-link i {
        margin: 0;
    }
}

@media (max-width: 767.98px) {
    .contact-header {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    
    .contact-stats {
        justify-content: center !important;
        margin-top: 1rem;
    }
    
    .contact-stats .stat-item {
        min-width: 70px;
        padding: 0.75rem;
    }
    
    .contact-main-card {
        margin: 1rem;
    }
    
    .contact-content,
    .contact-sidebar {
        padding: 1.5rem;
    }
    
    .section-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .contact-icon-header {
        width: 60px;
        height: 60px;
    }
    
    .contact-icon-header i {
        font-size: 2rem;
    }
    
    .contact-stats .stat-number {
        font-size: 1.2rem;
    }
    
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}