/* CautColeg.ro Layout CSS - Sticky Header & Scroll Transition */
:root {
  --header-height: 80px;
  --header-padding: 24px;
}
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid transparent;
  z-index: 1001;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  overflow: visible;
}
.site-header.scrolled {
  border-bottom-color: var(--border-dark);
  box-shadow: var(--shadow-sm);
}
#header-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}
#header-overlay.active {
  opacity: 1;
  visibility: visible;
}
.site-header .header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--header-padding);
  height: var(--header-height);
  position: relative;
}
.header-expanded-content {
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  overflow: visible;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  transform-origin: 50% 0;
}
.site-header.scrolled .header-expanded-content {
  height: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.4, 0) translateY(-60px);
  pointer-events: none;
}
.site-header.expanded {
  background: white !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.site-header.expanded .header-expanded-content {
  height: 80px !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) translateY(0) !important;
  pointer-events: auto !important;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 500;
  color: var(--brand);
  letter-spacing: -0.02em;
  white-space: nowrap;
  z-index: 10;
  text-decoration: none;
}
.header-logo svg {
  width: 42px;
  height: 42px;
  overflow: visible;
}
.header-logo:hover {
  opacity: 0.9;
}
.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 32px;
  transition: all 0.2s ease;
  visibility: visible;
  opacity: 1;
  z-index: 5;
}
.header-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--gray);
  font-size: 16px;
  padding: 10px 0;
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}
.header-nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}
.header-nav a:hover {
  color: var(--black);
}
.header-nav a.active {
  color: var(--black);
  font-weight: 600;
}
.header-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
}
.filter-btn-container {
  padding-left: 12px;
}
.filter-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  background: white;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  height: 48px;
}
.filter-trigger-btn:hover {
  border-color: var(--black);
  background: var(--gray-bg);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}
.header-host-link {
  font-weight: 600;
  font-size: 14px;
  color: #484848;
  padding: 10px 16px;
  border-radius: 24px;
  text-decoration: none;
  transition: background 0.2s;
}
.header-host-link:hover {
  background: #f7f7f7;
}
.site-header .nav-link.btn-publish-header {
  background: var(--brand) !important;
  color: white !important;
  padding: 10px 22px !important;
  border-radius: 40px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  margin-left: 12px;
  transition: all 0.3s var(--ease) !important;
  box-shadow: 0 4px 12px rgba(255, 56, 92, 0.2);
  display: inline-flex;
  align-items: center;
}
.site-header .nav-link.btn-publish-header:hover {
  background: #e02e4d !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 56, 92, 0.35);
  color: white !important;
}
/* Currency Trigger & Standard Actions */
.header-action-ghost {
  font-weight: 600;
  font-size: 14px;
  color: #484848;
  padding: 10px 16px;
  border-radius: 24px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.header-action-ghost:hover {
  background: #f7f7f7;
}

.header-action-ghost svg {
  opacity: 0.8;
}

.header-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 5px 5px 14px;
  border: 1px solid #DDDDDD;
  border-radius: 40px;
  cursor: pointer;
  background: var(--white);
  transition: box-shadow 0.2s, background 0.2s;
  height: 48px;
  box-sizing: border-box;
}
.header-user-menu:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
  background: #f7f7f7;
}
.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.menu-icon span {
  display: block;
  width: 16px;
  height: 2px;
  background: #484848;
  border-radius: 1px;
}
@media (max-width: 768px) {
  .site-header {
    --header-padding: 16px;
  }
  .header-actions {
    gap: 4px;
  }
  .header-logo {
    font-size: 0;
  }
  .header-logo svg {
    margin-right: 0;
  }
  .header-host-link, .header-action-ghost {
    font-size: 13px;
    padding: 8px 10px;
    height: 38px;
  }
  #currency-current-text,
  #pub-currency-current-text {
    display: none !important;
  }
  .header-user-menu {
    padding: 4px 4px 4px 10px;
    gap: 8px;
  }
  .header-nav {
    display: none;
  }
}
@media (max-width: 480px) {
  .site-header .header-inner {
    padding: 0 12px;
  }
}
.search-results-page {
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}
.results-list-side {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}
.map-side {
  width: 42%;
  position: relative;
  background: #f0f0f0;
}
@media (max-width: 1024px) {
  .map-side {
    display: none;
  }
}
.filter-inline-bar {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-dark);
  background: white;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 8px 0;
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: ddSlideIn 0.18s cubic-bezier(0.2, 0, 0, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
}
@keyframes ddSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.user-dropdown.active {
  display: flex;
}
.dropdown-category-label {
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #a0a0a0;
  pointer-events: none;
  user-select: none;
}
.user-dropdown .dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  position: relative;
}
.user-dropdown .dd-item:hover {
  background: #f5f5f5;
  color: #111;
}
.dd-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}
.dd-icon svg {
  width: 18px;
  height: 18px;
  color: #888;
  transition: color 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dd-item:hover .dd-icon svg {
  color: #222;
  transform: scale(1.18);
}
.dd-item.dd-admin .dd-icon svg {
  color: #6366f1;
}
.dd-item.dd-admin {
  color: #6366f1;
  font-weight: 700;
}
.dd-item.dd-admin:hover {
  background: #eef2ff;
}
.dd-item.dd-admin:hover .dd-icon svg {
  color: #4f46e5;
  transform: scale(1.22) rotate(-8deg);
}
.dd-item.dd-highlight {
  font-weight: 700;
  color: #222;
}
.dd-item.dd-highlight:hover .dd-icon svg {
  color: var(--brand, #FF385C);
  transform: scale(1.22);
}
.dd-item.dd-logout {
  color: #b91c1c;
}
.dd-item.dd-logout .dd-icon svg {
  color: #b91c1c;
}
.dd-item.dd-logout:hover {
  background: #fef2f2;
  color: #991b1b;
}
.dd-item.dd-logout:hover .dd-icon svg {
  color: #991b1b;
  transform: scale(1.18) translateX(3px);
}
.dd-item[href="/favorite"]:hover .dd-icon svg {
  color: #ef4444;
  transform: scale(1.25);
}
.dd-item[href="/mesaje"]:hover .dd-icon svg {
  color: #0ea5e9;
  transform: scale(1.18) translateY(-1px);
}
.dd-item[href="/setari"]:hover .dd-icon svg {
  color: #6b7280;
  transform: scale(1.15) rotate(30deg);
}
.dropdown-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 6px 12px;
}
/* -------------------------------------
 * FOOTER STYLES
 * ------------------------------------- */
.site-footer {
  background: #f7f7f7;
  border-top: 1px solid #ebebeb;
  padding: 48px 0;
  margin-top: 64px;
}
.footer-main-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}
.footer-brand-col {
  flex: 1;
  min-width: 250px;
}
.footer-brand-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-brand-desc {
  font-size: 14px;
  color: #717171;
  line-height: 1.6;
}
.footer-links-row {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
}
.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-link {
  color: #484848;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-link:hover {
  color: #222;
  text-decoration: underline;
}
.footer-bottom {
  border-top: 1px solid #ebebeb;
  margin-top: 40px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copyright {
  font-size: 14px;
  color: #717171;
}
.footer-socials {
  display: flex;
  gap: 24px;
}
/* -------------------------------------
 * GLOBALS FROM APP.PHP
 * ------------------------------------- */
.search-overlay.active,
.user-dropdown.active,
.app-dropdown.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.home-nav-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translate(-50%, 40px) !important;
  pointer-events: none !important;
}
#header-nav {
  transition: all 0.4s cubic-bezier(0.2, 0, 0, 1) !important;
}
@keyframes slideInRight {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes flashProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}
/* ─── Header pe telefon: filtrele nu mai ies din ecran ─────────────────
   Pe /anunturi, header-ul primeşte trei butoane în plus (Oraş, Filtre,
   Sortează) peste „Publică", valuta şi meniu. La 375px conţinutul măsura 477px
   şi „Sortează" ieşea complet din ecran, fără nicio cale de a-l atinge.

   Soluţia: pe ecrane mici scoatem din header ce se găseşte oricum în meniu
   („Publică") şi lăsăm filtrele să se strângă. Ele sunt motivul pentru care
   cineva e pe pagina asta. */
@media (max-width: 768px) {
  .header-actions { min-width: 0; flex: 1 1 auto; justify-content: flex-end; }

  .header-filter-group {
    min-width: 0;
    flex: 1 1 auto;
    gap: 6px !important;
    margin-right: 6px !important;
  }
  .header-filter-group > div { min-width: 0; }

  /* Butoanele de filtru: text mai mic, fără să depăşească niciodată spaţiul. */
  .header-pill-btn {
    min-width: 0;
    max-width: 100%;
    padding: 8px 12px !important;
    font-size: 12.5px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

}

/* Sub ~560px nu mai încape tot: renunţăm la „Publică", care există şi în
   meniul de utilizator. Pe tabletă rămâne, fiindcă acolo e loc. */
@media (max-width: 560px) {
  .header-host-link { display: none; }
}

/* Foarte îngust: rămân doar pictogramele pentru „Filtre" şi „Sortează".

   Eticheta oraşului rămâne: ea arată o stare („Bucureşti"), nu doar numele
   unei acţiuni. Trei butoane rotunde identice nu spun nimic, iar oraşul
   selectat e exact informaţia după care se orientează cineva pe pagina asta. */
@media (max-width: 420px) {
  .header-filter-group .header-pill-btn { padding: 8px 10px !important; }
  .header-filter-group .header-pill-btn .pill-btn-label:not(.is-kept) { display: none; }
  .header-filter-group .header-pill-btn .pill-btn-label.is-kept {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
