/* ===== DEOPR CARING FACILITY — PUBLIC SITE ===== */
/* Warm, welcoming palette — same structural pattern as the Training
   Academy site (strong primary + gold accent + clean cards) but swapped
   for warm terracotta/honey/cream instead of navy/gold/teal, since this
   is a caring facility rather than a corporate training provider. */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

:root {
    --terracotta: #001aff;
    --terracotta-deep: #2f5df4;
    --honey: #00c8ff;
    --honey-light: #9bcdff;
    --sage: #8cfb63;
    --cream: #eefffe;
    --cream-deep: #d3fbff;
    --text: #040404;
    --text-muted: #3a3937;
    --white: #fdfdfd;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--terracotta-deep);
    line-height: 1.25;
}

a {
    color: var(--terracotta);
}

/* ===== NAV ===== */
.site-nav {
    background: var(--white);
    border-bottom: 3px solid var(--honey);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nav-brand img {
    height: 44px;
    width: auto;
}
.nav-brand-text strong {
    display: block;
    color: var(--terracotta-deep);
    font-size: 17px;
}
.nav-brand-text small {
    display: block;
    color: var(--honey);
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 26px;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: 0.2s ease;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--terracotta);
    border-bottom-color: var(--honey);
}
.nav-cta {
    background: var(--terracotta);
    color: var(--white) !important;
    padding: 9px 20px !important;
    border-radius: 30px;
    border-bottom: none !important;
}
.nav-cta:hover {
    background: var(--terracotta-deep);
}

/* Dropdown for grouped secondary items (desktop only — on mobile these
   just render as regular flat links in the already-vertical menu). */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.nav-dropdown-toggle svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 12px 24px rgba(74, 55, 40, 0.15);
    padding: 8px;
    min-width: 190px;
    z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}
.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown:focus-within .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}
.nav-dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    border-bottom: none !important;
    font-size: 14px;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover {
    background: var(--cream);
    color: var(--terracotta);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    width: 24px;
    height: 3px;
    background: var(--terracotta-deep);
    border-radius: 2px;
    transition: 0.25s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 8px 24px 16px;
        box-shadow: 0 12px 20px rgba(74, 55, 40, 0.12);
    }
    .nav-links.is-open { display: flex; }
    .nav-links a {
        padding: 8px 4px 6px;
        width: 100%;
        border-bottom: 1px solid var(--cream-deep);
    }
    .nav-links li:last-of-type a { border-bottom: none; }
    .nav-dropdown-toggle {
        border-bottom: 1px solid var(--cream-deep) !important;
        padding: 8px 4px 6px;
        justify-content: space-between;
        width: 100%;
    }
    .nav-links li:has(.nav-cta),
    .nav-links li:last-child {
        margin-top: 30px;
        padding-top: 30px;
        border-top: 1px solid var(--cream-deep);
    }
    .nav-cta {
        text-align: center;
        border-bottom: none !important;
    }

    /* Community starts collapsed — .nav-dropdown-toggle click (see JS)
       adds .is-open to the parent <li>, which is the only thing that
       reveals the submenu on mobile. Desktop's hover/focus-within
       behavior is untouched, since this rule only exists inside this
       mobile media query. */
    .nav-dropdown-toggle svg { display: block; }
    .nav-dropdown-menu {
        display: none;
        flex-direction: column;
        position: static;
        box-shadow: none;
        padding: 2px 0 2px 14px;
        margin: 0;
        min-width: 0;
        gap: 0;
    }
    .nav-dropdown.is-open .nav-dropdown-menu {
        display: flex;
    }
    .nav-dropdown.is-open .nav-dropdown-toggle svg {
        transform: rotate(180deg);
    }
    .nav-dropdown-menu a {
        all: unset;
        box-sizing: border-box;
        display: block;
        width: 100%;
        padding: 6px 0 4px;
        margin: 0;
        line-height: 1.2;
        font-size: 15px;
        color: var(--text);
        border-bottom: 1px solid var(--cream-deep) !important;
        cursor: pointer;
    }
    .nav-dropdown-menu a:last-child {
        border-bottom: none !important;
    }
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--cream-deep), var(--honey-light));
    padding: 70px 8% 60px;
    text-align: center;
}
.hero img {
    height: 90px;
    width: auto;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 38px;
    margin-bottom: 12px;
}
.hero p {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 26px;
}
@media (max-width: 640px) {
    .hero { padding: 50px 6% 40px; }
    .hero h1 { font-size: 28px; }
}

/* ===== SECTIONS ===== */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 6%;
}
.section-heading {
    text-align: center;
    margin-bottom: 40px;
}
.section-heading h2 {
    font-size: 28px;
}
.section-heading p {
    color: var(--text-muted);
    margin-top: 8px;
}

/* ===== CARDS ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 26px;
}
.warm-card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(181, 86, 60, 0.08);
    border-top: 4px solid var(--honey);
}
.warm-card h3 {
    font-size: 19px;
    margin-bottom: 10px;
}
.warm-card p {
    color: var(--text-muted);
    font-size: 15px;
}
.warm-card .cost {
    display: inline-block;
    margin-top: 14px;
    color: var(--sage);
    font-weight: 700;
}

/* ===== BUTTONS ===== */
.btn-warm {
    display: inline-block;
    background: var(--terracotta);
    color: var(--white);
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-warm:hover {
    background: var(--terracotta-deep);
}
.btn-warm-outline {
    display: inline-block;
    background: transparent;
    color: var(--terracotta);
    padding: 11px 26px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    border: 2px solid var(--terracotta);
    transition: 0.2s ease;
}
.btn-warm-outline:hover {
    background: var(--terracotta);
    color: var(--white);
}

/* ===== EVENT / SERVICE LIST ROWS (alt layout for dated items) ===== */
.event-row {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--white);
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 6px 18px rgba(181, 86, 60, 0.07);
    margin-bottom: 16px;
}
.event-date-badge {
    background: var(--sage);
    color: var(--white);
    border-radius: 10px;
    padding: 10px 16px;
    text-align: center;
    min-width: 64px;
}
.event-date-badge .day { font-size: 22px; font-weight: 700; line-height: 1; }
.event-date-badge .month { font-size: 11px; text-transform: uppercase; margin-top: 4px; }

/* ===== FORMS (donation, contact, report-abuse) ===== */
.warm-form {
    background: var(--white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(181, 86, 60, 0.08);
    max-width: 560px;
    margin: 0 auto;
}
.warm-field {
    margin-bottom: 18px;
}
.warm-field label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--terracotta-deep);
}
.warm-field input,
.warm-field select,
.warm-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--cream-deep);
    background: var(--cream);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
}
.warm-field input:focus,
.warm-field select:focus,
.warm-field textarea:focus {
    outline: none;
    border-color: var(--honey);
    background: var(--white);
}

/* ===== BANNERS (donations, victim empowerment CTA) ===== */
.warm-banner {
    background: var(--terracotta);
    color: var(--white);
    border-radius: 18px;
    padding: 40px 8%;
    text-align: center;
    margin: 20px 6%;
}
.warm-banner h2 { color: var(--white); }
.warm-banner p { color: var(--honey-light); margin: 10px 0 22px; }
.warm-banner .btn-warm {
    background: var(--honey);
}
.warm-banner .btn-warm:hover {
    background: var(--honey-light);
    color: var(--terracotta-deep);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--terracotta-deep);
    color: var(--honey-light);
    padding: 40px 8% 24px;
    margin-top: 40px;
}
.site-footer a {
    color: var(--white);
}
.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-grid h4 {
    color: var(--white);
    font-size: 14px;
    margin-bottom: 12px;
}
.footer-grid p, .footer-grid a {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    text-decoration: none;
}
.footer-bottom {
    text-align: center;
    font-size: 12px;
    padding-top: 18px;
    color: var(--honey-light);
}

/* ===== BADGES ===== */
.warm-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}
.warm-badge-open { background: var(--honey-light); color: var(--terracotta-deep); }
.warm-badge-investigating { background: #b759ff; color: #7c4dff; }
.warm-badge-closed { background: #e2ebe0; color: var(--sage); }

/* ===== MEMORIAL BOARD ===== */
.memorial-hero {
    background: linear-gradient(135deg, #31c6fc, #5f95f8);
    padding: 60px 8%;
    text-align: center;
}
.memorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 24px;
}
.memorial-card {
    background: var(--white);
    border-radius: 16px;
    padding: 26px 22px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(74, 55, 40, 0.1);
    border-top: 4px solid var(--honey);
}
.memorial-card img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid var(--honey-light);
}
.memorial-card .no-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--cream-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 14px;
    color: var(--terracotta);
}
.memorial-card h3 {
    font-size: 17px;
    margin-bottom: 4px;
}
.memorial-card .dates {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}
.memorial-card .tribute {
    font-size: 14px;
    color: var(--text);
    font-style: italic;
}

/* ===== PERSONALITY TOUCHES ===== */

/* Warm handwritten accent font, used sparingly for tribute quotes and
   special callouts — not body text, which stays readable and dignified. */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&display=swap');

.handwritten {
    font-family: 'Caveat', cursive;
    font-size: 1.4em;
    color: var(--terracotta-deep);
    line-height: 1.3;
}

/* Heart-shaped photo frame — used on the Memorial Board, where it's a
   genuinely fitting, tasteful touch rather than decoration for its own
   sake. */
.heart-photo {
    width: 110px;
    height: 100px;
    margin: 0 auto 16px;
    background-size: cover;
    background-position: center;
    clip-path: path('M55,95 C20,70 0,45 0,25 C0,8 13,0 27,0 C38,0 48,7 55,20 C62,7 72,0 83,0 C97,0 110,8 110,25 C110,45 90,70 55,95 Z');
    box-shadow: 0 6px 16px rgba(181, 86, 60, 0.2);
}
.heart-photo-placeholder {
    width: 110px;
    height: 100px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--honey-light), var(--terracotta));
    clip-path: path('M55,95 C20,70 0,45 0,25 C0,8 13,0 27,0 C38,0 48,7 55,20 C62,7 72,0 83,0 C97,0 110,8 110,25 C110,45 90,70 55,95 Z');
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
}

/* Soft wave divider — replaces hard rectangular section breaks with a
   gentle curve, giving the page a softer, more organic feel. */
.wave-divider {
    display: block;
    width: 100%;
    line-height: 0;
}
.wave-divider svg {
    width: 100%;
    height: 60px;
    display: block;
}

/* Small polaroid-style tilt for memorial cards — adds warmth without
   being twee. Alternates tilt direction for a natural, un-uniform feel. */
.memorial-card:nth-child(odd) {
    transform: rotate(-1deg);
}
.memorial-card:nth-child(even) {
    transform: rotate(1deg);
}
.memorial-card:hover {
    transform: rotate(0deg) scale(1.02);
    transition: transform 0.25s ease;
}

/* Understated floating hearts on the donate banner — small, low-opacity,
   not distracting from the actual message. */
.warm-banner {
    position: relative;
    overflow: hidden;
}
.warm-banner::before,
.warm-banner::after {
    content: '♥';
    position: absolute;
    color: rgba(255, 255, 255, 0.12);
    font-size: 90px;
    line-height: 1;
}
.warm-banner::before {
    top: -20px;
    left: 4%;
    transform: rotate(-12deg);
}
.warm-banner::after {
    bottom: -30px;
    right: 5%;
    font-size: 120px;
    transform: rotate(10deg);
}

/* ===== PHOTO GALLERY ===== */
.gallery-category-heading {
    margin: 40px 0 20px;
}
.gallery-category-heading:first-child {
    margin-top: 0;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 16px;
}
.gallery-photo {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(74, 55, 40, 0.1);
    cursor: pointer;
}
.gallery-photo img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.gallery-photo:hover img {
    transform: scale(1.06);
}
.gallery-photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(74, 55, 40, 0.75), transparent);
    color: var(--white);
    padding: 24px 14px 10px;
    font-size: 13px;
    font-weight: 600;
}

/* Simple lightbox — no JS framework needed, pure CSS :target trick */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(74, 55, 40, 0.9);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.lightbox:target {
    display: flex;
}
.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
}
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    color: var(--white);
    font-size: 32px;
    text-decoration: none;
    line-height: 1;
}
/* ===== SCROLL-REVEAL ANIMATION =====
   Elements start slightly faded and shifted down, then ease into
   place once they enter the viewport — handled via IntersectionObserver
   in the shared JS. Falls back gracefully (content just shows
   immediately) if JS fails to load, since .reveal-visible would never
   get added and .reveal alone still shows the element, just without
   the transition. */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== SUBTLE HOVER POLISH ===== */
.warm-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.warm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(181, 86, 60, 0.14);
}
.btn-warm, .btn-warm-outline {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-warm:hover, .btn-warm-outline:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(181, 86, 60, 0.2);
}
.btn-warm:active, .btn-warm-outline:active {
    transform: translateY(0);
}

/* ===== WELCOME POPUP ===== */
#welcome-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(74, 55, 40, 0.55);
    z-index: 600;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.welcome-popup-card {
    background: var(--white);
    border-radius: 18px;
    max-width: 420px;
    width: 100%;
    padding: 36px 32px;
    text-align: center;
    position: relative;
}
.welcome-popup-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
}
.welcome-popup-card .icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.welcome-popup-card h2 {
    margin-bottom: 10px;
}
.welcome-popup-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
}