:root {
    --blue: #113a8f;
    --blue-dark: #081d4f;
    --red: #d61d36;
    --light: #f4f7fb;
    --dark: #18202a;
    --text: #334155;
    --muted: #64748b;
    --white: #ffffff;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    --radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
}

.container {
    width: min(1150px, 95%);
    margin: auto;
}

/* PORTADA */

.portada img {
    width: 100%;
    height: clamp(110px, 18vw, 250px);
    object-fit: cover;
}

/* BOTON WHATSAPP FLOTANTE */

.whatsapp-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #25d366;
    color: var(--white);
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 800;
    z-index: 999;
    box-shadow: var(--shadow);
    transition: 0.3s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-2px) scale(1.03);
    background: #20ba5a;
}

/* HEADER */

.topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--white);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.07);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
}

.logo-link {
    display: flex;
    align-items: center;
    color: inherit;
    gap: 15px;
}

.brand-logo {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: 12px;
}

.brand-title {
    display: block;
    font-weight: 800;
    color: var(--blue);
    font-size: 1.15rem;
    font-family: 'Montserrat', Arial, sans-serif;
}

.brand-subtitle {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
}

.menu {
    display: flex;
    gap: 20px;
    font-weight: 700;
}

.menu a {
    color: #333333;
    transition: 0.3s;
}

.menu a:hover {
    color: var(--red);
}

.language-switcher {
    display: flex;
    gap: 8px;
}

.language-switcher button {
    border: none;
    background: var(--blue);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 800;
    transition: 0.3s;
}

.language-switcher button:hover {
    background: var(--blue-dark);
}

/* HERO */

.hero {
    padding: 70px 0;
    background: linear-gradient(135deg, #f4f7fb 0%, #e3f2fd 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero h1 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--blue-dark);
}

.badge,
.kicker {
    display: inline-block;
    background: #ffe9ec;
    color: var(--red);
    border-radius: 999px;
    font-weight: 800;
}

.badge {
    padding: 8px 15px;
    margin-bottom: 15px;
}

.kicker {
    padding: 8px 15px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.hero p {
    margin-bottom: 25px;
    line-height: 1.8;
}

.hero-actions,
.modal-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 999px;
    color: var(--white);
    background: var(--blue);
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
    text-align: center;
}

.btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--blue);
    border: 2px solid var(--blue);
}

.btn.full {
    width: 100%;
}

.btn-whatsapp {
    background: #25d366;
}

.btn-whatsapp:hover {
    background: #20ba5a;
}

/* TARJETAS Y SECCIONES */

.hero-card,
.card,
.stat-box,
.contact-form,
.map-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 25px;
}

.hero-card h2 {
    color: var(--blue-dark);
    font-family: 'Montserrat', Arial, sans-serif;
}

.info-card {
    padding: 15px;
    margin-top: 15px;
    background: #f6f8fc;
    border-left: 4px solid var(--red);
    border-radius: 12px;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: var(--blue);
}

.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--light);
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h2 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: clamp(1.7rem, 3vw, 2rem);
    margin-top: 10px;
    color: var(--blue-dark);
}

.section-heading p {
    margin-top: 6px;
}

/* SERVICIOS */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.card {
    overflow: hidden;
    transition: 0.3s;
}

.card:hover,
.card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(17, 58, 143, 0.18);
}

.service-card {
    cursor: pointer;
    outline: none;
}

.service-card:focus {
    box-shadow: 0 0 0 4px rgba(17, 58, 143, 0.22), var(--shadow);
}

.service-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.card-body {
    padding: 22px 18px 25px;
    text-align: center;
}

.card h3 {
    color: var(--blue);
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.card p {
    color: var(--muted);
    font-size: 0.95rem;
}

/* NOSOTROS */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.about-grid p {
    font-size: 1.05rem;
    margin-top: 15px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-box {
    padding: 20px;
    text-align: center;
}

.stat-box strong {
    display: block;
    color: var(--red);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.stat-box span {
    font-size: 0.9rem;
}

/* GALERIA */

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.media-item {
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: var(--white);
    transition: 0.3s;
}

.media-item:hover {
    transform: translateY(-6px);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    background: #000000;
}

.media-content {
    padding: 18px 20px 22px;
    background: var(--white);
}

.media-content h3 {
    color: var(--blue);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.media-content p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* VIDEO, MAPA Y CONTACTO */

.video-section {
    max-width: 900px;
    margin: auto;
}

.video-section video {
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: block;
    background: #000000;
}

.map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
}

.map-card iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 18px;
    display: block;
}

.cta-section {
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: var(--white);
}

.cta-section .kicker {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-details p {
    margin-top: 15px;
}

.contact-form {
    padding: 25px;
    color: var(--text);
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark);
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(17, 58, 143, 0.15);
}

#mensaje-enviado {
    display: none;
    margin-top: 15px;
    color: #128a3a;
    font-weight: 800;
    text-align: center;
}

/* MODAL */

.modal-servicio {
    position: fixed;
    inset: 0;
    background: rgba(8, 29, 79, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-servicio.modal-activo {
    display: flex;
}

.modal-contenido {
    background: var(--white);
    width: min(900px, 95%);
    max-height: 92vh;
    overflow: auto;
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalEntrada 0.25s ease;
}

@keyframes modalEntrada {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.modal-cerrar:hover {
    background: #b9152b;
}

#modalImagen {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.modal-texto {
    padding: 28px;
}

.modal-texto h2 {
    margin-bottom: 12px;
    color: var(--blue);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2rem;
}

.modal-texto p {
    color: var(--text);
    line-height: 1.7;
    font-size: 1.05rem;
}

.modal-actions {
    margin-top: 24px;
}

/* FOOTER */

.footer {
    background: #0b1325;
    color: var(--white);
    padding: 25px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .nav {
        flex-wrap: wrap;
    }

    .menu {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-grid,
    .about-grid,
    .map-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 700px) {
    .container {
        width: min(100% - 28px, 1150px);
    }

    .nav {
        justify-content: center;
        text-align: center;
    }

    .logo-link {
        width: 100%;
        justify-content: center;
    }

    .brand-logo {
        width: 55px;
        height: 55px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.8rem;
    }

    .language-switcher {
        width: 100%;
        justify-content: center;
    }

    .menu {
        gap: 14px;
        font-size: 0.95rem;
    }

    .section {
        padding: 60px 0;
    }

    .cards,
    .media-gallery {
        grid-template-columns: 1fr;
    }

    .service-card img,
    .media-item img,
    .media-item video {
        height: 230px;
    }

    #modalImagen {
        height: 240px;
    }

    .modal-texto {
        padding: 22px;
    }

    .modal-texto h2 {
        font-size: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}