:root {
    /* Variables de color */
    --primary-color: #003366; /* Azul Oscuro */
    --secondary-color: #ffffff; /* Azul Claro muy suave */
    --accent-color: #e6f0ff;   /* Blanco */
    --text-dark: #0a0a0a;      /* Texto oscuro general */
    --text-light: #ffffff;     /* Texto claro */
    --text-medium: #333;       /* Texto gris medio */
    --border-color: #003366;   /* Borde para elementos */
    --box-background: #f5f5f5; /* Fondo para cajas de características */

    /* Variables de tipografía */
    --font-family-base: 'Montserrat', 'Segoe UI', sans-serif;
    --font-size-base: 1rem;
    --font-size-large-heading: 2.5rem;
    --font-size-medium-heading: 1.8rem;
    --font-size-small-heading: 1.4rem;
    --font-size-paragraph: 1.1rem;
    --font-size-tagline: 1.2rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family-base);
}

body {
    background-color: var(--accent-color);
    color: var(--text-dark);
    line-height: 1.6;
}

header {
    background: var(--primary-color);
    padding: 2.5rem 1rem;
    color: var(--text-light);
    animation: fadeIn 2s ease forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap; /* Permite que se ajuste bien en pantallas pequeñas */
    gap: 2rem;
    text-align: left;
}


h2 {
    text-align: center;
}

header .logo {
    max-width: 300px;
    height: auto;
    flex-shrink: 0; /* evita que se reduzca demasiado */
    margin-bottom: 0;
}


header h1 {
    font-size: var(--font-size-large-heading);
    color: var(--text-light);
}

header .tagline {
    margin-top: 0.5rem;
    font-size: var(--font-size-tagline);
    color: #d0d0d0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Navegación */
nav ul {
    list-style: none;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

nav ul li a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #a7d9ff;
}

.btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background-color: var(--primary-color);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    transform: translateY(-3px);
}

main {
    padding: 0;
}

/* Contenedor de las imágenes de marcas */
.large-images-container {
    max-width: 1200px;
    margin: 0 auto 1% auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.large-images-container h2,
.large-images h2 {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.large-images h2 {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: var(--font-size-medium-heading);
    margin: 3rem auto 2rem auto;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 1.5s ease-in-out;
}

.large-images {
    text-align: center;
}


.large-image {
    width: 150px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.large-image:hover {
    transform: scale(1.1);
}

/* Sección servicios */
.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Crear 2 columnas */
    gap: 2.5rem; /* Espacio entre tarjetas */
    padding: 4rem 1rem; /* Padding vertical */
    max-width: 1200px; /* Limitar ancho máximo para mejor lectura */
    margin: 0 auto; /* Centrar las características */
    animation: slideUp 2s ease forwards;
    background-color: var(--accent-color); /* Fondo azul claro */
}

main {
    padding: 0; /* Asegurarse de que el main no agregue padding extra */
}

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Crear 2 columnas */
    gap: 2.5rem; /* Espacio entre tarjetas */
    padding: 2rem 1rem; /* Padding vertical */
    max-width: 1200px; /* Limitar ancho máximo para mejor lectura */
    margin: 0 auto; /* Centrar las características */
    animation: slideUp 2s ease forwards;
}

.feature {
    display: flex; /* Utilizar Flexbox */
    flex-direction: column; /* Los hijos se alinearán verticalmente */
    justify-content: center; /* Centrar verticalmente */
    align-items: center; /* Centrar horizontalmente */
    background: var(--box-background);
    border-radius: 12px; /* Bordes más redondeados */
    padding: 1%; /* Padding interno */
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Sombra suave */
    text-align: center; /* Centrar el texto */
    
}

.feature:hover {
    transform: translateY(-8px); /* Elevación más notable */
    background: var(--secondary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada */
}

.feature h2 {
    font-size: 100%;      /* Tamaño más pequeño del texto */
    font-weight: 800;     /* Menos grueso, si lo prefieres */
    margin: 0.5rem 0;     /* Menos espacio arriba y abajo de cada título */
    text-align: center;   /* Centrado opcional si lo deseas */
}

.feature p {
    color: var(--text-medium);
    font-size: var(--font-size-paragraph);
}
/* -------------------------- Slide ------------------------------*/
@keyframes slide {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.logos {
    overflow: hidden;
    padding: 5px 0;
    background: white;
    white-space: nowrap;
    position: relative;

}

.logos:before,
.logos:after {
    position: absolute;
    top: 0;
    width: 250px;
    height: 100%;
    content: "";
    z-index: 2;
}

.logos:before {
    left: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0), white);
}

.logos:after {
    right: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), white);
}

.logos:hover .logos-slide {
    animation-play-state: paused;
}

.logos-slide {
    display: inline-block;
    animation: 80s slide infinite linear;
}

.logos-img {
    height: 100px;
    margin: 0 1x0px;
}
/* -------------------------- Fin del slide --------------------------*/

/* Galería proyectos */
.gallery {
    padding: 4rem 1rem;
    text-align: center;
    background: var(--secondary-color);
}

.gallery h2 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    font-size: var(--font-size-medium-heading);
    background-color: #003366;
    color: white;
    border-radius: 8px;
    width: 65%;
    margin: 0 auto;
    margin-bottom: 2.5rem;
}

.gallery h2:first-child {
    margin-top: 0;
}

.gallery h2:nth-child(3) {
    margin-top: 2rem;
}

.gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.8rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --------- Cambio de distribucion para una sola imagen --------- */
.gallery-images-unique {
    display: flex;
    justify-content: center;
}

.gallery-images .unique-img {
    height: 20rem;
    width: 20rem;
}
/* --------- Fin del cambio para una imagen --------- */

.gallery-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.gallery-images img:hover {
    transform: scale(1.07);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gallery-images:last-of-type {
    padding-bottom: 2rem; 
}


/* -------------------------------------Sección contacto------------------------------------- */
.contact-section {
    background-color: var(--box-background);
    padding: 1rem 1rem;
    text-align: center;
    max-width: 1250px;
    margin: 0 auto;
    border-top: 1px solid #ddd; /* Separador sutil */
}

.contact-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: var(--font-size-medium-heading);
}

.contact-section p {
    font-size: var(--font-size-paragraph);
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.contact-section address {
    font-style: normal; /* Quitar cursiva por defecto */
    margin-top: 2rem;
}

.contact-section address p {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.contact-section address a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-section address a:hover {
    color: #0056b3; /* Un azul más oscuro al pasar el mouse */
    text-decoration: underline;
}

.contact-section address {
    font-style: normal;
}

.contact-row {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 0rem;
}

.contact-row p {
    margin: 0;
}


footer {
    background-color: var(--primary-color);
    text-align: center;
    padding: 1.2rem;
    font-size: 0.95rem;
    color: #ccc;
}

/* Animaciones generales */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.6rem;
    }

    .large-image {
        width: 120px;
        height: 80px;
    }

    .feature {
        padding: 1.8rem;
    }

    .gallery-images img {
        height: 140px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3rem;
    }

    .large-image {
        width: 100px;
        height: 70px;
    }
}
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.97); /* Fondo blanco semitransparente */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    padding: 12px;
    background-color: #fff; /* fondo blanco detrás por si la imagen tiene transparencia */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #333;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: bold;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.header-text {
    flex: 1; /* que tome el resto del espacio disponible */
    min-width: 0; /* evita errores de flex overflow */
}


.header-text h1 {
    font-size: var(--font-size-large-heading);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-text h1 {
        font-size: 1.6rem;
    }

    .header-text .tagline {
        font-size: 1.1rem;
    }
}

body {
    overflow-x: hidden;
}

@media (max-width: 480px) {
    .features {
        grid-template-columns: 1fr; /* Una columna en móvil */
        padding: 1rem;
    }

    .feature {
        padding: 1.5rem;
    }
}
@media (max-width: 600px) {
    .gallery-images {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }

    .gallery-images img {
        aspect-ratio: 1 / 1;  /* asegura cuadrado también en móvil */
        height: auto;         /* no forzar altura fija */
    }
}

.modal-content-side {
    display: flex;
    flex-direction: row;
    /* gap: 4rem; */
    background-color: #fff;
    /* padding: 2rem; */
    border-radius: 10px;
    /* max-width: 90%;
    max-height: 90%; */
    height: 90%;
    width: 90%;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-content-side img {
    /* max-width: 40%; */
    height: 90%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.modal-text {
    max-width: 400px;
    text-align: left;
}

#modalCaption {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
    line-height: 1.6;
}

@media (max-width: 768px) {
  .modal-content-side {
    flex-direction: column; /* Apilar imagen arriba y texto abajo */
    padding: 1rem;
    gap: 1rem;
    max-height: 90%;
  }

  .modal-content-side img {
    max-width: 90%;
    height: auto;
  }

  .modal-text {
    max-width: 90%;
    text-align: center;
  }

  #modalCaption {
    font-size: 1rem;
    padding: 0 1rem;
  }
}

.logos {
    padding-bottom: 0;
    margin-bottom: 0;
}

.logos-slide {
    margin-bottom: 0;
}

.logos-slide img {
    height: 80px;
}

.gallery {
    margin-top: 0;
    padding-top: 1rem;
}

