:root {
    --primary-color: #2F4C8F;
    --secondary-color: #003366;
    --accent-color: #FFC107;
    --text-light: #ffffff;
    --text-dark: #333333;
    --background-light: #f8f9fa;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Banner */
.banner {
    position: relative;
    overflow: hidden;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.banner-video {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.banner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    color: #fff;
    text-shadow:
        0 2px 16px #000a,
        0 0 8px #000,
        2px 2px 8px #000,
        -2px -2px 8px #000;
}
.banner h1 { font-size: 3em; margin-bottom: 10px; }
.banner p { font-size: 1.5em; margin-bottom: 30px; }

.btn {
    background: #0074d9;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    text-decoration: none;
}

/* Services */
.services {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 60px 0;
}
.service {
    flex: 1 1 30%;
    background: #f4f4f4;
    margin: 10px;
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
}
.service h3 { color: #003366; }

/* Footer */
footer {
    background: #133c6e;
    color: #ffe600;
    text-align: center;
    padding: 14px 0 12px 0;
    font-size: 0.98em;
    letter-spacing: 0.5px;
    border-top: 1px solid #224a7a;
}

/* Empresas Clientes */
.empresas-clientes {
    text-align: center;
    margin: 40px auto 20px auto;
}
.empresas-clientes h2 {
    color: #003366;
    margin-bottom: 20px;
}
.carousel-empresas {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin: 0 auto 30px auto;
    max-width: 800px;
    background: transparent;
}
.carousel-track {
    display: flex;
    gap: 40px;
    animation: scroll-logos 18s linear infinite;
    align-items: center;
}
.carousel-track img {
    height: 60px;
    margin: 0 16px;
    object-fit: contain;
    background: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    transition: filter 0.3s;
}
.carousel-track img:hover {
    filter: grayscale(0);
}
@keyframes scroll-logos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.carousel-track {
    width: max-content;
}

/* Footer Responsive */
@media (max-width: 900px) {
    .footer-banner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-col {
        margin-bottom: 30px;
    }
}
@media (max-width: 800px) {
    .services { flex-direction: column; }
    nav { float: none; text-align: center; margin-top: 10px; }
}

/* Footer Banner */
.footer-banner {
    background: #0a2a5c;
    color: #fff;
    display: flex;
    justify-content: space-around;
    padding: 40px 0 30px 0;
    margin-top: 40px;
    font-size: 1.1em;
}
.footer-col {
    flex: 1 1 30%;
    margin: 0 20px;
}
.footer-col h3 {
    color: #ffe600;
    border-bottom: 2px solid #ffe600;
    padding-bottom: 8px;
    margin-bottom: 18px;
    font-size: 1.2em;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 10px;
}
.footer-col iframe {
    border-radius: 8px;
    border: none;
    width: 100%;
    min-width: 220px;
}

/* WhatsApp Chat */
.whatsapp-chat {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    background: #25d366;
    border-radius: 50%;
    box-shadow: 0 2px 8px #0003;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.whatsapp-chat:hover {
    box-shadow: 0 4px 16px #0005;
    transform: scale(1.08);
}
.whatsapp-chat img {
    width: 36px;
    height: 36px;
    display: block;
    filter: invert(1) brightness(2);
}

/* Header Elements */
.logo-header {
    height: 60px;
    width: auto;
    display: block;
    margin-right: 24px;
}
.header .container, .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}
.menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}
.menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.auth-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.user-name {
    color: #fff;
    font-weight: bold;
    font-size: 1.08rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3em 0.8em;
    border-radius: 18px;
    background: rgba(255,255,255,0.07);
    transition: background 0.2s;
}
.user-name .user-icon {
    font-size: 1.2em;
}
.btn-header {
    margin: 0;
    padding: 0.4em 1.2em;
    border: 1.5px solid #ffe066;
    background: transparent;
    color: #ffe066;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    margin-left: 0.5em;
}
.btn-header:hover {
    background: #ffe066;
    color: #003366;
}
#menu-toggle {
    display: none;
}

/* Menú desplegable para Servicios */
.menu .dropdown {
    position: relative;
}
.menu .dropdown .arrow {
    margin-left: 6px;
    font-size: 0.8em;
}
.menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0a2a5c;
    min-width: 260px;
    box-shadow: 0 4px 16px #0005;
    border-radius: 0 0 8px 8px;
    z-index: 200;
    padding: 0;
    margin: 0;
}
.menu .submenu li {
    color: #fff;
    padding: 12px 20px;
    white-space: normal;
    cursor: pointer;
    font-size: 1em;
    border-bottom: 1px solid #224a7a;
    list-style: none;
    transition: background 0.2s;
}
.menu .submenu li:last-child {
    border-bottom: none;
}
.menu .submenu li:hover {
    background: #133c6e;
}
.menu .dropdown:hover .submenu,
.menu .dropdown:focus-within .submenu {
    display: block;
}
.menu .dropdown > a {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive Menu */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-nav {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    .menu {
        display: none;
        position: absolute;
        top: 48px;
        right: 0;
        background: #003366;
        flex-direction: column;
        width: 180px;
        box-shadow: 0 4px 16px #0005;
        border-radius: 0 0 8px 8px;
        z-index: 100;
        padding: 16px 0;
    }
    .menu li {
        margin: 0;
        padding: 0;
        text-align: right;
        margin-right: 18px;
        margin-bottom: 12px;
    }
    .menu li:last-child {
        margin-bottom: 0;
    }
    .menu-icon {
        display: block;
    }
    #menu-toggle:checked + .menu-icon + .menu {
        display: flex;
    }
    .auth-links {
        flex-direction: column;
        gap: 6px;
        margin-left: 12px;
    }
    .menu .dropdown .submenu {
        position: static;
        box-shadow: none;
        background: #0a2a5c;
        border-radius: 0 0 8px 8px;
        display: none;
    }
    .menu .dropdown.open .submenu {
        display: block;
    }
    .menu .dropdown:hover .submenu,
    .menu .dropdown:focus-within .submenu {
        display: none;
    }
}

/* Contact Section */
.contact-info-box, .contact-form-box {
    background: #fff;
    flex: 1 1 320px;
    max-width: 400px;
}

.contact-info-box a:hover {
    text-decoration: underline;
}

.contact-form-desc {
    color: #224a7a;
}

.contact-form label {
    width: 100%;
    padding: 12px 14px;
    font-size: 1em;
    outline: none;
}

.contact-form input:focus,
.contact-form .btn {
    padding: 13px 0;
    transition: background 0.2s, box-shadow 0.2s;
}

.contact-form .btn:hover {
    background: linear-gradient(90deg, #005fa3 60%, #002244 100%);
    box-shadow: 0 4px 16px #00336633;
}

/* Responsive */
@media (max-width: 600px) {
    .contact-section {
        padding: 24px 0 36px 0;
    }
    .contact-section .container {
        padding: 18px 6px;
    }
    .contact-section h1 {
        font-size: 1.3em;
    }
}
@media (max-width: 900px) {
    .contact-main-container {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        max-width: 98vw;
    }
    .contact-info-box,
    .contact-form-box {
        max-width: 100%;
        margin-bottom: 18px;
    }
}

/* Footer Links */
.footer-banner a,
.footer-banner a:visited,
.footer-banner a:active {
    color: #ffe600;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-banner a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Services Slider */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
    font-family: Arial, sans-serif;
}

.services-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 25px;
    color: #003366;
    text-transform: uppercase;
}

.services-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
}

.services-slider::-webkit-scrollbar {
    height: 10px;
}
.services-slider::-webkit-scrollbar-thumb {
    background: #004080;
    border-radius: 5px;
}
.services-slider::-webkit-scrollbar-track {
    background: #e0e0e0;
}

.service {
    flex: 0 0 300px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.1);
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}
.service:hover {
    transform: translateY(-5px);
}
.service h3 {
    font-size: 1.1rem;
    color: #004080;
    margin-bottom: 10px;
}
.service p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}
/* === Sección de Servicios Corregida (Responsive y Ordenada) === */

/* Título */
.services-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: bold;
    color: #1a4d94;
    margin: 60px auto 40px auto;
    width: 100%;
}

/* Contenedor de Servicios (grid limpio) */
.services-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 por fila en desktop */
    gap: 2.5rem; /* Espacio entre tarjetas */
    max-width: 1200px;
    margin: 0 auto 60px auto; /* centrado con espacio inferior */
    padding: 0 1.5rem;
    box-sizing: border-box;
    justify-items: center;
    align-items: stretch;
}

/* Tarjeta individual */
.service {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.8rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 360px; /* asegura ancho uniforme */
}

.service:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Ícono */
.service .material-icons-sharp {
    font-size: 2.8rem;
    color: #2F4C8F;
    margin-bottom: 1rem;
}

/* Título dentro de la tarjeta */
.service h3 {
    font-size: 1.25rem;
    color: #2F4C8F;
    margin-bottom: 0.75rem;
}

/* Texto */
.service p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

/* === Responsive === */

/* 2 columnas en tablets / pantallas medianas */
@media (max-width: 1024px) {
    .services-slider {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* 1 columna en móviles */
@media (max-width: 600px) {
    .services-slider {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1rem;
    }
    .service {
        max-width: 100%;
    }
}

/* === FIX para mantener el título centrado arriba === */
.services {
    display: block !important;
    text-align: center;
    margin: 60px auto;
    width: 100%;
}

.services .container {
    display: block;
}

.services-title {
    text-align: center;
    margin: 60px auto 40px auto;
    width: 100%;
}
/* === Ajuste de separación entre servicios === */
.services-slider {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.2rem 3rem; /* aumenta espacio vertical y horizontal */
    max-width: 1200px;
    margin: 0 auto 80px auto; /* más margen inferior */
    padding: 0 2rem;
    box-sizing: border-box;
    justify-items: center;
    align-items: stretch;
}

.service {
    margin: 0; /* evita que haya márgenes mezclados */
    padding: 2rem 1.6rem; /* un poco más de aire interno */
}

/* 2 columnas en pantallas medianas */
@media (max-width: 1024px) {
    .services-slider {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 2rem; /* mantiene buena separación */
    }
}

/* 1 columna en móviles */
@media (max-width: 600px) {
    .services-slider {
        grid-template-columns: 1fr;
        gap: 1.8rem; /* espacio entre tarjetas vertical */
        padding: 1.2rem;
    }
}

/* Modal flotante mejorado mensaje de usuarios */
.modal-mensaje {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: modal-fade-in 0.3s;
}
@keyframes modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-contenido {
    background: linear-gradient(135deg, #ffffff 80%, #e6f0ff 100%);
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    text-align: center;
    min-width: 320px;
    max-width: 90vw;
    border: 2px solid #007bff;
    position: relative;
    animation: modal-pop 0.4s;
}
@keyframes modal-pop {
    0% { transform: scale(0.8);}
    100% { transform: scale(1);}
}
.modal-texto {
    display: block;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    color: #0044cc;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.btn-modal {
    background: linear-gradient(90deg, #007bff 60%, #0056b3 100%);
    color: #fff;
    border: none;
    padding: 0.8rem 2.2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, transform 0.2s;
}
.btn-modal:hover {
    background: linear-gradient(90deg, #0056b3 60%, #007bff 100%);
    transform: scale(1.07);
}
