/* =========================================
   1. VARIABLES Y RESET
   ========================================= */
:root {
  --dark-bg: #111418;
  --dark-card: #1c2128;
  --light-bg: #f4f6f8;
  --light-card: #ffffff;

  --bronze: #c69214;
  --bronze-hover: #e0a821;
  --text-dark: #111418;
  --text-light: #e6ebf0;
  --text-muted: #8d9a8e;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-light: rgba(0, 0, 0, 0.08);

  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden; /* Previene scroll horizontal */
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-light);
  line-height: 1.5;
  padding-top: 68px;
  position: relative;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* =========================================
   2. NAVBAR Y MENÚ
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--dark-bg);
  border-bottom: 1px solid var(--border-dark);
  transition: box-shadow 0.3s ease;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: relative;
  z-index: 10002;
}

.logo__img {
  max-height: 44px;
  width: auto;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__menu a {
  font-weight: 500;
  font-size: 14.5px;
  opacity: 0.85;
  transition:
    opacity 0.2s,
    color 0.2s;
}

.nav__menu a:hover {
  opacity: 1;
  color: var(--bronze);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10003;
}

.nav__toggle-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-light);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* =========================================
   3. HERO (SPLIT 2 COLUMNAS)
   ========================================= */
.hero {
  position: relative;
  padding: 80px 0 100px;
  min-height: calc(85vh - 68px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) contrast(1.1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(17, 20, 24, 0.4) 0%,
    var(--dark-bg) 100%
  );
}

.hero__split {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.hero__badge {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--bronze);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero__title {
  font-size: clamp(36px, 5vw, 62px);
  margin: 0 0 16px;
  line-height: 1.05;
  font-weight: 800;
}

.hero__title span {
  color: var(--bronze);
}

.hero__text {
  font-size: 16px;
  color: #a0aec0;
  margin-bottom: 28px;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__card {
  background: rgba(28, 33, 40, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(198, 146, 20, 0.25);
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero__card h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 20px;
}

.hero__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.hero__list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-dark);
  font-size: 14px;
  color: #cbd5e0;
}

.hero__card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--bronze);
}

/* =========================================
   4. COMPONENTES Y BOTONES
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  border: none;
}

.btn--primary {
  background: var(--bronze);
  color: #000;
}

.btn--primary:hover {
  background: var(--bronze-hover);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn--ghost:hover {
  border-color: var(--bronze);
  color: var(--bronze);
}

.btn--whats {
  background: #25d366;
  color: #fff;
}

.btn--full {
  width: 100%;
}

/* =========================================
   5. SECCIONES Y GRIDS
   ========================================= */
.section {
  padding: 80px 0;
}

.section--dark {
  background-color: var(--dark-bg);
  color: var(--text-light);
}

.section--light {
  background-color: var(--light-bg);
  color: var(--text-dark);
}

.section__header {
  text-align: center;
  margin-bottom: 48px;
}

.section__title {
  font-size: clamp(26px, 4vw, 36px);
  margin: 0 0 8px;
}

.section__subtitle {
  color: #8d9a8e;
  margin: 0;
  font-size: 15px;
}

.dark-text {
  color: var(--text-dark);
}

.dark-sub {
  color: #5a6578;
}

/* Servicios */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--light-card);
  padding: 28px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card__icon {
  font-size: 20px;
  font-weight: 800;
  color: var(--bronze);
  margin-bottom: 12px;
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text-dark);
}

.service-card p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

/* Proceso */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.step-card {
  background: var(--dark-card);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-dark);
}

.step-card__num {
  font-size: 28px;
  font-weight: 800;
  color: var(--bronze);
  display: block;
  margin-bottom: 8px;
}

.step-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #fff;
}

.step-card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Galería Bento Grid */
.bento-grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  auto-rows: 200px;
}

.bento__item,
.gallery__item {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #e2e8f0;
  cursor: pointer;
}

.bento__item img,
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bento__item:hover img,
.gallery__item:hover img {
  transform: scale(1.05);
}

.bento__item--large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento__item--wide {
  grid-column: span 2;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  place-items: center;
  z-index: 10000;
  padding: 20px;
}

.lightbox.show {
  display: grid;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 32px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* Contacto */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.contact-info__title {
  font-size: 22px;
  margin: 0 0 16px;
  color: #fff;
}

.contact-info__list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.contact-info__list li {
  margin-bottom: 12px;
  color: #a0aec0;
  font-size: 14.5px;
}

.contact-info__list a:hover {
  color: var(--bronze);
}

.contact-info__badge {
  padding: 12px 16px;
  background: rgba(198, 146, 20, 0.1);
  border-left: 3px solid var(--bronze);
  border-radius: 0 8px 8px 0;
  color: var(--bronze);
  font-weight: 500;
  font-size: 13.5px;
}

.contact-form {
  background: var(--dark-card);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid var(--border-dark);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form__group label {
  font-size: 13px;
  color: #a0aec0;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--dark-bg);
  color: #fff;
  font-size: 14px;
}

.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--bronze);
}

/* =========================================
   6. FOOTER Y FLOATING
   ========================================= */
.footer {
  border-top: 1px solid var(--border-dark);
  background: #0b0d0f;
  padding: 24px 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.footer__top {
  color: var(--bronze);
  font-weight: 600;
}

.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.wa-float::before {
  content: "";
  width: 26px;
  height: 26px;
  background: center/contain no-repeat url("media/whatsapp_icon.webp");
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(12px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  transition-delay: var(--reveal-delay, 0s);
}

/* =========================================
   7. RESPONSIVE
   ========================================= */
@media (max-width: 850px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 68px; /* Muestra la barra superior para permitir cerrar */
    left: 0;
    width: 100%;
    height: calc(100vh - 68px);
    background-color: #111418;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 20px;
    margin: 0;
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0.3s ease;
    z-index: 9998;
  }

  .nav__menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav__menu a {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
  }

  .hero__split,
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .bento-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    auto-rows: 180px;
  }

  .bento__item--large,
  .bento__item--wide {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 600px) {
  .bento-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .bento__item--large,
  .bento__item--wide {
    grid-column: span 1;
  }
}
