:root {
    /* text sizes */
    --size-small: 0.85rem;
    --size-base: 1rem;
    --size-large: 1.5rem;
    --size-xl: 2rem;
    --size-2xl: 3rem;

    /*colours*/
    --colour-dark: #1a1a1a;
    --colour-club: #074b0e;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: Arial, sans-serif;
    font-size: var(--size-base);
    background-color: #ffffff;
    color: var(--colour-dark);
    line-height: calc(1em + 0.5rem);
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-size: cover;
    /* padding-bottom: 40px; */
}

.wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

header,
footer {
    background: var(--colour-club);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    padding: 1rem;
    text-align: center;
}

header {
    background-image: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0)),
        url("../images/maisfled-pixabay-header.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
} */

main {
    flex: 1;
    padding: 1rem 2rem;
    width: 100%;
    background-size: cover;
}

.maislabyrinth {
    background-image: linear-gradient(
            rgba(255, 255, 255, 0.8),
            rgba(255, 255, 255, 0.8)
        ),
        url("../images/mais-lab1.webp");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

.announcement {
    text-align: center;
    font-size: var(--size-xl);
    margin-bottom: 0.5rem;
    line-height: 125%;
}

.red {
    color: rgb(228, 1, 1);
}

.green {
    color: greenyellow;
    text-shadow: 0 0 5px black, 0 0 10px lime, 0 0 15px limegreen;
}

.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: white;
    min-height: 60px;
    flex-wrap: wrap;
}

.center-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    flex: 1;
    min-width: 200px;
}

#title {
    font-family: "Great Vibes", cursive;
}

#title h1 {
    font-size: var(--size-2xl);
}

#title h3 {
    font-size: var(--size-2xl);
}

section {
    font-size: var(--size-base);
}

section h2 {
    font-family: "Merriweather", serif;
    font-weight: 500;
    border-bottom: 2px solid #ccc;
    display: inline-block;
    padding-bottom: 0.3rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.smaller {
    font-size: 90%;
}

.translation {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-left: 0.1em;
    white-space: nowrap;
}

.right img {
    max-width: 100px;
    height: auto;
    border-radius: 50%;
}

.map-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    overflow: hidden;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

hr {
    margin: 5px 0;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centers items horizontally */
    gap: 16px;
    padding: 0.5rem 1rem 0rem;
    max-width: 100%; /* ensures it doesn't overflow */
    box-sizing: border-box;
    margin: 0 auto;
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: inline-block;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.gallery-item {
    flex: 1 1 auto;
    max-width: 100%;
    text-align: center;
}

/* buttons */
#reveal-image {
    display: block;
    margin: 2rem auto;
    background-color: #14532d; /* Dark green */
    color: #ffffff; /* White text */
    border: none;
    padding: 0.75em 1.5em;
    font-size: 1rem;
    /* font-family: Arial, sans-serif; */
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

#reveal-image:hover {
    background-color: #166534; /* Slightly lighter green */
    transform: scale(1.02);
}

#reveal-image:active {
    background-color: #0f3d23; /* Even darker when clicked */
    transform: scale(0.98);
}
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn {
    display: inline-block;
    padding: 0.75em 1.5em;
    background-color: #14532d;
    font-size: 1rem;
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.btn:hover {
    background-color: #166534; /* Slightly lighter green */
    transform: scale(1.02);
}

.btn:active {
    background-color: #0f3d23; /* Even darker when clicked */
    transform: scale(0.98);
}

/* flashy stuff */

/* .flashing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--size-xl);
    font-family: Arial, sans-serif;
}

.flashing {
    animation: flash 1s infinite;
    color: yellowgreen;
    font-weight: bold;
    margin: 0 10px;
    text-shadow: 0 0 5px black, 0 0 10px lime, 0 0 15px limegreen;
    font-size: calc(var(--size-xl) * 1.8);
}

@keyframes flash {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
} */

/* images styling */

.hidden {
    display: none;
}

.lightbox img {
    cursor: zoom-in;
    transition: 0.3s ease;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px #000;
}

.lightbox-overlay.hidden {
    display: none;
}

/* language text rules */
.rules-section {
    padding: 1rem 1rem 0rem;
    max-width: 700px;
    margin: auto;
    /* font-family: sans-serif; */
}

.title {
    text-align: center;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.lang-switcher button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid #aaa;
    border-radius: 5px;
    background-color: #f8f8f8;
}

.lang-switcher button:hover {
    background-color: #e0e0e0;
}

.rules p {
    margin-bottom: 1em;
    line-height: 1.5;
}

.right-align {
    text-align: right;
}

.icon-button img {
    width: 16px; /* or 24px, 40px — adjust as needed */
    height: 16px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #2e5339;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.text-with-icon {
    overflow: hidden; /* contain the floated image */
    /* margin-bottom: 2rem; */
}

.text-with-icon img {
    float: left;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%; /* makes it round */
    margin: 0 0.5rem 0.5rem 0; /* space around the image */
}

.text-with-icon p {
    /* margin: 0; */
    line-height: 1.6;
    color: #222;
}

.card {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.right-counter {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem 1rem 0rem;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f2f2f2;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: "Merriweather", serif;
    font-size: var(--size-base);
    color: #222;
    flex-wrap: nowrap; /* Prevent wrapping */
    text-align: center;
    max-width: 100%; /* Just in case */
    white-space: nowrap; /* Prevent label/number from stacking */
}

.counter-number {
    font-weight: bold;
    font-size: var(--size-large);
    color: var(--colour-club);
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
        background-size: contain;
        width: 100%;
        background-size: auto 100%;
    }
    .maislabyrinth {
        background-attachment: scroll; /* override fixed */
        background-size: cover;
    }
}

@media (max-width: 600px) {
    body {
        font-size: var(--size-small);
    }
    header,
    footer {
        padding: 0.5rem;
        font-size: var(--size-small);
    }

    #title h1 {
        font-size: var(--size-xl);
    }

    .section {
        font-size: var(--size-base);
    }

    .section h2 {
        font-size: var(--size-base);
        font-weight: 400;
    }

    .right img {
        max-width: 65px;
    }

    .announcement {
        text-align: center;
        font-size: var(--size-base);
        font-weight: 600;
    }

    .flashing-container {
        font-size: var(--size-large);
    }

    .container {
        flex-direction: column; /* stack vertically */
        align-items: center; /* center everything */
    }

    .center-group {
        flex: none; /* don’t stretch */
        margin: 0; /* space between center group and image */
    }

    .right {
        /* center the image on small screens */
        order: -1;
        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 10px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .text-with-icon img {
        width: 40px;
        height: 40px;
        display: block;
        margin: 0 0.25rem 0.25rem auto;
    }

    .card {
        padding: 1rem;
    }
    .rules-section {
        padding: 0.5rem 0.5rem 0rem;
    }
    .visitor-counter {
        font-size: var(--size-small);
        padding: 0.25rem;
    }
    .counter-number {
        font-size: var(--size-base);
    }
}
