/* ==========================================================================
   Seddir Evlerde — loaded on every page only while its switch is on (Sayfa metinleri), so the
   site stays exactly as it was while it is off (src/pages/platform/index.mjs → platformStyles).
   A calm gallery in the site's poster language: uniform 3:4 photos on paper, the city and the name set small
   under each, and a thin piping cord in the colours of the cushion in the photo that runs out to the tile's
   width on hover. The share call is a poster of the başvuru çağrısı family (components.css → .invite) in pink
   and navy. The form reuses the başvuru form (apply.css). Capitals come from the template (upTr), never from
   text-transform on a text that may hold the word Seddir.
   ========================================================================== */
[data-page="homes"] { --head-bg: var(--c-green); --head-fg: var(--c-navy); --foot-bg: var(--c-navy); --foot-fg: var(--c-pink); }

.homes { padding-inline: var(--inset); }
.homes .product__crumb { margin-bottom: 0; }

/* ---- filters (homes.js): two plain selects on a line ---- */
.h-filters { scroll-margin-top: calc(var(--head-total, 80px) + 16px); display: flex; flex-wrap: wrap; gap: 14px 32px; max-width: 1180px; margin: 36px auto 0; }
.h-filter { display: grid; gap: 6px; font: 700 13px/1.2 var(--ff-body); color: var(--ink-soft); }
.h-filter select, .h-form .apply__field select {
  appearance: none; min-width: 220px; max-width: 100%; padding: 10px 36px 10px 0;
  font: 700 17px/1.3 var(--ff-display); color: var(--c-navy);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2319325E' stroke-width='2.4'/%3E%3C/svg%3E") right 4px center / 14px 9px no-repeat;
  border: 0; border-bottom: 2px solid var(--c-navy); border-radius: 0; cursor: pointer;
}
.h-filter select:focus-visible { outline: 2px solid var(--c-red); outline-offset: 4px; }

/* ---- the Türkiye map (homesMap → homes.js): provinces on paper, the ones with a home in navy, the chosen one orange ---- */
.h-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: clamp(24px, 4vw, 64px); align-items: center; max-width: 1180px; margin: 36px auto 0; padding: clamp(24px, 3vw, 44px); background: #fff; }
.h-map__text { display: grid; gap: 12px; align-content: start; }
.h-map__title { font: 800 clamp(26px, 1.8vw + 12px, 40px)/1 var(--ff-display); font-stretch: var(--wdth-wide); color: var(--c-navy); text-wrap: balance; }
.h-map__count { font: 800 clamp(18px, .6vw + 13px, 22px)/1.2 var(--ff-display); color: var(--c-orange); }
.h-map__hint { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.h-map__list { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; font: 700 14px/1.2 var(--ff-body); }
.h-map__list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid rgb(25 50 94 / .14); color: var(--c-navy); }
.h-map__svg { display: block; width: 100%; height: auto; overflow: visible; }
.h-map__il { fill: rgb(25 50 94 / .08); stroke: #fff; stroke-width: 1; stroke-linejoin: round; transition: fill .3s; }
.h-map__il--on { fill: var(--c-navy); cursor: pointer; }
.h-map__il--on:hover { fill: var(--c-red); }
.h-map__il--on:focus-visible { outline: none; fill: var(--c-red); }
.h-map__il--on[aria-pressed="true"] { fill: var(--c-orange); }

/* ---- the gallery ---- */
.h-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 40px; max-width: 1180px; margin: 40px auto 0; padding: 0; list-style: none; }
.h-grid > li[hidden] { display: none; }
.h-tile { display: block; color: inherit; }
.h-tile__media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: #fff; }
.h-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out-circ); }
.h-tile:hover .h-tile__media img { transform: scale(1.04); }
.h-tile:focus-visible { outline: none; }
.h-tile:focus-visible .h-tile__media { outline: 3px solid var(--c-navy); outline-offset: 3px; }
.h-tile__count {                                      /* more than one photo in the post */
  position: absolute; right: 12px; bottom: 12px; min-width: 30px; padding: 6px 8px; border-radius: 99px;
  font: 800 12px/1 var(--ff-display); text-align: center; background: var(--c-paper); color: var(--c-navy);
}
.h-tile__cord {
  display: block; width: 56px; height: 8px; margin-top: 14px; border-radius: 99px;
  background: var(--f); box-shadow: inset 0 0 0 2px var(--p);
  transition: width .7s var(--ease-out-circ);
}
.h-tile:is(:hover, :focus-visible) .h-tile__cord { width: 100%; }
.h-tile__meta { display: grid; gap: 6px; margin-top: 12px; }
.h-tile__meta small { font: 700 11px/1 var(--ff-body); letter-spacing: .12em; color: var(--ink-soft); }
.h-tile__name { font: 700 clamp(17px, .5vw + 12px, 21px)/1.2 var(--ff-display); color: var(--c-navy); overflow-wrap: anywhere; }
.h-empty { max-width: 1180px; margin: 40px auto 0; font: 700 clamp(18px, 1vw + 12px, 22px)/1.35 var(--ff-display); }
.h-empty[hidden] { display: none; }

/* rows: the home page (six), a product page (three), a post's "Diğer evler" (three) */
.h-home .h-grid, .h-product .h-grid, .h-others .h-grid { max-width: none; margin: 0; }
.h-grid--home { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 40px 24px; }
.h-grid--home .h-tile__name { font-size: clamp(15px, .3vw + 12px, 18px); }
.h-others { max-width: 1180px; margin-inline: auto; }

/* ---- the share call ---- */
.h-share { padding: 0; max-width: 1180px; margin-inline: auto; }
.h-share__poster { background: var(--c-pink); color: var(--c-navy); }
.h-share .invite__cord { stroke: var(--c-navy); }
.h-share .invite__text { color: var(--c-navy); }
.h-share .btn { text-transform: none; }               /* the label is already in capitals (upTr) */
.h-share .invite__btn:hover { background: var(--c-red); }
.h-share .invite__btn:focus-visible { outline: 2px solid var(--c-navy); outline-offset: 3px; }
.h-withdraw { max-width: 1180px; margin: 28px auto 0; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.h-withdraw a, .h-notice a { text-decoration: underline; text-underline-offset: 2px; }
.h-empty-page { margin-bottom: 0; }

/* ---- a post ---- */
.h-post { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; max-width: 1180px; margin: 28px auto 0; }
.h-post__photos { display: grid; gap: 16px; padding: 0; list-style: none; }
.h-post__photos--many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* two or four side by side; of three, the first one large over the other two */
.h-post__photos--lead .h-post__photo:first-child { grid-column: 1 / -1; }
.h-post__photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #fff; }
.h-post__text { position: sticky; top: calc(var(--head-total) + 28px); display: grid; justify-items: start; align-content: start; gap: 14px; }
.h-post__city { font: 700 12px/1 var(--ff-body); letter-spacing: .14em; color: var(--ink-soft); }
.h-post__name { font: 800 clamp(34px, 3.4vw + 8px, 60px)/.95 var(--ff-display); font-stretch: var(--wdth-wide); color: var(--c-navy); text-wrap: balance; overflow-wrap: anywhere; }
.h-post__cord { display: block; width: 96px; height: 10px; margin: 6px 0 8px; border-radius: 99px; background: var(--f); box-shadow: inset 0 0 0 2.5px var(--p); }
.h-post__note { max-width: 52ch; font-size: 17px; line-height: 1.6; white-space: pre-line; }
.h-post__products { display: grid; gap: 10px; margin-top: 10px; }
.h-post__products h2 { font: 700 13px/1.2 var(--ff-body); color: var(--ink-soft); }
.h-post__products ul { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.h-post__products a {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 2px solid var(--c-navy); border-radius: 99px;
  font: 700 14px/1.1 var(--ff-display); color: var(--c-navy); transition: background-color var(--dur-fast), color var(--dur-fast);
}
.h-post__products a:not(:has(.cushion)) { padding-left: 14px; }
.h-post__products a:is(:hover, :focus-visible) { background: var(--c-navy); color: var(--c-paper); }
.h-post__products .cushion { box-shadow: none; }
.h-post__back { margin-top: 14px; }
.h-post__cards { padding: 0; max-width: 1180px; margin-inline: auto; }

/* ---- the form (apply.css draws the fields) ---- */
.h-form.apply { padding-inline: 0; }
.h-form .product__crumb { max-width: none; margin: 0; }
.h-form .apply__field select { width: 100%; min-width: 0; padding: 12px 40px 12px 14px; font: 500 16px/1.4 var(--ff-body); color: var(--ink); background-color: var(--c-paper); background-position: right 14px center; border: 2px solid transparent; border-bottom-color: var(--c-navy); }
.h-form .apply__field select:focus-visible { outline: none; border-color: var(--c-navy); background-color: #fff; }
.h-form [aria-invalid="true"] { border-color: var(--c-red) !important; }
.h-thumbs li { width: calc((100% - 30px) / 4); max-width: 132px; }
.h-thumbs button { min-height: 28px; }
.h-form [data-homes-photos][aria-busy="true"] .apply__pick span { opacity: .55; }
.h-products { border: 0; padding: 0; margin: 0; min-width: 0; }
.h-products legend, .h-consents legend { padding: 0; }
.h-products legend { margin-bottom: 8px; }
.h-chips { display: flex; flex-wrap: wrap; gap: 8px; max-height: 260px; overflow-y: auto; padding: 3px; margin: -3px; }
.h-chip { position: relative; }
.h-chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.h-chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px;
  font: 600 14px/1.2 var(--ff-body); color: var(--c-navy); background: var(--c-paper); border: 2px solid var(--c-navy);
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.h-chip:has(.cushion) span { padding-left: 8px; }
.h-chip .cushion { box-shadow: none; }
.h-chip input:checked + span { background: var(--c-navy); color: var(--c-paper); }
.h-chip input:focus-visible + span { outline: 2px solid var(--c-red); outline-offset: 2px; }
.h-consents { display: grid; gap: 14px; border: 0; padding: 18px 0 0; margin: 0; min-width: 0; border-top: 2px solid var(--line); }
.h-consents legend { float: left; width: 100%; margin-bottom: 4px; font: 800 20px/1.1 var(--ff-display); color: var(--c-navy); }
.h-notice { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.h-done .btn { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { .h-tile__media img, .h-tile__cord { transition: none; } }

@media (max-width: 1024.98px) {
  .h-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 20px; }
  /* home and product rows: a sideways strip, like the "Yanına yakışır" cards */
  .h-grid--home, .h-grid--row {
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--inset)); padding: 0 var(--inset) 4px; scroll-padding-inline: var(--inset);
  }
  .h-home .h-grid--home, .h-product .h-grid--row, .h-others .h-grid--row { margin-inline: calc(-1 * var(--inset)); }
  .h-grid--home::-webkit-scrollbar, .h-grid--row::-webkit-scrollbar { display: none; }
  .h-grid--home > li, .h-grid--row > li { flex: none; width: 260px; scroll-snap-align: start; }
  .h-post { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
  .h-map { grid-template-columns: 1fr; padding: 20px; }
  .h-map__svg { order: -1; }
  .h-filters { margin-top: 24px; gap: 12px 16px; }
  .h-filter { flex: 1 1 140px; }
  .h-filter select { min-width: 0; width: 100%; font-size: 16px; }
  .h-grid { gap: 28px 10px; margin-top: 24px; }
  .h-tile__cord { width: 40px; height: 7px; margin-top: 10px; }
  .h-tile__meta { margin-top: 8px; gap: 4px; }
  .h-tile__name { font-size: 15px; }
  .h-tile__count { right: 8px; bottom: 8px; }
  .h-grid--home > li, .h-grid--row > li { width: 62vw; }
  .h-grid--home .h-tile__name { font-size: 16px; }

  .h-post { grid-template-columns: 1fr; gap: 24px; margin-top: 18px; }
  .h-post__text { position: static; padding-inline: 4px; }
  /* several photos: swiped sideways, the next one peeking in */
  .h-post__photos--many {
    display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--inset)); padding-inline: var(--inset); scroll-padding-inline: var(--inset);
  }
  .h-post__photos--many::-webkit-scrollbar { display: none; }
  .h-post__photos--many .h-post__photo { flex: none; width: 84vw; scroll-snap-align: start; }
  .h-post__note { font-size: 16px; }
  .h-withdraw { padding-inline: 4px; }

  .h-thumbs { gap: 8px; }
  .h-thumbs li { width: calc((100% - 24px) / 4); }
  .h-chips { max-height: 300px; }
}
