/* === General Page Layout === */
body {
    background-color: #f2f2f2;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
}

header,
main {
    padding: 16px;
}

h1,
h2,
h3 {
    color: #222;
    margin: 1rem 0;
    font-weight: bold;
}

/* === Round Cards === */
#rounds-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

.round-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.round-card:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.round-card .round-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.round-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.round-info p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
    color: #555;
}

/* === Round Details === */
#round-details {
    padding: 2rem;
    max-width: 1000px;
    margin: auto;
    display: none;
}

.round-detail img {
    max-height: 95%;
    max-width: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    margin: 1rem 0;
}

.round-detail .back-button {
    display: inline-block;
    margin-top: 1.5rem;
    background-color: #007bff;
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.round-detail .back-button:hover {
    background-color: #0056b3;
}

/* === Gallery Grid === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    padding-bottom: 10px;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.gallery-card p {
    font-size: 15px;
    margin: 8px 0 2px;
    color: #333;
    font-weight: 600;
}

.gallery-card .craft-type {
    font-size: 13px;
    color: #666;
    padding-bottom: 8px;
}

/* === Responsive Adjustments === */
@media (max-width: 600px) {

    .round-info p,
    .gallery-card p,
    .gallery-card .craft-type {
        font-size: 0.9rem;
    }

    .round-card img,
    .gallery-card img {
        height: auto;
    }
}

/* === Hide landing info on detail views === */
body:not(.landing) .landing-info,
body:not(.landing) #rounds-heading {
    display: none;
}

#rounds-heading {
    max-width: 1200px;
    margin: 2rem auto 1rem;
    padding: 0 20px;
}

body {
    background-color: #fdfdfd;
    color: #222;
}

.landing-info {
    background: linear-gradient(135deg, #f2f2f2, #e8f0ff);
    border-radius: 12px;
    padding: 2rem;
    max-width: 900px;
    margin: 2rem auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    text-align: start;
}

.landing-info h1 {
    font-size: 2.4rem;
    color: #1e3a8a;
}

.landing-info p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #333;
}

/* Give rounds grid a soft background */
#rounds-list {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* === Gallery Details === */
#gallery-details {
    padding: 2rem;
    max-width: 900px;
    margin: auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.gallery-detail h2 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.gallery-detail .square-image-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 1rem;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-detail .square-image-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.gallery-detail .info-row {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #555;
}

.gallery-detail .back-button {
    display: inline-block;
    margin-top: 1.5rem;
    background-color: #007bff;
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.gallery-detail .back-button:hover {
    background-color: #0056b3;
}

#language-switcher {
    position: relative;
    top: 0px;
    left: 0px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 0.95rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#language-switcher a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
    margin: 0 4px;
}

#language-switcher a:hover {
    text-decoration: underline;
}

.square-image-container {
    width: 100%;
    /* Adjusts to parent width */
    max-width: 300px;
    /* Limits maximum width */
    aspect-ratio: 1 / 1;
    /* Ensures a perfect square */
    overflow: hidden;
    /* Hides any overflowing parts */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    /* Centers the image container */
}

.square-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills the square without stretching */
    border-radius: 10px;
    /* Optional: Rounds the corners */
}

.additional-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.additional-images img {
    width: auto;
    /* Adjust as needed */
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.additional-images img:hover {
    transform: scale(1.1);
}

.lightbox {
    display: none;
    /* Hide by default */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: contain;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: auto;
    user-select: none;
    touch-action: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    touch-action: none;
    cursor: zoom-in;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* ✅ Navigation Arrows */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: white;
    cursor: pointer;
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ddd;
}

.logo-container {
    display: flex;
    align-items: center;
    /* Vertically center the items */
    gap: 10px;
    /* Optional spacing between logo and text */
}

.logo-container img {
    height: 80px;
    width: 80px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
}

.preserve-lines {
    white-space: pre-line;
}

.round-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 0.5em;
}

.map-container {
    height: 500px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

#round-map {
    width: 100% !important;
    height: 500px !important;
    position: relative;
}

/* Hide the attribution links (Keyboard shortcuts, Map data, Terms, Report a map error) */
#round-map .gmnoprint,
#round-map .gm-style-cc,
#round-map a[href*="keyboard_shortcuts"],
#round-map a[href*="terms"],
#round-map a[href*="report_a_map_error"] {
    display: none !important;
}

.gm-control-active {
    all: initial;
}

/* Prevent global svg styles from affecting Google controls */
.gm-style button svg {
    width: 24px !important;
    height: 24px !important;
}

/* Ensure markers are visible on mobile */
.gm-style .gm-style-iw,
/* InfoWindow */
.gm-style .gmp-marker,
/* AdvancedMarkerElement */
.gm-style .gm-marker

/* Standard Marker */
    {
    display: block !important;
    visibility: visible !important;
    z-index: 1000 !important;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    /* ⬅ allows wrapping on small screens */
    gap: 1rem;
    /* optional: spacing between elements */
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    padding: 1rem 2rem;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
    /* ⬅ prevent shrinking */
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
}


#language-switcher {
    flex-shrink: 0;
    white-space: nowrap;
}


main {
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

nav ul li a {
    text-decoration: none;
    text-transform: uppercase;
    /* 🔠 All caps */
    font-weight: 600;
    /* 🧱 Semi-bold */
    letter-spacing: 0.05em;
    /* 🌬️ Some breathing room */
    color: #444;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

nav ul li a:hover {
    color: #000;
    border-bottom: 2px solid #ccc;
    /* 💡 Subtle underline on hover */
}

nav ul li a.active {
    color: #0066cc;
    border-bottom: 2px solid #0066cc;
}

/* Base styles */
.hamburger {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    /* hidden on desktop */
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
    }

    nav.show {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        padding-left: 0;
    }

    #language-switcher {
        margin-top: 1rem;
    }

    .navbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }
}

.app-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.app-links a img {
    height: 60px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.app-links a:hover img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-box {
    margin-top: 1.5rem;
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.contact-email {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-email:hover {
    color: #004c99;
    text-decoration: underline;
}

.custom-marker {
    width: 40px;
    height: 40px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-circle {
    width: 32px;
    height: 32px;
    background-color: #4285F4;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.marker-number {
    user-select: none;
}

html.lightbox-active,
body.lightbox-active {
    touch-action: none;
    overflow: hidden;
}