/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3d3d3d;
    --secondary-color: #38383b;
    --back-color: #202020;
    --text-color: white;
    --border-color: #dee2e6;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--back-color);
    overflow-x: hidden;
}
section[id] {
    scroll-margin-top: 100px;
}

/* Header and Navigation */
header {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* .navbar: distribuye el logo, el menu principal y las redes del encabezado.
    Afecta a <nav class="navbar"> en index.html. */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 1rem;
}

/* .brand: agrupa y alinea el logo de imagen y el nombre de la empresa.
    Afecta al primer bloque del encabezado en index.html. */
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* .menu-toggle: abre y cierra el menu principal en pantallas pequenas.
    Afecta al boton de navegacion agregado en index.html. */
.menu-toggle {
    display: none;
}

/* .logo: define el tamano y peso del texto DAAT MX.
    Afecta a <div class="logo"> en index.html. */
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    white-space: nowrap;
}

/* .nav-menu: muestra cada lista de navegacion en una fila con separacion.
    Afecta a las dos listas <ul class="nav-menu"> y es consultada por script.js. */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Estos enlaces comparten color, decoracion y transicion.
    Afecta a los enlaces del menu y del footer en index.html. */
.nav-menu a,
.footer-column a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

/* Reduce la opacidad de los enlaces cuando el cursor pasa sobre ellos. */
.nav-menu a:hover,
.footer-column a:hover {
    opacity: 0.8;
}

h1, h2, h3, h4, h5{
    margin-bottom: 1rem;
    color: var(--text-color);
    text-align: center;
}

h1 {
    font-size: 3rem;
}

h3 {
    font-size: 2.25rem;
}

h2, h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.15rem;
}

/* Convierte los SVG sociales negros en blancos y conserva su transparencia.
    Afecta a las imagenes .social-icon del menu y del footer. */
.nav-menu .social-icon,
.social-links .social-icon {
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* .nav-menu .social-icon: fija el tamano de los iconos sociales del encabezado. */
.nav-menu .social-icon {
    width: 20px;
    height: 20px;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    padding: 1rem;
    border-radius: 8px;
}

p {
    text-align: justify;
    color: var(--text-color);
}

/* .p-centrado: centra el texto introductorio de la seccion Inicio.
     Afecta al parrafo con esta clase en index.html. */
 .p-centrado {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-color);
 }

/* About Section */
/* .about y .about-reverse: comparten la estructura de los bloques informativos.
    Afecta a los contenedores correspondientes de index.html. */
.about,
.about-reverse {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

/* .about: coloca la imagen y el texto en orden normal. */
.about {
    flex-direction: row;
}

/* .about-listing: presenta los compromisos como una lista vertical con sangria.
    Afecta a la lista class="about-listing" en index.html. */
.about-listing {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-left: 3rem;
    text-align: justify;
}

/* .navabout: permite que el bloque de texto ocupe el espacio disponible.
    Afecta a los div class="navabout" dentro de las secciones about. */
.navabout {
    flex: 1;
    padding-right: 2rem;
}

/* Ajusta el espaciado del texto cuando el bloque about esta invertido. */
.about-reverse .navabout {
    padding-right: 0;
    padding-left: 2rem;
}

/* .imagen-adaptable: adapta las imagenes de las secciones informativas.
    Afecta a las imagenes class="imagen-adaptable" en index.html. */
.imagen-adaptable {
  width: 80%;          /* La imagen ocupa todo el ancho disponible en el celular */
  height: auto;
  align-self: center;  /* Centra la imagen horizontalmente */
  border-radius: 50px; /* Ajusta este valor a tu gusto */
  margin-bottom: 2rem; /* Espacio debajo de la imagen */ 
}

/* .contact y footer: comparten el fondo de las secciones destacadas.
    Afecta a estas secciones de index.html. */
.contact,
footer {
    background-color: var(--secondary-color);
}

/* Separa visualmente las cajas de Servicios y Contacto. */
.services {
    margin-bottom: 5rem;
}

/* .service-grid: crea una cuadricula adaptable para las tarjetas de servicios.
    Afecta al contenedor de tarjetas en index.html. */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* .service-card: da formato individual a cada servicio y permite hover.
    Afecta a cada <article class="service-card"> en index.html. */
.service-card {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

/* Eleva visualmente la tarjeta activa al pasar el cursor. */
.service-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Ajusta el espacio del titulo dentro de cada tarjeta de servicio. */
.service-card h3 {
    margin-bottom: 0.5rem;
}

/* .service-card-image: mantiene las imagenes de servicios con tamano uniforme.
    Afecta a las imagenes de cada tarjeta en index.html. */
.service-card-image {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Full-width image */
/* .full-width-img: expande la imagen de Inicio al ancho de la ventana.
    Afecta a la imagen principal de index.html. */
.full-width-img {
    width: 100vw;
    height: auto;
    display: block;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 4rem;
}

/* Contact Section */
.contact {
    background-color: var(--secondary-color);
    color: #29292c;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 680px;
    margin: 2rem auto 3rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    background-color: var(--back-color);
    color: white;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
}

.contact-card__icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 12px;
}

.contact-card__icon--whatsapp {
    background-color: #315b4b;
}

.contact-card__icon--email {
    background-color: #3c4e68;
}

.contact-card__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.contact-card__text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
    align-items: center;
    text-align: center;
}

.contact-card__label {
    color: #b5b5b8;
    font-size: 0.95rem;
}

.contact-card strong {
    color: #ffffff;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

/* Buttons */
/* .btn-primary: define los botones principales y su posicion centrada.
    Afecta a los botones de index.html y es consultada por script.js. */
.btn-primary {
    background-color: white;
    color: black;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    margin: 2rem auto 4rem;
}

/* Cambia el color y escala el boton al pasar el cursor. */
.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: scale(1.05);
}

/* Reduce brevemente el boton mientras se presiona. */
.btn-primary:active {
    transform: scale(0.98);
}

/* Footer */
footer {
    color: var(--text-color);
    padding: 2rem;
    margin-top: 3rem;
}

/* .footer-container: reparte el footer en tres columnas iguales.
    Afecta al contenedor principal del footer en index.html. */
.footer-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin: 0 auto 2rem;
}

/* Centra y compacta los textos informativos del footer. */
.footer-column p,
.footer-bottom p {
    text-align: center;
}

.footer-column p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* .social-links: centra y separa los iconos sociales del footer.
    Afecta al contenedor class="social-links" en index.html. */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Define el area clicable de cada enlace social del footer. */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

/* Fija el tamano de los iconos sociales del footer. */
.social-links .social-icon {
    width: 30px;
    height: 30px;
}

/* .footer-bottom: separa la leyenda de copyright.
    Afecta al bloque inferior del footer en index.html. */
.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Corrige el margen especifico del parrafo de copyright. */
.footer-bottom p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .menu-toggle {
        display: block;
        background: transparent;
        color: var(--text-color);
        border: none;
        padding: 0.4rem 1rem;
        font-size: 1rem;
        cursor: pointer;
        margin-bottom: 0.75rem;
    }

    .nav-menu {
        flex-direction: column;
        justify-content: center;
        gap: 0.35rem;
        text-align: center;
    }

    .main-menu {
        display: none;
    }

    .main-menu.is-open {
        display: flex;
        margin-bottom: 1rem;
    }

    .navbar > .nav-menu:last-child {
        flex-direction: row;
        gap: 1rem;
    }

    main {
        padding: 1rem;
    }

    section {
        padding: 1.5rem;
        margin-bottom: 0.75rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .full-width-img {
        width: calc(100% + 5rem);
        margin-left: -2.5rem;
        margin-bottom: 2rem;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .about,
    .about-reverse {
        flex-direction: column;
    }

    .about-reverse .navabout {
        padding-left: 0;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        gap: 0.5rem;
    }

    .nav-menu {
        gap: 0.25rem;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
  .about {
    justify-content: space-between; /* Deja espacio proporcional entre ambos */
  }

  .imagen-adaptable {
    width: 45%;           /* En PC, la imagen solo ocupará el 45% del ancho */
  }
}

.daat-catalogo {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 32px 20px;
    text-align: center;
    font-family: inherit;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .daat-catalogo__titulo {
    font-weight: 600;
    margin-bottom: 8px;
  }

  .daat-catalogo__subtitulo {
    margin-bottom: 32px;
    text-align: center;
  }

  .daat-catalogo__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
  }

  @media (max-width: 900px) {
    .daat-catalogo__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 560px) {
    .daat-catalogo__grid {
      grid-template-columns: 1fr;
    }
  }

  .daat-catalogo__card {
        display: flex;
        flex-direction: column;
        min-height: 190px;
        background: var(--secondary-color);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
        padding: 1.25rem;
    text-align: left;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  }

  .daat-catalogo__card:hover {
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
  }

  .daat-catalogo__icono {
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
        margin-bottom: 1rem;
    font-size: 22px;
  }

  .daat-catalogo__nombre {
    font-weight: 600;
    margin: 0 0 6px;
  }

  .daat-catalogo__desc {
    margin: 0;
    line-height: 1.5;
        color: rgba(255, 255, 255, 0.72);
  }

  /* Banda de marcas */
  .daat-marcas {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 32px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

    .daat-marcas__titulo,
    .daat-confianza__titulo {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.62);
        margin-bottom: 20px;
  }

    .daat-marcas__viewport {
        overflow: hidden;
        width: 100%;
        padding: 12px 0;
        background-color: var(--secondary-color);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 8px;
    }

    .daat-marcas__viewport + .daat-marcas__viewport {
        margin-top: 20px;
    }

    .daat-marcas__pista {
        display: flex;
        width: max-content;
        will-change: transform;
    }

    .daat-marcas__pista--derecha {
        animation: marcas-hacia-derecha 32s linear infinite;
    }

    .daat-marcas__pista--izquierda {
        animation: marcas-hacia-izquierda 32s linear infinite;
    }

    .daat-marcas__grupo {
    display: flex;
    align-items: center;
        gap: 48px;
        padding-right: 48px;
  }

    .daat-marcas__grupo img {
        display: block;
        flex: 0 0 auto;
        width: 120px;
        height: 54px;
        object-fit: contain;
        filter: grayscale(100%);
        opacity: 0.7;
        transition: filter 0.2s ease, opacity 0.2s ease;
    }

    .daat-marcas__grupo img:hover {
        filter: grayscale(0%);
        opacity: 1;
    }

    @keyframes marcas-hacia-derecha {
        from {
            transform: translateX(-50%);
        }
        to {
            transform: translateX(0);
        }
    }

    @keyframes marcas-hacia-izquierda {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(-50%);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .daat-marcas__pista {
            animation-play-state: paused;
        }
    }

    .daat-marcas__pista.is-paused {
        animation-play-state: paused;
    }

    @media (hover: hover) {
        .daat-marcas__pista:hover {
            animation-play-state: paused;
        }
    }

  @media (max-width: 480px) {
        .daat-marcas__grupo {
            gap: 28px;
            padding-right: 28px;
        }

        .daat-marcas__grupo img {
            width: 96px;
            height: 44px;
    }
  }

  .daat-confianza {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 32px 20px;
    text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .daat-confianza__lista {
    display: flex;
    justify-content: center;
    align-items: center;
        gap: 1rem;
    flex-wrap: wrap;
  }

  .daat-confianza__item {
    display: flex;
        flex-direction: column;
        flex: 1 1 260px;
        max-width: 360px;
        min-height: 250px;
    align-items: center;
        gap: 12px;
        padding: 1.25rem;
        background: rgba(32, 32, 32, 0.65);
        border-radius: 8px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  }

  .daat-confianza__item:hover {
        border-color: rgba(255, 255, 255, 0.3);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
  }

    .daat-confianza__item .imagen-adaptable {
        width: 100%;
        height: 160px;
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 0;
    }

    .daat-confianza__item h6 {
        margin-bottom: 0;
        color: var(--text-color);
    }

  @media (max-width: 480px) {
    .daat-confianza__lista {
      gap: 28px;
    }
  }