/* =========================================================
   FARM ANIMAL SANCTUARY DIRECTORY — THEME
   Warm farm palette: meadow greens, harvest orange,
   barn red and buttercup yellow on a soft cream base.
   ========================================================= */
:root {
    /* Base */
    --cream:        #FFF9F0;
    --sand:         #FCEFD9;
    --white:        #FFFFFF;
    --ink:          #2B2118;
    --ink-soft:     #5E5046;
    --line:         #EADCC8;

    /* Greens */
    --green-deep:   #1F5130;
    --green:        #2F7D3A;
    --leaf:         #7CB342;
    --green-tint:   #E8F4E4;

    /* Warm accents */
    --orange:       #EE7A1B;
    --orange-deep:  #C2410C;   /* white text passes contrast on this */
    --orange-tint:  #FFEBD6;
    --red:          #C0392B;
    --red-tint:     #FBE3DF;
    --yellow:       #F6C343;
    --yellow-tint:  #FFF4CC;

    /* Shape + depth */
    --radius-sm:    8px;
    --radius:       14px;
    --radius-lg:    22px;
    --shadow-sm:    0 1px 3px rgba(43, 33, 24, 0.10);
    --shadow:       0 6px 20px rgba(43, 33, 24, 0.10);
    --shadow-lg:    0 18px 44px rgba(43, 33, 24, 0.18);

    --nav-h:        68px;
    --font-body:    "Nunito", "Segoe UI", Arial, sans-serif;
    --font-head:    "Poppins", "Segoe UI", Arial, sans-serif;
}

/* =========================================================
   GLOBAL RESET + BASE
   ========================================================= */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
    font-family: var(--font-head);
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 0.5em;
}
a {
    color: var(--green);
    font-weight: 700;
}
a:hover { color: var(--orange-deep); }
img { max-width: 100%; }

:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
    border-radius: 4px;
}

.hidden {
    display: none !important;   /* ✅ forces modal to be hidden on load */
}

.wrap {
    width: min(1140px, 100% - 40px);
    margin: 0 auto;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
    background: var(--orange-deep);
    color: var(--white);
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.35);
}
.btn-primary:hover { background: #A8380A; color: var(--white); }
.btn-green {
    background: var(--green);
    color: var(--white);
    box-shadow: 0 6px 16px rgba(47, 125, 58, 0.30);
}
.btn-green:hover { background: var(--green-deep); color: var(--white); }
.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover { background: var(--white); color: var(--green-deep); }
.btn-outline {
    background: var(--white);
    color: var(--ink);
    border-color: var(--line);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange-deep); }

/* =========================================================
   NAVIGATION BAR
   ========================================================= */
.navbar {
    width: 100%;
    height: var(--nav-h);
    background: var(--white);
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 4000;
    box-shadow: 0 2px 0 var(--line);
}
/* Rainbow harvest stripe under the bar */
.navbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -5px;
    height: 3px;
    background: linear-gradient(90deg, var(--green) 0 25%, var(--yellow) 25% 50%, var(--orange) 50% 75%, var(--red) 75% 100%);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}
.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
}
.logo-mark svg { display: block; width: 100%; height: 100%; }
.nav-title {
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.1;
    display: block;
}
.nav-sub {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--orange-deep);
}

.nav-right {
    display: flex;
    gap: 6px;
}
.nav-link {
    position: relative;
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 999px;
    transition: background 0.15s, color 0.15s;
}
.nav-link:hover {
    background: var(--orange-tint);
    color: var(--orange-deep);
}
.nav-link.active {
    background: var(--green);
    color: var(--white);
}

.hamburger { display: none; }

/* =========================================================
   HOME — HERO
   ========================================================= */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 12%, rgba(246, 195, 67, 0.55), transparent 32%),
        radial-gradient(circle at 70% 110%, rgba(238, 122, 27, 0.45), transparent 40%),
        linear-gradient(135deg, var(--green-deep) 0%, #2A6A36 60%, var(--green) 100%);
    color: var(--white);
    padding: 72px 0 96px;
}
/* Rolling hills along the bottom edge */
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 70px;
    background: var(--cream);
    clip-path: path("M0 40 C 240 0, 480 70, 760 34 S 1280 10, 2400 50 L 2400 80 L 0 80 Z");
}
.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
    align-items: center;
}
.eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--yellow-tint);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.hero h1 {
    color: var(--white);
    font-size: clamp(34px, 4.6vw, 54px);
    font-weight: 700;
    margin: 18px 0 16px;
}
.hero h1 .highlight {
    color: var(--yellow);
}
.hero p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.92);
    max-width: 560px;
    margin: 0 0 28px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Quick stats under the hero buttons */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 34px;
    max-width: 560px;
}
.stat {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    padding: 12px 10px;
    text-align: center;
}
.stat strong {
    display: block;
    font-family: var(--font-head);
    font-size: 26px;
    line-height: 1.1;
    color: var(--yellow);
}
.stat span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
}

/* =========================================================
   CAROUSEL (sits in the hero)
   ========================================================= */
.carousel-section {
    position: relative;
}
.carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--sand);
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--white);
    transform: rotate(1.5deg);
}
.carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.carousel-img.active {
    opacity: 1;
}
.carousel-dots {
    margin-top: 18px;
    text-align: center;
}
.carousel-dot {
    height: 10px;
    width: 10px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    display: inline-block;
    margin: 0 4px;
    cursor: pointer;
    transition: width 0.25s, background 0.25s;
}
.carousel-dot.active {
    width: 28px;
    background: var(--yellow);
}

/* =========================================================
   HOME — SECTIONS
   ========================================================= */
.section {
    padding: 64px 0;
}
.section-title {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
}
.section-title h2 {
    font-size: clamp(26px, 3vw, 36px);
}
.section-title p {
    color: var(--ink-soft);
    margin: 0;
}
.kicker {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange-deep);
    margin-bottom: 8px;
}

/* "Ways to get involved" cards */
.involve-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.involve-card {
    --accent: var(--green);
    --tint: var(--green-tint);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 26px 22px 22px;
    box-shadow: var(--shadow);
    border-top: 6px solid var(--accent);
    text-decoration: none;
    color: var(--ink);
    font-weight: 400;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.involve-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}
.involve-card .icon-bubble {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    font-size: 28px;
    border-radius: 18px;
    background: var(--tint);
    margin-bottom: 16px;
}
.involve-card h3 {
    font-size: 20px;
    margin-bottom: 6px;
}
.involve-card p {
    color: var(--ink-soft);
    font-size: 15px;
    margin: 0 0 16px;
    flex: 1;
}
.involve-card .go {
    font-weight: 800;
    color: var(--accent);
    font-size: 15px;
}
.involve-card.c-orange { --accent: var(--orange-deep); --tint: var(--orange-tint); }
.involve-card.c-yellow { --accent: #9A6B00;           --tint: var(--yellow-tint); border-top-color: var(--yellow); }
.involve-card.c-red    { --accent: var(--red);         --tint: var(--red-tint); }

/* Disclaimers */
.disclaimer-section {
    background: var(--white);
    margin-bottom: 64px;
}
.disclaimer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.disclaimer-card {
    display: flex;
    gap: 16px;
    background: var(--yellow-tint);
    border: 1px solid #F1D98A;
    border-left: 6px solid var(--yellow);
    padding: 20px 22px;
    border-radius: var(--radius);
}
.disclaimer-card .num {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--ink);
    font-family: var(--font-head);
    font-weight: 700;
    display: grid;
    place-items: center;
}
.disclaimer-card h3 { font-size: 17px; margin-bottom: 4px; }
.disclaimer-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* Feedback call-to-action band */
.feedback-section {
    padding: 0 0 72px;
}
.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 36px 40px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 95% 0%, rgba(246, 195, 67, 0.6), transparent 40%),
        linear-gradient(120deg, var(--orange-deep) 0%, #C9442A 55%, var(--red) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}
.cta-band h2 { color: var(--white); margin-bottom: 6px; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, 0.95); max-width: 620px; }
.cta-band .btn {
    background: var(--white);
    color: var(--red);
}
.cta-band .btn:hover { background: var(--yellow-tint); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: var(--green-deep);
    color: rgba(255, 255, 255, 0.85);
    padding: 40px 0 28px;
    font-size: 15px;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.site-footer strong {
    font-family: var(--font-head);
    color: var(--white);
    font-size: 17px;
}
.site-footer p { margin: 6px 0 0; }
.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.footer-links a {
    color: var(--yellow);
    text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; color: var(--yellow); }
.footer-meta {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* =========================================================
   INNER PAGE HEADER (Directory + Contact)
   ========================================================= */
.page-hero {
    background:
        radial-gradient(circle at 90% 0%, rgba(246, 195, 67, 0.5), transparent 35%),
        linear-gradient(135deg, var(--green-deep), var(--green));
    color: var(--white);
    padding: 44px 0 72px;
    position: relative;
}
.page-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 40px;
    background: var(--cream);
    clip-path: path("M0 24 C 300 0, 600 40, 900 20 S 1500 6, 2400 30 L 2400 40 L 0 40 Z");
}
.page-hero h1 {
    color: var(--white);
    font-size: clamp(30px, 4vw, 42px);
    margin-bottom: 6px;
}
.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    max-width: 640px;
}

/* =========================================================
   MAP PAGE
   ========================================================= */
.map-container {
    position: relative;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    overflow: hidden;
}
#map {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #DDEBD5;
}

/* Floating "Filters" button */
.filter-toggle {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 1001;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange-deep);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(194, 65, 12, 0.4);
    transition: transform 0.15s, background 0.15s;
}
.filter-toggle:hover { transform: translateY(-2px); background: #A8380A; }
.filter-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--ink);
    font-size: 13px;
    display: inline-grid;
    place-items: center;
}
.filter-count:empty { display: none; }

/* Filter panel — floating card on desktop */
.filter-panel {
    position: absolute;
    top: 18px;
    left: 18px;
    bottom: 18px;
    width: 350px;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1002;
    transform: translateX(calc(-100% - 30px));
    transition: transform 0.3s ease-in-out;
}
.filter-panel.open {
    transform: translateX(0);
}
.panel-head {
    position: relative;
    padding: 20px 56px 18px 22px;
    background:
        radial-gradient(circle at 100% 0%, rgba(246, 195, 67, 0.6), transparent 45%),
        linear-gradient(135deg, var(--green-deep), var(--green));
    color: var(--white);
}
.panel-head h2 {
    color: var(--white);
    font-size: 20px;
    margin: 0;
}
.panel-head p {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--yellow-tint);
    font-weight: 700;
}
.filter-close-btn {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}
.filter-close-btn:hover { background: rgba(255, 255, 255, 0.32); }

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 6px 22px 22px;
}
.label {
    display: block;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 16px 0 8px;
}
.label small {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--ink-soft);
    font-size: 13px;
}

/* Search field with icon */
.search-field {
    position: relative;
}
.search-field .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border-radius: 12px;
    border: 2px solid var(--line);
    background: var(--cream);
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--ink);
    transition: border-color 0.15s, background 0.15s;
}
.search-input:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--white);
}

/* Animal pills (replace the old dropdown) */
.animal-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pill {
    position: relative;
    cursor: pointer;
}
.pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.pill span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 2px solid var(--line);
    background: var(--white);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-soft);
    transition: all 0.15s;
    user-select: none;
}
.pill:hover span {
    border-color: var(--leaf);
    color: var(--ink);
}
.pill input:checked + span {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(47, 125, 58, 0.3);
}
.pill input:focus-visible + span {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

/* Feature tiles (Visit / Stay / Volunteer / Café) */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.feature-tile {
    --accent: var(--green);
    --tint: var(--green-tint);
    position: relative;
    cursor: pointer;
}
.feature-tile input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.feature-tile .tile {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    padding: 9px 12px;
    border-radius: 14px;
    border: 2px solid var(--line);
    background: var(--white);
    transition: all 0.15s;
    user-select: none;
}
.feature-tile .tile-icon {
    font-size: 22px;
    line-height: 1.2;
}
.feature-tile strong {
    font-size: 15px;
    color: var(--ink);
}
.feature-tile small {
    font-size: 12px;
    line-height: 1.3;
    color: var(--ink-soft);
}
.feature-tile:hover .tile { border-color: var(--accent); }
.feature-tile input:checked + .tile {
    background: var(--tint);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}
.feature-tile input:checked + .tile::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    display: grid;
    place-items: center;
}
.feature-tile input:focus-visible + .tile {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}
.feature-tile.t-stay  { --accent: var(--orange-deep); --tint: var(--orange-tint); }
.feature-tile.t-vol   { --accent: #B7860B;            --tint: var(--yellow-tint); }
.feature-tile.t-cafe  { --accent: var(--red);          --tint: var(--red-tint); }

/* Panel footer: clear + show results */
.panel-foot {
    display: flex;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
    background: var(--cream);
}
.clear-filters-btn {
    flex: 1;
    background: var(--white);
    border: 2px solid var(--red);
    color: var(--red);
    padding: 11px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 800;
    transition: background 0.15s, color 0.15s;
}
.clear-filters-btn:hover:not(:disabled) {
    background: var(--red);
    color: var(--white);
}
.clear-filters-btn:disabled {
    border-color: var(--line);
    color: #A89A8C;
    cursor: default;
}
.show-results-btn {
    flex: 1.3;
    padding: 11px 14px;
    font-size: 15px;
}

/* Pin counter + legend */
.pin-counter {
    position: absolute;
    bottom: 24px;
    right: 18px;
    background: var(--green-deep);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: var(--shadow);
    z-index: 1000;
    pointer-events: none;
}
.map-legend {
    position: absolute;
    bottom: 76px;
    right: 18px;
    z-index: 1000;
    background: var(--white);
    border-radius: var(--radius);
    padding: 12px 16px;
    box-shadow: var(--shadow);
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
}
.map-legend strong {
    display: block;
    font-family: var(--font-head);
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 4px;
}
.legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.9;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.legend-dot.open    { background: var(--green); }
.legend-dot.arrange { background: var(--orange); }
.legend-dot.closed  { background: var(--red); }

/* Map pins (Leaflet divIcon) */
.pin {
    background: none;
    border: none;
}
.pin-shape {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--pin, var(--green));
    border: 3px solid var(--white);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s;
}
.pin-shape::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--white);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.pin:hover .pin-shape { transform: rotate(-45deg) scale(1.15); }
.pin-open    { --pin: var(--green); }
.pin-arrange { --pin: var(--orange); }
.pin-closed  { --pin: var(--red); }

.leaflet-tooltip.pin-tip {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 13px;
    color: var(--ink);
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 5px 10px;
}
.leaflet-container {
    font-family: var(--font-body);
}
/* Soften the busy OpenStreetMap colours so the coloured pins stand out */
.leaflet-tile-pane {
    filter: saturate(0.7) brightness(1.04) contrast(0.92);
}
.leaflet-top.leaflet-right { margin-top: 6px; }

/* First-visit hint */
.map-hint {
    position: fixed;
    top: calc(var(--nav-h) + 20px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 560px;
    padding: 12px 18px;
    background: var(--yellow-tint);
    border: 2px solid var(--yellow);
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    color: var(--ink);
    box-shadow: var(--shadow);
    z-index: 999;
}

/* =========================================================
   MODAL (sanctuary details)
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(31, 43, 26, 0.55);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}
.modal-content {
    width: 95%;
    max-width: 560px;
    max-height: 90vh;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    animation: popIn 0.2s ease-out;
}
@keyframes popIn {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--ink);
    z-index: 10000;
}
.close-btn:hover { background: var(--yellow-tint); }
.modal-scroll {
    max-height: 90vh;
    overflow-y: auto;
}

/* Compact header: small logo beside the name */
.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 64px 18px 22px;
    background: linear-gradient(135deg, var(--cream), var(--sand));
    border-bottom: 1px solid var(--line);
}
.modal-logo {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    padding: 6px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* many photos are logos — don't crop them */
    display: block;
}
.modal-header h2 {
    font-size: 21px;
    margin-bottom: 2px;
}
.modal-location {
    color: var(--ink-soft);
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}
.modal-body-inner {
    padding: 4px 22px 22px;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}
.status-pill.open    { background: var(--green-tint);  color: var(--green-deep); }
.status-pill.arrange { background: var(--orange-tint); color: #8A3A06; }
.status-pill.closed  { background: var(--red-tint);    color: #8E2A1F; }

.section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}
.section-heading .icon { font-size: 16px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--green-tint);
    padding: 4px 10px;
    border-radius: 999px;
    margin: 0 5px 6px 0;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--green-deep);
    border: 1px solid #CDE6C6;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.feature-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 7px 10px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.3;
}
.feature-item .icon { font-size: 16px; line-height: 1.2; }
.feature-item strong { display: block; font-size: 13.5px; }
.feature-item.badge-yes { background: var(--green-tint); color: var(--green-deep); }
.feature-item.badge-no  { background: #F6F1EA;           color: #7A6D62; }

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    background: var(--green-tint);
    color: var(--green-deep);
    border: 2px solid transparent;
    transition: all 0.15s;
}
.link-btn:hover {
    border-color: var(--green);
    color: var(--green-deep);
}
.link-btn.stay { background: var(--orange-tint); color: #8A3A06; }
.link-btn.stay:hover { border-color: var(--orange); }
.link-btn.nav-btn {
    background: var(--orange-deep);
    color: var(--white);
}
.link-btn.nav-btn:hover { background: #A8380A; color: var(--white); }

/* =========================================================
   DIRECTORY PAGE
   ========================================================= */
.page-container {
    padding: 0 0 64px;
    min-height: calc(100vh - 356px);   /* keeps the footer at the bottom on short pages */
}
.directory-tools {
    position: relative;
    z-index: 2;
    margin-top: -40px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}
.directory-tools .search-field {
    flex: 1 1 320px;
}
#dirSearch {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-family: var(--font-body);
    font-size: 16px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--cream);
    color: var(--ink);
}
#dirSearch:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--white);
}
.result-count {
    font-weight: 800;
    color: var(--green-deep);
    background: var(--green-tint);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 15px;
    white-space: nowrap;
}

.card-list {
    margin-top: 28px;
}
#directoryContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}
.card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.card-photo {
    height: 170px;
    padding: 10px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* many photos are logos — don't crop them */
    display: block;
}
.card-body .status-pill {
    align-self: flex-start;
    margin-bottom: 10px;
}
.card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card h3 {
    font-size: 19px;
    margin-bottom: 2px;
}
.card .where {
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
}
.card .animals {
    font-size: 22px;
    letter-spacing: 2px;
    margin-bottom: 10px;
    min-height: 30px;
}
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.mini-tag {
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}
.mini-tag.stay { background: var(--orange-tint); color: #8A3A06; }
.mini-tag.vol  { background: var(--yellow-tint); color: #6B4A00; }
.mini-tag.cafe { background: var(--red-tint);    color: #8E2A1F; }
.mini-tag.shop { background: var(--green-tint);  color: var(--green-deep); }
.card-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.card-actions a {
    font-size: 14px;
    padding: 8px 12px;
}
.card-actions .btn-primary {
    grid-column: 1 / -1;
}
.card-actions .btn:hover { transform: none; }
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    color: var(--ink-soft);
}

/* =========================================================
   RESOURCES PAGE
   ========================================================= */
.resource-list {
    position: relative;
    z-index: 2;
    margin-top: -40px;
    display: grid;
    gap: 18px;
    max-width: 860px;
}
.resource-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 26px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border-left: 6px solid var(--orange);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--ink);
    font-weight: 400;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}
.resource-icon {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    font-size: 28px;
    border-radius: 18px;
    background: var(--orange-tint);
}
.resource-text {
    flex: 1;
    min-width: 0;
}
.resource-type {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--orange-deep);
}
.resource-card h2 {
    font-size: 19px;
    margin: 2px 0 4px;
}
.resource-source {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-soft);
}
.resource-go {
    flex-shrink: 0;
    font-weight: 800;
    font-size: 15px;
    color: var(--green);
}
@media (max-width: 768px) {
    .resource-card {
        flex-wrap: wrap;
        padding: 20px;
        gap: 14px;
    }
    .resource-text { flex-basis: calc(100% - 72px); }
    .resource-go { flex-basis: 100%; }
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-container {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: -40px auto 64px;
    padding: 34px 38px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-top: 6px solid var(--orange);
}
.contact-container > p {
    color: var(--ink-soft);
    margin-top: 0;
}
.two-col {
    display: flex;
    gap: 20px;
}
.two-col .form-group { flex: 1; }
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 800;
    font-size: 15px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 13px 16px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--ink);
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--cream);
    transition: border-color 0.15s, background 0.15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--white);
}
.submit-btn {
    background: var(--orange-deep);
    color: var(--white);
    padding: 14px 30px;
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(194, 65, 12, 0.3);
    transition: transform 0.15s, background 0.15s;
}
.submit-btn:hover { background: #A8380A; transform: translateY(-2px); }
.form-status {
    font-weight: 800;
    color: var(--green-deep);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
    .hero-grid { grid-template-columns: 1fr; }
    .carousel-section { max-width: 620px; }
    .involve-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --nav-h: 62px; }
    body { font-size: 16px; }

    .navbar { padding: 0 16px; }
    .nav-title { font-size: 16px; }
    .nav-sub { font-size: 11px; }
    .logo-mark { width: 38px; height: 38px; }

    /* Mobile: show hamburger */
    .hamburger {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        font-size: 24px;
        background: var(--orange-tint);
        color: var(--orange-deep);
        border: none;
        border-radius: 12px;
        cursor: pointer;
        position: relative;
        z-index: 6000;
    }

    /* Mobile: dropdown menu */
    .nav-right {
        display: none;
        flex-direction: column;
        gap: 4px;
        background: var(--white);
        position: absolute;
        top: calc(var(--nav-h) + 6px);
        right: 12px;
        width: 220px;
        padding: 10px;
        border-radius: var(--radius);
        box-shadow: var(--shadow-lg);
        z-index: 5000;
    }
    .nav-right.open { display: flex; }
    .nav-link { padding: 10px 16px; }

    .hero { padding: 44px 0 80px; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .carousel { transform: none; }

    .section { padding: 44px 0; }
    .involve-grid,
    .disclaimer-grid { grid-template-columns: 1fr; }
    .cta-band { padding: 28px 24px; }

    .two-col { flex-direction: column; gap: 0; }
    .contact-container { padding: 26px 20px; margin: -40px 12px 44px; }

    /* Map: filter panel becomes a bottom sheet */
    .filter-toggle { top: 12px; left: 12px; }
    .filter-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 85%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        transform: translateY(105%);
    }
    .filter-panel.open { transform: translateY(0); }
    .pin-counter { bottom: 16px; right: 12px; }
    .map-legend { bottom: 66px; right: 12px; padding: 10px 12px; }
    .map-hint { font-size: 14px; top: calc(var(--nav-h) + 70px); }

    /* Mobile modal: bottom sheet */
    .modal {
        align-items: flex-end;
        padding: 0;
    }
    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        animation: slideUp 0.25s ease-out;
    }
    .modal-scroll { max-height: 90vh; }
    .modal-header { padding: 18px 60px 16px 18px; gap: 12px; }
    .modal-logo { width: 68px; height: 68px; padding: 4px; border-radius: 12px; }
    .modal-header h2 { font-size: 19px; }
    .modal-body-inner { padding: 2px 18px 20px; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@media (min-width: 769px) {
    .show-results-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
