/* Public football-field directory. Layered on top of landing.css — reuses its
   .container / .btn / .card primitives and only adds what the listing and
   profile pages need. */

.dir-head { padding: 40px 0 24px; }
.dir-head h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 8px; color: #12351f; }
.dir-head p { color: #5b6b60; margin: 0; }

/* --- Filter bar --- */
.dir-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; }
.dir-filters form { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
.dir-input {
    flex: 1 1 220px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid #d7e2da;
    border-radius: 10px;
    font: inherit;
    background: #fff;
    color: #12351f;
}
.dir-input:focus { outline: 2px solid #47CE79; outline-offset: 1px; border-color: #47CE79; }
.dir-select { flex: 0 1 200px; }

.dir-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.dir-chip {
    display: inline-block;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid #d7e2da;
    background: #fff;
    color: #3c5647;
    text-decoration: none;
    font-size: 0.875rem;
}
.dir-chip:hover { border-color: #47CE79; color: #1A5C30; }
.dir-chip--active { background: #1A5C30; border-color: #1A5C30; color: #fff; }

/* --- Listing grid --- */
.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin: 0 0 40px;
}
.dir-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e4ece7;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s ease, transform .18s ease;
}
.dir-card:hover { box-shadow: 0 8px 24px rgba(16, 51, 30, .10); transform: translateY(-2px); }
/* Ratio boxes are padding-based, not `aspect-ratio`: these pages open in the
   Telegram in-app browser and older Android WebViews, which ignore the
   property — the image then falls back to its natural height and the
   thumbnails come out uneven. padding-top works everywhere. */
.dir-card__media { position: relative; height: 0; padding-top: 62.5%; background: #eef4f0; overflow: hidden; }
.dir-card__media img,
.dir-card__placeholder {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
}
.dir-card__media img { object-fit: cover; display: block; }
.dir-card__placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #9db3a6;
}
.dir-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dir-card__name { font-weight: 700; color: #12351f; font-size: 1.0625rem; line-height: 1.35; }
.dir-card__meta { color: #6b7f72; font-size: 0.875rem; }
.dir-card__price { color: #1A5C30; font-weight: 600; font-size: 0.9375rem; margin-top: auto; }

.dir-badge {
    position: absolute; top: 10px; left: 10px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 700;
    background: rgba(255, 255, 255, .94); color: #3c5647;
    backdrop-filter: blur(2px);
}
.dir-badge--bookable { background: #1A5C30; color: #fff; }

/* --- Profile page --- */
.dir-hero { aspect-ratio: 21 / 9; background: #eef4f0; border-radius: 16px; overflow: hidden; margin: 24px 0 0; }
.dir-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dir-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 0; }
.dir-gallery > a { position: relative; display: block; height: 0; padding-top: 75%;
  border-radius: 10px; overflow: hidden; background: #eef4f0; }
.dir-gallery > a img { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; cursor: zoom-in; transition: transform .15s ease; }
.dir-gallery > a:hover img { transform: scale(1.03); }
.dir-gallery > a:focus-visible { outline: 3px solid #1f9d55; outline-offset: 2px; }

/* CSS-only lightbox: the thumbnail links to #id, :target reveals the overlay.
   No JS, so it works in the Telegram in-app browser too. */
.dir-lightbox { display: none; position: fixed; inset: 0; z-index: 60; padding: 24px;
  background: rgba(6, 20, 12, .9); align-items: center; justify-content: center; }
.dir-lightbox:target { display: flex; }
.dir-lightbox__backdrop { position: absolute; inset: 0; }
.dir-lightbox img { position: relative; max-width: min(1100px, 100%); max-height: 88vh;
  width: auto; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 12px; }
.dir-lightbox__close { position: absolute; top: 12px; right: 18px; z-index: 1;
  color: #fff; font-size: 2.25rem; line-height: 1; text-decoration: none; padding: 4px 12px; }
.dir-lightbox__close:hover { opacity: .8; }

.dir-title { font-size: clamp(1.5rem, 3.5vw, 2.125rem); margin: 22px 0 6px; color: #12351f; }
.dir-sub { color: #5b6b60; margin: 0 0 18px; }

.dir-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin: 0 0 48px; }
@media (min-width: 900px) { .dir-layout { grid-template-columns: minmax(0, 1fr) 320px; } }

.dir-section { margin: 0 0 26px; }
.dir-section h2 { font-size: 1.125rem; margin: 0 0 10px; color: #12351f; }
.dir-section p { color: #45564c; margin: 0; line-height: 1.65; }

.dir-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dir-facts li { display: flex; gap: 10px; color: #45564c; font-size: 0.9375rem; }
.dir-facts span:first-child { flex: 0 0 22px; }

.dir-aside { align-self: start; position: sticky; top: 20px; }
.dir-panel { background: #fff; border: 1px solid #e4ece7; border-radius: 14px; padding: 18px; margin: 0 0 16px; }
.dir-panel h3 { margin: 0 0 6px; font-size: 1rem; color: #12351f; }
.dir-panel p { margin: 0 0 14px; color: #6b7f72; font-size: 0.875rem; line-height: 1.6; }
.dir-panel .btn { width: 100%; text-align: center; margin: 0 0 8px; }
.dir-panel .btn:last-child { margin-bottom: 0; }

.dir-note {
    background: #f6faf7; border: 1px solid #e0ece4; border-radius: 10px;
    padding: 11px 14px; color: #5b6b60; font-size: 0.8125rem; line-height: 1.6;
}

.dir-alert {
    background: #E8F8EE; border: 1px solid #C6EED7; color: #1A5C30;
    border-radius: 10px; padding: 13px 16px; margin: 20px 0 0; font-weight: 500;
}

/* --- Claim form --- */
.dir-claim { border: 1px solid #e4ece7; border-radius: 14px; background: #fff; margin: 0 0 40px; }
.dir-claim > summary {
    padding: 16px 18px; cursor: pointer; font-weight: 600; color: #1A5C30; list-style: none;
}
.dir-claim > summary::-webkit-details-marker { display: none; }
.dir-claim > summary::after { content: ' ▾'; }
.dir-claim[open] > summary::after { content: ' ▴'; }
.dir-claim__body { padding: 0 18px 20px; display: grid; gap: 12px; }
.dir-claim label { display: block; font-size: 0.875rem; font-weight: 600; color: #3c5647; margin: 0 0 5px; }
.dir-claim .dir-input, .dir-claim textarea, .dir-claim select { width: 100%; }
.dir-claim textarea { min-height: 84px; resize: vertical; }
.dir-hint { font-size: 0.8125rem; color: #7b8d82; margin: 5px 0 0; }
.dir-error { color: #b42318; font-size: 0.8125rem; margin: 5px 0 0; }
.dir-removal { font-size: 0.8125rem; color: #6b7f72; }
.dir-removal summary { cursor: pointer; }

.dir-pagination { display: flex; justify-content: center; gap: 6px; margin: 0 0 48px; flex-wrap: wrap; }

/* --- Venue facilities (the venue → facility hierarchy on the profile) --- */
.dir-tag {
    display: inline-block; padding: 2px 9px; margin: 0 4px 0 0;
    border-radius: 999px; background: #E8F8EE; color: #1A5C30;
    font-size: 0.75rem; font-weight: 600; vertical-align: middle;
}
.dir-tag--muted { background: #eef2f0; color: #5b6b60; }
.dir-card__sports { display: block; margin: 2px 0 0; }

.dir-facilities { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dir-facility {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 14px; border: 1px solid #e4ece7; border-radius: 12px; background: #fff;
}
.dir-facility__name { font-weight: 600; color: #12351f; margin-right: 6px; }
.dir-facility__price { color: #1A5C30; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }

/* --- Pagination (self-styled; the stock Laravel views assume Tailwind) --- */
.dir-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; flex-wrap: wrap; margin: 8px 0 12px;
}
.dir-page {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    border: 1px solid #d7e2da; border-radius: 10px;
    background: #fff; color: #3c5647; text-decoration: none;
    font-size: 0.875rem; font-weight: 600; line-height: 1;
}
.dir-page:hover { border-color: #47CE79; color: #1A5C30; }
.dir-page--current { background: #1A5C30; border-color: #1A5C30; color: #fff; }
.dir-page--disabled { opacity: .45; pointer-events: none; }
.dir-page--gap { border: 0; background: none; min-width: 20px; padding: 0; }
.dir-pagination__summary {
    text-align: center; color: #6b7f72; font-size: 0.875rem; margin: 0 0 48px;
}

/* --- Facility detail (inline expansion + its own page) --- */
.dir-facility { display: block; padding: 0; }
.dir-facility > details > summary {
    list-style: none; cursor: pointer; padding: 12px 14px;
}
.dir-facility > details > summary::-webkit-details-marker { display: none; }
.dir-facility__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.dir-facility > details > summary::after { content: ' ▾'; color: #6b7f72; }
.dir-facility > details[open] > summary::after { content: ' ▴'; }
.dir-facility__body {
    padding: 0 14px 14px; border-top: 1px solid #eef4f0; margin-top: 4px; padding-top: 12px;
}
.dir-facility__body p { color: #45564c; margin: 0 0 10px; line-height: 1.6; }
.dir-facility__link {
    display: inline-block; margin-top: 10px; color: #1A5C30;
    font-weight: 600; font-size: 0.875rem; text-decoration: none;
}
.dir-facility__link:hover { text-decoration: underline; }

.dir-crumbs { padding: 24px 0 0; color: #6b7f72; font-size: 0.875rem; }
.dir-crumbs a { color: #3c5647; text-decoration: none; }
.dir-crumbs a:hover { color: #1A5C30; text-decoration: underline; }
.dir-crumbs span { margin: 0 6px; }
