:root {
    /* set of fonts */
    --font1: "Merriweather", serif;
    --font2: "Merriweather sans", sans-serif;
    --font3: "Times New Roman", serif;
    --font4: "Oswald", sans-serif;
    --font5: "Quicksand", sans-serif;
    --font6: "Lato", sans-serif;
    --font7: "Open Sans", sans-serif;
    --font8: "Roboto", sans-serif;

    /* set of font-sizes */
    --size-tiny: 0.7rem;
    --size-smaller: 0.8rem;
    --size-small: 0.9rem;
    --size-normal: 1rem;
    --size-big: 1.2rem;
    --size-bigger: 1.3rem;
    --size-large: 1.5rem;
    --size-larger: 1.7rem;
    --size-xlarge: 2.0rem;
    --size-huge: 3.0rem;

    /* modifiable text styles */
    --titlecolor: rgb(209, 19, 19);
    --titlefont: "Outfit", sans-serif;
    --titlesize: var(--size-large);
    --headingcolor: rgb(209, 19, 19);
    --headingfont: "Outfit", sans-serif;
    --headingsize: var(--size-bigger);
    --subheadingcolor: rgb(209, 19, 19);
    --subheadingfont: "Outfit", sans-serif;
    --subheadingsize: var(--size-normal);
    --textcolor: black;
    --textfont: "Noto Serif", serif;
    --textsize: var(--size-small);
    --footerfont: var(--textfont);
    --footercolor: white;
    --footersize: 1rem;
    --linkcolor: darkblue;
    --navbarfont: var(--font8);
    --navbarcolor: rgb(134, 134, 134);


    /* modifiable background styles */
    --pagecolor: white;
    --headercolor: white;
    --blockcolor: grey;

    /* modifiable border colors */
    --border1color: grey;
    --border2color: var(--titlecolor);

    /* box shadow options */
    --shadow: none;
    --shadow1: 5px 5px 5px var(--border1color);
    --shadow2: 5px 5px 5px var(--border2color);

    /* border options */
    --border: none;
    --border1: 1px solid var(--border1color);
    --border2: 7px solid var(--border1color);

    /* modifiable borders and shadows */
    --blockborder: var(--border);
    --blockshadow: var(--shadow);

    /* modifiable gap and radius */
    --blockgap: 10;
    --blockradius: 0;
    --blockpadding: 0px;

    /* other modifiable values */
    --pagewidth: 1200px;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, b, big, cite, code,
del, dfn, em, font, i, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	border: 0;
	margin: 0;
	outline: 0;
	padding: 0;
}

* {
    box-sizing: border-box;
}

h1,h2,h3 {
    font-weight: 600;
    margin-top: 0px;
    margin-bottom: 5px;
}

h1 {
    width: 100%;
    color: var(--titlecolor);
    font-family: var(--titlefont);
    font-size: var(--titlesize);
}

h2 {
    color: var(--headingcolor);
    font-family: var(--headingfont);
    font-size: var(--headingsize);
}

h3 {
    color: var(--subheadingcolor);
    font-family: var(--subheadingfont);
    font-size: var(--subheadingsize);
}

p {
    margin-bottom: 0.2em;
    font-family: var(--textfont);
    font-size: var(--textsize);
    color: var(--textcolor);
    hyphens: auto;
}

a {
    color: var(--linkcolor);
    text-decoration: none;
}

body {
    margin: 0 auto;
    padding: 2%;
    background-color: var(--pagecolor);
    max-width: var(--pagewidth);
}

.hidden {
    display: none !important;
}

.pageheader {
    width: 100%;
    background-color: var(--headercolor);
    overflow: visible;
    margin-bottom: 1.5rem;
}

.headercontainer {
    display: inline-flex;
    align-items: center;
    width: 100%;
}

.pagefooter {
    width: 100%;
    background-color: var(--footercolor);
    font-family: var(--footerfont);
    font-size: var(--footersize);
    color: var(--footercolor);
}

.col2, .col3, .col4 {
    text-align: justify;
    hyphens: auto;
}

.col2 {
    columns: 1;
    column-gap: 40px;
}

.col3 {
    columns: 1;
    column-gap: 40px;
}
.col4 {
    columns: 1;
    column-gap: 40px;
}

@media (min-width: 600px)
{
    .col2 {column-count: 2;}
    .col3 {column-count: 2;}
    .col4 {column-count: 2;}
}

@media (min-width: 800px)
{
    .col2 {column-count: 2;}
    .col3 {column-count: 3;}
    .col4 {column-count: 3;}
}

@media (min-width: 1000px)
{
    .col2 {column-count: 2;}
    .col3 {column-count: 3;}
    .col4 {column-count: 4;}
}

.linkcolor {
    font-size: inherit;
    color:var(--linkcolor);
}

.navbar {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0px;
    gap: 0px 15px;
    width: 100%;
    padding: 2px 0px;
}

.nav {
    margin: 0px;
    padding: 0px;
}

.navlink {
    text-decoration: none;
}

.navitem {
    margin: 0px;
    padding: 2px;
    font-family: var(--navbarfont);
    font-size: var(--navbarsize);
    color: var(--navbarcolor);
    text-transform: uppercase;
    cursor: pointer;
}

.navitem.active {
    color: var(--titlecolor);
}

.navicon {
    display: block;
    position: relative;
    font-size:xx-large;
    margin-right: 20px;
}

.navmenu {
    display: none;
    flex-direction: column;
    gap: 7px 0px;
    width: 250px;
    position: absolute;
    top: 40px;
    left: 0px;
    z-index: 99;
    padding: 5px;
    font-size: 0.85rem;
    background-color: var(--headercolor);
    border: 1px solid grey;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.navmenu.open {
    display: inline-flex;
}

/* mobile first */
@media screen and (min-width: 0px)
{
    .navbar { display: none; }
}

@media screen and (min-width: 600px)
{
    .navbar { display: inline-flex; }
    .navicon { display: none; }
}

@media screen and (min-width: 800px)
{
    .embedded {padding-bottom: 40%;}
}

/***************************************************
 * People page renderer
 ***************************************************/

.people-section {
    width: 100%;
    margin-bottom: 40px;
}

.people-heading {
    padding-top: 20px;
    margin-bottom: 10px;
}

.people-intro {
    font-family: var(--textfont);
    font-size: var(--textsize);
    color: var(--textcolor);
    margin-bottom: 20px;
}

.people-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--blockgap) * 1px);
    width: 100%;
}

.person-card {
    display: flex;
    flex-direction: column;
    background-color: var(--pagecolor);
    border-radius: calc(var(--blockradius) * 1px);
    border: var(--blockborder);
    box-shadow: var(--blockshadow);
    overflow: hidden;
}

.person-photo-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
}

.person-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    display: block;
}

.person-name {
    padding: 8px 8px 2px;
}

.person-role {
    font-family: var(--textfont);
    font-size: var(--size-small);
    color: var(--textcolor);
    opacity: 0.75;
    padding: 0 8px 6px;
}

.person-bio {
    font-family: var(--textfont);
    font-size: var(--textsize);
    color: var(--textcolor);
    padding: 6px 8px;
    flex: 1;
}

.person-contact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 8px 10px;
}

.person-contact-item {
    font-family: var(--textfont);
    font-size: var(--size-small);
    color: var(--linkcolor);
}

@media screen and (min-width: 600px) {
    .people-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================
   Geschichte / History page
   ===================================================== */

.history-h1 {
    font-family: var(--titlefont);
    font-size: var(--titlesize);
    color: var(--titlecolor);
    margin: 0 0 1rem;
}

.history-h2 {
    font-family: var(--headingfont);
    font-size: var(--headingsize);
    color: var(--headingcolor);
    margin: 0 0 1.2rem;
}

.history-section {
    margin-bottom: 3rem;
}

/* Intro */
.history-intro {
    margin-bottom: 3rem;
}

.history-intro-text {
    column-count: 1;
    column-gap: 2.5rem;
    font-family: var(--textfont);
    font-size: var(--textsize);
    color: var(--textcolor);
    line-height: 1.7;
}

.history-intro-text p {
    margin: 0 0 0.9em;
}

/* Pastors grid */
.pastors-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--blockgap) * 1px);
}

.pastor-card {
    display: flex;
    gap: 16px;
    background-color: var(--pagecolor);
    border-radius: calc(var(--blockradius) * 1px);
    border: var(--blockborder);
    box-shadow: var(--blockshadow);
    overflow: hidden;
}

.pastor-photo-wrap {
    width: 100px;
    flex-shrink: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    align-self: flex-start;
}

.pastor-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    display: block;
}

.pastor-info {
    padding: 0 12px 12px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pastor-name {
    font-family: var(--textfont);
    font-size: var(--size-normal);
    font-weight: bold;
    color: var(--headingcolor);
}

.pastor-years {
    font-family: var(--textfont);
    font-size: var(--size-small);
    color: var(--textcolor);
    opacity: 0.7;
}

.pastor-quote {
    margin: 8px 0 0;
    padding: 0;
    font-family: var(--textfont);
    font-size: var(--size-small);
    font-style: italic;
    color: var(--textcolor);
    opacity: 0.85;
    line-height: 1.5;
}

/* Wide pastor card (landscape photo) */
.pastor-card--wide .pastor-photo-wrap {
    width: 160px;
    aspect-ratio: 4 / 3;
}

/* Milestones */
.milestones-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.milestone-item {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--border1color);
    font-family: var(--textfont);
    font-size: var(--textsize);
}

.milestone-item:last-child {
    border-bottom: 1px solid var(--border1color);
}

.milestone-date {
    font-weight: bold;
    color: var(--headingcolor);
    padding-top: 1px;
}

.milestone-text {
    color: var(--textcolor);
    line-height: 1.5;
}

/* Publications */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: calc(var(--blockgap) * 1px);
}

.publication-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.publication-cover-wrap {
    aspect-ratio: 5 / 7;
    overflow: hidden;
    border-radius: calc(var(--blockradius) * 1px);
    border: var(--blockborder);
    box-shadow: var(--blockshadow);
}

.publication-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.2s;
}

.publication-item:hover .publication-cover {
    transform: scale(1.03);
}

.publication-title {
    font-family: var(--textfont);
    font-size: var(--size-small);
    color: var(--textcolor);
    text-align: center;
}

@media screen and (min-width: 600px) {
    .history-intro-text { column-count: 2; }
    .pastors-grid { grid-template-columns: repeat(2, 1fr); }
    .publications-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
/* =====================================================
   Gemeindebriefe page
   ===================================================== */

.gb-heading {
    font-family: var(--titlefont);
    font-size: var(--titlesize);
    color: var(--titlecolor);
    margin: 0 0 1.2rem;
}

.gb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--blockgap) * 1px);
}

.gb-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.gb-item-nopdf {
    cursor: default;
}

.gb-cover-wrap {
    aspect-ratio: 1 / 1.41;
    overflow: hidden;
    border-radius: calc(var(--blockradius) * 1px);
    border: var(--blockborder);
    box-shadow: var(--blockshadow);
}

.gb-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.2s;
}

.gb-item:not(.gb-item-nopdf):hover .gb-thumbnail {
    transform: scale(1.03);
}

.gb-title {
    font-family: var(--textfont);
    font-size: var(--size-small);
    color: var(--textcolor);
    text-align: center;
}

@media screen and (min-width: 600px) {
    .gb-grid { grid-template-columns: repeat(3, 1fr); }
}

.gb-date {
    font-family: var(--textfont);
    font-size: var(--size-tiny);
    color: #666;
    text-align: center;
}

/* =====================================================
   Predigten page — header image
   ===================================================== */

.pr-header {
    width: 100%;
    margin-bottom: 1.2rem;
    border-radius: calc(var(--blockradius) * 1px);
    overflow: hidden;
}

.pr-header-img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 280px;
    object-position: center center;
}

/* =====================================================
   Hungry Souls page — menu display
   ===================================================== */

.hs-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hs-menu-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.hs-menu-link {
    display: block;
    max-width: 450px;
    width: 100%;
    border-radius: calc(var(--blockradius) * 1px);
    overflow: hidden;
    box-shadow: var(--blockshadow);
    transition: transform 0.2s;
}

.hs-menu-link:hover {
    transform: scale(1.01);
}

.hs-menu-img {
    width: 100%;
    display: block;
}

.hs-text {
    font-family: var(--textfont);
    font-size: var(--textsize);
    color: var(--textcolor);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 1.2rem;
}

/* =====================================================
   Fakten page
   ===================================================== */

.facts-section {
    margin-bottom: 2rem;
}

.facts-h2 {
    font-family: var(--titlefont);
    font-size: var(--titlesize);
    color: var(--titlecolor);
    margin: 0 0 1rem;
}

.facts-html h3 {
    font-family: var(--headingfont);
    font-size: var(--headingsize);
    color: var(--headingcolor);
    margin: 1.2rem 0 0.4rem;
}

.facts-html p {
    font-family: var(--textfont);
    font-size: var(--textsize);
    color: var(--textcolor);
    line-height: 1.6;
    margin: 0 0 0.6rem;
}

.facts-html a {
    color: var(--titlecolor);
}

.facts-trustees {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--blockgap) * 1px);
    margin-top: 1.2rem;
}

.facts-trustee {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.facts-trustee-photo-wrap {
    aspect-ratio: 3 / 4;
    width: 100%;
    overflow: hidden;
    border-radius: calc(var(--blockradius) * 1px);
    border: var(--blockborder);
    box-shadow: var(--blockshadow);
    background: #eee;
}

.facts-trustee-no-photo {
    background: #ddd;
}

.facts-trustee-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    display: block;
}

.facts-trustee-name {
    font-family: var(--headingfont);
    font-size: var(--size-small);
    color: var(--headingcolor);
    font-weight: 600;
}

.facts-trustee-role {
    font-family: var(--textfont);
    font-size: var(--size-smaller);
    color: var(--textcolor);
}

@media screen and (min-width: 600px) {
    .facts-trustees { grid-template-columns: repeat(4, 1fr); }
}

/***************************************************/
/* Index page elements                             */
/***************************************************/

/* Index page column wrapper */
.ix-page {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Announcements grid */
.ix-announcements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--blockgap) * 1px);
    margin: 1rem 0;
}

@media screen and (min-width: 600px) {
    .ix-announcements-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Announcement */
.ix-announcement {
    padding: 1rem;
    border: 1px solid #e8e8e8;
    border-radius: calc(var(--blockradius) * 1px);
    background: #fafafa;
}

.ix-ann-heading {
    margin: 0 0 0.3rem;
}

.ix-ann-subheading {
    font-family: var(--subheadingfont);
    font-size: var(--size-big);
    color: var(--subheadingcolor);
    margin: 0 0 0.3rem;
    font-weight: 400;
}

.ix-ann-datetime {
    font-family: var(--textfont);
    font-size: var(--size-small);
    color: #666;
    margin: 0 0 0.6rem;
}

.ix-ann-img {
    width: 100%;
    display: block;
    object-fit: cover;
    border-radius: calc(var(--blockradius) * 1px);
    margin: 0.6rem 0;
}

.ix-ann-text {
    margin-top: 0.6rem;
}

.ix-ann-text p {
    margin: 0.4rem 0;
    font-family: var(--textfont);
    font-size: var(--textsize);
    color: var(--textcolor);
}

/* Carousel */
.ix-carousel {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--blockradius) * 1px);
    margin: 1rem 0;
}

.ix-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.ix-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.ix-slide-title {
    font-family: var(--headingfont);
    font-size: var(--size-big);
    color: var(--headingcolor);
    text-align: center;
    margin: 0 0 0.4rem;
}

.ix-slide-img {
    width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .ix-slide-img { max-height: 340px; }
}

.ix-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
}

.ix-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.2s;
}

.ix-dot.ix-dot-active {
    background: var(--titlecolor);
}

/* Link buttons */
.ix-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 1rem 0;
}

.ix-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 160px;
    max-width: 220px;
    min-height: 64px;
    padding: 12px 16px;
    border-radius: calc(var(--blockradius) * 1px);
    text-align: center;
    color: black;
    font-family: var(--headingfont);
    font-size: var(--size-normal);
    font-weight: 600;
    text-decoration: none;
    background: var(--titlecolor);
    transition: filter 0.2s;
}

.ix-link-btn:hover {
    filter: brightness(0.92);
}

/* Image grid */
.ix-img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--blockgap) * 1px);
    margin: 1rem 0;
}

.ix-img-grid-item {
    display: flex;
    flex-direction: column;
}

.ix-img-grid-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: calc(var(--blockradius) * 1px);
    display: block;
}

.ix-img-grid-caption {
    font-family: var(--textfont);
    font-size: var(--size-smaller);
    color: #555;
    margin: 4px 0 0;
    text-align: center;
}

/* Losung */
.ix-losung {
    background: rgb(100, 15, 15);
    color: white;
    padding: 20px;
    border-radius: calc(var(--blockradius) * 1px);
    text-align: center;
    margin: 1rem 0;
}

.ix-losung-title {
    font-family: var(--headingfont);
    font-size: var(--size-big);
    color: white;
    margin: 0 0 0.6rem;
}

.ix-losung-meta {
    font-family: var(--textfont);
    font-size: var(--size-small);
    color: rgba(255, 255, 255, 0.8);
    margin: 0.3rem 0;
}

.ix-losung-text {
    font-family: var(--font1);
    font-size: var(--size-big);
    color: white;
    font-style: italic;
    margin: 0.6rem 0;
}

/* Losung iframe */
.ix-losung-frame {
    width: 100%;
    min-height: 160px;
    border: none;
    display: block;
}

/* Full-width image element */
.ix-image {
    margin: 0.6rem 0;
}

.ix-image img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.ix-image-caption {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin: 0.3rem 0 0;
}

/* PDF element */
.ix-pdf {
    text-align: center;
    margin: 1rem 0;
}

/* Two or more consecutive PDF elements lay out side-by-side */
.ix-pdfs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
    margin: 1rem 0;
}

.ix-pdfs .ix-pdf {
    flex: 1 1 220px;
    max-width: 320px;
    margin: 0;
}

/* Uniform thumbnail height so captions line up across PDFs in a row.
   object-fit: contain preserves the full image (letterboxes if aspect differs). */
.ix-pdfs .ix-pdf-thumb {
    height: 300px;
    object-fit: contain;
    background: #fafafa;
}

.ix-pdf a {
    display: inline-block;
}

.ix-pdf-thumb {
    max-width: 220px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: box-shadow 0.15s;
}

.ix-pdf-thumb:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ix-pdf-icon {
    display: inline-block;
    padding: 1rem 2rem;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: bold;
    color: #555;
}

.ix-pdf-title {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: #555;
}

/* Columns element (footer contact info) */
.ix-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
    color: var(--textcolor);
}

.ix-column-heading {
    color: var(--headingcolor);
    font-family: var(--headingfont);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.ix-column-line {
    font-family: var(--textfont);
    font-size: 0.8rem;
    line-height: 1.6;
}

.ix-column-line a {
    color: inherit;
    text-decoration: underline;
}

.pagefooter .ix-html {
    color: var(--textcolor);
}

/* Header logo image */
.hf-logo-img {
    height: 60px;
    width: auto;
    display: block;
}

/* HTML block */
.ix-html {
    margin: 1rem 0;
    overflow-x: auto;
}

@media screen and (min-width: 600px) {
    .ix-img-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Gallery overview ─────────────────────────────────────────────────────── */

.gal-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.gal-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.gal-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.12); }

.gal-card-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.gal-card-no-cover { background: #ddd; }

.gal-card-info { padding: 0.6rem 0.8rem 0.8rem; }

.gal-card-title {
    font-family: var(--headingfont);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
}

.gal-card-date { font-size: 0.8rem; color: #888; margin-bottom: 0.3rem; }

.gal-card-desc { font-size: 0.85rem; margin: 0; color: #555; }

/* ── Gallery page ─────────────────────────────────────────────────────────── */

.gal-page-date { color: #888; font-size: 0.9rem; margin: -0.5rem 0 0.8rem; }

.gal-page-desc { margin-bottom: 1rem; }

.gal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.gal-item { cursor: pointer; }

.gal-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.gal-caption { font-size: 0.8rem; color: #666; margin: 0.2rem 0 0; text-align: center; }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */

.gal-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
}

.gal-lb-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.gal-lb-cap { color: #ddd; font-size: 0.9rem; text-align: center; margin: 0; }

.gal-lb-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    line-height: 1;
}

.gal-lb-prev,
.gal-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 0.2rem 0.7rem;
    border-radius: 4px;
    line-height: 1;
}

.gal-lb-prev { left: 0.4rem; }
.gal-lb-next { right: 0.4rem; }
.gal-lb-prev:hover, .gal-lb-next:hover { background: rgba(255,255,255,0.3); }

@media screen and (min-width: 600px) {
    .gal-overview-grid { grid-template-columns: repeat(3, 1fr); }
    .gal-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (min-width: 900px) {
    .gal-grid { grid-template-columns: repeat(4, 1fr); }
}
