/* ==========================================================================
   mobile-footer.css — footer comun pentru toate paginile mobile.

   Extras din assets/css/homepage.css și menținut ca sursă comună, nescopată
   de body.homepage-view, ca includes/components/
   homepage-footer.php să poată fi randat pe orice pagină (nu doar homepage-ul)
   fără să tragă restul CSS-ului specific homepage-ului (hero, rail-uri etc.).

   Folosit de includes/layout/mobile-aware-footer.php — randează acest footer
   sub 992px pe orice pagină publică, păstrând footer-ul desktop existent
   (public-footer.php) neschimbat la ≥992px.
   ========================================================================== */

.home-footer {
  background: #ffffff;
  border-top: 1px solid var(--color-border, rgba(226, 232, 240, 0.8));
  padding: 24px 0 16px;
  margin-top: 8px;
}

.home-footer-top {
  margin-bottom: 18px;
}

.home-footer-brand {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-brand-logo-start, #4f46e5);
  text-decoration: none;
}

.home-footer-brand:hover {
  text-decoration: none;
}

.home-footer-brand:focus-visible {
  border-radius: 4px;
  outline: 3px solid rgba(99, 102, 241, 0.35);
  outline-offset: 4px;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .home-footer-brand {
    background: var(--gradient-brand-logo);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

@media (forced-colors: active) {
  .home-footer-brand {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: CanvasText;
  }
}

.home-footer-tagline {
  color: var(--color-text-secondary, #475569);
  font-size: 0.86rem;
  margin-top: 6px;
  max-width: 420px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-footer-groups {
  display: flex;
  flex-direction: column;
}

.home-footer-group {
  border-top: 1px solid var(--color-border, rgba(226, 232, 240, 0.8));
}

/* Sub 992px, grupul "Explorează" (Evenimente/Unde ieșim/Shopping & Lifestyle/
   Promoții) e redundant cu bara de navigare de jos (assets/css/mobile-navigation.css,
   aceleași 4 destinații + „Acasă"), vizibilă pe același interval — rămâne doar
   pe desktop (≥992px, fără bara de jos). */
@media (max-width: 991.98px) {
  .home-footer-group-explore {
    display: none;
  }
}

.home-footer-group > summary.home-footer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 2px;
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary, #475569);
}

.home-footer-group > summary.home-footer-heading::-webkit-details-marker {
  display: none;
}

.home-footer-group > summary.home-footer-heading::after {
  content: '';
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.home-footer-group[open] > summary.home-footer-heading::after {
  transform: rotate(-135deg);
}

.home-footer-group > summary.home-footer-heading:focus-visible {
  outline: 2px solid var(--primary-color, #6366f1);
  outline-offset: 2px;
}

.home-footer-list {
  list-style: none;
  padding: 0 2px 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-footer-list li {
  width: 100%;
}

.home-footer-list a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--color-text-primary, #1e293b);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.home-footer-list a:hover,
.home-footer-list a:focus-visible {
  color: var(--primary-color, #6366f1);
  background: rgba(99, 102, 241, 0.08);
  text-decoration: none;
}

.home-footer-list a:focus-visible {
  outline: 2px solid var(--primary-color, #6366f1);
  outline-offset: 2px;
}

.home-footer-bottom {
  border-top: 1px solid var(--color-border, rgba(226, 232, 240, 0.8));
  margin-top: 8px;
  padding-top: 16px;
  color: var(--color-text-secondary, #475569);
  font-size: 0.82rem;
}

/* De la 768px, inclusiv: toate cele trei grupuri sunt permanent extinse,
   linkurile vizibile fără interacțiune, fără chevron. Suprascrie
   comportamentul nativ <details> indiferent de atributul `open` — corectitudinea
   semantică/de focus e asigurată de assets/js/homepage-footer.js, care setează
   atributul real `open` și scoate <summary> din ordinea de tab la >=768px,
   sincronizat dinamic prin matchMedia (fără reload la trecerea peste 768px). */
@media (min-width: 768px) {
  .home-footer-group {
    border-top: none;
  }
  .home-footer-group > summary.home-footer-heading {
    pointer-events: none;
    padding: 0 0 12px;
  }
  .home-footer-group > summary.home-footer-heading::after {
    display: none;
  }
  .home-footer-group:not([open]) > *:not(summary) {
    display: block !important;
  }
  .home-footer-list {
    padding: 0;
  }
}

/* 768–991.98px: grupurile (fără coloana de brand) în coloane compacte; doar
   două rămân vizibile aici (.home-footer-group-explore e ascuns mai sus).
   La 992px+ ele devin parte din grid-ul .home-footer-content de mai jos. */
@media (min-width: 768px) and (max-width: 991.98px) {
  .home-footer-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .home-footer-bottom {
    margin-top: 20px;
  }
}

@media (min-width: 992px) {
  /* Footerul este o componentă a shellului public, nu o bandă full-bleed.
     Îl aliniem la aceeași coloană activă de 1100px folosită de navbar,
     hero-ul contextual și conținutul paginilor. Regula acoperă atât footerul
     bogat, cât și fallbackul public mai vechi. */
  .public-footer-desktop-shell > .home-footer,
  .public-footer-desktop-shell > .footer-glass {
    box-sizing: border-box;
    width: min(1100px, calc(100% - 32px));
    margin-right: auto !important;
    margin-left: auto !important;
    overflow: hidden;
    border: 1px solid var(--color-border, rgba(226, 232, 240, 0.8));
    border-radius: 22px 22px 0 0;
  }

  .public-footer-desktop-shell > .home-footer > .container,
  .public-footer-desktop-shell > .footer-glass > .container {
    width: 100%;
    max-width: none !important;
    padding-right: 28px;
    padding-left: 28px;
  }

  .home-footer {
    padding: 32px 0 20px;
  }
  .home-footer-content {
    display: grid;
    grid-template-columns: minmax(220px, 300px) repeat(3, 1fr);
    gap: 28px;
    align-items: start;
  }
  .home-footer-top {
    margin-bottom: 0;
  }
  .home-footer-groups {
    display: contents;
  }
  .home-footer-bottom {
    margin-top: 24px;
  }
  .home-footer-list {
    gap: 8px;
  }
  .home-footer-list li,
  .home-footer-list a {
    width: auto;
  }
  .home-footer-list a {
    min-height: 0;
    padding: 2px 0;
    border-radius: 0;
  }
  .home-footer-list a:hover,
  .home-footer-list a:focus-visible {
    background: transparent;
    text-decoration: underline;
  }
}

@media (max-width: 767.98px) {
  .home-footer {
    text-align: center;
  }
  .home-footer-tagline {
    max-width: none;
  }
  .home-footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .home-footer-group > summary.home-footer-heading {
    justify-content: space-between;
    padding-inline: 16px;
    text-align: left;
  }
  .home-footer-group > summary.home-footer-heading::after {
    position: static;
  }
  .home-footer-list {
    align-items: stretch;
  }
  .home-footer-list a {
    justify-content: space-between;
    gap: 12px;
    padding-inline: 14px;
    border: 1px solid rgba(226, 232, 240, 0.82);
    background: #fafbff;
    text-align: left;
  }
  .home-footer-list a::after {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-top: 1.8px solid currentColor;
    border-right: 1.8px solid currentColor;
    opacity: 0.62;
    transform: rotate(45deg);
  }
  .home-footer-bottom {
    justify-content: center !important;
    text-align: center;
  }
}
