/* --- Variables & Base Reset --- */
:root {
    --primary: #2b3a67;
    --secondary: #4a90e2;
    --brand-blue: rgb(21, 93, 252);
    --accent: #c7dd3b;
    --text: #333;
    --light: #f4f7f6;
    --white: #ffffff;
    --black: #000000;
    --header-bg: #f5f7f8;
    --transition: 240ms ease;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Oswald', sans-serif;
    line-height: 1.6;
    color: var(--text);
    overflow-x: hidden;
}

/* --- Layout Utils --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: clamp(60px, 10vh, 100px) 0;
}

.bg-light {
    background: var(--light);
}

.text-center {
    text-align: center;
    margin-bottom: 40px;
}

.grid-2 {
    display: grid;
    gap: 40px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Header & Navigation --- */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    transition: all var(--transition);
}

.main-header.scrolled {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 16px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #111;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all var(--transition);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--secondary);
    color: var(--white);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.logo-img {
    height: 42px;
    display: block;
    transition: filter var(--transition);
}

.logo-white {
    display: none;
}

.logo-color {
    display: inline-block;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

    .main-header.nav-open .nav-links {
        display: flex;
    }
}

/* --- Buttons --- */
.btn-primary,
.btn-submit,
.btn-secondary {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary,
.btn-submit {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    background: rgba(8, 21, 74) !important;
    border-color: rgba(8, 21, 74) !important;
    box-shadow: 0 6px 16px rgba(8, 21, 74, 0.3);
}

.btn-secondary {
    border-color: var(--white);
    color: var(--white);
}

.btn-secondary:hover {
    background: rgba(8, 21, 74) !important;
    border-color: rgba(8, 21, 74) !important;
    color: var(--white);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(43, 58, 103, 0.65), rgba(61, 90, 175, 0.65)),
        url(../images/Hero.webp) no-repeat center/cover;
    min-height: 100vh;
    color: var(--white);
    display: grid;
    place-items: center;
    text-align: center;
    padding: 100px 20px 60px;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 6rem);
    margin-bottom: 20px;
    line-height: 1.1;
    animation: moverDerecha 1s ease-out forwards;
}

.hero p {
    font-size: clamp(1.05rem, 2.2vw, 1.4rem);
    max-width: 800px;
    margin: 12px auto 30px;
    color: rgba(255, 255, 255, 0.9);
    animation: moverDerecha 1s ease-out 0.2s forwards;
    opacity: 0;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes moverDerecha {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Features --- */
.features-carousel {
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    animation: scroll 20s linear infinite;
}

.feature-card {
    min-width: 240px;
    flex: 0 0 auto;
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.feature-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.feature-card h4 {
    color: var(--primary);
}

.feature-card p {
    font-size: 0.9rem;
    color: #666;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* --- Services Styles --- */
.services-cards {
    background: var(--light);
}

.services-title {
    font-size: clamp(2rem, 5vw, 2.25rem);
    letter-spacing: 1px;
}

.services-title .accent {
    color: var(--white);
    background: var(--primary);
    padding: 2px 10px;
    border-radius: 4px;
}

.services-intro {
    max-width: 700px;
    margin: 0 auto 40px;
    color: #555;
    padding: 0 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    color: var(--text);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.service-card img {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.service-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Responsive Tablets */
@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Mobile */
@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ====================================================== */
/* ABOUT US SECTION                                       */
/* ====================================================== */
.about-section {
    background: #f8f9fb;
}

.about-card {
    background: var(--white);
    padding: 45px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.about-card h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    position: relative;
}

.about-card h2::after {
    content: "";
    width: 70px;
    height: 4px;
    background: var(--primary);
    display: block;
    margin-top: 10px;
    border-radius: 10px;
}

.about-box {
    margin-top: 25px;
    padding: 20px;
    border-left: 5px solid var(--secondary);
    background: #f3f6ff;
    border-radius: 15px;
}

.about-card p,
.about-box p {
    text-align: justify;
}

.about-box h4 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1.2rem;
}

.about-img {
    width: 100%;
    max-width: 750px;
    height: 700px;
    object-fit: cover;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    .about-card {
        padding: 25px;
    }

    .about-img {
        height: 300px;
    }
}

/* ====================================================== */
/* CLIENTS SECTION                                        */
/* ====================================================== */

.clients-section {
    background: var(--light);
}

/* Full Width Carousel */
.clients-carousel {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

/* Fade Edges (Apple Style) */
.clients-carousel::before,
.clients-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

/* Left Fade */
.clients-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--light), transparent);
}

/* Right Fade */
.clients-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--light), transparent);
}

/* Track Infinite Scroll */
.clients-track {
    display: flex;
    align-items: center;
    gap: 50px;
    width: max-content;
    animation: clientsScroll 25s linear infinite;
}

/* Logo Card */
.client-logo {
    flex: 0 0 auto;
    width: 160px;
    height: 90px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: var(--white);
    border-radius: 14px;
    padding: 15px;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

/* Hover Lift */
.client-logo:hover {
    transform: translateY(-4px);
}

/* Logo Image */
.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: 0.3s ease;
}

.client-logo:hover img {
    transform: scale(1.05);
    /* Agregamos un pequeño zoom en lugar del color */
}

/* Pause on Hover */
.clients-carousel:hover .clients-track {
    animation-play-state: paused;
}

/* Infinite Animation */
@keyframes clientsScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .client-logo {
        width: 130px;
        height: 75px;
    }

    .clients-track {
        gap: 25px;
    }

    .clients-carousel::before,
    .clients-carousel::after {
        width: 60px;
    }
}


/* Stats Section Below Carousel */
/* --- SECCIÓN DE ESTADÍSTICAS (CLIENTS STATS) --- */
/* Modificar esta sección para ajustar el diseño base de los números */
.clients-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 60px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(8, 21, 74);
    /* Color solicitado */
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    color: #555;
    font-weight: 600;
}

/* --- AJUSTES RESPONSIVE PARA ESTADÍSTICAS --- */
/* Cambiar aquí para forzar 2 columnas en móviles (2 arriba, 2 abajo) */
@media (max-width: 480px) {
    .clients-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .stat-number {
        font-size: 1.8rem;
    }
}

/* ====================================================== */
/* CONTACT SECTION                                        */
/* ====================================================== */
.contact-section {
    padding: 100px 0;
    font-size: 1.3rem;
    background-color: rgba(8, 21, 74);
}

.contact-grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

@media (min-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    color: var(--white);
}

.contact-info a {
    color: inherit !important;
    text-decoration: none !important;
}


.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-info p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    margin-bottom: 12px;
}

.contact-form {
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.4s ease;
}

.contact-form:hover {
    transform: translateY(-6px);
}

.contact-form h3 {
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary);
}

.contact-form input,
.contact-form textarea {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
}

.contact-form button {
    background: var(--accent);
    color: #111;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.contact-form button:hover {
    transform: translateY(-2px);
    background: rgba(8, 21, 74);
    color: var(--white);
    opacity: 0.95;
}

.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-status:empty {
    display: none;
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 4px;
}

/* ====================================================== */
/* FOOTER                                                 */
/* ====================================================== */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 0 30px;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    width: 140px;
}