  /* =============================
           VARIABLES Y FUENTES BASE
        ============================= */
  :root {
      --color-primario: #4b2d0b;
      --color-secundario: #e9c46a;
      --color-terciario: #e9c46a;
      --color-fondo: #f8f9fa;
      --color-texto: #333;
      --color-blanco: #fff;
      --color-negro: #000;
      --sombra: 0 4px 12px rgba(0, 0, 0, 0.1);
      --transicion: all 0.3s ease;
  }

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

  body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background-color: var(--color-fondo);
      color: var(--color-texto);
      line-height: 1.6;
      overflow-x: hidden;
      scroll-behavior: smooth;
  }

  /* =============================
           ENCABEZADO Y NAVEGACIÓN
        ============================= */
  header.portada {
      background: url('../img/portada.jpg') no-repeat center center/cover;
      background-size: cover;
      background-position: center;
      color: var(--color-blanco);
      text-align: center;
      padding: 2rem 1rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: relative;
      min-height: 100vh;
      width: 100%;
  }

  header.portada h1 {
      font-size: 3.5rem;
      margin: 0 0 1.5rem 0;
      text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
      font-weight: 800;
      letter-spacing: 1px;
      animation: fadeInDown 1s ease;
  }

  nav {
      width: 100%;
      max-width: 1200px;
      margin: 2rem auto;
      padding: 1rem;
  }

  nav ul {
      list-style: none;
      padding: 0;
      margin: 0;
      display: flex;
      justify-content: center;
      gap: 20px;
  }

  nav ul li a {
      color: var(--color-blanco);
      text-decoration: none;
      font-size: 1.2rem;
      font-weight: bold;
      padding: 0.8rem 1.5rem;
      border-radius: 30px;
      transition: var(--transicion);
      border: 2px solid transparent;
      background-color: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
  }

  nav ul li a:hover,
  nav ul li a:focus {
      background-color: var(--color-terciario);
      color: var(--color-negro);
      border-color: var(--color-terciario);
      transform: translateY(-3px);
  }

  .btn-descubrir {
      display: inline-block;
      margin-top: 2rem;
      padding: 1rem 2.5rem;
      background-color: var(--color-terciario);
      color: var(--color-negro);
      text-decoration: none;
      font-weight: bold;
      border-radius: 30px;
      transition: var(--transicion);
      box-shadow: var(--sombra);
      animation: pulse 2s infinite;
  }

  .btn-descubrir:hover {
      background-color: var(--color-blanco);
      transform: translateY(-5px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .menu-toggle {
      display: none;
      background: none;
      border: none;
      font-size: 2rem;
      color: var(--color-blanco);
      position: absolute;
      top: 1rem;
      right: 1rem;
      z-index: 1100;
  }

  /* Barra de navegación móvil */
  .navbar-mobile {
      position: fixed;
      top: -100px;
      /* Inicialmente oculta */
      left: 0;
      width: 100%;
      background-color: var(--color-primario);
      padding: 15px;
      z-index: 1000;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
      transition: top 0.4s ease;
      display: none;
      /* Oculto en desktop */
  }

  .navbar-mobile.visible {
      top: 0;
  }

  .navbar-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
      max-width: 1200px;
      margin: 0 auto;
  }

  .navbar-logo {
      color: var(--color-blanco);
      font-size: 1.3rem;
      font-weight: bold;
      text-decoration: none;
  }

  /* =============================
           SECCIONES GENERALES
        ============================= */
  main {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1rem;
  }

  .seccion {
      padding: 4rem 2rem;
      margin: 2rem 0;
      border-radius: 15px;
      background-color: var(--color-blanco);
      box-shadow: var(--sombra);
      transition: var(--transicion);
      opacity: 0;
      transform: translateY(20px);
      animation: fadeInUp 0.8s ease forwards;
  }

  .seccion:nth-child(2) {
      animation-delay: 0.2s;
  }

  .seccion:nth-child(3) {
      animation-delay: 0.4s;
  }

  .seccion h2 {
      color: var(--color-primario);
      font-size: 2.5rem;
      margin-bottom: 2rem;
      text-align: center;
      position: relative;
      padding-bottom: 1rem;
  }

  .seccion h2::after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 4px;
      background-color: var(--color-terciario);
      border-radius: 2px;
  }

  .seccion p {
      margin-bottom: 1.5rem;
      font-size: 1.1rem;
  }

  .seccion ul {
      padding-left: 1.5rem;
      margin-bottom: 2rem;
  }

  .seccion li {
      margin-bottom: 1rem;
      font-size: 1.1rem;
      position: relative;
      padding-left: 2rem;
  }

  .seccion li::before {
      content: '\f00c';
      font-family: 'Font Awesome 5 Free';
      font-weight: 900;
      position: absolute;
      left: 0;
      top: 0;
      color: var(--color-secundario);
  }

  .seccion strong {
      color: var(--color-primario);
  }

  .oculto {
      display: none;
  }

  /* =============================
           GALERÍA
        ============================= */
  .galeria {
      padding: 2rem 0;
      text-align: center;
  }

  .grid-imagenes {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
  }

  .grid-imagenes img,
  .video-galeria {
      width: 100%;
      height: 250px;
      object-fit: cover;
      border-radius: 10px;
      cursor: pointer;
      transition: var(--transicion);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .grid-imagenes img:hover {
      transform: scale(1.03);
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
      z-index: 2;
  }

  .video-galeria {
      height: auto;
      min-height: 250px;
  }

  /* =============================
           SERVICIOS
        ============================= */
  .servicios-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 25px;
      margin-top: 3rem;
  }

  .servicio {
      background: var(--color-fondo);
      border-radius: 15px;
      padding: 2rem;
      text-align: center;
      transition: var(--transicion);
      border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .servicio:hover {
      transform: translateY(-10px);
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  }

  .servicio i {
      font-size: 3.5rem;
      color: var(--color-secundario);
      margin-bottom: 1.5rem;
  }

  .servicio h3 {
      color: var(--color-primario);
      margin-bottom: 1rem;
  }

  /* =============================
           LIGHTBOX
        ============================= */
  .lightbox {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.9);
      justify-content: center;
      align-items: center;
      z-index: 2000;
  }

  .lightbox img {
      max-width: 90%;
      max-height: 90%;
      border-radius: 5px;
      box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  }

  .lightbox-arrow {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(0, 0, 0, .6);
      color: #fff;
      border: none;
      font-size: 3rem;
      width: 55px;
      height: 55px;
      border-radius: 50%;
      cursor: pointer;
      transition: background .25s;
  }

  .lightbox-arrow:hover {
      background: rgba(0, 0, 0, .8);
  }

  .lightbox-arrow.prev {
      left: 20px;
  }

  .lightbox-arrow.next {
      right: 20px;
  }

  .cerrar-lightbox {
      position: absolute;
      top: 20px;
      right: 20px;
      background: none;
      color: var(--color-blanco);
      font-size: 2.5rem;
      border: none;
      cursor: pointer;
      transition: var(--transicion);
  }

  .cerrar-lightbox:hover {
      color: var(--color-terciario);
  }

  /* =============================
           SECCIÓN CONTACTO
        ============================= */
  #contacto {
      text-align: center;
      background-color: var(--color-fondo);
  }

  #contacto p {
      margin-bottom: 2rem;
      font-size: 1.2rem;
  }

  .redes-sociales {
      display: flex;
      justify-content: center;
      gap: 25px;
      margin-top: 2rem;
      flex-wrap: wrap;
  }

  .red-social {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-decoration: none;
      color: var(--color-texto);
      transition: var(--transicion);
      width: 100px;
  }

  .red-social i {
      font-size: 3rem;
      margin-bottom: 0.5rem;
      transition: var(--transicion);
  }

  .red-social .fa-facebook {
      color: #4267B2;
  }

  .red-social .fa-instagram {
      color: #C13584;
  }

  .red-social .fa-whatsapp {
      color: #25D366;
  }

  .red-social:hover i {
      transform: scale(1.2);
  }

  .red-social:hover .fa-facebook {
      color: #365899;
  }

  .red-social:hover .fa-instagram {
      color: #E1306C;
  }

  .red-social:hover .fa-whatsapp {
      color: #128C7E;
  }

  .red-social span {
      font-weight: 600;
  }

  .visitanos {
      margin-top: 3rem;
      padding: 2rem;
      background-color: rgba(44, 94, 26, 0.1);
      margin-bottom: 2rem;
  }

  .visitanos i {
      margin-right: 1rem;
      transition: var(--transicion);
      margin-top: 2rem;
  }

  .visitanos a {
      text-decoration: none;
      color: inherit;
  }



  /* =============================
           PIE DE PÁGINA
        ============================= */
  footer {
      text-align: center;
      padding: 3rem 1rem;
      background-color: var(--color-primario);
      color: var(--color-blanco);
      margin-top: 4rem;
  }

  footer p {
      margin: 0;
  }

  /* =============================
           ANIMACIONES
        ============================= */
  @keyframes fadeInDown {
      from {
          opacity: 0;
          transform: translateY(-30px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes fadeInUp {
      from {
          opacity: 0;
          transform: translateY(30px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes pulse {
      0% {
          box-shadow: 0 0 0 0 rgba(233, 196, 106, 0.7);
      }

      70% {
          box-shadow: 0 0 0 15px rgba(233, 196, 106, 0);
      }

      100% {
          box-shadow: 0 0 0 0 rgba(233, 196, 106, 0);
      }
  }

  /* =============================
           RESPONSIVE DESIGN
        ============================= */
  @media (max-width: 992px) {
      header.portada h1 {
          font-size: 2.8rem;
      }
  }

  @media (max-width: 768px) {

      header.portada h1 {
          font-size: 2.2rem;

      }

      header.portada {
          background: url('../img/portada-movil.jpg') no-repeat center center/cover;
          min-height: 100vh;
          background-size: cover;
          background-position: center center;
          padding-top: 60px;
          /* Espacio para navbar */
      }

      nav ul {
          position: fixed;
          top: 0;
          right: 0;
          width: 65%;
          height: 100vh;
          background-color: var(--color-primario);
          padding: 6rem 1rem 2rem;
          /* 6rem = 96px para dejar espacio a la barra fija */
          z-index: 900;
          /* Menor que la barra (que debe tener z-index 1000 o más) */
          box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
          transform: translateX(100%);
          transition: transform 0.3s ease;
          display: flex;
          flex-direction: column;
          align-items: center;
          /* CENTRADO HORIZONTAL */
          justify-content: flex-start;
          /* ALINEADO ARRIBA */
          gap: 30px;
          text-align: center;
      }

      nav.active ul {
          transform: translateX(0);
      }

      nav ul li a {
          font-size: 1.2rem;
          padding: 12px 20px;
          border-radius: 10px;
          background-color: rgba(255, 255, 255, 0.15);
          color: white;
          display: inline-block;
          text-decoration: none;
          transition: background 0.3s;
      }

      nav ul li a:hover {
          background-color: rgba(255, 255, 255, 0.3);
      }

      .menu-toggle {
          display: block;
          z-index: 1100;
      }

      .seccion {
          padding: 3rem 1.5rem;
      }

      .seccion h2 {
          font-size: 2rem;
      }

      .navbar-mobile {
          position: fixed;
          top: 0;
          left: 0;
          width: 101%;
          z-index: 1000;
          /* Muy importante: mayor que el nav */
          background-color: var(--color-primario);
          color: white;
          padding: 0.75rem 1rem;
          display: flex;
          justify-content: space-between;
          align-items: center;
      }

      .menu-overlay {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: rgba(0, 0, 0, .4);
          opacity: 0;
          /* oculto por defecto */
          pointer-events: none;
          transition: opacity .3s ease;
          z-index: 850;
          /* justo por debajo del nav (900) */
      }

      .menu-overlay.active {
          opacity: 1;
          pointer-events: auto;
      }

      /* Cambio clave: Forzar 3 columnas con tamaño flexible */
      .grid-imagenes {
          grid-template-columns: repeat(3, minmax(100px, 1fr)) !important;
          gap: 8px;
      }

      .grid-imagenes img,
      .video-galeria {
          height: 120px;
      }

      /* Ajustes específicos para el video */
      .video-galeria {
          grid-column: span 3;
          /* Ocupa toda la fila */
          height: auto;
          min-height: 150px;
          aspect-ratio: 16/9;
          /* Proporción correcta */
      }



  }


  @media (max-width: 480px) {
      header.portada h1 {
          font-size: 1.8rem;
      }

      .btn-descubrir {
          padding: 0.8rem 1.8rem;
          font-size: 1rem;
      }

      .seccion {
          padding: 2rem 1rem;
      }

      .grid-imagenes {
          grid-template-columns: 1fr;
          gap: 6px;
      }

      .grid-imagenes img,
      .video-galeria {
          height: 100px;
      }
  }