/* assets/site.css */

/* Base theme (keeps your current vibe) */
:root{
    --brand-bg: #E7D967;
    --panel-bg: #ffffff;
    --text: #000000;
    --link: #0000ee;
    --link-hover-bg: #2B4359;
    --nav-bg: #ffffff;
    --nav-active: #3399ff;
    --nav-hover-bg: #003399;
    --nav-hover-text: #ffffff;

    --shadow: 0 3px 10px rgba(0,0,0,.25);
    --radius: 12px;

    --container-max: 1100px;
    --sidebar-w: 200px;
    --gap: 18px;
}

/* Minimal reset */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
    margin: 0;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    background: var(--brand-bg);
    color: var(--text);
    line-height: 1.4;
}
img{ max-width: 100%; height: auto; display: block; }

/* Layout shell */
.site{
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 12px 28px;
}

/* Responsive header (image + overlay text) */
.site-header{
    margin: 0;
    padding: 12px 0;
}
.site-header__banner{
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #000; /* fallback while image loads */
}
.site-header__img{
    width: 100%;
    height: clamp(160px, 20vw, 240px);
    object-fit: cover;
    object-position: center;
    display: block;
    filter: saturate(1.05) contrast(1.05);
}
.site-header__overlay{
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 16px;
    text-align: center;
    background: linear-gradient(
            to bottom,
            rgba(0,0,0,.35),
            rgba(0,0,0,.10) 55%,
            rgba(0,0,0,.35)
    );
}
.site-header__title{
    margin: 0;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: clamp(22px, 4vw, 44px);
    letter-spacing: .5px;
    color: #ffff66;
    text-shadow: 0 2px 10px rgba(0,0,0,.65);
}
.site-header__subtitle{
    margin: 6px 0 0;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,.65);
}

/* Two-column layout on desktop, collapses on smaller screens */
.site-layout{
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: var(--gap);
    align-items: start;
    margin-top: var(--gap);
}

/* Navigation */
.site-nav{
    background: var(--nav-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 10px;
    position: relative;
    z-index: 50;
}
.site-nav__toggle{
    display: none;
    width: 100%;
    font: inherit;
    font-weight: bold;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.25);
    border-radius: 10px;
    background: #fff;
    position: relative;
    z-index: 51;
    pointer-events: auto;
}
.site-nav__list{
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}
.site-nav__list a{
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    font-weight: bold;
    color: #000;
    border-radius: 8px;
}
.site-nav__list a.active {
    background: var(--nav-active);
    color: #fff;
}
.site-nav__list a:hover{
    background: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}
.site-footer {
    margin-top: 20px;
    text-align: center;
}
/* Main content panel */
.panel{
    background: var(--panel-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(14px, 2vw, 22px);
}
.panel h1, .panel h2{ margin-top: 0; }

/* Links in content */
.panel a{
    color: var(--link);
    text-decoration: none;
}
.panel a:hover{
    color: #fff;
    background: var(--link-hover-bg);
}

/* Contact layout + map embed */
.contact-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.figure{
    margin: 0;
}
.figure img{
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.map-embed{
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #ddd;
    aspect-ratio: 16 / 10;
}
.map-embed iframe{
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Activities page helpers */
.media{
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 12px 0;
}
.media img{
    width: 100%;
    height: auto;
}
.activities-intro{
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 16px;
    align-items: start;
}
.activities-intro__side img{
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.activities-intro__text ul{
    columns: 2;
    column-gap: 28px;
    padding-left: 20px;
}
.activities-intro__text li{
    break-inside: avoid;
    margin: 0 0 6px;
}

/* Simple callout (replacement for old "crosslink" block) */
.callout{
    background: #0099ff;
    color: #333;
    border: 2px outset #666;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    font-weight: bold;
}
.callout a{
    color: #000;
    text-decoration: underline;
}
.callout a:hover{
    color: #ff6600;
    background: transparent;
}

/* Description page layout */
.description-grid{
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}
.description-grid__media img{
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.description-map{
    margin-top: 14px;
    text-align: center;
}
.description-map img{
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,.35);
}

/* Happenings page */
.happenings-hero{
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 16px;
    align-items: start;
}
.happenings-hero__image img{
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.event-month{
    margin-top: 14px;
}
.event-month__title{
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(231, 217, 103, 0.65);
    font-family: Georgia, "Times New Roman", Times, serif;
    font-weight: bold;
}
.event-list{
    list-style: none;
    margin: 0;
    padding: 0;
}
.event{
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.75);
    margin-bottom: 10px;
}
.event__when{
    white-space: nowrap;
    font-weight: bold;
    color: rgba(0,0,0,.7);
}
.event a{
    text-decoration: underline;
}

/* Links page */
.links-section{
    margin-top: 16px;
}
.links-section__title{
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(231, 217, 103, 0.65);
    font-weight: bold;
}
.links-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.link-card{
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    background: rgba(255,255,255,.75);
}
.link-card__logo{
    display: grid;
    place-items: center;
}
.link-card__logo img{
    max-width: 150px;
    max-height: 110px;
    width: auto;
    height: auto;
}
.link-card__title{
    margin: 0 0 4px;
    font-weight: bold;
}
.link-card__meta{
    margin: 0;
}
.link-card__meta a{
    word-break: break-word;
    text-decoration: underline;
}

/* New gallery (SPGM-free) */
.gallery-albums{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 14px;
}
.gallery-album{
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(0,0,0,.12);
    text-decoration: none;
    color: inherit;
}
.gallery-album__cover{
    aspect-ratio: 4 / 3;
    background: rgba(0,0,0,.08);
}
.gallery-album__cover img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-album__body{
    padding: 10px 12px;
}
.gallery-album__title{
    margin: 0 0 6px;
    font-weight: bold;
}
.gallery-album__desc{
    margin: 0;
    color: rgba(0,0,0,.75);
    font-size: 0.95em;
}

.gallery-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 14px;
}
.gallery-thumb{
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: rgba(0,0,0,.06);
    text-decoration: none;
}
.gallery-thumb img{
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.lightbox{
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
    background: rgba(0,0,0,.85);
    padding: 16px;
}
.lightbox[data-open="true"]{
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
}
.lightbox__top{
    display: flex;
    justify-content: flex-end;
}
.lightbox__btn{
    font: inherit;
    font-weight: bold;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(0,0,0,.25);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}
.lightbox__stage{
    display: grid;
    place-items: center;
    min-height: 40vh;
}
.lightbox__img{
    max-width: min(1100px, 100%);
    max-height: 75vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.45);
    background: rgba(255,255,255,.06);
}
.lightbox__nav{
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.lightbox__nav .lightbox__btn{
    flex: 1;
}

/* visitor counter */
.hit-counter{
    margin: 10px auto 20px;
    border: 1px solid white;
    background-color: black;
    color: white;
    width: 150px;
    font-size: 0.75rem;
}

.hit-counter td:first-child{
    text-align: left;
    width:60%;
}

.hit-counter td:last-child{
    text-align: center;
}

.hit-counter td {
    padding: 2px;
    border: 1px solid white;
}

@media (max-width: 900px){
    .site-layout{
        grid-template-columns: 1fr;
    }
    .site-nav__toggle{
        display: inline-block;
    }
    .site-nav__list{
        display: none;
        margin-top: 10px;
    }
    .site-nav[data-open="true"] .site-nav__list{
        display: block;
    }

    .contact-grid{
        grid-template-columns: 1fr;
    }

    .activities-intro{
        grid-template-columns: 1fr;
    }

    .activities-intro__text ul{
        columns: 1;
    }

    .description-grid{
        grid-template-columns: 1fr;
    }

    .happenings-hero{
        grid-template-columns: 1fr;
    }
    .event{
        grid-template-columns: 1fr;
    }
    .event__when{
        white-space: normal;
    }

    .links-grid{
        grid-template-columns: 1fr;
    }
    .link-card{
        grid-template-columns: 1fr;
        text-align: center;
    }
    .link-card__logo img{
        max-width: 220px;
        max-height: 140px;
    }

    .gallery-albums{
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px){
    .gallery-albums{
        grid-template-columns: 1fr;
    }
    .gallery-grid{
        grid-template-columns: 1fr;
    }
}