/* ============================================================
   directory.css
   Directory hub page (directory.php) + shared directory styles
   Uses the site's existing CSS variable system from styles.css
   ============================================================ */

:root {
    --ac-l: #fdebd0; /* light accent, matches page-standard.css / things-to-do.css */
}

/* ============================================================
   EDITORIAL
   Full text always in the DOM. Collapsible only at mobile
   widths — desktop always shows it fully expanded, no toggle.
   ============================================================ */
.dir-editorial {
    background: var(--wh);
    border: 1px solid var(--bd);
    border-left: 4px solid var(--ac);
    border-radius: 10px;
    padding: 1.1rem 1.5rem;
}

.dir-editorial-body p {
    font-size: 0.9rem;
    color: var(--mu);
    line-height: 1.65;
    margin-bottom: 0;
}

.dir-editorial-body a {
    color: var(--pr);
}

.dir-editorial-body a:hover {
    color: var(--ac);
}

.dir-editorial-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.dir-editorial-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 999px;
    text-decoration: none;
    background: var(--ac);
    color: #fff !important;
    border: 1.5px solid var(--ac);
    transition: background 0.15s, border-color 0.15s;
}

.dir-editorial-cta:hover {
    background: #ca6f1e;
    border-color: #ca6f1e;
    color: #fff !important;
}

.dir-editorial-toggle {
    display: none; /* hidden on desktop - full text always shown */
}

@media (max-width: 767px) {
    .dir-editorial-body {
        max-height: 48px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .dir-editorial-body.open {
        max-height: 500px;
    }
    .dir-editorial-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--pr);
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
    }
    .dir-editorial-toggle i {
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }
    .dir-editorial-toggle.open i {
        transform: rotate(180deg);
    }
}

/* ============================================================
   GRID INTRO HEADING
   Sits above the card grid, always visible (not part of the
   collapsible editorial block) — a second real heading for
   both visitors and search engines.
   ============================================================ */
.dir-grid-intro {
    margin-bottom: 1.25rem;
}

.dir-grid-intro h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--pr);
    margin-bottom: 0.4rem;
}

.dir-grid-intro p {
    font-size: 0.88rem;
    color: var(--mu);
    margin-bottom: 0;
}

/* ============================================================
   SEARCH FEATURE
   Its own prominent band, not a form tucked beside text
   ============================================================ */
.dir-search-band {
    background: var(--pr-l);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.dir-search-prompt {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pr);
    margin-bottom: 1rem;
}

.dir-search {
    display: flex;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
}

.dir-search input {
    flex: 1;
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 0.75rem 1.1rem;
    font-size: 0.95rem;
    color: var(--tx);
}

.dir-search input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--pr);
}

.dir-search button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: var(--ac);
    color: var(--wh);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0 8px 8px 0;
    padding: 0 1.3rem;
    cursor: pointer;
    transition: background 0.15s;
}

.dir-search button:hover {
    background: #ca6f1e;
}

.dir-search button:focus-visible,
.dir-search input:focus-visible {
    outline: 2px solid var(--pr);
    outline-offset: 2px;
}

/* ============================================================
   AD SLOT
   ============================================================ */
.dir-ad-slot {
    min-height: 0; /* collapses cleanly if left empty */
    text-align: center;
}

/* ============================================================
   FEATURED STRIP
   Same interaction pattern as .ev-feat-scroll on the events page
   ============================================================ */
.dir-sect-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mu);
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ac);
    display: inline-block;
}

.dir-feat-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--bd) transparent;
    -webkit-overflow-scrolling: touch;
}

.dir-feat-scroll::-webkit-scrollbar { height: 4px; }
.dir-feat-scroll::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 2px; }

.dir-feat-card {
    min-width: 220px;
    max-width: 240px;
    background: var(--wh);
    border: 1px solid var(--bd);
    border-top: 3px solid var(--ac);
    border-radius: 10px;
    padding: 0 1.1rem 1rem;
    flex-shrink: 0;
    transition: box-shadow 0.15s;
    overflow: hidden;
}

.dir-feat-img {
    margin: 0 -1.1rem 0.85rem;
    height: 110px;
    overflow: hidden;
}

.dir-feat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.dir-feat-card:hover .dir-feat-img img {
    transform: scale(1.04);
}

.dir-feat-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--pr-l);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dir-feat-img-placeholder i {
    font-size: 1.8rem;
    color: var(--pr);
    opacity: 0.5;
}

.dir-feat-cat {
    margin-top: 0.85rem;
}

.dir-feat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}

.dir-feat-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.dir-feat-cat {
    font-size: 0.72rem;
    color: var(--ac);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.dir-feat-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tx);
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.dir-feat-desc {
    font-size: 0.8rem;
    color: var(--mu);
    line-height: 1.5;
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.dir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.dir-card {
    background: var(--wh);
    border: 1px solid var(--bd);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.15s, transform 0.15s;
}

.dir-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.dir-card-link {
    display: block;
    padding: 1.5rem 1.25rem 0.9rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.dir-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    background: var(--ac-l);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.dir-card-icon i {
    color: var(--ac);
    font-size: 1.4rem;
}

.dir-card:hover .dir-card-icon {
    background: var(--ac);
}

.dir-card:hover .dir-card-icon i {
    color: var(--wh);
}

.dir-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pr);
    margin: 0 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--ac);
    display: inline-block;
}

.dir-card-subtitle {
    font-size: 0.82rem;
    color: var(--mu);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

.dir-card-count {
    font-size: 0.75rem;
    color: var(--mu);
    font-weight: 600;
}

.dir-card-subcats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 1.25rem 1.25rem;
}

.dir-card-subcats a {
    font-size: 0.76rem;
    color: var(--pr);
    background: var(--bg);
    border: 1px solid var(--bd);
    border-radius: 999px;
    padding: 3px 11px;
    text-decoration: none;
    transition: all 0.15s;
}

.dir-card-subcats a:hover {
    border-color: var(--pr);
    background: var(--pr-l);
}

/* ============================================================
   DISCLAIMER
   ============================================================ */
.dir-disclaimer {
    font-size: 0.78rem;
    color: var(--mu);
    margin-top: 1.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bd);
    font-style: italic;
}

/* ============================================================
   CATEGORY PAGE — BREADCRUMB
   ============================================================ */
.dir-breadcrumb {
    padding: 0.5rem 0 1rem;
    font-size: 0.82rem;
    color: var(--mu);
}

.dir-breadcrumb a {
    color: var(--pr);
    text-decoration: none;
}

.dir-breadcrumb a:hover {
    text-decoration: underline;
}

.dir-breadcrumb .sep {
    margin: 0 0.4rem;
    color: var(--bd);
}

/* ============================================================
   CATEGORY PAGE — SUMMARY + NARROW DOWN
   ============================================================ */
.dir-included {
    background: var(--bg);
    border: 1px solid var(--bd);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.83rem;
    color: var(--mu);
    line-height: 1.55;
    margin-top: 1.25rem;
}

.dir-included i {
    color: var(--pr);
    margin-right: 0.35rem;
}

.dir-included a {
    color: var(--pr);
}

.dir-included a:hover {
    color: var(--ac);
}

.dir-cat-summary {
    font-size: 0.92rem;
    color: var(--mu);
    line-height: 1.65;
    margin: 0.5rem 0 1.25rem;
    max-width: 70ch;
}

.dir-narrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.dir-narrow-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mu);
    margin-right: 0.25rem;
}

.dir-narrow a {
    font-size: 0.82rem;
    color: var(--pr);
    background: var(--bg);
    border: 1px solid var(--bd);
    border-radius: 999px;
    padding: 4px 13px;
    text-decoration: none;
    transition: all 0.15s;
}

.dir-narrow a:hover {
    border-color: var(--pr);
    background: var(--pr-l);
}

/* Fallback guides shown under a "no results" message — rendered with the
   standard result cards, so only the intro line needs its own styling */
.dir-fallback {
    margin-top: 0.25rem;
}

.dir-fallback p {
    font-size: 0.88rem;
    color: var(--mu);
    margin-bottom: 0.75rem;
}

.dir-result-count {
    font-size: 0.82rem;
    color: var(--mu);
    margin-bottom: 1rem;
}

/* ============================================================
   RESULT CARDS
   ============================================================ */
.dir-results {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.dir-result-card {
    background: var(--wh);
    border: 1px solid var(--bd);
    border-radius: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dir-result-card:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dir-result-card a {
    display: block;
    padding: 0.85rem 1.1rem;
    text-decoration: none;
    color: inherit;
}

.dir-result-title {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--pr);
    margin-bottom: 0.3rem;
}

.dir-result-desc {
    font-size: 0.84rem;
    color: var(--mu);
    line-height: 1.55;
}

.dir-result-cat {
    font-size: 0.76rem;
    color: var(--pr);
    margin-top: 0.4rem;
}

.dir-result-cat i {
    margin-right: 0.3rem;
}

.dir-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--mu);
    font-size: 0.9rem;
}

.dir-empty i {
    display: block;
    margin-bottom: 0.75rem;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.dir-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bd);
    font-size: 0.85rem;
}

.dir-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--pr);
    text-decoration: none;
    font-weight: 600;
    border: 1.5px solid var(--pr);
    border-radius: 999px;
    padding: 6px 15px;
    transition: all 0.15s;
}

.dir-page-btn:hover {
    background: var(--pr-l);
}

.dir-page-btn.disabled {
    color: var(--bd);
    border-color: var(--bd);
    cursor: default;
    pointer-events: none;
}

.dir-page-status {
    color: var(--mu);
}

/* ============================================================
   LISTING PAGE — description text + accent button
   Directory-owned equivalents of the ev-description/ev-btn
   pattern, not shared with attraction-detail.css.
   ============================================================ */
.dir-description {
    font-size: 0.95rem;
    color: var(--tx);
    line-height: 1.7;
}

.dir-description p {
    margin-bottom: 1rem;
}

.dir-description p:last-child {
    margin-bottom: 0;
}

.dir-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    border: none;
    cursor: pointer;
}

.dir-btn-accent {
    background: var(--ac);
    color: #fff;
}

.dir-btn-accent:hover {
    background: #ca6f1e;
    color: #fff;
}

.dir-btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 576px) {
    .dir-search {
        flex-direction: column;
        max-width: 100%;
    }
    .dir-search input {
        border-radius: 8px;
        margin-bottom: 0.6rem;
    }
    .dir-search button {
        border-radius: 8px;
        justify-content: center;
        padding: 0.75rem;
    }
    .dir-search-band {
        padding: 1.5rem 1rem;
    }
    .dir-grid {
        grid-template-columns: 1fr;
    }
}
