/* =========================
   Base / Bootstrap tweaks
   ========================= */

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* =========================
   Family theme (beige/brown)
   ========================= */

:root {
    --family-bg: #e6dccf; /* medium warm tan */
    --family-card: #f3ede4; /* lighter card surface */
    --family-primary: #7a5f43; /* headings / links */
    --family-secondary: #a68a6a;
    --family-text: #3b2e22;
}

/* Page background */
body {
    background-color: var(--family-bg);
    color: var(--family-text);
}

/* Headings */
h1, h2, h3, h4, h5 {
    color: var(--family-primary);
}

/* =========================
   Navbar
   ========================= */

.navbar {
    background-color: var(--family-card) !important;
    border-bottom: 1px solid #e3d6c6;
}

.navbar-brand,
.nav-link {
    color: var(--family-primary) !important;
}

    .nav-link:hover {
        color: #5f4a34 !important;
    }

.navbar-nav .nav-link {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Ensure navbar always clickable */
header {
    position: relative;
    z-index: 1050;
}

    header * {
        pointer-events: auto;
    }

/* Family-style navbar */
.family-navbar {
    background-color: var(--family-card);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    border-bottom: none;
}

/* =========================
   Cards
   ========================= */

.card {
    background-color: var(--family-card);
    border: 1px solid #e3d6c6;
    border-radius: 12px;
}

.card-title a {
    color: var(--family-primary);
}

    .card-title a:hover {
        color: #5f4a34;
    }

/* =========================
   Links / tables / footer
   ========================= */

a {
    color: var(--family-primary);
}

    a:hover {
        color: #5f4a34;
    }

.table {
    background-color: var(--family-card);
}

    .table thead {
        background-color: #ede3d7;
    }

footer {
    color: #7a6652;
}

/* =========================
   OurKids – LIST page
   ========================= */

.ourkids-card {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

    .ourkids-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    }

    /* List thumbnails */
    .ourkids-card .kid-thumb {
        width: 100%;
        height: 260px;
        object-fit: cover;
        object-position: 50% 15%;
        display: block;
    }

/* =========================
   OurKids – DETAIL page
   ========================= */

/* OurKids – DETAIL page cover: left aligned, not centered */
.kid-cover-wrap {
    width: 100%;
    max-width: 1080px;
    margin-left: 0 !important;
    margin-right: auto !important;
    text-align: left;
}

.kid-cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    object-position: left top;
    margin: 0 !important;
}

.kid-page {
    width: 100%;
    max-width: none;
}

.kid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.kid-thumb-btn {
    text-align: left;
}

.kid-thumb-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

/* Force grid for grandchild galleries, even if .kid-gallery is flex elsewhere */
.kid-gallery-grid {
    display: grid !important;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

    /* Each item behaves like a grid cell */
    .kid-gallery-grid .kid-thumb-wrap {
        margin: 0;
    }

    /* Make sure images scale inside the cell */
    .kid-gallery-grid .kid-thumb-img {
        width: 100%;
        height: auto;
        display: block;
    }

/* =========================
   Poetry
   ========================= */

.poetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.poetry-thumb {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

    .poetry-thumb img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        object-position: top center;
        border-radius: 10px;
        background: #f2efe8;
    }

    .poetry-thumb:hover img {
        transform: translateY(-2px);
        box-shadow: 0 10px 26px rgba(0,0,0,0.14);
    }

/* =========================
   Event page – cover + thumbs crop (keep heads)
   ========================= */

.event-cover-img {
    max-width: 500px;
    height: auto;
    cursor: zoom-in;
    display: block;
}

/* Event gallery thumbnails */
.event-thumb-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: 50% 15%;
    cursor: zoom-in;
}

/* =========================
   Privacy
   ========================= */

.privacy-quote {
    max-width: 700px;
    margin: 2rem auto;
    text-align: center;
    font-style: italic;
    line-height: 1.6;
}

/* =========================
   Index footer image (click + fade-in)
   ========================= */

.index-footer-link {
    display: inline-block;
}

.index-footer-image {
    max-width: 240px;
    width: 100%;
    height: auto;
    cursor: pointer;
    opacity: 0.85; /* visible even if animation fails */
}

    /* subtle fade + slight rise */
    .index-footer-image.fade-in {
        opacity: 0;
        transform: translateY(10px);
        animation: fadeInUp 1800ms cubic-bezier(0.22, 1, 0.36, 1) 500ms forwards;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 0.85;
        transform: translateY(0);
    }
}

/* hover hint */
.index-footer-link:hover .index-footer-image {
    opacity: 1;
}
/* Index menu cards – thinner */
.index-menu-card {
    padding: 1.1rem 1rem;
}

    .index-menu-card h3 {
        font-size: 1.15rem;
    }
/* Home menu cards – slimmer height */
.home-menu-card .card-body {
    padding: 0.9rem 1.1rem;
}

.home-menu-card h5 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.home-menu-card p {
    margin-bottom: 0;
    line-height: 1.05;
}
.family-navbar {
    position: sticky;
    top: 0;
    z-index: 1100;
}

