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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background: #f7fafc;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 2rem 0;
    color: #1a202c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    text-align: center;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 0.5rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header-location {
    position: absolute;
    right: 0;
}

.location-compact {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4a5568;
    transition: all 0.3s ease;
}

.location-compact:hover {
    background: #edf2f7;
    border-color: #3182ce;
    transform: translateY(-1px);
}

.location-icon-small {
    background: #3182ce;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-icon-small i {
    font-size: 0.9rem;
    color: #ffffff;
}

.location-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.location-label {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.location-value {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.change-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.change-btn:hover {
    background: #3182ce;
    color: #ffffff;
    border-color: #3182ce;
    transform: scale(1.05);
}

.header-location.hidden {
    display: none;
}

.logo i {
    font-size: 2.5rem;
    color: #3182ce;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: #2d3748;
}

.subtitle {
    font-size: 1.2rem;
    color: #718096;
    font-weight: 400;
}

/* Main content */
.main {
    padding: 2rem 0;
    flex: 1;
}


/* Controls */
.controls-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.controls-sticky.enhanced {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-bottom-color: #cbd5e0;
}

.controls {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.controls-sticky .controls {
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 1rem 0;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filters select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.stat-card i {
    font-size: 2.5rem;
    color: #3182ce;
    flex-shrink: 0;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.1;
}

.stat-label {
    font-size: 1rem;
    color: #718096;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Sites grid */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.site-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.site-card::after {
    content: "Click to view on UNESCO site";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(49, 130, 206, 0.9);
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.site-card:hover::after {
    transform: translateY(0);
}

/* Site image */
.site-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.site-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.site-card:hover .site-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.7) 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 1rem;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
}

.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.image-error {
    background: linear-gradient(135deg, #a0aec0 0%, #718096 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-error::before {
    content: '🏛️';
    font-size: 4rem;
    opacity: 0.6;
    z-index: 1;
}

.image-error::after {
    content: 'Image not available';
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.8;
    z-index: 2;
}

.site-category {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-category.cultural {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.site-category.natural {
    background: #c6f6d5;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

/* Site content */
.site-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.site-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
}

.site-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #2d3748;
}

.site-distance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #3182ce;
}

.navigation-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.distance-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.distance-info[data-action="directions"] {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(49, 130, 206, 0.05);
    border: 1px solid rgba(49, 130, 206, 0.1);
}

.distance-info[data-action="directions"]:hover {
    background: rgba(49, 130, 206, 0.1);
    border-color: rgba(49, 130, 206, 0.2);
    transform: scale(1.02);
}

.distance-info[data-action="directions"]::after {
    content: "🗺️";
    margin-left: 0.25rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.distance-info i {
    color: #3182ce;
}

.direction-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(49, 130, 206, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3182ce;
    border: 1px solid rgba(49, 130, 206, 0.2);
    transition: all 0.3s ease;
}

.direction-indicator:hover {
    background: rgba(49, 130, 206, 0.15);
    transform: scale(1.05);
}

.direction-arrow {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1;
}

.direction-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 25px;
    text-align: center;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.google-earth-btn {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.google-earth-btn:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.3);
    transform: scale(1.1);
}

.site-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    flex: 1;
}

.site-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: start;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #718096;
}

.info-item i {
    color: #3182ce;
    width: 16px;
}

/* Country flags styling */
.countries-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.country-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    background: rgba(49, 130, 206, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(49, 130, 206, 0.1);
    transition: all 0.2s ease;
}

.country-item:hover {
    background: rgba(49, 130, 206, 0.1);
    border-color: rgba(49, 130, 206, 0.2);
    transform: scale(1.02);
}

/* Flag emoji styling */
.country-item::first-letter {
    font-size: 1.1em;
    margin-right: 0.1rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    color: #4a5568;
}

.loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.loading p {
    font-size: 1.2rem;
}

/* Location prompt */
.location-prompt {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.location-prompt.show {
    display: flex;
}

.prompt-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    margin: 0 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.prompt-content i {
    font-size: 4rem;
    color: #3182ce;
    margin-bottom: 1.5rem;
}

.prompt-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.prompt-content p {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.location-options {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.location-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.location-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(49, 130, 206, 0.1), transparent);
    transition: left 0.5s ease;
}

.location-option:hover {
    border-color: #3182ce;
    background: rgba(49, 130, 206, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(49, 130, 206, 0.15);
}

.location-option:hover::before {
    left: 100%;
}

.location-option:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.2);
}

.location-option i {
    font-size: 2rem;
    color: #3182ce;
    margin-bottom: 0.75rem;
}

.location-option h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.location-option p {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
    line-height: 1.4;
}

.prompt-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
    justify-content: center;
}

.btn-primary {
    background: #3182ce;
    color: white;
}

.btn-primary:hover {
    background: #2c5aa0;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(49, 130, 206, 0.4);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #3182ce;
    color: #3182ce;
}

/* City selector */
.city-selector {
    margin-bottom: 2rem;
}

.city-selector h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    text-align: center;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.city-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    min-height: 100px;
}

.city-btn:hover {
    border-color: #3182ce;
    background: rgba(49, 130, 206, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(49, 130, 206, 0.2);
}

.city-btn i {
    font-size: 1.8rem;
    color: #3182ce;
}

.city-btn span {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
}

.city-btn small {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 400;
}

.btn-back {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin: 0 auto;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Footer */
.footer {
    background: #2d3748;
    color: #e2e8f0;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}


/* Responsive design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header-location {
        position: static;
        margin-top: 1rem;
    }

    .header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .location-value {
        max-width: 150px;
    }

    .prompt-content {
        padding: 2rem;
        margin: 0 10px;
    }

    .location-options {
        grid-template-columns: 1fr;
    }

    .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .prompt-buttons {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        min-width: auto;
        width: 100%;
    }


    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls-sticky .controls {
        padding: 1rem;
    }

    .search-box {
        min-width: auto;
    }

    .filters {
        flex-direction: column;
    }

    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
        padding: 1rem 0;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .stat-card i {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }

    .sites-grid {
        grid-template-columns: 1fr;
    }


    .site-image {
        height: 180px;
    }

    .image-placeholder i {
        font-size: 2.5rem;
    }
    
    .distance-info[data-action="directions"] {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .site-card::after {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .countries-list {
        gap: 0.25rem;
    }
    
    .country-item {
        font-size: 0.8rem;
        padding: 0.15rem 0.4rem;
    }
    
    .site-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .navigation-buttons {
        gap: 0.25rem;
    }

    .nav-btn {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Hide loading initially */
.loading.hidden {
    display: none;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #4a5568;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    opacity: 0.8;
}

}

/* Extra small screens */
@media (max-width: 480px) {
.city-grid {
    grid-template-columns: 1fr;
}

.location-options {
    grid-template-columns: 1fr;
}

.prompt-content {
    padding: 1.5rem;
}
}