/* --- Variables y Paleta de Colores --- */
      :root {
        --primary-color: #1a1a1a;
        --bg-color: #fdfbf9;
        --accent-color: #d46a4e;
        --text-color: #4a4a4a;
        --light-gray: #f0edea;
      }

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

      html {
        scroll-behavior: smooth;
      }

      body {
        font-family: "Montserrat", sans-serif;
        background-color: var(--bg-color);
        color: var(--text-color);
        line-height: 1.6;
        overflow-x: hidden;
      }

      body.lightbox-open {
        overflow: hidden;
      }

      h1,
      h2,
      h3 {
        font-family: "Playfair Display", serif;
        font-weight: 400;
        color: var(--primary-color);
      }

      /* --- Animaciones de Scroll --- */
      .fade-in {
        opacity: 0;
        transform: translateY(40px);
        transition:
          opacity 0.8s ease-out,
          transform 0.8s ease-out;
      }

      .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
      }

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

      .delay-1 {
        transition-delay: 0.1s;
      }
      .delay-2 {
        transition-delay: 0.2s;
      }
      .delay-3 {
        transition-delay: 0.3s;
      }

      /* --- Header y Navegación --- */
      header {
        position: fixed;
        top: 0;
        width: 100%;
        background-color: rgba(253, 251, 249, 0.98);
        padding: 0.15rem 2.5%;
        z-index: 1000;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
      }

      .header-main-row {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        gap: 0.7rem;
      }

      .logo img {
        height: 50px;
        margin-top: 0;
        display: block;
      }

      nav ul {
        list-style: none;
        display: flex;
        gap: 0.5rem;
        align-items: center;
      }

      nav a {
        position: relative;
        display: inline-block;
        text-decoration: none;
        color: var(--primary-color);
        font-weight: 600;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        line-height: 1;
        padding: 10px 16px;
        transition: color 0.3s ease;
        z-index: 1;
      }

      nav a::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-top: 2px solid var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
        transform: scaleY(2);
        opacity: 0;
        transition: 0.3s;
      }

      nav a::after {
        content: "";
        position: absolute;
        top: 2px;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--primary-color);
        transform: scale(0);
        opacity: 0;
        transition: 0.3s;
        z-index: -1;
      }

      nav a:hover {
        color: #fff;
      }

      nav a:hover::before {
        transform: scaleY(1);
        opacity: 1;
      }

      nav a:hover::after {
        transform: scaleY(1);
        opacity: 1;
      }

      .social-icons {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.45rem;
        margin-bottom: 4px; /* pequeño espacio debajo */
      }

      .social-icons a {
        color: var(--primary-color);
        font-size: 1.2rem;
        line-height: 1;
        transition:
          color 0.3s ease,
          transform 0.2s ease;
      }

      .social-icons a:hover {
        color: var(--accent-color);
        transform: scale(1.1);
      }

      /* --- Botones --- */
      .btn {
        display: inline-block;
        padding: 12px 25px;
        background-color: var(--accent-color);
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        letter-spacing: 1px;
        text-transform: uppercase;
        border-radius: 4px;
        transition:
          background-color 0.3s ease,
          transform 0.2s ease;
        box-shadow: 0 4px 10px rgba(212, 106, 78, 0.3);
        border: none;
        cursor: pointer;
      }

      .btn:hover {
        background-color: #b8573f;
        transform: translateY(-2px);
      }

      /* --- Hero Section --- */
      .hero {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 100px 5% 40px;
        background: linear-gradient(to bottom, #fff, var(--bg-color));
      }

      .hero h1 {
        font-size: 2.8rem;
        margin-bottom: 1rem;
        line-height: 1.2;
      }

      .hero h1 span {
        color: var(--accent-color);
        font-style: italic;
      }
      /* Permite que el contenedor de la palabra no se rompa */
      .hero h1 span {
        display: inline-block;
      }

      /* Aplica a cada letra individual */
      .hero h1 span span {
        display: inline-block;
        transition: transform 0.25s ease; /* Retorno fluido a la posición original */
        cursor: default;
      }

      /* Efecto zoom al pasar el ratón por encima de la letra */
      .hero h1 span span:hover {
        transform: scale(1.3); /* Magnitud del zoom (1.3 = 30% más grande) */
      }
      .hero p {
        font-size: 1.1rem;
        max-width: 500px;
        margin-bottom: 2.5rem;
        color: #666;
      }

      /* --- Secciones Generales --- */
      section {
        padding: 5rem 0;
        text-align: center;
      }

      section h2,
      .section-desc {
        padding-left: 5%;
        padding-right: 5%;
      }

      section h2 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
        position: relative;
        display: inline-block;
      }

      section h2::after {
        content: "";
        display: block;
        width: 50px;
        height: 3px;
        background-color: var(--accent-color);
        margin: 15px auto 0;
        border-radius: 2px;
      }

      .section-desc {
        margin-bottom: 3rem;
        color: #777;
        font-size: 1rem;
      }

      /* --- Cómo Funciona --- */
      .como-funciona {
        background-color: var(--light-gray);
        border-radius: 20px;
        margin: 0 5%;
        padding: 4rem 5%;
      }

      .steps-container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin-top: 3rem;
      }

      .step {
        background: #fff;
        padding: 2rem;
        border-radius: 12px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
      }

      .step-number {
        font-size: 2rem;
        font-family: "Playfair Display", serif;
        color: var(--accent-color);
        margin-bottom: 10px;
      }

      .step h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
      }

      /* --- Galerías (Carouseles Horizontales Móviles) --- */
      .carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding: 10px 5% 30px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
      }

      .carousel::-webkit-scrollbar {
        display: none;
      }

      .carousel.is-auto-scrolling {
        scroll-snap-type: none;
      }

      .carousel-item {
        flex: 0 0 75%;
        scroll-snap-align: center;
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        aspect-ratio: 1 / 1;
      }

      .carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
      }

      .carousel-item[data-lightbox-index]::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
          180deg,
          rgba(26, 26, 26, 0) 45%,
          rgba(26, 26, 26, 0.28) 100%
        );
        opacity: 0;
        transition: opacity 0.35s ease;
        pointer-events: none;
      }

      .carousel-item[data-lightbox-index]:hover::after,
      .carousel-item[data-lightbox-index]:focus-visible::after {
        opacity: 1;
      }

      .carousel-item:focus-visible {
        outline: 3px solid rgba(212, 106, 78, 0.72);
        outline-offset: 4px;
      }

      /* --- Lightbox de Colección --- */
      .image-lightbox {
        position: fixed;
        inset: 0;
        z-index: 2000;
        display: grid;
        place-items: center;
        padding: clamp(18px, 3vw, 44px);
        background: rgba(17, 17, 17, 0.72);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        opacity: 0;
        visibility: hidden;
        transition:
          opacity 0.34s ease,
          visibility 0s linear 0.34s;
      }

      .image-lightbox.is-open {
        opacity: 1;
        visibility: visible;
        transition: opacity 0.34s ease;
      }

      .image-lightbox.is-closing {
        opacity: 0;
      }

      .lightbox-dialog {
        position: relative;
        width: min(1120px, 100%);
        height: min(82vh, 820px);
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 22px;
        background: rgba(253, 251, 249, 0.06);
        box-shadow:
          0 28px 90px rgba(0, 0, 0, 0.45),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
        overflow: hidden;
        transform: translateY(18px) scale(0.96);
        opacity: 0;
        transition:
          transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
          opacity 0.32s ease;
      }

      .image-lightbox.is-open .lightbox-dialog {
        transform: translateY(0) scale(1);
        opacity: 1;
      }

      .lightbox-viewport {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        cursor: default;
        user-select: none;
        touch-action: none;
      }

      .lightbox-viewport.is-zoomed {
        cursor: grab;
      }

      .lightbox-viewport.is-panning {
        cursor: grabbing;
      }

      .lightbox-image {
        max-width: calc(100vw - clamp(52px, 10vw, 180px));
        max-height: calc(100vh - clamp(120px, 17vh, 180px));
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 16px;
        box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
        transform: translate3d(0, 0, 0) scale(1);
        transition:
          transform 0.18s ease-out,
          opacity 0.24s ease;
        will-change: transform;
        pointer-events: none;
      }

      .lightbox-image.is-changing {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.985);
      }

      .lightbox-control {
        position: absolute;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 999px;
        background: rgba(253, 251, 249, 0.12);
        color: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
        cursor: pointer;
        transition:
          background 0.25s ease,
          transform 0.25s ease,
          border-color 0.25s ease;
      }

      .lightbox-control:hover,
      .lightbox-control:focus-visible {
        background: rgba(212, 106, 78, 0.88);
        border-color: rgba(255, 255, 255, 0.34);
        transform: translateY(-1px);
      }

      .lightbox-control:focus-visible {
        outline: 2px solid rgba(255, 255, 255, 0.7);
        outline-offset: 3px;
      }

      .lightbox-close {
        top: 18px;
        right: 18px;
        width: 42px;
        height: 42px;
        font-size: 1.05rem;
        z-index: 3;
      }

      .lightbox-arrow {
        top: 50%;
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
        z-index: 2;
      }

      .lightbox-prev {
        left: 18px;
        transform: translateY(-50%);
      }

      .lightbox-next {
        right: 18px;
        transform: translateY(-50%);
      }

      .lightbox-prev:hover,
      .lightbox-prev:focus-visible,
      .lightbox-next:hover,
      .lightbox-next:focus-visible {
        transform: translateY(calc(-50% - 1px));
      }

      .lightbox-zoom-controls {
        position: absolute;
        left: 50%;
        bottom: 18px;
        z-index: 3;
        display: flex;
        gap: 8px;
        padding: 6px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 999px;
        background: rgba(26, 26, 26, 0.34);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transform: translateX(-50%);
      }

      .lightbox-zoom {
        position: static;
        width: 38px;
        height: 38px;
        font-size: 1rem;
      }

      .lightbox-counter {
        position: absolute;
        left: 22px;
        top: 22px;
        z-index: 3;
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.78rem;
        font-weight: 600;
        letter-spacing: 1.6px;
        text-transform: uppercase;
      }

      /* --- Sección Empresas --- */
      .empresas-section {
        background-color: #fff;
      }

      /* --- Footer --- */
      footer {
        background-color: var(--primary-color);
        color: #fff;
        text-align: center;
        padding: 4rem 5% 2rem;
      }

      footer h2 {
        color: #fff;
      }

      footer h2::after {
        background-color: var(--accent-color);
      }

      /* --- Media Queries (Adaptación Responsiva) --- */
      @media (min-width: 768px) {
        .hero h1 {
          font-size: 4.5rem;
        }
        .hero p {
          font-size: 1.2rem;
        }
        section h2 {
          font-size: 2.8rem;
        }

        .steps-container {
          flex-direction: row;
          justify-content: space-between;
        }
        .step {
          flex: 1;
        }

        .carousel {
          flex-wrap: wrap;
          justify-content: center;
          overflow-x: visible;
        }
        .carousel-item {
          flex: 0 0 calc(25% - 15px);
          max-width: 300px;
        }
        .carousel-item[data-lightbox-index] {
          cursor: zoom-in;
          transition:
            box-shadow 0.35s ease,
            transform 0.35s ease;
        }
        .carousel-item[data-lightbox-index]:hover {
          transform: translateY(-3px);
          box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
        }
        .carousel-item:hover img {
          transform: scale(1.08);
        }
      }

      /* Adaptación del Header para móviles */
      @media (max-width: 767px) {
        .carousel {
          scroll-snap-type: none;
        }

        .carousel-item {
          scroll-snap-align: none;
        }
      }

      @media (max-width: 768px) {
        .header-main-row {
          flex-wrap: wrap;
          justify-content: center;
          gap: 0.6rem;
        }

        .logo,
        .social-icons {
          flex: 0 0 auto;
        }

        nav {
          flex: 0 0 100%;
          margin-top: 6px;
          display: flex;
          justify-content: center;
        }

        .social-icons {
          width: 100%;
          justify-content: center;
          margin-top: 6px;
        }
      }
