/* Variables y Configuración Global */
:root {
    --primary-blue: #0A4386;
    --accent-blue: #0056B3;
    --light-bg: #F5F6F8;
    --card-bg: #FFFFFF;
    --dark: #111827;
    --gray-text: #4B5563;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 80px;
}

body {
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.6;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Montserrat', sans-serif;
}

/* Header & Navegación */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    z-index: 1000;
}

.navbar {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-logo {
    height: 45px;
    width: auto;
    display: block;
}

.footer-logo {
    height: 35px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--light-bg);
    border: 1px solid #CBD5E1;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

.lang-btn {
    background: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-text);
    cursor: pointer;
    transition: color 0.2s ease;
}

.lang-btn.active {
    color: var(--primary-blue);
    text-decoration: underline;
}

.lang-switch .divider {
    color: #94A3B8;
    font-size: 0.85rem;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero-fullscreen {
    background: linear-gradient(135deg, rgba(10, 30, 60, 0.92) 0%, rgba(10, 67, 134, 0.8) 100%), 
                url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    min-height: 85vh;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
}

.hero-overlay {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
}

.hero-content {
    max-width: 800px;
}

.location-badges {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.location-badges span {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    color: var(--white);
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    min-height: 120px;
}

.hero-content p.subtitle {
    font-size: 1.25rem;
    color: #E0E7FF;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--white);
    color: var(--primary-blue);
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-hero-primary:hover {
    background: #E0E7FF;
    transform: translateY(-2px);
}

.btn-hero-secondary {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Quiénes Somos */
.about {
    padding: 6rem 2rem;
    background-color: var(--white);
}

.about-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-tag {
    color: var(--primary-blue);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.about-title {
    font-size: 2.6rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.about-highlight {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--gray-text);
    line-height: 1.7;
    font-size: 1.05rem;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--light-bg);
    padding: 2rem 1.5rem;
    border-radius: 14px;
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
}

.stat-card h3 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.stat-card p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-text);
}

/* Sección de Servicios */
.services {
    padding: 6rem 0;
    background: radial-gradient(circle at center, #0F4C81 0%, #082952 100%);
    color: var(--white);
    width: 100%;
    overflow: hidden;
}

.services-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 2rem;
}

.services-header h2 {
    font-size: 2.5rem;
    letter-spacing: 2px;
    color: var(--white);
}

.carousel-container-full {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 3.5rem;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide-card {
    min-width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 3rem;
    box-sizing: border-box;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.slide-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.card-icon {
    font-size: 2.8rem;
    color: #60A5FA;
    margin-bottom: 1rem;
}

.slide-info h3 {
    font-size: 2.2rem;
    color: var(--white);
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}

.slide-info p {
    font-size: 1.05rem;
    color: #E0E7FF;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.services-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #93C5FD;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pill i {
    color: #60A5FA;
}

.slide-media {
    overflow: hidden; 
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.slide-media img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

.carousel-slide-card:hover .slide-media img {
    transform: scale(1.08); 
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--white);
    color: #0F4C81;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.4);
}

.prev-btn { left: -10px; }
.next-btn { right: -10px; }

.carousel-dots-services {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 2rem;
}

.dot-service {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot-service.active {
    background: var(--white);
    width: 30px;
    border-radius: 10px;
}

/* =========================================
   OFICINAS / COBERTURA (VERSIÓN COMPACTA)
   ========================================= */
.offices {
    padding: 3rem 2rem;
    background-color: var(--white);
}

.offices-container {
    max-width: 1100px;
    margin: 0 auto;
}

.offices-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: center; 
}

/* Contenedor e Imagen del Mapa */
.offices-map-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-image-container {
    width: 100%;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 25px rgba(10, 67, 134, 0.06);
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.offices-map-img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
    display: block;
}

/* Tarjetas en Grid de 2 Columnas */
.offices-cards-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.office-card {
    background: var(--light-bg);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

/* La última tarjeta (Dallas) ocupa 2 columnas para centrarse */
.office-card:last-child {
    grid-column: span 2;
}

.office-card h3 {
    font-size: 1rem;
    color: var(--primary-blue);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.office-card p {
    font-size: 0.8rem;
    color: var(--gray-text);
    line-height: 1.35;
    margin: 0;
}

.office-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 67, 134, 0.08);
    background: #FFFFFF;
}

/* Sección de Contacto */
.contact {
    padding: 5rem 2rem;
    background-color: var(--light-bg);
}

.contact-card-box {
    max-width: 750px;
    margin: 0 auto;
    background: var(--white);
    padding: 2.5rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-top: 5px solid var(--primary-blue);
}

.toggle-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: opacity 0.3s ease;
    user-select: none;
}

.toggle-header:hover {
    opacity: 0.8;
}

.contact-title-group h2 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.contact-title-group p {
    color: var(--gray-text);
}

.toggle-icon-box {
    background: var(--light-bg);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1.2rem;
    transition: transform 0.4s ease, background 0.3s ease;
}

.toggle-icon-box.rotate {
    transform: rotate(180deg);
    background: var(--primary-blue);
    color: var(--white);
}

.contact-form-wrapper {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, margin-top 0.4s ease;
}

.contact-form-wrapper.open {
    max-height: 700px;
    opacity: 1;
    margin-top: 2.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.4rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    color: var(--dark);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(10, 67, 134, 0.08);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: var(--accent-blue);
}

/* Footer */
.footer-section {
    background-color: #0A0F1D;
    color: var(--white);
    padding: 3.5rem 2rem 1.5rem 2rem;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.2rem;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 35px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.newsletter-col p {
    color: #94A3B8;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.6rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 6px;
    color: var(--white);
    outline: none;
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 0.8rem 1.2rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--accent-blue);
}

.social-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.social-btn i {
    font-size: 1.1rem;
}

.social-btn:hover {
    transform: translateY(-2px);
    color: var(--white);
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
}

.social-btn.facebook:hover {
    background: #1877F2;
    border-color: transparent;
}

.social-btn.tiktok:hover {
    background: #000000;
    border-color: #25F4EE;
    color: #25F4EE;
}

.social-btn.linkedin:hover {
    background: #0077B5;
    border-color: transparent;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1E293B;
    padding-top: 1.5rem;
    color: #64748B;
    font-size: 0.85rem;
}

.type-cursor {
    font-weight: 400;
    color: var(--white);
    animation: blink 0.8s infinite;
    margin-left: 4px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =========================================
   ANIMACIONES DE SCROLL Y REVEAL
   ========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-up.visible, 
.fade-in-left.visible, 
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .nav-logo {
        height: 35px;
    }
    .hero-content h1 {
        font-size: 2.3rem;
        min-height: 100px;
    }
    .about-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 1.5rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .slide-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .slide-media img {
        height: 220px;
    }
    .carousel-container-full {
        padding: 0 1rem;
    }
    .carousel-btn {
        display: none;
    }
    
    .offices-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .offices-cards-col {
        grid-template-columns: 1fr;
    }

    .office-card:last-child {
        grid-column: span 1;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .newsletter-form {
        flex-direction: column;
    }
    
    .fade-in-left, .fade-in-right {
        transform: translateY(30px);
    }
}