/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* =========================================================
   BASE
========================================================= */

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "proxima-nova", sans-serif;
    color: #666666;
    padding-top: var(--nav-h);
    position: relative;
}

main {
    flex: 1;
    padding: 0;
}

p {
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: "proxima-nova", sans-serif;
    color: #666666;
    font-weight: bold;
    text-align: center;
}

h1 {
    margin: 20px 0;
}

h2 {
    font-size: 2em;
    margin: 20px 0;
}

h3, h4 {
    font-size: 1.25em;
}


/* =========================================================
   NAVBAR
========================================================= */

:root {
    --nav-h: 70px;
}

.white-bg {
    background-color: #ffffff;
}

.logotipo {
    height: 50px;
    margin-left: 10px;
}

header nav div div ul li {
    font-family: "Advent Pro", sans-serif;
    font-weight: 400;
    font-size: 20px;
    padding: 0 10px;
    color: #666666;
    text-decoration: none;
    text-align: center;
}

.bold-hov:hover {
    font-weight: 600;
}


/* =========================================================
   HOME
========================================================= */

.home-section {
    padding: 80px 20px;
}

.intro-txt {
    text-align: center;
    margin: 30px;
}

.intro-txt img {
    width: 50%;
    margin-bottom: 20px;
}

        /* Responsive - home */
        @media screen and (min-width: 600px) {
            .intro-txt {
                margin: auto;
                max-width: 600px;
            }
            .home-section {
              display: none;
            }
        }

/* =========================================================
   HERO VIDEO
========================================================= */

.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: white;
    display: flex;
    justify-content: center;
}

.hero-section video {
    display: block;
    width: 100%;
    max-width: 1200px;
    height: auto;
    object-fit: cover;
    object-position: center center;
}

        /* Mostrar video solo a partir de tablet */
        @media screen and (max-width: 600px) {
            .hero-section {
                display: none;
            }
        }

/* =========================================================
   PORTAFOLIO
========================================================= */

.portafolio-section {
    background: #333333;
    padding: 20px;
}

.portafolio-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.portafolio-card {
    display: block;
    position: relative;
    text-decoration: none;
}

.portafolio-figure {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.portafolio-figure img,
.portafolio-figure video {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity .3s ease;
}

.portafolio-caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #bbb;
    padding: 12px;
    opacity: 0;
    transition: opacity .3s ease;
    background: linear-gradient(0deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .25));
}

.portafolio-caption h4 {
    color: #fff;
    margin: 0 0 4px;
}

.portafolio-caption p {
    margin: 0 0 10px;
    font-size: .95rem;
}

.cta-caso {
    background: transparent;
    border: 1px solid #999;
    border-radius: 999px;
    padding: 6px 12px;
    color: #fff;
    cursor: pointer;
    display:inline-block;
}

.portafolio-card:hover .portafolio-figure img,
.portafolio-card:hover .portafolio-figure video {
    opacity: .15;
}

.portafolio-card:hover .portafolio-caption,
.portafolio-card:focus-visible .portafolio-caption {
    opacity: 1;
}

        @media screen and (min-width: 600px) {
            .portafolio-container {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media screen and (min-width: 1200px) {
            .portafolio-container {
                grid-template-columns: repeat(3, 1fr);
            }
        }

/* =========================================================
   LIGHTBOX / MODAL
========================================================= */

.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 12px;
    padding: 16px;
    z-index: 1000;
    justify-items: center;
    align-content: center;
    min-height: 100dvh;
    touch-action: manipulation;
}

.lb-stage {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    justify-items: center;
    max-width: 100vw; 
    overflow: hidden;
    margin: 0 auto;
}

.lb-stage img,
.lb-stage video {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 8px;
    margin: 0 auto; 
    display: block; 
    min-height: 200px;
}

.lb-prev,
.lb-next,
.lb-close {
    background: transparent;
    border: 1px solid #666;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: #ddd;
    font-size: 18px;
}

.lb-prev:hover,
.lb-next:hover,
.lb-close:hover {
    border-color: #aaa;
    color: #fff;
}

.lb-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    color: #bbb;
    padding:0 8px;
}

.lb-meta h3 {
    margin: 0;
    color: #fff;
    line-height:1.2;
}

.lb-meta p {
    margin: 0;
    line-height: 1.2; 
}

.lb-cta {
    border: 1px solid #999;
    border-radius: 999px;
    padding: 6px 12px;
    text-decoration: none;
    color: #fff;
}

.sr-only {
    position: absolute; 
    width: 1px; 
    height: 1px; 
    overflow: hidden; 
    clip: rect(0 0 0 0); 
    white-space: nowrap;
}

.lb-media {
  display: grid;
  place-items: center;
}

.lb-media img,
.lb-media video {
  max-width: 90vw;
  max-height: 70vh;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #000;
  min-height: 200px;
}

        /* ==== LIGHTBOX — RESPONSIVE ==== */

        @media (max-width: 1024px) {
          .lightbox { 
            padding: 12px; 
            padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 12px);
            overflow: auto; 
            -webkit-overflow-scrolling: touch;
            align-content: center;
            min-height: 100dvh;
          }
          .lb-stage { 
            position: relative; 
            display: block; 
            max-width: min(100%, 100vw); 
          }
          .lb-stage img {
            display: block;
            width: 100%;
            height: auto;
            max-width: 100%;
            max-height: 58vh;
            margin: 0 auto;
          }
          .lb-prev,
          .lb-next {
            position: absolute; 
            top: 50%;
            transform: translateY(-50%); 
            z-index: 1;
            border-radius: 999px;
            padding: 10px 14px; 
            background: rgba(0,0,0,.35);
            border-color: #888;
          }
          .lb-prev { 
            left: 8px; 
          }
          .lb-next { 
            right: 8px; 
          }
          .lb-meta { 
            margin-top: 10px; 
            flex-direction: column; 
            gap: 8px; 
            text-align: center; 
            padding: 0 8px; 
          }
          .lb-cta {
            display: inline-block;
            max-width: 90vw;
          }
        }

        html, body { 
          overflow-x: hidden; 
        }

        .lb-wrapper {
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 8px;
        }
        .lb-caption {
          color: #ccc;
          font-size: 0.9rem;
          text-align: center;
          max-width: 90%;
          line-height: 1.4;
        }
        .lb-media video,
        .lb-media img {
          max-width: 90vw;
          max-height: 70vh;
          border-radius: 8px;
        }




/* =========================================================
   SERVICIOS
========================================================= */

.servicios-section {
    background-color: #f2f2f2;
}

.servicios-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 30px 20px;
    margin: 0 auto;
    max-width: 1200px;
    box-sizing: border-box;
}

.servicios-intro {
    text-align: left;
}

.servicios-cat {
    display: flex;
    flex-direction: column;
}

.servicios-img {
    width: 100%;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.servicios-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.servicios-txt h3 {
    text-align: left;
}

.servicios-txt {
    padding-top: 10px;
    border-top: #6C98BC solid 10px;
    text-align: left;
}

        @media screen and (min-width: 600px) {
            .servicios-container {
                grid-template-columns: repeat(2, 1fr);
            }
            .servicios-container h2,
            .servicios-intro {
                grid-column: span 2;
            }
        }

        @media screen and (min-width: 1200px) {
            .servicios-container {
                grid-template-columns: repeat(4, 1fr);
            }
            .servicios-container h2,
            .servicios-intro {
                grid-column: span 4;
            }
        }


/* =========================================================
   CLIENTES
========================================================= */

.clientes-container {
    display: grid;
    grid-template-columns: 1fr;
    padding: 30px 20px;
}

.clientes-intro {
    text-align: left;
}

.clientes-logotipos {
    padding: 20px 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.logo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 8px;
}

.logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

        @media screen and (min-width: 600px) {
            .clientes-logotipos {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        @media screen and (min-width: 1200px) {
            .clientes-container,
            .clientes-logotipos {
                max-width: 1200px;
                margin: auto;
            }
            .clientes-logotipos {
                grid-template-columns: repeat(7, 1fr);
            }
            .logo-box {
                height: 80px;
                padding: 10px;
            }
        }


/* =========================================================
   NOSOTROS
========================================================= */

.nosotros-section {
    background-color: #000;
}

.nosotros-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 30px 20px;
    text-align: center;
}

.nosotros-container h3 {
  font-size: 1.5em;
}

.nosotros-container h2,
.nosotros-container h3,
.nosotros-container h4,
.nosotros-container p {
    color: #dcdcdc;
}

.nosotros-img {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
}

        @media screen and (min-width: 600px) {
            .nosotros-container {
                grid-template-columns: repeat(2, 1fr);
                justify-content: center;
                margin: 0 auto;
                gap: 0 50px;
                padding: 30px 50px;
            }
            .nosotros-container h2 {
                grid-column: span 2;
            }
        }
        @media screen and (min-width: 1200px) {
            .nosotros-container {
              max-width: 1200px;
              justify-content: center;
              margin: auto;
            }
        }


/* =========================================================
   CONTACTO
========================================================= */

.contacto-section {
    position: relative;
    display: flex;
    justify-content: center;
    background: #3A7964;
    padding: 30px 20px;
}

.contacto-video-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.contacto-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) opacity(0.3);
}

.contacto-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
}

.contacto-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1024px;
    text-align: left;
    margin: 40px auto 60px auto;
    padding: 0 40px;
}

.contacto-container h2 {
    color: #ffffff;
    margin-bottom: 30px;
}

.contacto-contenido {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 100px;
}

.form-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 25px;
    width: 100%;
    max-width: 420px;
}

label {
    display: block;
    font-size: 0.8em;
    margin-bottom: 6px;
    color: #333;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: none;
    border-bottom: 1px solid #666;
}

.button-contacto {
    width: 50%;
    background-color: #3A7964;
    color: #ffffff;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.button-contacto:hover {
    background-color: #E8B76A;
}

.info-contacto {
    align-self: flex-end;
    color: #FFFFFF;
    text-align: left;
    line-height: 1.6;
}

.info-contacto a {
    color: #FFFFFF;
    text-decoration: none;
}

.info-contacto a:hover {
    text-decoration: underline;
}

.info-contacto img {
  height: 40px;
  margin-right: 10px;
  margin-bottom: 10px;
}

.logo-contacto img {
  height: 80px;
}

.form-status {
  text-align: center;
  margin-top: 15px;
  font-size: 0.9em;
  min-height: 40px;
}
.form-status p {
  padding: 10px;
  border-radius: 5px;
}
.form-status .ok {
  background-color: #dff0d8;
  color: #3c763d;
}
.form-status .error {
  background-color: #f2dede;
  color: #a94442;
}

        @media (max-width: 768px) {
        .contacto-contenido {
            flex-direction: column;
            align-items: center;
            gap: 40px;
        }

        .contacto-container {
            padding: 0 20px;
        }

        .info-contacto {
            align-self: auto;
            text-align: center;
        }

        .info-contacto img {
            margin: 5px;
        }
        }


/* =========================================================
   FOOTER
========================================================= */

  footer {
    padding: 10px 20px;
  }

  footer img {
    height: 40px;
  }

  footer p {
    font-size: 10px;
    color: #AEAEAE;
    margin-left: 10px;
  }

  .aviso-privacidad {
    color: #AEAEAE;
    font-weight: bold;
    text-decoration: none;
  }

  
/* =========================
   SECCIÓN: AVISO DE PRIVACIDAD
========================= */

.aviso-privacidad-section {
  max-width: 900px;
  margin: 140px auto 80px auto;
  padding: 0 20px;
  font-family: "proxima-nova", sans-serif;
  color: #666;
}

.aviso-privacidad-section h2 {
  font-family: "proxima-nova", sans-serif;
  font-weight: 700;
  text-align: left;
  color: #39709F;
  margin-bottom: 40px;
}

.aviso-privacidad-section h3 {
  font-family: "proxima-nova", sans-serif;
  font-weight: 600;
  text-align: left;
  margin-top: 40px;
  margin-bottom: 15px;
}

.aviso-privacidad-section p {
  font-size: 1rem;
  color: #666;
  text-align: justify;
}

.aviso-privacidad-section ul {
  margin-left: 20px;
  padding-left: 15px;
}

.aviso-privacidad-section li {
  list-style-type: disc;
  color: #666;
}

        @media (max-width: 768px) {
        .aviso-privacidad-section {
            margin-top: 120px;
            padding: 0 15px;
        }
        }


/* =========================================================
   REEL PAGE
========================================================= */

.reel-page-section {
    padding: 40px 20px;
    background: #000;
    min-height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-page-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.reel-video-wrap {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
}

.reel-video-wrap video {
    display: block;
    width: 100%;
    height: auto;
}

.reel-page-cta {
    margin-top: 24px;
}

.reel-btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #999;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    transition: all .3s ease;
}

.reel-btn:hover {
    border-color: #fff;
    color: #fff;
}    


/* ==== FIX: mantener contenido del lightbox centrado debajo del menú en desktop ==== */
@media (min-width: 1025px) {
    .lightbox {
        padding-top: calc(var(--nav-h) + 16px); /* agrega espacio debajo del navbar */
        align-content: center;                  /* mantiene centrado vertical */
    }
}
