﻿/* ENCABEZADO DE SECCIÓN */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 3rem;
    color: var(--purple);
    font-weight: 800;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 100px;
        height: 4px;
        background: var(--orange);
        border-radius: 2px;
    }

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-top: 24px;
}

/* ===== SECCIÓN PRINCIPAL ===== */
.contacto-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 20px 60px;
    background: var(--bg-body);
}

/* ===== INFORMACIÓN DE CONTACTO (TARJETAS) ===== */
.contacto-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
    margin-bottom: 50px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    font-size: 1rem;
    color: var(--text-main);
    padding: 30px;
    border-radius: 20px;
    flex: 1;
    min-width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.info-item i {
    font-size: 2.5rem;
    width: 50px;
    text-align: center;
    margin-top: 5px;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    opacity: 0.7;
}

.info-value {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.5;
    display: block;
}

/* Colores específicos por tarjeta */
#phoneDiv {
    background: rgba(0, 151, 58, 0.2);
    border-left: 4px solid var(--green);
}
#phoneDiv i { color: var(--green); }

#MailDiv {
    background: rgba(122, 31, 162, 0.2);
    border-left: 4px solid var(--purple);
}
#MailDiv i { color: var(--purple); }

#horarioDiv {
    background: rgba(255, 122, 42, 0.2);
    border-left: 4px solid var(--orange);
}
#horarioDiv i { color: var(--orange); }
#horarioDiv .info-value { margin-bottom: 4px; }
#horarioDiv .info-value:last-child { margin-bottom: 0; }

/* ===== GRID FORMULARIO + IMAGEN ===== */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

/* Columna del formulario */
.contacto-form-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Columna de la imagen */
.contacto-imagen-wrapper {
    position: relative;
    width: 100%;
}

.contacto-imagen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-soft);
}

.contacto-imagen:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* ===== HEADER DEL FORMULARIO ===== */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-title {
    font-size: 2rem;
    color: var(--purple);
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.form-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
}

    .form-subtitle::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: var(--orange);
        border-radius: 2px;
    }

/* ===== FORMULARIO ===== */
.contacto-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-soft);
    height: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-soft);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition-base);
    background: var(--bg-card);
    color: var(--text-main);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(122, 31, 162, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
    min-height: 1.2em;
}

.btn-enviar {
    width: 100%;
    padding: 16px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(122, 31, 162, 0.3);
}

.btn-enviar:hover {
    background: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 122, 42, 0.4);
}

.btn-enviar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.mensaje-estado {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
}

.mensaje-estado.exito {
    background: rgba(0, 151, 58, 0.1);
    color: var(--green);
    border: 2px solid var(--green);
}

.mensaje-estado.error {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
    border: 2px solid #e53e3e;
}

/* ===== MODO OSCURO ===== */
body.dark-mode #phoneDiv {
    background: linear-gradient(135deg, rgba(0, 151, 58, 0.25) 0%, rgba(0, 151, 58, 0.1) 100%);
}

body.dark-mode #MailDiv {
    background: linear-gradient(135deg, rgba(122, 31, 162, 0.25) 0%, rgba(122, 31, 162, 0.1) 100%);
}

body.dark-mode #horarioDiv {
    background: linear-gradient(135deg, rgba(255, 122, 42, 0.25) 0%, rgba(255, 122, 42, 0.1) 100%);
}

body.dark-mode .contacto-form {
    background: var(--bg-card);
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea {
    background: var(--bg-card);
}

body.dark-mode .contacto-imagen {
    border-color: var(--border-soft);
    opacity: 0.95;
}

/* ===== CHECKBOX DE PRIVACIDAD ===== */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding-left: 0;
}

    .checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin: 0;
        cursor: pointer;
        accent-color: var(--purple);
    }

    .checkbox-label .checkmark {
        display: none;
    }

.privacy-link {
    color: var(--purple);
    text-decoration: underline;
    transition: var(--transition-base);
    margin-left: 4px;
}

    .privacy-link:hover {
        color: var(--orange);
    }

/* Ajuste para el mensaje de error del checkbox */
#error-privacidad {
    margin-top: 8px;
    margin-left: 32px;
}

/* Modo oscuro */
body.dark-mode .privacy-link {
    color: var(--orange);
}

    body.dark-mode .privacy-link:hover {
        color: var(--purple);
    }


/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contacto-imagen-wrapper {
        position: static;
        padding-bottom: 0;
        order: -1;
    }

    .contacto-imagen {
        position: static;
        max-height: 300px;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    .contacto-section {
        padding: 100px 15px 60px;
    }

    .contacto-info {
        flex-direction: column;
        gap: 20px;
    }

    .info-item {
        min-width: auto;
        padding: 20px;
    }

    .info-item i {
        font-size: 2rem;
        width: 40px;
    }

    .contacto-form {
        padding: 30px 24px;
    }

    .form-title {
        font-size: 1.6rem;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    .checkbox-label {
        font-size: 0.85rem;
        gap: 10px;
    }

    #error-privacidad {
        margin-left: 30px;
    }
}

@media (max-width: 480px) {
    .contacto-grid {
        gap: 20px;
    }

    .contacto-imagen {
        max-height: 250px;
    }

    .form-title {
        font-size: 1.4rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }
}