/* ===============================
   Directory page styles
================================ */

.directory-page h1 {
    margin: 0 0 12px;
}

.directory-background {
    position: relative;
    background-color: #fff;
    overflow: hidden;
    min-height: 100svh;
}

.directory-background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: max(100svh, 920px);
    background-image:
  url("../assets/logos/2 Green/3x/Green _ Ball@3x.png"),
  url("../assets/logos/2 Green/3x/Green _ Coconut@3x.png"),
  url("../assets/logos/2 Green/3x/Green _ Disco@3x.png"),
  url("../assets/logos/2 Green/3x/Green _ Guitar@3x.png"),
  url("../assets/logos/2 Green/3x/Green _ Vinyl@3x.png");
background-repeat: no-repeat;
background-size: 200px, 220px, 260px, 200px, 220px;
background-position:
  48px 72px,
  calc(100% - 300px) 180px,
  calc(50% - 130px) 560px,
  110px 500px,
  calc(100% - 260px) 700px;
    opacity: 0.38;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: multiply;
  }

.directory-background > * {
    position: relative;
    z-index: 1;
}

/* ===============================
   Filters row
================================ */

.directory-filters {
    display: grid;
    grid-template-columns: 1.3fr 0.85fr;
    gap: 8px 14px;
    margin-top: 1px;

    /* Align by control bottom */
    align-items: end;
}

/* Search column */
.filter-search {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    gap: 6px;
    grid-column: 1 / 2;
    grid-row: 1;
}

/* Search input */
.filter-search .field-input {
    width: 100%;
    height: 46px;
    padding: 12px;
    box-sizing: border-box;
    border-radius: var(--radius-control);
    border: 1px solid rgb(57 28 28 / 18%);
    background: #fff;
    font-family: var(--font-body);
    font-size: var(--size-body);
    color: var(--globe-charcoal);
    box-shadow: 0 6px 14px rgb(241 107 129 / 6%);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.directory-meet {
    margin: 22px 0 0;
    color: var(--globe-red);
    font-size: clamp(42px, 4.2vw, 55px);
    line-height: 1.08;
    opacity: 0.95;
    text-align: center;
}

/* ===============================
   Categories dropdown
================================ */

.filter-categories {
    flex: 0.85;
    position: relative;
    height: 46px;
    box-sizing: border-box;
    border: 1px solid rgb(57 28 28 / 18%);
    border-radius: var(--radius-control);
    background: #fff;
    box-shadow: 0 6px 14px rgb(241 107 129 / 6%);
    grid-column: 2 / 3;
    grid-row: 1;
}

/* Summary behaves like input */
.filter-categories summary {
    list-style: none;
    appearance: none;
    width: 100%;
    height: 46px;
    padding: 12px;
    box-sizing: border-box;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: var(--radius-control);
}

.filter-categories summary::-webkit-details-marker {
    display: none;
}

/* Open state */
.filter-categories[open] summary {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* ===============================
   Category chips
================================ */

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 12px;
}

.filter-clear {
    flex: 0 0 100%;
    width: fit-content;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--globe-red);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.filter-clear:disabled {
    opacity: 0.45;
    cursor: default;
    text-decoration: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-chip);
    border: 1px solid rgb(57 28 28 / 16%);
    background: rgb(240 78 35 / 8%);
    color: var(--globe-charcoal);
    font-size: var(--size-body-small);
    font-weight: 700;
    cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.filter-chip input {
    accent-color: var(--globe-red);
}

.filter-search .field-input:focus {
    outline: none;
    border-color: var(--globe-red);
    box-shadow: 0 0 0 3px rgb(240 78 35 / 15%);
}

/* Dropdown panel */
.filter-categories[open] .filter-chips {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 10;
    background: #fff;
    border: 1px solid rgb(57 28 28 / 18%);
    border-radius: var(--radius-control);
    box-shadow: 0 10px 30px rgb(241 107 129 / 12%);
}

/* ===============================
   Map + directory
================================ */

.directory-map {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    align-items: center;
    margin-top: 28px;
}

.map-embed {
    min-height: 350px;
    height: 100%;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    display: block;
}

.directory-grid {
    margin-top: 32px;
    display: grid;
    gap: 18px;
}

.directory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    align-content: flex-start;
    min-height: clamp(320px, 42vh, 560px);
}

/* ===============================
   Cards
================================ */

.directory-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-tile);
    padding: 0;
    flex: 0 1 320px;
    max-width: 320px;
    min-height: 0;
    text-decoration: none;
    color: var(--globe-charcoal);
    box-shadow: 0 16px 30px rgb(57 28 28 / 16%);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.directory-card__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-tile);
    overflow: hidden;
    position: relative;
    background: var(--placeholder-bg);
}

.directory-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.directory-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 16px;
    background: rgb(57 28 28 / 60%);
    color: var(--globe-cream);
}

.directory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 36px rgb(57 28 28 / 20%);
}

.directory-card__title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: inherit;
}


/* ===============================
   Responsive
================================ */

@media (width <= 900px) {
    .directory-filters {
        grid-template-columns: 1fr;
        row-gap: 10px;
        align-items: stretch;
    }

    .filter-search,
    .filter-categories {
        width: 100%;
        grid-column: auto;
        grid-row: auto;
    }

    .directory-meet {
        margin-top: 16px;
        font-size: clamp(34px, 8vw, 44px);
    }

    .directory-map {
        grid-template-columns: 1fr;
    }

    .map-embed {
        min-height: 280px;
    }

    .directory-list {
        min-height: 300px;
    }
}

@media (width <= 640px) {
    .directory-background::before {
        background-position:
          24px 72px,
          calc(100% - 180px) 220px,
          calc(50% - 95px) 520px,
          18px 430px,
          calc(100% - 170px) 620px;
    }

    .directory-list {
        min-height: 240px;
    }

    .directory-grid {
        margin-top: 24px;
        gap: 14px;
    }

    .directory-card {
        padding: 12px 14px 14px;
    }

    .directory-card__title {
        font-size: 19px;
    }

    .directory-map {
        gap: 16px;
    }

    .map-embed {
        min-height: 220px;
    }
}
