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

@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

body {
    font-family: 'Lora', 'Georgia', serif;
    line-height: 1.6;
    color: #2d2d2d;
    background-color: #fdfdfd;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* Header Styles */
.header {
    background: #ffffff;
    color: #2d2d2d;
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 3px solid #f0f0f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header h1 {
    font-family: 'Crimson Text', 'Georgia', serif;
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.go-to-map-btn {
    background: #2d2d2d;
    border: 2px solid #2d2d2d;
    color: white;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-family: 'Lora', serif;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.go-to-map-btn:hover {
    background: #E74C3C;
    border-color: #E74C3C;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.header p {
    max-width: 800px;
    margin: 1rem auto;
    text-align: left;
    font-size: 1.1rem;
}

.header h2 {
    color: #1a1a1a;
    font-family: 'Crimson Text', 'Georgia', serif;
    font-size: 1.6rem;
    margin: 2rem auto 1rem auto;
    font-weight: 600;
    max-width: 800px;
    text-align: left;
}

.header ul {
    margin: 1rem auto;
    padding-left: 2rem;
    max-width: 800px;
    text-align: left;
}

.header li {
    font-size: 1.1rem
}

.legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.marker.eastern {
    background-color: #F39C12;
}

.marker.piedmont {
    background-color: #E74C3C;
}

/* Map Section */
.map-section {
    background: white;
    padding: 2rem 0 0 0;
}

.map-header {
    font-family: 'Crimson Text', 'Georgia', serif;
    font-size: 2rem;
    color: #1a1a1a;
    text-align: center;
    margin: 0 2rem 2rem 2rem;
    font-weight: 600;
}

/* Map Container */
.map-container {
    position: relative;
    height: 70vh;
    min-height: 400px;
    margin: 0;
}

#map {
    height: 100%;
    width: 100%;
}

.map-instructions {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.4);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 1000;
}

/* Restaurant Details */
.restaurant-details {
    background: white;
    border-top: 4px solid #2d2d2d;
    padding: 2rem;
    margin: 0;
}

.restaurant-details.hidden {
    display: none;
}

.details-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.details-header h2 {
    color: #1a1a1a;
    font-size: 2rem;
    margin: 0;
}


.restaurant-info {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #E74C3C;
}

.restaurant-info p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.restaurant-info p:last-child {
    margin-bottom: 0;
}

.description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.photos-section h3 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 100%;
}

.photo-container {
    display: flex;
    flex-direction: column;
}

.photo-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
}

.photo-item img {
    width: 100%;
    height: 100%;
}

.photo-item img.lazy-load {
    opacity: 0.7;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1rem 0.5rem 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    opacity: 1;
}

.photo-source {
    background: #f8f8f8;
    padding: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    border-top: 1px solid #e8e8e8;
}

.photo-source a {
    color: #E74C3C;
    text-decoration: none;
}

.photo-source a:hover {
    text-decoration: underline;
}

.no-photos {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

/* Photo Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modal-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.modal-caption {
    padding: 1rem;
    background: white;
    text-align: center;
    font-weight: bold;
}

/* Footer */
.footer {
    background: #f8f8f8;
    color: #2d2d2d;
    padding: 3rem 2rem;
    margin-top: 0;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer h3 {
    color: #FF6B47;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.footer p {
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

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

.footer a {
    color: #E74C3C;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    display: inline-block;
    font-weight: 500;
}

.footer a:hover {
    background-color: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    text-decoration: underline;
}

.warning {
    background: rgba(255, 107, 71, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #FF6B47;
    margin-top: 1.5rem;
    font-weight: bold;
}

/* Custom Map Marker Styles */
.custom-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s;
}

.custom-marker:hover {
    transform: scale(1.2);
}

.custom-marker.eastern {
    background-color: #F39C12;
}

.custom-marker.piedmont {
    background-color: #E74C3C;
}

.custom-marker.closed {
    background-color: #666;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .intro {
        padding: 1rem;
        text-align: left;
    }

    .legend {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .map-container {
        height: 60vh;
        min-height: 350px;
    }

    .map-instructions {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .restaurant-details {
        padding: 1.5rem 1rem;
    }

    .details-header h2 {
        font-size: 1.5rem;
    }

    .restaurant-info {
        padding: 1rem;
    }

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

    .footer {
        padding: 2rem 1rem;
    }

    .footer h3 {
        font-size: 1.5rem;
    }

    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .intro p {
        font-size: 1rem;
    }

    .legend-item {
        font-size: 0.9rem;
    }

    .map-container {
        height: 50vh;
        min-height: 300px;
    }


    .photo-gallery {
        grid-template-columns: 1fr;
    }
}

/* Touch-friendly map controls */
.leaflet-control-container {
    font-size: 18px;
}

.leaflet-control-zoom a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 20px;
}

/* Ensure map requires two-finger interaction on mobile */
.leaflet-container {
    touch-action: none;
}

/* Allow normal touch behavior on desktop */
@media (min-width: 769px) {
    .leaflet-container {
        touch-action: auto;
    }
}

/* Custom cluster icon styling */
.custom-cluster-icon div:hover {
    transform: scale(1.1);
}

/* Override default cluster styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: none !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: none !important;
    border: none !important;
}