/* ======== GOOGLE FONTS ======== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* ======== VARIABLES CSS ======== */
:root {
    --header-height: 3.5rem;

    /* Colores (extraídos del logo) */
    --primary-blue: #3094e6;
    --primary-green: #49c929;
    --dark-color: #1E1E1E;
    --text-color: #555;
    --body-color: #FFFFFF;
    --container-color: #FFFFFF;

    /* Tipografía */
    --body-font: 'Poppins', sans-serif;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* ======== BASE ======== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
}

h1, h2, h3 {
    color: var(--dark-color);
    font-weight: 700;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ======== REUSABLE CSS CLASSES ======== */
.container {
    max-width: 1024px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

.section {
    padding: 4.5rem 0 2rem;
}

.section__title {
    font-size: var(--h2-font-size);
    text-align: center;
    margin-bottom: 1rem;
}
.section__subtitle {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.section__title--left {
    text-align: left;
    margin-bottom: 1.5rem;
}

/* ======== HEADER & NAV ======== */
.header {
    width: 100%;
    background-color: var(--body-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo img {
    height: 40px;
}

.nav__list {
    display: flex;
    column-gap: 2.5rem;
}

.nav__link {
    color: var(--text-color);
    font-weight: 600;
    transition: color .3s;
}

.nav__link:hover {
    color: var(--primary-blue);
}

/* ======== BUTTONS ======== */
.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all .3s;
    border: none;
    cursor: pointer;
}

.button--header {
    background-color: var(--primary-green);
    color: white;
}
.button--header:hover {
    background-color: #6aa322;
}

.button--cta {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.button--cta i {
    margin-right: 0.5rem;
}

.button--cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.button--white {
    background-color: white;
    color: var(--primary-blue);
}
.button--white:hover {
    background-color: #f0f0f0;
}


/* ======== HERO SECTION ======== */
.hero {
    background-color: #f8f9fa;
    padding: 8rem 0 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before { /* Elemento de diseño inspirado en el logo */
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-blue), var(--primary-green));
    opacity: 0.1;
    bottom: -100px;
    right: -50px;
    z-index: 1;
}

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__data {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero__title {
    font-size: var(--h1-font-size);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: #495057;
}

/* ======== SERVICES SECTION ======== */
.services__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.service-card {
    background-color: var(--container-color);
    padding: 2.5rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform .3s, box-shadow .3s;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.service-card__icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

.service-card__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

/* ======== PROCESS SECTION ======== */
.process__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 4rem;
}

.process-step {
    text-align: center;
    position: relative;
}

.process-step__number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem auto;
    border: 4px solid #e9f5db;
}

.process-step__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
}

/* ======== WHY US SECTION (Mejorado) ======== */
.why-us__header {
    text-align: center;
    margin: 0 auto 4rem auto;
    max-width: 800px;
}

.why-us__intro {
    color: var(--text-color);
}

.why-us__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.why-us__features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 5px solid var(--primary-green);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.feature-card__icon {
    color: var(--primary-green);
    font-size: 1.8rem;
    margin-right: 1rem;
}

.feature-card__text h3 {
    margin-bottom: 0.25rem;
    font-size: var(--h3-font-size);
}

.feature-card__text p {
    margin: 0;
}

.why-us__image {
    text-align: center;
}

.why-us__logo-big {
    max-width: 250px;
    opacity: 0.8;
}

/* ======== CLIENTS SECTION ======== */
.clients__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
    align-items: center;
    margin-top: 4rem;
}

.client-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.client-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.client__logo {
    max-width: 140px;
    height: 80px; 
    object-fit: contain; 
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.3s, opacity 0.3s;
}  

.client-item:hover .client__logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* ======== EXAMPLES SECTION ======== */
.examples__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.example-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.example-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.example-item img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.example-item:hover img {
    transform: scale(1.05);
}

.example-item__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(48, 148, 230, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
    text-align: center;
}

.example-item:hover .example-item__overlay {
    opacity: 1;
}

.example-item__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.example-item__cta {
    display: flex;
    align-items: center;
    font-weight: 600;
}

.example-item__cta i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}


/* ======== FINAL CTA ======== */
.cta-final {
    background: var(--body-color);
    padding: 4rem 1.5rem;
    text-align: center;
    color: white;
    border-top: 1px solid #eee;
    margin: 4rem 0 0 0;
}
.cta-final__title {
    color: var(--dark-color);
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
}
.cta-final__text {
    color: var(--text-color);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ======== FOOTER ======== */
.footer {
    background-color: var(--dark-color);
    color: #a0a0a0;
    padding: 3rem 0;
    text-align: center;
}

.footer__container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer__logo {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer__copyright {
    font-size: var(--small-font-size);
}

/* ======== LIGHTBOX STYLES ======== */
.lightbox {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.show {
    visibility: visible;
    opacity: 1;
}

.lightbox__content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox__content {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox__close:hover {
    color: #ccc;
}


/* ======== SCROLL ANIMATIONS ======== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ======== RESPONSIVE DESIGN ======== */
@media screen and (max-width: 767px) {
    .nav__menu {
        display: none;
    }
    .nav {
        justify-content: space-between;
    }
    .button--header {
        font-size: var(--small-font-size);
        padding: 0.6rem 1rem;
    }
    .hero {
        padding: 6rem 0 3rem 0;
    }
    :root {
        --h1-font-size: 1.75rem;
        --h2-font-size: 1.25rem;
        --h3-font-size: 1.1rem;
    }
}

@media screen and (min-width: 768px) {
    .why-us__grid {
        grid-template-columns: 1fr 1fr;
    }
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 1024px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
/* ==================== SOLUCIÓN PARA VISIBILIDAD EN MÓVILES ==================== */
@media screen and (max-width: 767px) {

    /* Evita que la imagen se agrande en dispositivos táctiles al tocar */
    .example-item:hover img {
        transform: none;
    }

    /* Modifica la superposición para que sea una barra de información visible en la parte inferior */
    .example-item__overlay {
        opacity: 1; /* La hace visible por defecto */
        background: rgba(48, 148, 230, 0.9); /* Fondo azul semi-transparente */
        
        /* La posiciona abajo */
        top: auto;
        bottom: 0;
        height: auto;
        
        /* Alinea el título a la izquierda y el botón a la derecha */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;

        /* Elimina la transición de opacidad que ya no es necesaria en móvil */
        transition: none;
    }

    /* Asegura que no haya cambios al "intentar" hacer hover en móvil */
    .example-item:hover .example-item__overlay {
        opacity: 1;
    }

    /* Ajusta el título para el nuevo layout */
    .example-item__title {
        margin: 0;
        text-align: left;
        font-size: 1rem;
        font-weight: 600;
        text-shadow: none; /* La sombra no es necesaria con un fondo sólido */
    }

    /* Ajusta el botón/CTA para el nuevo layout */
    .example-item__cta {
        font-weight: 600;
        font-size: 0.9rem;
    }

    .example-item__cta i {
        font-size: 1.1rem;
        margin-right: 0.4rem;
    }
}