/* ================================================================
   DOR DE MARE — Sejururi page
   Depends on: design-system.css, navbar.css
   ================================================================ */

/* ── PAGE ─────────────────────────────────────────────────── */

/* html background = footer color → niciun gap/overscroll alb la fund pe iOS */
html {
  background: #111827;
}

.sej-page {
  background: #111827;   /* = culoarea footer-ului → niciun gol alb sub footer */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
[data-theme="dark"] .sej-page {
  background: var(--c-bg);
}


/* ── BARĂ DE CĂUTARE (fără hero) ──────────────────────────── */
.sej-search-bar {
  padding-top: 72px;
  background: #F7F7F7;
  position: relative;
}
[data-theme="dark"] .sej-search-bar {
  background: var(--c-bg);
}
.sej-search-inner {
  padding: 64px clamp(20px, 4vw, 48px) 28px;
  max-width: 920px;
  margin: 0 auto;
}
.sej-pill-mobile { display: none; }

/* ── SEARCH PILL — Airbnb-style, un singur câmp compact ───── */
.sej-pill {
  display: flex;
  align-items: stretch;
  background: var(--c-surface, #fff);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg, 24px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
  padding: 12px 12px 12px 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sej-pill:hover, .sej-pill:focus-within {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}
[data-theme="dark"] .sej-pill {
  background: var(--c-bg-elevated);
  border-color: rgba(255, 255, 255, 0.10);
}

.sej-pill-field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 18px;
  border-right: 1px solid var(--c-border);
}
.sej-pill-field--last,
.sej-pill-field:last-of-type {
  border-right: none;
}
.sej-pill-field label {
  font-family: var(--font);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--c-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
[data-theme="dark"] .sej-pill-field label {
  color: rgba(255, 255, 255, 0.70);
}

.sej-fg-wrap { position: relative; }
.sej-pill-input::-webkit-calendar-picker-indicator { display: none; }
.sej-pill-input::-webkit-inner-spin-button { display: none; }
.sej-pill-input {
  border: none;
  background: transparent;
  padding: 0;
  height: 22px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Search button */
.sej-pill-search {
  flex: 0 0 auto;
  align-self: center;
  width: 48px;
  height: 48px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.18s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(0, 123, 167, 0.16);
}
.sej-pill-search:hover {
  background: #006A91;
  transform: translateY(-1px);
}
.sej-pill-search:active { transform: translateY(0); }
[data-theme="dark"] .sej-pill-search {
  background: rgba(77, 149, 185, 0.16);
  color: #E0F2FE;
  border: 1px solid rgba(125, 211, 252, 0.18);
  box-shadow: none;
}
[data-theme="dark"] .sej-pill-search:hover {
  background: rgba(77, 149, 185, 0.26);
  color: #FFFFFF;
  border-color: rgba(125, 211, 252, 0.32);
}

/* ── Buton favorite (inimă) pe carduri ─────────────────────── */
.card-fav {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #FFFFFF;
  transition: transform 0.15s ease, background 0.15s ease;
}
.card-fav:hover { transform: scale(1.08); background: rgba(17, 24, 39, 0.5); }
.card-fav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: fill 0.15s ease, stroke 0.15s ease;
}
.card-fav.active svg { fill: #EF4444; stroke: #EF4444; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .sej-pill { display: none; }
  .sej-pill-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg, 24px);
    padding: 14px 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    color: var(--c-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
  }
  .sej-pill-mobile-icon {
    color: var(--c-primary);
    display: flex;
    flex-shrink: 0;
  }
  [data-theme="dark"] .sej-pill-mobile {
    background: var(--c-bg-elevated);
    border-color: rgba(255, 255, 255, 0.10);
  }

  /* navbar → bară de căutare: mai apropiat pe mobil decât pe desktop */
  .sej-search-inner { padding-top: 24px; }
}

@media (max-width: 600px) {
  /* Carduri mai mari pe mobile */
  .property-card { padding: 12px; border-radius: 24px; }
  .card-name  { font-size: 1.05rem; }
  .card-loc   { font-size: 0.82rem; }
  .price-val  { font-size: 1.18rem; }
  .price-per  { font-size: 0.74rem; }
  .card-cta   { font-size: 0.82rem; }
}

/* ════════════════════════════════════════════════════════════
   CAROUSEL ORIZONTAL — tipar dor-de-mare (scroll nativ garantat)
   .carousel-wrapper(overflow:hidden) > .prop-grid(overflow-x:auto)
   width:100% + min-width:0 pe carduri. Fără drag JS.
   ════════════════════════════════════════════════════════════ */
/* margin-top:-1px → acoperă seam-ul hairline search-bar↔content prin care răzbate
   fundalul închis (#111827) al body-ului pe ecrane cu DPR fracționar (mobil) */
.sej-content {
  flex: 1 0 auto;
  background: #F7F7F7;
  position: relative;
  z-index: 1;
  margin-top: -1px;
}
[data-theme="dark"] .sej-content { background: var(--c-bg); }

/* Toast gol nu trebuie să apară ca o cutie albă în flux */
#toast:empty { display: none; }

.prop-section {
  background: #F7F7F7;
  /* orizontal identic cu .sej-search-inner, ca titlurile de secțiune să se
     alinieze exact cu pastila de căutare de mai sus, la orice lățime */
  padding: clamp(20px, 2.6vw, 28px) clamp(20px, 4vw, 48px);
}
[data-theme="dark"] .prop-section { background: var(--c-bg); }
.prop-section[hidden] { display: none; }
/* prima secțiune — mai mult spațiu față de hero */
#sej-promovate { padding-top: clamp(20px, 3vw, 36px); }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.section-head-text { min-width: 0; }
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-accent);
  font-size: 1.15rem; font-weight: 700;
  color: var(--c-sand-dark);
  margin-bottom: var(--sp-2);
}
.section-title {
  font-family: 'Inter', var(--font);
  font-size: clamp(1.25rem, 2.2vw, 1.875rem);
  font-weight: 600; color: var(--c-text);
  line-height: 1.2; letter-spacing: -0.02em;
  margin: 0;
}
.section-title em { font-style: normal; font-weight: 600; color: inherit; }
.section-sub { color: var(--c-text-secondary); font-size: 0.9rem; margin: 0; max-width: 480px; line-height: 1.6; }

.carousel-controls { display: flex; gap: 10px; flex-shrink: 0; }
.carousel-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--c-border-strong);
  background: var(--c-surface); color: var(--c-text-secondary);
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all 0.2s var(--ease);
}
.carousel-btn:hover { background: var(--c-primary-ghost); border-color: var(--c-primary); color: var(--c-primary); }
.carousel-btn:active { transform: scale(0.95); }

.carousel-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 16px 0 24px;
  margin: -16px 0 -24px;
}

.prop-grid {
  display: flex;
  gap: 16px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.prop-grid::-webkit-scrollbar { display: none; }
.prop-grid .property-card,
.prop-grid .prop-skeleton {
  flex: 0 0 calc((100% - 56px) / 4.5); /* ~4 pe rând, carduri o idee mai mici + peek */
  min-width: 0;
  scroll-snap-align: start;
}

.prop-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 12px; min-height: 18px; }
.prop-dot {
  width: 8px; height: 8px; min-width: 8px; min-height: 8px;
  border-radius: 50%; background: var(--c-border-strong);
  border: 1px solid transparent; appearance: none; -webkit-appearance: none;
  cursor: pointer; line-height: 0; padding: 0; flex-shrink: 0; opacity: 0.75;
  transition: all 0.18s var(--ease);
}
.prop-dot:hover { opacity: 1; transform: scale(1.18); }
.prop-dot.active { background: var(--c-primary); border-color: var(--c-primary); opacity: 1; transform: scale(1.12); }

/* Signature „inset photo" card — foto rotunjită în interiorul padding-ului */
.property-card {
  background: #FFFFFF; border-radius: 22px; overflow: hidden;
  padding: 10px;
  border: 1px solid var(--c-border-subtle);
  box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 6px 20px rgba(15,23,42,0.06);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), box-shadow 0.28s cubic-bezier(0.22,1,0.36,1);
  text-decoration: none; color: inherit; display: block; cursor: pointer;
}
[data-theme="dark"] .property-card { background: var(--c-bg-elevated); border-color: var(--c-border); }

.card-img {
  aspect-ratio: 4/3; overflow: hidden; position: relative;
  background: #E5E7EB; border-radius: 15px;
}
[data-theme="dark"] .card-img { background: rgba(255,255,255,0.06); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.55s cubic-bezier(0.22,1,0.36,1); }

/* Rating badge — colț dreapta-sus pe imagine */
.card-rating {
  position: absolute; top: 9px; right: 9px;
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--c-primary); border-radius: 999px; padding: 4px 9px 4px 7px;
  font-size: 0.72rem; font-weight: 700; color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18); pointer-events: none;
}
.card-rating svg { flex-shrink: 0; }

.card-body { padding: 12px 6px 4px; background: transparent; }
.card-name {
  font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; line-height: 1.3;
  color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-loc {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.75rem; color: var(--c-text-tertiary); margin-bottom: 12px;
  white-space: nowrap; overflow: hidden;
}
.card-loc svg { flex-shrink: 0; color: var(--c-primary); opacity: 0.8; }
.card-loc span { overflow: hidden; text-overflow: ellipsis; }

/* Footer — preț (stânga) + „Vezi →" (dreapta) */
.card-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--c-border-subtle);
}
[data-theme="dark"] .card-foot { border-top-color: var(--c-border); }
.card-price { line-height: 1.1; min-width: 0; }
.price-val { font-size: 1.02rem; font-weight: 800; color: var(--c-text); letter-spacing: -0.02em; }
.price-per { display: block; font-size: 0.68rem; font-weight: 500; color: var(--c-text-tertiary); margin-top: 1px; }
.card-cta {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: 0.76rem; font-weight: 700; color: var(--c-primary);
  transition: gap 0.2s ease;
}
.card-cta svg { transition: transform 0.2s ease; }

@media (hover: hover) and (pointer: fine) {
  .property-card:hover { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(15,23,42,0.06), 0 18px 38px rgba(15,23,42,0.12); }
  .property-card:hover .card-img img { transform: scale(1.06); }
  .property-card:hover .card-cta { gap: 7px; }
  .property-card:hover .card-cta svg { transform: translateX(2px); }
}

.prop-skeleton { position: relative; overflow: hidden; background: #EBEBEB; border-radius: 22px; height: 250px; }
[data-theme="dark"] .prop-skeleton { background: rgba(255,255,255,0.06); }
.prop-skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.7) 50%, transparent 100%);
  animation: sejPropShimmer 1.4s infinite linear; will-change: transform;
}
@keyframes sejPropShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Responsive carousel — 4 pe rând pe desktop, scade treptat */
@media (max-width: 900px) {
  .prop-grid .property-card, .prop-grid .prop-skeleton { flex: 0 0 calc((100% - 32px) / 3); }
}
@media (max-width: 768px) {
  .carousel-btn { display: none; }
  .prop-grid .property-card, .prop-grid .prop-skeleton { flex: 0 0 calc((100% - 16px) / 2); }
}
@media (max-width: 600px) {
  .prop-section { padding: 16px clamp(20px, 4vw, 48px); }
  #sej-promovate { padding-top: 16px; }
  .prop-grid { gap: 16px; touch-action: pan-x pan-y; }
  /* Carduri mari: unul plin + un mic peek din următorul */
  .prop-grid .property-card, .prop-grid .prop-skeleton { flex: 0 0 82%; max-width: none; }
  .prop-skeleton { height: 320px; }
}
@media (max-width: 420px) {
  .prop-grid .property-card, .prop-grid .prop-skeleton { flex: 0 0 88%; }
}

/* ── FOOTER ───────────────────────────────────────────────── */
footer {
  background: #111827;
  color: rgba(255, 255, 255, 0.7);
  padding: var(--sp-12) clamp(var(--sp-4), 4vw, var(--sp-12)) var(--sp-6);
  padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}
[data-theme="dark"] footer {
  background: #0A0E14;
  border-top: 1px solid var(--c-border);
}
footer .footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-10);
  margin-bottom: var(--sp-10);
}
footer .footer-logo {
  font-family: var(--font);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin-bottom: var(--sp-3);
}
footer .footer-logo span { color: var(--c-accent); }
footer .footer-desc {
  font-family: var(--font);
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--sp-5);
}
footer .social-row { display: flex; gap: var(--sp-2); }
footer .social-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: all var(--duration-fast, 0.15s) var(--ease, ease);
  text-decoration: none;
}
footer .social-btn:hover {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #FFFFFF;
}
footer .footer-col h3,
footer .footer-col h4 {
  font-family: var(--font);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: var(--sp-4);
}
footer .footer-col a {
  display: block;
  font-family: var(--font);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  padding: var(--sp-1) 0;
  transition: color var(--duration-fast, 0.15s) var(--ease, ease);
  text-decoration: none;
}
footer .footer-col a:hover { color: #FFFFFF; }
footer .footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: var(--sp-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  flex-wrap: wrap;
  gap: var(--sp-2);
}
