/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    background: url('images/bauska-ca.jpg') no-repeat center center/cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    overflow-x: hidden;
}

/* Sidebar & Menu */
.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: black;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.language-flags {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 0;
    width: 100%;
}

.language-flags .flag {
    text-decoration: none;
    font-size: 20px;
    margin: 0 8px;
    transition: transform 0.2s;
}

.language-flags .flag:hover,
.language-flag:hover {
    transform: scale(1.2);
    opacity: 0.8;
    cursor: pointer;
}

.language-flag.active {
    border-bottom: 2px solid #fff;
    padding-bottom: 2px;
}


.sidebar {
    position: fixed;
    top: -100vh;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    transition: 0.3s;
    z-index: 999;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar.active {
    top: 0;
}

.sidebar-search {
    width: 85%;
    max-width: 500px;
    padding: 12px;
    border-radius: 25px;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.sidebar.active .sidebar-search {
    opacity: 1;
}

.sidebar-links {
    list-style: none;
    padding: 0;
}

.sidebar-links li {
    margin-bottom: 10px;
}

.sidebar-links a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

/* Snow Animation */
.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 0.6em;
    text-shadow: 0 0 1px #000;
    user-select: none;
    z-index: 1000;
    animation: fall linear forwards;
    opacity: 0.8;
}

@keyframes fall {
    to {
        transform: translateY(105vh);
    }
}

/* Snowflake Toggle Button */
.snowflake-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.snowflake-toggle:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Spot Page Styles */
.spot-page {
    background: url('images/bauska-ca.jpg') no-repeat center center/cover;
    color: white;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spot-page #content {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    margin: 0 auto;
    max-width: 900px;
    position: relative;
    width: 90%;
}

.spot-page #content h1 {
    background: rgba(0, 0, 0, 0.9);
    margin: 0;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 100;
}


.spot-page #content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 70px 0 20px;
    display: block;
    position: relative;
    box-shadow: 0 4px 8px rgb(0, 0, 0, 0.2);
}

/* Information Section */
.spot-page .info-section {
    margin-top: 20px;
    padding: 20px;
}

/* Collapsible Sections */
.collapsible-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.collapsible-section h3 {
    margin-top: 0;
    color: #fff;
}

.preview-text, .full-text {
    margin: 10px 0;
    line-height: 1.5;
}

/* ✅ Fix for newlines in opening times */
.full-text {
    white-space: pre-line;
}

/* Hidden Sections */
.hidden {
    display: none;
}

/* Toggle Button */
.toggle-btn {
    background: #333;
    color: white;
    border: 1px solid #666;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.toggle-btn:hover {
    background: #444;
}

.toggle-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s;
    background-color: rgba(255, 255, 255, 0.1);
}

.toggle-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.expand-icon, .collapse-icon {
    transition: transform 0.3s ease;
}

.hidden {
    display: none;
}

.collapsible-section a {
    color: #3a87fe;
    text-decoration: none;
}

.collapsible-section a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .spot-page #content {
        width: 100%;
        margin: 0;
        padding: 10px;
    }

    .spot-page #content h1 {
        font-size: 1.5rem;
        padding: 15px 10px;
    }

    .spot-page #content img {
        width: 100%;
        margin: 60px 0 10px;
        border-radius: 0;
    }

    .info-section {
        padding: 10px;
    }

    .collapsible-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .menu-btn {
        top: 10px;
        left: 10px;
    }

    .sidebar {
        padding: 10px;
    }

    .sidebar-search {
        width: 90%;
    }

    header {
        width: 90%;
        margin: 10px;
        padding: 15px;
    }

    .toggle-btn {
        width: 100%;
        margin-top: 10px;
        padding: 8px;
    }
}

/* Header */
header {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    width: 50%;
    max-width: 330px;
    margin: 20px auto;
}

header h1 {
    font-size: 2rem;
    margin: 0 0 10px 0;
}

header p {
    font-size: 1.1rem;
    margin: 0 0 20px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 10px;
    background: blue;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    width: 80%;
    max-width: 160px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    background: blue;
    text-decoration: none;
    color: white;
}

@media (max-width: 480px) {
    header {
        width: 95%;
        padding: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
        width: 90%;
    }
}

/* Map */
#map {
    height: 500px;
    width: 80%;
    margin: 20px auto;
    position: relative;
    transition: all 0.3s ease;
}

/* Forms */
.form-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
}

input, textarea {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border-radius: 4px;
    border: 1px solid #ddd;
}

button {
    background: blue;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* Custom Map Popup Styling */
.custom-popup .maplibregl-popup-content {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 220px;
}

.custom-popup .maplibregl-popup-close-button {
    display: none; /* Hide the default close button */
}

.popup-close-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: white;
    padding: 0;
    z-index: 10;
}

.popup-container {
    width: 100%;
}

.popup-header {
    background-color: #1a56db;
    color: white;
    padding: 8px 10px;
    position: relative;
}

.popup-header h3 {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
}

.rating {
    font-size: 10px;
    margin-top: 2px;
}

.popup-content {
    padding: 8px 10px;
    background-color: white;
}

.popup-content p {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.spot-type {
    background-color: #f1f1f1;
    color: #666;
    padding: 3px 6px;
    border-radius: 10px;
    font-size: 10px;
}

.view-details-btn {
    background-color: #1a56db;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
}

.view-details-btn:hover {
    background-color: #1642a3;
}

.fullscreen-map {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.map-control-button {
    position: absolute;
    z-index: 10;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px;
    color: #000;
    font-weight: bold;
    padding: 6px;
}

.map-control-button:hover {
    color: #007bff;
    background-color: #f8f8f8;
}

#mapFullscreenBtn {
    top: 10px;
    left: 10px;
}