/* ============================================================
   BAMBOO INTERIORISMO INTEGRAL — components.css
   Navbar, hamburger, menú móvil, footer, modal consulta.
   Se carga en TODAS las páginas.
============================================================ */

/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.5rem 4rem;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.4s ease;
}
nav.scrolled {
  background: rgba(250,248,243,0.92); backdrop-filter: blur(12px);
  padding: 1rem 4rem; border-bottom: 1px solid rgba(184,148,90,0.2);
}

/* Transparente (hero oscuro) — texto claro */
.nav-logo {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 500;
  letter-spacing: 0.05em; color: var(--cream); text-decoration: none; transition: color 0.4s;
}
.nav-logo span { color: var(--gold); }

/* Logo gráfico del navbar: claro sobre el hero y oscuro al hacer scroll */
.nav-logo--image {
  position: relative;
  display: block;
  justify-self: start;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}
.nav-logo-img {
  position: absolute;
  inset: 0;
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: opacity 0.4s ease;
}
.nav-logo-img--hero     { opacity: 1; }
.nav-logo-img--scrolled { opacity: 0; }
nav.scrolled .nav-logo-img--hero     { opacity: 0; }
nav.scrolled .nav-logo-img--scrolled { opacity: 1; }

.nav-menu { display: flex; justify-self: center; gap: 2.5rem; list-style: none; }
.nav-menu a {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream); text-decoration: none;
  position: relative; transition: color 0.3s;
}
.nav-menu a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--gold); transition: width 0.3s ease;
}
.nav-menu a:hover          { color: var(--gold); }
.nav-menu a:hover::after   { width: 100%; }
.nav-menu a.active         { color: var(--gold); }
.nav-menu a.active::after  { width: 100%; }

.nav-cta {
  font-family: var(--sans); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--charcoal); background: var(--cream);
  padding: 0.75rem 1.75rem; text-decoration: none;
  justify-self: end;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  border: 1px solid var(--cream);
}
.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }

/* Scrolled — texto oscuro */
nav.scrolled .nav-logo        { color: var(--charcoal); }
nav.scrolled .nav-menu a      { color: var(--charcoal); }
nav.scrolled .nav-cta         { color: var(--white); background: var(--charcoal); border-color: var(--charcoal); }
nav.scrolled .nav-cta:hover   { background: var(--gold); border-color: var(--gold); }

/* Nav--light: páginas interiores (sin hero oscuro) */
nav.nav--light .nav-logo      { color: var(--charcoal); }
nav.nav--light .nav-menu a    { color: var(--charcoal); }
nav.nav--light .nav-cta       { color: var(--white); background: var(--charcoal); border-color: var(--charcoal); }
nav.nav--light .nav-cta:hover { background: var(--gold); border-color: var(--gold); }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none; position: fixed; top: 1.1rem; right: 1.5rem; z-index: 999;
  flex-direction: column; justify-content: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px; background: var(--cream);
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
  transform-origin: center;
}
.nav-hamburger.dark-bar span                   { background: var(--charcoal); }
.nav-hamburger.nav-hamburger--light span       { background: var(--charcoal); }
.nav-hamburger.open span                       { background: var(--cream) !important; }
.nav-hamburger.open span:nth-child(1)          { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2)          { opacity: 0; }
.nav-hamburger.open span:nth-child(3)          { transform: translateY(-8px) rotate(-45deg); }

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed; top: 0; left: 0; width: 100vw;
  background: var(--charcoal); z-index: 500;
  padding: 5rem 2rem 3rem; display: flex; flex-direction: column; gap: 0;
  border-bottom: 1px solid rgba(184,148,90,0.2);
  transform: translateY(-110%); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.mobile-menu.open { transform: translateY(0); pointer-events: auto; }
.mobile-menu a {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--cream);
  text-decoration: none; padding: 1.25rem 0;
  border-bottom: 1px solid rgba(184,148,90,0.12); transition: color 0.25s;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu .mobile-cta {
  margin-top: 1.5rem; background: var(--gold); color: var(--charcoal);
  text-align: center; padding: 1rem; font-weight: 600; border-bottom: none;
}
#menuOverlay.active { display: block !important; }

/* ── FOOTER ── */
footer { background: var(--charcoal); padding: 5rem 0 2.5rem; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(184,148,90,0.15); margin-bottom: 2.5rem;
}
.footer-brand .nav-logo { display: block; margin-bottom: 1.25rem; color: var(--cream); }
.footer-brand .nav-logo span { color: var(--gold); }
.footer-logo {
  width: 50px;
  height: 50px;
}
.footer-logo img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.footer-brand p { font-size: 0.75rem; line-height: 1.9; color: var(--stone); font-weight: 300; max-width: 240px; }
.footer-col-title { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.5rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a { font-size: 0.75rem; color: var(--stone-light); text-decoration: none; font-weight: 300; transition: color 0.3s; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; }
.footer-copy { font-size: 0.7rem; color: var(--stone); font-weight: 300; letter-spacing: 0.05em; }
.footer-social { display: flex; gap: 1.5rem; }
.footer-social a { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--stone); text-decoration: none; transition: color 0.3s; }
.footer-social a:hover { color: var(--gold); }

/* ── MODAL CONSULTA ── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(14,14,12,0.85); backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--ivory); width: 100%; max-width: 560px;
  position: relative; overflow: hidden;
  animation: modalIn 0.45s cubic-bezier(0.16,1,0.3,1);
  max-height: 95vh; overflow-y: auto;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-bar { height: 3px; background: linear-gradient(to right, var(--gold), var(--gold-light)); }
.modal-progress { display: flex; align-items: center; justify-content: center; padding: 1.75rem 2.5rem 0; }
.progress-step { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; flex: 1; position: relative; }
.progress-step:not(:last-child)::after {
  content: ''; position: absolute; top: 14px;
  left: calc(50% + 14px); right: calc(-50% + 14px);
  height: 1px; background: var(--cream-dark); transition: background 0.4s;
}
.progress-step.done:not(:last-child)::after { background: var(--gold); }
.progress-dot {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--cream-dark); background: var(--ivory);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 0.6rem; font-weight: 600;
  color: var(--stone-light); transition: all 0.35s ease; position: relative; z-index: 1;
}
.progress-step.active .progress-dot,
.progress-step.done .progress-dot { border-color: var(--gold); background: var(--gold); color: var(--white); }
.progress-label { font-size: 0.55rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--stone-light); transition: color 0.3s; white-space: nowrap; }
.progress-step.active .progress-label { color: var(--gold); }
.progress-step.done  .progress-label { color: var(--stone); }
.modal-header { padding: 1.5rem 2.5rem 0; }
.modal-step-label { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.modal-title { font-family: var(--serif); font-size: 1.6rem; font-weight: 300; color: var(--charcoal); line-height: 1.2; }
.modal-title em { font-style: italic; color: var(--gold); }
.modal-close {
  position: absolute; top: 1.25rem; right: 1.5rem;
  background: none; border: none; cursor: pointer;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--stone); font-size: 1.2rem; line-height: 1; transition: color 0.2s; z-index: 10;
}
.modal-close:hover { color: var(--charcoal); }
.modal-body { padding: 1.5rem 2.5rem 2rem; }
.step-panel { display: none; }
.step-panel.active { display: block; animation: panelIn 0.35s cubic-bezier(0.16,1,0.3,1); }
@keyframes panelIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1rem; }
.option-card {
  border: 1.5px solid var(--cream-dark); padding: 1rem 1.1rem; cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  display: flex; align-items: center; gap: 0.75rem; background: var(--white);
}
.option-card:hover    { border-color: var(--gold-pale); background: #FDFBF7; }
.option-card.selected { border-color: var(--gold);      background: #FBF6EE; }
.option-icon { font-size: 1.3rem; flex-shrink: 0; }
.option-text { font-size: 0.72rem; font-weight: 500; color: var(--charcoal); line-height: 1.3; }
.option-sub  { font-size: 0.62rem; color: var(--stone-light); margin-top: 0.2rem; font-weight: 300; }
.budget-options { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.budget-card {
  border: 1.5px solid var(--cream-dark); padding: 0.9rem 1.25rem; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; background: var(--white);
  transition: border-color 0.25s, background 0.25s;
}
.budget-card:hover    { border-color: var(--gold-pale); background: #FDFBF7; }
.budget-card.selected { border-color: var(--gold);      background: #FBF6EE; }
.budget-range { font-family: var(--serif); font-size: 1rem; font-weight: 400; color: var(--charcoal); }
.budget-desc  { font-size: 0.62rem; color: var(--stone-light); font-weight: 300; }
.form-group { margin-top: 1rem; }
.form-group + .form-group { margin-top: 0.85rem; }
.form-label { display: block; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--stone); margin-bottom: 0.4rem; }
.form-input, .form-select {
  width: 100%; padding: 0.75rem 1rem; font-family: var(--sans);
  font-size: 0.78rem; font-weight: 300; color: var(--charcoal);
  background: var(--white); border: 1.5px solid var(--cream-dark);
  outline: none; transition: border-color 0.25s; appearance: none;
}
.form-input:focus, .form-select:focus { border-color: var(--gold); }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237A7670' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.modal-footer { padding: 0 2.5rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.btn-modal-back {
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--stone); background: none; border: none; cursor: pointer;
  padding: 0.6rem 0; display: flex; align-items: center; gap: 0.4rem; transition: color 0.2s;
}
.btn-modal-back:hover { color: var(--charcoal); }
.btn-modal-back.hidden { visibility: hidden; pointer-events: none; }
.btn-modal-next {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--charcoal); background: var(--gold); border: none;
  padding: 0.85rem 2rem; cursor: pointer;
  transition: background 0.25s, transform 0.15s; flex-shrink: 0;
}
.btn-modal-next:hover    { background: var(--gold-light); transform: translateY(-1px); }
.btn-modal-next:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.modal-success { display: none; padding: 2.5rem; text-align: center; }
.modal-success.active { display: block; animation: panelIn 0.4s cubic-bezier(0.16,1,0.3,1); }
.success-check {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem; font-size: 1.5rem;
}
.success-title { font-family: var(--serif); font-size: 1.8rem; font-weight: 300; color: var(--charcoal); margin-bottom: 0.75rem; }
.success-title em { font-style: italic; color: var(--gold); }
.success-name  { font-family: var(--serif); font-size: 1rem; font-style: italic; color: var(--gold); margin-bottom: 1.5rem; }
.success-text  { font-size: 0.78rem; line-height: 1.85; color: var(--stone); font-weight: 300; max-width: 340px; margin: 0 auto 2rem; }
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 0.75rem;
  background: #25D366; color: var(--white); font-family: var(--sans);
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  padding: 1rem 2rem; text-decoration: none;
  transition: background 0.25s, transform 0.15s;
  border: none; cursor: pointer; margin-bottom: 0.75rem;
}
.btn-whatsapp:hover { background: #1ebe5c; transform: translateY(-2px); }
.btn-whatsapp svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.success-skip {
  display: block; font-size: 0.62rem; color: var(--stone-light); cursor: pointer;
  background: none; border: none; font-family: var(--sans);
  letter-spacing: 0.08em; transition: color 0.2s;
}
.success-skip:hover { color: var(--stone); }
.netlify-hidden { display: none !important; }

/* ── RESPONSIVE COMPONENTES ── */
@media (min-width: 769px) and (max-width: 1100px) {
  nav { padding-right: 2rem; padding-left: 2rem; }
  nav.scrolled { padding-right: 2rem; padding-left: 2rem; }
  .nav-menu { gap: 1.5rem; }
  .nav-cta { padding-right: 1rem; padding-left: 1rem; }
}

@media (max-width: 768px) {
  nav { display: flex; justify-content: space-between; padding: 1.1rem 1.5rem; }
  nav.scrolled { padding: 0.85rem 1.5rem; }
  .nav-menu, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  footer { padding: 3.5rem 0 2rem; }
  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-brand p { max-width: 100%; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-social { justify-content: center; }

  .modal { max-height: 92vh; }
  .modal-title { font-size: 1.3rem; }
  .option-card { padding: 0.75rem; }
  .option-text { font-size: 0.68rem; }
  .form-row { grid-template-columns: 1fr; }
  .modal-progress { padding: 1.25rem 1.5rem 0; }
  .modal-header  { padding: 1.25rem 1.5rem 0; }
  .modal-body    { padding: 1rem 1.5rem 1.5rem; }
  .modal-footer  { padding: 0 1.5rem 1.5rem; }
}
