/* Estilos para la sección de contacto */
.contacto-section {
    padding: 4rem 0;
    background: #f9f9f9;
}

.contacto-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
    font-size: 2.5rem;
}

.contacto-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 0 1rem;
}

/* Información de contacto */
.info-contacto {
    background: #007bff;
    color: white;
    padding: 2rem;
    border-radius: 10px;
    height: fit-content;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-contacto h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.info-item:hover {
    transform: translateX(5px);
}

.info-item i {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.info-item p {
    line-height: 1.4;
}

.info-item .fa-whatsapp {
    color: #25D366;
    font-size: 1.4rem;
}

.whatsapp-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.whatsapp-link:hover {
    color: #25D366;
}

/* Efecto hover para el contenedor del WhatsApp */
.info-item:has(.fa-whatsapp):hover {
    transform: scale(1.05);
}

.info-item:has(.fa-whatsapp):hover .fa-whatsapp {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Formulario */
#contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.phone-input-container select:focus,
.phone-input-container input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Estilos para el campo de teléfono */
.phone-group {
    margin-bottom: 1.5rem;
}

.phone-input-container {
    display: flex;
    gap: 0.5rem;
}

.phone-input-container select {
    width: 120px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.phone-input-container input {
    flex: 1;
}

/* Botón de envío */
#contact-form button {
    width: 100%;
    padding: 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#contact-form button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#contact-form button:active {
    transform: translateY(0);
}

/* Mensajes de error */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.form-group input.error,
.form-group textarea.error,
.phone-input-container select.error,
.phone-input-container input.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

/* Estilos para la imagen de la oficina */
.office-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.office-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.office-image:hover .office-photo {
    transform: scale(1.05);
}

/* Estilos para el mapa y el mensaje de envío */
.location-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.location-link:hover {
    color: var(--primary-color);
}

.map-container {
    margin-top: 2rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.map-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.submit-message {
    margin-top: 1rem;
    text-align: center;
    color: #4CAF50;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.submit-message.visible {
    opacity: 1;
    transform: translateY(0);
}

button[type="submit"] {
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Modal del Mapa */
.map-modal .modal-content {
    width: 250px;
    height: 250px;
    padding: 0;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
}

.map-modal h3 {
    margin: 0;
    padding: 0.5rem;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    text-align: center;
}

.map-container {
    flex-grow: 1;
    width: 100%;
    position: relative;
}

.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.directions-button {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 10;
}

.directions-button:hover {
    background: var(--primary-color-dark);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.directions-button i {
    font-size: 1rem;
}

.close-modal {
    position: absolute;
    top: 0.3rem;
    right: 0.5rem;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

/* Animación del modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Media queries */
@media (max-width: 768px) {
    .office-image {
        height: 200px;
    }

    .map-container {
        height: 250px;
    }

    .map-modal .modal-content {
        width: 95%;
        margin: 1rem;
    }

    .map-container {
        height: 350px;
    }

    .map-info {
        flex-direction: column;
        text-align: center;
    }

    .map-info p {
        justify-content: center;
    }
}

@media (max-width: 1200px) {
    .contacto-container {
        max-width: 95%;
        gap: 2rem;
    }
}

@media (max-width: 992px) {
    .contacto-section h2 {
        font-size: 2rem;
    }
    
    .contacto-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .info-contacto {
        text-align: center;
    }
    
    .info-item {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .contacto-section {
        padding: 3rem 0;
    }
    
    .contacto-section h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    #contact-form {
        padding: 1.5rem;
    }
    
    .phone-input-container {
        flex-direction: column;
    }
    
    .phone-input-container select {
        width: 100%;
    }
    
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .info-item i {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .contacto-section h2 {
        font-size: 1.5rem;
    }
    
    .info-contacto {
        padding: 1.5rem;
    }
    
    .info-contacto h3 {
        font-size: 1.3rem;
    }
    
    .form-group input,
    .form-group textarea,
    .phone-input-container select {
        padding: 0.7rem;
    }
}

/* Animación del header al hacer scroll */
header {
    transition: transform 0.3s ease-in-out;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
