/* ==========================================
   BANNER DE SERVICIOS
   ========================================== */
.banner-servicios {
    background: linear-gradient(135deg, #002147 0%, #00509e 100%);
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.banner-servicios h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.banner-servicios p {
    font-size: 1.2rem;
    color: #e0f2fe;
}

/* ==========================================
   CUADRÍCULA DE SERVICIOS
   ========================================== */
.seccion-servicios {
    padding: 80px 0;
    background-color: #f8fafc;
}

.contenedor-servicios {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 70px;
}

/* --- TARJETA DE SERVICIO --- */
.tarjeta-servicio {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-top: 5px solid #0072ce; /* Línea decorativa azul */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.tarjeta-servicio:hover {
    transform: translateY(-10px); /* Efecto de flotar */
    box-shadow: 0 15px 35px rgba(0, 114, 206, 0.15);
}

.icono-servicio {
    width: 80px;
    height: 80px;
    background-color: #f0f7ff;
    color: #0072ce;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
    margin: 0 auto 25px auto;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Invertir colores del icono al pasar el mouse */
.tarjeta-servicio:hover .icono-servicio {
    background-color: #0072ce;
    color: #ffffff;
}

.tarjeta-servicio h3 {
    font-size: 1.4rem;
    color: #003366;
    margin-bottom: 15px;
    font-weight: 800;
}

.tarjeta-servicio p {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
}

/* ==========================================
   LLAMADO A LA ACCIÓN (CTA)
   ========================================== */
.cta-servicios {
    background-color: #ffffff;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.cta-servicios h2 {
    color: #003366;
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta-servicios p {
    color: #475569;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn-azul-servicios {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0072ce;
    color: #ffffff;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-azul-servicios:hover {
    background-color: #00509e;
    transform: scale(1.05);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .banner-servicios h1 {
        font-size: 2.2rem;
    }
    .cta-servicios {
        padding: 30px 20px;
    }
    .cta-servicios h2 {
        font-size: 1.6rem;
    }
}
/* ==========================================
   TÍTULOS COMPARTIDOS
   ========================================== */
.titulo-centrado {
    text-align: center;
    font-size: 2.2rem;
    color: #003366;
    font-weight: 800;
    margin-bottom: 15px;
}

.subtitulo-centrado {
    text-align: center;
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 40px;
}

/* ==========================================
   SECCIÓN DE MARCAS (CARRUSEL INFINITO PURE CSS)
   ========================================== */
.seccion-marcas {
    padding: 60px 0;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.contenedor-marcas {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden; /* Oculta lo que se sale del borde */
}

.carrusel-marcas {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

/* El track que se mueve */
.track-marcas {
    display: flex;
    align-items: center;
    width: max-content;
    /* La animación dura 20s, es lineal (sin frenar) e infinita */
    animation: scrollInfinito 20s linear infinite; 
}

/* Efecto para que el carrusel se pause si el cliente pone el mouse encima */
.carrusel-marcas:hover .track-marcas {
    animation-play-state: paused;
}

.track-marcas img {
    height: 80px; /* Tamaño de los logos */
    margin: 0 40px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6); /* Logos en blanco y negro por elegancia */
    transition: all 0.3s ease;
}

.track-marcas img:hover {
    filter: grayscale(0%) opacity(1); /* Toman color al pasar el mouse */
    transform: scale(1.1);
}

/* Keyframes de la animación de movimiento */
@keyframes scrollInfinito {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Se mueve a la mitad exacta y se reinicia */
}

/* ==========================================
   SECCIÓN GALERÍA DE TRABAJOS (PORTAFOLIO)
   ========================================== */
.seccion-galeria {
    padding: 80px 0;
    background-color: #f8fafc;
}

.contenedor-galeria {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.item-galeria {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    cursor: pointer;
}

.item-galeria img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la foto llene la caja */
    transition: transform 0.5s ease;
}

/* Capa azul transparente que sube */
.overlay-galeria {
    position: absolute;
    bottom: -100%; /* Empieza oculta abajo */
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 51, 102, 0.9), rgba(0, 114, 206, 0.4));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 20px;
    transition: bottom 0.4s ease;
}

.overlay-galeria h4 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 5px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
}

.overlay-galeria p {
    color: #e0f2fe;
    font-size: 0.9rem;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease 0.2s;
}

/* Efectos al pasar el mouse por la foto */
.item-galeria:hover img {
    transform: scale(1.1); /* Zoom a la foto */
}

.item-galeria:hover .overlay-galeria {
    bottom: 0; /* Sube la capa azul */
}

.item-galeria:hover .overlay-galeria h4,
.item-galeria:hover .overlay-galeria p {
    transform: translateY(0); /* Entran los textos suavemente */
    opacity: 1;
}

/* ==========================================
   ANIMACIÓN "SCROLL REVEAL" (APARICIÓN)
   ========================================== */
/* Estado oculto inicial */
.animar-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Clase que se agrega con JS para mostrar */
.animar-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE CELULARES */
@media (max-width: 768px) {
    .titulo-centrado { font-size: 1.8rem; }
    .item-galeria { height: 250px; }
    .track-marcas img { height: 60px; margin: 0 20px; }
}