/* ============================================================
   CONSTRUFACH — FOOTER
   ============================================================ */

.footer {
  background: var(--white);
  border-top: 3px solid var(--red);
  position: relative;
}

/* ── Nav grid ──────────────────────────────────────────────── */
.footer-links-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 3rem 3rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 3rem;
  list-style: none;
}

/* ── Columna individual ────────────────────────────────────── */
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Logo */
.footer-links:first-child img {
  height: 52px;
  width: auto;
  display: block;
  /* Invertir si el logo es claro — quitá este filtro si el logo ya tiene colores */
  transition: opacity 0.25s ease;
}

.footer-links:first-child img:hover {
  opacity: 0.8;
}

/* ── Título de columna ─────────────────────────────────────── */
.footer-links-title p {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--red);
  display: inline-block;
  margin-bottom: 0.25rem;
}

/* ── Links ─────────────────────────────────────────────────── */
.footer-links-a a {
  font-family: 'Barlow', sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: #6a7a8a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  transition: color 0.25s ease, gap 0.25s ease;
}

.footer-links-a a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--red);
  transition: width 0.3s var(--ease-out-expo);
}

.footer-links-a a:hover {
  color: var(--red);
  gap: 0.5rem;
}

.footer-links-a a:hover::after {
  width: 100%;
}

/* ── Acordeón "Construcción y Reformas" estilo hamburguesa ── */
.footer-zonas-toggle {
  position: relative;
}

.footer-zonas-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: transparent;
  border: 1px solid var(--gray-mid, #e4e0da);
  border-radius: 4px;
  padding: 0.65rem 0.9rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
  width: 100%;
  justify-content: space-between;
}
.footer-zonas-btn:hover,
.footer-zonas-btn[aria-expanded="true"] {
  border-color: var(--red);
  color: var(--red);
}

.footer-zonas-btn-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
  flex-shrink: 0;
}
.footer-zonas-btn-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
}
.footer-zonas-btn[aria-expanded="true"] .footer-zonas-btn-bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.footer-zonas-btn[aria-expanded="true"] .footer-zonas-btn-bars span:nth-child(2) {
  opacity: 0;
}
.footer-zonas-btn[aria-expanded="true"] .footer-zonas-btn-bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.footer-zonas-btn-label {
  flex-grow: 1;
  text-align: left;
  letter-spacing: 0.02em;
}
.footer-zonas-btn-icon {
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease-out-expo);
}
.footer-zonas-btn[aria-expanded="true"] .footer-zonas-btn-icon {
  transform: rotate(180deg);
}

.footer-zonas-panel {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.6rem;
  background: var(--gray-warm, #f0ede8);
  border: 1px solid var(--gray-mid, #e4e0da);
  border-radius: 4px;
  max-height: 280px;
  overflow-y: auto;
  animation: footerZonasOpen 0.35s var(--ease-out-expo);
}
.footer-zonas-panel[hidden] {
  display: none;
}
.footer-zonas-panel li a {
  display: block;
  padding: 0.45rem 0.5rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.82rem;
  color: #4a5765;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}
.footer-zonas-panel li a:hover {
  background: var(--white);
  color: var(--red);
}

@keyframes footerZonasOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Acordeón "Reformas de cocina" estilo hamburguesa ─────── */
.footer-cocinas-toggle {
  position: relative;
}

.footer-cocinas-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: transparent;
  border: 1px solid var(--gray-mid, #e4e0da);
  border-radius: 4px;
  padding: 0.65rem 0.9rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
  width: 100%;
  justify-content: space-between;
}
.footer-cocinas-btn:hover,
.footer-cocinas-btn[aria-expanded="true"] {
  border-color: var(--red);
  color: var(--red);
}

.footer-cocinas-btn-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
  flex-shrink: 0;
}
.footer-cocinas-btn-bars span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out-expo), opacity 0.3s ease;
}
.footer-cocinas-btn[aria-expanded="true"] .footer-cocinas-btn-bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.footer-cocinas-btn[aria-expanded="true"] .footer-cocinas-btn-bars span:nth-child(2) {
  opacity: 0;
}
.footer-cocinas-btn[aria-expanded="true"] .footer-cocinas-btn-bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

.footer-cocinas-btn-label {
  flex-grow: 1;
  text-align: left;
  letter-spacing: 0.02em;
}
.footer-cocinas-btn-icon {
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease-out-expo);
}
.footer-cocinas-btn[aria-expanded="true"] .footer-cocinas-btn-icon {
  transform: rotate(180deg);
}

.footer-cocinas-panel {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.15rem 0.6rem;
  background: var(--gray-warm, #f0ede8);
  border: 1px solid var(--gray-mid, #e4e0da);
  border-radius: 4px;
  max-height: 280px;
  overflow-y: auto;
  animation: footerCocinasOpen 0.35s var(--ease-out-expo);
}
.footer-cocinas-panel[hidden] {
  display: none;
}
.footer-cocinas-panel li a {
  display: block;
  padding: 0.45rem 0.5rem;
  font-family: 'Barlow', sans-serif;
  font-size: 0.82rem;
  color: #4a5765;
  text-decoration: none;
  border-radius: 3px;
  transition: background 0.2s ease, color 0.2s ease;
}
.footer-cocinas-panel li a:hover {
  background: var(--white);
  color: var(--red);
}

@keyframes footerCocinasOpen {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Barra inferior ────────────────────────────────────────── */
.footer-info-container {
  border-top: 1px solid #e8e4df;
  padding: 1.25rem 3rem;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copyright-p {
  font-family: 'Barlow', sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: #9aaabb;
  text-align: center;
}

.copyright-p a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.25s ease;
}

.copyright-p a:hover {
  color: var(--red);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-links-container {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2.5rem;
  }
  .footer-cocinas,
  .footer-zonas { grid-column: 1 / -1; }
  .footer-cocinas-panel,
  .footer-zonas-panel { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .footer-links-container {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 1.5rem 2rem;
  }

  /* Logo ocupa las dos columnas */
  .footer-links:first-child {
    grid-column: 1 / -1;
  }
  .footer-cocinas,
  .footer-zonas { grid-column: 1 / -1; }
  .footer-cocinas-panel,
  .footer-zonas-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .footer-links-container {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem 2rem;
  }

  .footer-links:first-child {
    grid-column: auto;
  }

  .footer-info-container {
    padding: 1.25rem;
  }

  .footer-cocinas-panel,
  .footer-zonas-panel {
    grid-template-columns: 1fr;
    max-height: 320px;
  }
}