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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    padding: 1rem 0;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #2c3e50;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto 2rem;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    padding: 1rem 2rem;
    background: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #2980b9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Museum Cards */
.featured-museums, .top-countries, .museums-list, .country-detail, .subdivision-detail, .search-page {
    padding: 4rem 0;
}

.featured-museums h2, .top-countries h2, .museums-list h1, .country-detail h1, .subdivision-detail h1, .search-page h1 {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.top-museums, .nearby-museums {
    margin-top: 4rem;
}

.top-museums h2, .nearby-museums h2 {
    margin-bottom: 3rem;
    font-size: 2rem;
    color: #2c3e50;
}

.country-stats {
    margin-bottom: 4rem;
}

.subdivisions {
    margin-bottom: 4rem;
}

.subdivisions h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
    color: #2c3e50;
}

.museum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.search-results {
    margin-top: 3rem;
}

.search-results h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    color: #2c3e50;
}

.search-results p {
    margin-bottom: 2rem;
    color: #666;
}

.museum-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.museum-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.museum-content {
    padding: 1.5rem;
}

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

.museum-card h3 {
    margin-bottom: 0.5rem;
}

.museum-card h3 a {
    text-decoration: none;
    color: #2c3e50;
    font-size: 1.2rem;
}

.museum-card h3 a:hover {
    color: #3498db;
}

.location {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #f39c12;
}

.description {
    color: #666;
    line-height: 1.5;
}

/* Country Grid */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.country-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.country-card:hover {
    transform: translateY(-3px);
}

.country-card a {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: #333;
    text-align: center;
}

.country-card h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.country-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Country Stats */
.country-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Subdivision Grid */
.subdivision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.subdivision-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.subdivision-card:hover {
    transform: translateY(-3px);
}

.subdivision-card a {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: #333;
}

/* Museum Detail */
.museum-detail {
    padding: 2rem 0;
}

.museum-hero {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.nearby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.nearby-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.nearby-card:hover {
    transform: translateY(-3px);
}

.nearby-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

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

.nearby-content {
    padding: 1rem;
}

.nearby-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.nearby-content h4 a {
    text-decoration: none;
    color: #2c3e50;
}

.nearby-content h4 a:hover {
    color: #3498db;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background: #f8f9fa;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Categories Section */
.categories {
    padding: 4rem 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    display: block;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* CTA Section */
.cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.cta p {
    margin-bottom: 2rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
}

/* Countries List */
.countries-list {
    padding: 4rem 0;
}

.countries-list h1 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.countries-list p {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 1.2rem;
    color: #666;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.country-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.country-item:hover {
    transform: translateY(-5px);
}

.country-item a {
    display: block;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.country-flag {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.country-item h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.country-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.museum-count {
    color: #666;
    font-size: 0.9rem;
}

.avg-rating {
    color: #f39c12;
    font-weight: 600;
}

/* Image Gallery */
.image-gallery {
    margin: 3rem 0;
}

.image-gallery h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-image:hover {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

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

/* Error Pages */
.error-page {
    padding: 4rem 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-content h1 {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.search-suggestion {
    max-width: 500px;
    margin: 0 auto;
}

.search-suggestion h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.error-info {
    margin-top: 2rem;
    color: #666;
}

@media (max-width: 768px) {
    .error-content h1 {
        font-size: 2rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Museum Detail Enhancements */
.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.museum-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.main-content h1 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #2c3e50;
}

.rating-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    font-size: 1.2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.rating-badge {
    background: #27ae60;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.description-section,
.highlights-section,
.visitor-section,
.architecture-section,
.contact-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.description-section h2,
.highlights-section h2,
.visitor-section h2,
.architecture-section h2,
.contact-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.architecture {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.contact-info {
    margin-bottom: 2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.quick-facts {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.quick-facts h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.fact {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.fact:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.fact .label {
    font-weight: 600;
    color: #666;
}

.features-list {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.features-list h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.feature-item .icon {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .museum-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .main-content h1 {
        font-size: 2rem;
    }
}

.museum-detail h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.museum-info {
    margin-bottom: 3rem;
}

.rating-section {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.location-info {
    margin-bottom: 2rem;
}

.location-info p {
    margin-bottom: 0.5rem;
}

.description, .highlights, .visitor-info {
    margin-bottom: 2rem;
}

.description h3, .highlights h3, .visitor-info h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.pagination a {
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.pagination a:hover {
    background: #2980b9;
}

/* Autocomplete */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item strong {
    display: block;
    color: #2c3e50;
}

.autocomplete-item small {
    color: #666;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.view-all {
    text-align: center;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

.legal-links {
    margin-top: 1rem;
}

.legal-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
}

.legal-links a:hover {
    color: #3498db;
}

/* Legal Pages */
.legal-page {
    padding: 4rem 0;
}

.legal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.last-updated {
    color: #666;
    margin-bottom: 3rem;
    font-style: italic;
}

.legal-content {
    max-width: 800px;
    line-height: 1.8;
}

.legal-content h2 {
    color: #2c3e50;
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
}

.legal-content h3 {
    color: #34495e;
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.2rem;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-stats, .country-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 10px;
    }
    
    .search-box button {
        border-radius: 0 0 10px 10px;
    }
    
    .museum-grid {
        grid-template-columns: 1fr;
    }
    
    .nav .container {
        flex-direction: column;
        gap: 1rem;
    }
}