/* Reset */
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* CSS adjustments for your header and language switcher */
header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 20px;
}

.logo-container {
    flex: 1;
}

.logo {
    max-height: 60px; /* Adjust based on your logo size */
}

/* This moves the language switcher from header to nav */
header .language-switcher {
    display: none; /* Hide it in the header */
}

nav {
    width: 100%;
    margin-top: 10px;
    position: relative; /* For absolute positioning of language switcher */
}

.main-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #f0f0f0; /* Your gray bar color */
}

.main-menu li {
    padding: 0;
}

.main-menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
}

.main-menu a.active {
    background-color: #4a90e2;
    color: white;
}

/* Add this language switcher to the nav instead */
nav .language-switcher {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.language-switcher a {
    text-decoration: none;
    color: #555;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 3px;
}

.language-switcher a.active {
    background-color: #4a90e2;
    color: white;
}

.language-switcher a:hover:not(.active) {
    background-color: #ddd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav .language-switcher {
        position: static;
        margin-top: 10px;
        transform: none;
        justify-content: flex-end;
    }
}
/* Page Banner */
.page-banner {
    background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../css/imgs/header11.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 20px;
    text-align: left;
}

.page-banner h1 {
    font-size: 1.8em;
    margin-bottom: 20px;
    margin-left: 0px;
    text-shadow: 1px 1px 1px #000000;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 20px;
    background-color: #f3f3f3;
    color: #666;
}

.breadcrumbs a {
    color: #4BA6C3;
    text-decoration: none;
}

/* Page Content */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.intro-text {
    margin-bottom: 30px;
}

blockquote {
    border-left: 4px solid #4BA6C3;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
}

/* Main container */
.search-and-map-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* For mobile responsiveness */
}

/* Search section */
.search-section {
    flex: 1;
    width: 100%;
    min-width: 300px;
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}

.search-field {
    margin-bottom: 15px;
    width: 100%;
}

.search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.search-field input[type="text"],
.search-field select {
    width: 100%;
    box-sizing: border-box;
    height: 40px; /* Consistent height */
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.search-button, 
.reset-button {
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
}

.search-button {
    background-color: #4a90e2;
    color: white;
    border: none;
}

.reset-button {
    background-color: #6c757d;
    color: white;
    border: none;
    display: inline-block;
}

/* Map preview */
.map-preview {
    flex: 2;
    min-width: 300px;
    height: 400px;
    background-color: #e9e9e9;
    border-radius: 8px;
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-and-map-container {
        flex-direction: column;
    }
    
    .map-preview {
        height: 300px;
    }
}
.search-and-results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.map-preview {
    flex: 1 1 300px;
    height: 400px;
    background-color: #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.museums-grid {
    flex: 2 1 600px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-and-results-container {
        flex-direction: column;
    }
    
    .map-preview {
        height: 300px;
        margin-bottom: 20px;
    }
}
/* Guides Grid */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.guide-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.guide-card:hover {
    transform: translateY(-5px);
}

.guide-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.guide-info {
    padding: 15px;
}

.guide-info h2 {
    margin-bottom: 10px;
    font-size: 1.2em;
}

.guide-location {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-menu {
        flex-direction: column;
    }
    
    .search-field {
        flex: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .guides-grid {
        grid-template-columns: 1fr;
    }
}

/* Info-sivun tyylit */
.info-section {
    margin-bottom: 40px;
}

.info-section h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 2em;
}

.info-text {
    flex: 1;
}

/* Ensimmäinen info-osio näytetään kahdessa sarakkeessa */
.info-section:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.info-image {
    flex: 0 0 350px;
}

.info-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .info-section:first-child {
        flex-direction: column;
    }
    
    .info-image {
        flex: 0 0 100%;
        margin-top: 20px;
    }
}

.info-section a {
    color: #4BA6C3;
    text-decoration: none;
}

.info-section a:hover {
    text-decoration: underline;
}
/* Museums Grid */
.museums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.museum-card {
    position: relative;
    overflow: hidden;
    height: 250px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.museum-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.museum-image {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: white;
}

.museum-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.museum-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
    padding: 15px;
    transition: background 0.3s;
}

.museum-card:hover .museum-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0.3) 100%);
}

.museum-overlay h2 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.museum-description {
    margin-bottom: 5px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.museum-location {
    font-size: 0.8rem;
    font-style: italic;
    margin-bottom: 0;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .museums-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 480px) {
    .museums-grid {
        grid-template-columns: 1fr;
    }
}

/* Lazy Loading Styles */

/* Lazy image placeholder styling */
.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-color: #f0f0f0; /* Light gray placeholder */
}

/* When image is loaded */
.image-loaded {
    opacity: 1;
}

/* Museum card transitions */
.museum-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.museum-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Loading spinner styles */
.loading-spinner {
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #337ab7;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blur-up effect for images */
.museum-image {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    height: 200px;
}

.museum-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease, opacity 0.5s ease;
}

/* Small thumbnail placeholder that will be shown while the full image loads */
.lazy-image {
    filter: blur(10px);
    transform: scale(1.05);
}

.image-loaded {
    filter: blur(0);
    transform: scale(1);
}

/* Museum overlay animations */
.museum-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
    color: white;
    padding: 15px;
    transform: translateY(20px);
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.museum-card:hover .museum-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .museums-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .museum-image {
        height: 180px;
    }
}

@media screen and (max-width: 480px) {
    .museums-grid {
        grid-template-columns: 1fr;
    }
    
    .museum-image {
        height: 200px;
    }
}

/* Päivitetyt tyylimäärittelyt hakupainikkeille */
.search-button,
.reset-button {
    background-color: #4BA6C3; /* Hakupainikkeen sininen väri */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.0rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    min-width: 150px; /* Asetetaan vähimmäisleveys */
    text-align: center;
    transition: background-color 0.3s;
    margin: 0 5px; /* Lisätään hieman marginaalia painikkeiden väliin */
    height: 40px; /* Asetetaan kiinteä korkeus */
    line-height: 20px; /* Keskitetään teksti pystysuunnassa */
    box-sizing: border-box; /* Varmistetaan että padding ei vaikuta kokoon */
}

.search-button {
    background-color: #4BA6C3; /* Hakupainikkeen sininen väri */
}

.search-button:hover {
    background-color: #3a8a9e; /* Tummempi sininen hover-tilassa */
}

.reset-button {
    background-color: #888; /* Harmaa väri "Näytä kaikki" -painikkeelle */
}

.reset-button:hover {
    background-color: #666; /* Tummempi harmaa hover-tilassa */
}

/* Muokataan hakuriviä niin, että painikkeet ovat vierekkäin */
.search-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    align-items: center;
    justify-content: flex-start; /* Tasaa painikkeet vasemmalle */
}

/* Jos haluat painikkeet keskitettynä */
.search-row:last-child {
    justify-content: center; /* Keskitetään painikkeet viimeisellä rivillä */
}