/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Fondos */
    --fondoPrincipal: url('/img/fondoPrincipal.webp');
    --fondoSecundario: url('/img/fondoSecundario.webp');

    /* Colores que se repiten */
    --colorTexto: #2c3e50;
    --colorTextoSecundario: #555;
    --colorBlanco: white;
    --colorFondo: #f4f8fc;
    --colorEnlace: #2646e2;

    /* Valores que se repiten */
    --radio-bordes: 20px;
    --espaciado-estandar: 20px;
    --gradiente-oscuro: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

body {
    font-family: 'Public Sans', sans-serif;
    background-color: var(--colorFondo);
    color: #2b2d42;
    line-height: 1.6;
}

/* Header */
.header {
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
    padding: 24px;
    position: absolute;
    width: calc(100% - 20px);
    margin: 10px;
    z-index: 1000;
}

.header__logo {
    height: 80px;
}

.menu-icon {
    height: 50px;
    cursor: pointer;
}

/* Menú desktop */
.header__nav {
    display: none;
}

.header__nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.header__nav-link {
    color: var(--colorBlanco);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.header__nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.header__nav-link--active {
    background-color: var(--colorEnlace);
    box-shadow: 0 2px 8px rgba(38, 70, 226, 0.3);
}

/* Hero Contact */
.hero-banner {
    background:
        var(--gradiente-oscuro),
        var(--fondoPrincipal);
    color: white;
    background-color: #2b2d42;
    padding: 24px;
    padding-top: 120px;
    border-radius: var(--radio-bordes);
    margin: 10px;
    background-size: cover;
    background-position: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.hero-banner__title {
    font-size: 32px;
    margin-bottom: 20px;
}

.hero-banner__description {
    font-size: 18px;
    max-width: 600px;
}

/* Contact Info */
.contact-info {
    padding: 24px;
    display: grid;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.contact-card__title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--colorTexto);
}

.contact-card__link {
    text-decoration: underline;
    color: var(--colorTextoSecundario);
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-card__link:hover {
    color: var(--colorEnlace);
}

.contact-card__text {
    color: var(--colorTexto);
    margin-bottom: 8px;
}

.contact-card__text strong {
    color: var(--colorTexto);
}

/* Mapa */
.map-wrapper {
    margin: 15px 0;
}

.map-wrapper iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 15px;
}

.map__button {
    background-color: var(--colorEnlace);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    width: 158px;
    height: 48px;
    display: block;
    margin: 15px auto 0;
    text-align: center;
    line-height: 48px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.map__button:hover {
    background-color: #1e3bc7;
    transform: translateY(-2px);
}

/* Formulario */
.form-section {
    padding: 24px;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--colorBlanco);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-container__title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--colorTexto);
    text-align: center;
}

.form__group {
    margin-bottom: 20px;
}

.form__label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--colorTexto);
}

.form__label--policy {
    display: inline-block;
    font-weight: 600;
    color: var(--colorTexto);
    margin: 0 0 8px 8px;
}

.form__input,
.form__textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: var(--colorTexto);
    background-color: var(--colorBlanco);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--colorEnlace);
    box-shadow: 0 0 0 3px rgba(38, 70, 226, 0.1);
}

.form__textarea {
    height: 150px;
    resize: vertical;
    min-height: 100px;
}

.form__input::placeholder,
.form__textarea::placeholder {
    color: var(--colorTextoSecundario);
}

.form__input--checkbox {
    transform: scale(1.5);
}

.form__button {
    background-color: var(--colorEnlace);
    color: var(--colorBlanco);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.form__button:hover {
    background-color: #1e3bc7;
    transform: translateY(-2px);
}

.form__button:active {
    transform: translateY(0);
}

/* ============= RESPONSIVE DESIGN ============= */

/* Tablet */
@media (min-width: 768px) {
    .contact-info {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        gap: 40px;
        padding: 40px;
    }

    /* La tarjeta de ubicación ocupa toda la fila inferior */
    .contact-card:nth-child(3) {
        grid-column: 1 / -1;
    }

    /* Orden tablet/desktop: telefono, email, horario, nuestra ubicacion */
    .contact-card:nth-child(1) {
        order: 1;
    }

    /* Teléfonos */
    .contact-card:nth-child(4) {
        order: 2;
    }

    /* Email */
    .contact-card:nth-child(2) {
        order: 3;
    }

    /* Horario */
    .contact-card:nth-child(3) {
        order: 4;
    }

    /* Nuestra ubicación */

    .contact-card {
        padding: 35px;
    }

    .hero-banner {
        padding: 40px;
        padding-top: 140px;
        margin: 15px;
        text-align: center;
        min-height: 350px;
    }

    .hero-banner__title {
        font-size: 42px;
    }

    .hero-banner__description {
        font-size: 20px;
        margin: 0 auto;
    }

    .form-container {
        padding: 50px 40px;
    }

    .form-container__title {
        font-size: 2.2rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {

    /* Header desktop */
    .header {
        padding: 24px 40px;
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(18px);
        margin: 20px 40px;
        border-radius: 18px;
        width: calc(100% - 82px);
    }

    .menu-icon {
        display: none;
    }

    .header__nav {
        display: block;
    }

    /* Layout desktop - Cards en fila para teléfonos, email, horarios */
    .contact-info {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        gap: 30px;
        padding: 40px;
    }

    /* La tarjeta de ubicación ocupa toda la fila inferior */
    .contact-card:nth-child(3) {
        grid-column: 1 / -1;
    }

    /* Orden tablet/desktop: telefono, email, horario, nuestra ubicacion */
    .contact-card:nth-child(1) {
        order: 1;
    }

    /* Teléfonos */
    .contact-card:nth-child(4) {
        order: 2;
    }

    /* Email */
    .contact-card:nth-child(2) {
        order: 3;
    }

    /* Horario */
    .contact-card:nth-child(3) {
        order: 4;
    }

    /* Nuestra ubicación */

    .contact-card {
        padding: 40px;
    }

    .contact-card__title {
        font-size: 24px;
    }

    .hero-banner {
        margin: 20px 40px;
        padding: 60px;
        padding-top: 160px;
        min-height: 400px;
    }

    .hero-banner__title {
        font-size: 48px;
    }

    .hero-banner__description {
        font-size: 22px;
    }

    .form-section {
        padding: 60px 40px;
    }

    .form-container {
        padding: 60px 50px;
    }

    .map-wrapper iframe {
        height: 450px;
    }
}

/* Desktop grande */
@media (min-width: 1200px) {
    .header {
        padding: 24px 60px;
        width: calc(100% - 104px);
        margin: 20px 52px;
    }

    .contact-info {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        max-width: 1400px;
    }

    /* La tarjeta de ubicación sigue ocupando toda la fila inferior */
    .contact-card:nth-child(3) {
        grid-column: 1 / -1;
    }

    /* Orden tablet/desktop: telefono, email, horario, nuestra ubicacion */
    .contact-card:nth-child(1) {
        order: 1;
    }

    /* Teléfonos */
    .contact-card:nth-child(4) {
        order: 2;
    }

    /* Email */
    .contact-card:nth-child(2) {
        order: 3;
    }

    /* Horario */
    .contact-card:nth-child(3) {
        order: 4;
    }

    /* Nuestra ubicación */

    .hero-banner {
        margin: 20px 52px;
        padding: 50px;
        padding-top: 150px;
        min-height: 450px;
    }

    .hero-banner__title {
        font-size: 54px;
    }

    .hero-banner__description {
        font-size: 24px;
        margin: 0 auto;
    }
}

/* Móvil específico */
@media (max-width: 767px) {
    .contact-info {
        padding: 10px;
        gap: 20px;
    }

    .contact-card {
        padding: 20px;
    }

    /* Orden móvil: telefono, horario, nuestra ubicacion, email */
    .contact-card:nth-child(1) {
        order: 1;
    }

    /* Teléfonos */
    .contact-card:nth-child(2) {
        order: 2;
    }

    /* Horario */
    .contact-card:nth-child(3) {
        order: 3;
    }

    /* Nuestra ubicación */
    .contact-card:nth-child(4) {
        order: 4;
    }

    /* Email */

    .form-section {
        padding: 10px;
    }

    .form-container {
        padding: 30px 20px;
    }

    .form-container__title {
        font-size: 1.8rem;
    }

    .hero-banner {
        margin: 10px;
        padding: 24px;
        padding-top: 120px;
    }

    .hero-banner__title {
        font-size: 32px;
    }

    .hero-banner__description {
        font-size: 18px;
    }
}

/* Estilos para los mensajes del formulario */
.form-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.form-message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estado del botón cuando está enviando */
.form__button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}