/* ================= OVERLAY ================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(72, 153, 108, 0.35), transparent 45%),
        radial-gradient(circle at bottom right, rgba(5, 55, 23, 0.85), #053717 60%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

/* ================= FLOATING CARD ================= */
.modal {
    position: relative;
    width: min(560px, 92%);
    padding: 42px 38px;
    border-radius: 26px;

    background:
        linear-gradient(160deg, #ffffff, #eef6f1);

    box-shadow:
        0 40px 120px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);

    animation: modalFloatIn 0.5s cubic-bezier(.2,.9,.3,1);
    overflow: hidden;
}

/* Decorative blob */
.modal::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(5, 55, 23, 0.18), transparent 70%);
    top: -80px;
    right: -60px;
    border-radius: 50%;
}

/* ================= ANIMATION ================= */
@keyframes modalFloatIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================= TITLE ================= */
.modal h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #053717;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

/* ================= DESCRIPTION ================= */
#modal-description {
    font-size: 1.05rem;
    color: #4f6b5d;
    line-height: 1.7;
    margin-bottom: 28px;
}

/* ================= INFO GRID ================= */
.modal-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.modal-info p {
    margin: 0;
    padding: 14px 16px;
    border-radius: 14px;

    background: linear-gradient(
        145deg,
        rgba(5, 55, 23, 0.06),
        rgba(5, 55, 23, 0.02)
    );

    color: #163528;
    font-size: 0.95rem;
    font-weight: 500;

    border: 1px solid rgba(5, 55, 23, 0.12);
}

/* Make long text span full width */
.modal-info p:nth-child(1),
.modal-info p:nth-child(2) {
    grid-column: span 2;
}

/* ================= CLOSE BUTTON ================= */
.modal-close {
    position: absolute;
    top: 18px;
    right: 20px;

    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;

    background: linear-gradient(
        145deg,
        #053717,
        #0b5a2a
    );

    color: #ffffff;
    font-size: 1.4rem;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
}

/* ================= MOBILE ================= */
@media (max-width: 520px) {
    .modal {
        padding: 30px 24px;
        border-radius: 20px;
    }

    .modal-info {
        grid-template-columns: 1fr;
    }

    .modal-info p {
        grid-column: span 1 !important;
    }
}

/* ================= MAIN STYLES ================= */

/* Hero Section */
.hero {
    background: 
        linear-gradient(rgba(225, 235, 219, 0.7), rgba(225, 235, 219, 0.7)),
        url('./images/c34da73dcdb926cdbc847f14e64486e1d0891c1d.png') no-repeat center center;
    background-size: cover;
    text-align: center;
    padding: 120px 0;
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.hero .container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #053717;
    font-weight: 700;
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 40px;
    color: #053717;
    line-height: 1.4;
}

hr {
    border: none;
    height: 1px;
    background-color: #053717;
    margin: 40px auto;
    width: 80%;
}

/* What Is Section */
.what-is {
    text-align: center;
}

.what-is h3 {
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.audience-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.audience-card {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.audience-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.audience-card h4 {
    color: #053717;
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Solution Section */
.solution {
    background-color: #ffffff;
}

.solution h3 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 30px;
}

.solution-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.highlight {
    background-color: rgba(5, 55, 23, 0.1);
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    border-left: 5px solid #053717;
}

/* ==================== MAP SECTION REDESIGN ==================== */

.map-section {
    padding: 40px 0;
    background-color: #053717;
}

.map-section h3 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #ffffff;
}

.map-filters-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

/* Left sidebar (20%) */
.filters-sidebar {
    flex: 0 0 20%;
    min-width: 250px;
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(5, 55, 23, 0.08);
    border: 1px solid #e0f2e9;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0f2e9;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 20px;
}

.filter-group h4 {
    color: #053717;
    font-size: 1.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group h4:before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background-color: #053717;
    border-radius: 2px;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8fdf5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    font-weight: 500;
    color: #053717;
}

.filter-item:hover {
    background-color: #e0f2e9;
    transform: translateX(5px);
}

.filter-item.active {
    background-color: #053717;
    color: white;
    border-color: #053717;
    box-shadow: 0 4px 12px rgba(5, 55, 23, 0.2);
}

.filter-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Nutritional category colors */
.filter-dot.vegan { background-color: #4CAF50; }
.filter-dot.vegetarian { background-color: #8BC34A; }
.filter-dot.nut-free { background-color: #FF9800; }
.filter-dot.gluten-free { background-color: #9C27B0; }
.filter-dot.lactose-free { background-color: #2196F3; }
.filter-dot.keto { background-color: #795548; }
.filter-dot.high-protein { background-color: #FF5722; }
.filter-dot.low-carb { background-color: #00BCD4; }

.filter-icon {
    width: 30px;
    height: 30px;
    background-color: #e0f2e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    color: #053717;
    font-size: 0.9rem;
}

.filter-item.active .filter-icon {
    background-color: white;
    color: #053717;
}

.clear-filters-btn {
    width: 100%;
    background-color: transparent;
    color: #053717;
    border: 2px solid #e0e5f2;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.clear-filters-btn:hover {
    background-color: #e0f2e9;
    border-color: #053717;
}

/* Right content (80%) */
.map-main-content {
    flex: 1;
    min-width: 0; /* Important for flexbox with text overflow */
}

.map-container-single {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(5, 55, 23, 0.1);
    margin-bottom: 25px;
    position: relative;
}

#restaurant-map {
    width: 100%;
    height: 450px !important;
    background-color: #f0f0f0;
}

/* Beautiful sort by option */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.results-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #053717;
    font-size: 1.1rem;
    background-color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(5, 55, 23, 0.05);
    border: 1px solid #e0f2e9;
}

.results-count i {
    color: #4CAF50;
}

#results-number {
    color: #4CAF50;
    font-weight: 700;
    font-size: 1.3rem;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
}

.sort-label i {
    color: #ffffff;
}

.custom-select {
    position: relative;
    min-width: 180px;
}

.custom-select select {
    appearance: none;
    width: 100%;
    padding: 12px 20px;
    padding-right: 45px;
    border: 2px solid #e0f2e9;
    border-radius: 10px;
    background-color: white;
    color: #053717;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(5, 55, 23, 0.05);
}

.custom-select select:focus {
    outline: none;
    border-color: #053717;
    box-shadow: 0 0 0 3px rgba(5, 55, 23, 0.1);
}

.custom-select:hover select {
    border-color: #053717;
}

.select-arrow {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: #053717;
    background-color: #f8fdf5;
    border-left: 2px solid #e0f2e9;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s;
}

.custom-select:hover .select-arrow {
    background-color: #e0f2e9;
    color: #053717;
}

/* Vertical restaurant list */
.restaurant-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 10px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix restaurant card layout */
.restaurant-card-vertical {
    background-color: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(5, 55, 23, 0.08);
    transition: all 0.3s ease;
    border: 2px solid #053717;
    display: flex;
    min-height: 220px;
    margin: 0;
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
}

.restaurant-card-vertical:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(5, 55, 23, 0.15);
}

/* Fix image container */
.restaurant-card-vertical .restaurant-image {
    flex: 0 0 300px;
    min-height: 220px;
    background-color: #e0f2e9;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    display: block !important;
    visibility: visible !important;
}

/* Add gradient overlay for better text visibility */
.restaurant-card-vertical .restaurant-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    z-index: 1;
}

/* Fix info container */
.restaurant-card-vertical .restaurant-info {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: white;
    border-radius: 0 12px 12px 0;
}

/* Fix headings */
.restaurant-card-vertical h4 {
    color: #053717;
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.3;
    font-weight: 600;
}

/* Fix tags container */
.restaurant-card-vertical .restaurant-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

/* Fix individual tags */
.restaurant-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: none;
}

/* Tag colors matching filter dots */
.restaurant-tag.vegan { 
    background-color: rgba(76, 175, 80, 0.1); 
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}
.restaurant-tag.vegetarian { 
    background-color: rgba(139, 195, 74, 0.1); 
    color: #8BC34A;
    border: 1px solid rgba(139, 195, 74, 0.3);
}
.restaurant-tag.glutenfree { 
    background-color: rgba(156, 39, 176, 0.1); 
    color: #9C27B0;
    border: 1px solid rgba(156, 39, 176, 0.3);
}
.restaurant-tag.nutfree { 
    background-color: rgba(255, 152, 0, 0.1); 
    color: #FF9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}
.restaurant-tag.lactosefree { 
    background-color: rgba(33, 150, 243, 0.1); 
    color: #2196F3;
    border: 1px solid rgba(33, 150, 243, 0.3);
}
.restaurant-tag.keto { 
    background-color: rgba(121, 85, 72, 0.1); 
    color: #795548;
    border: 1px solid rgba(121, 85, 72, 0.3);
}
.restaurant-tag.highprotein { 
    background-color: rgba(255, 87, 34, 0.1); 
    color: #FF5722;
    border: 1px solid rgba(255, 87, 34, 0.3);
}
.restaurant-tag.lowcarb { 
    background-color: rgba(0, 188, 212, 0.1); 
    color: #00BCD4;
    border: 1px solid rgba(0, 188, 212, 0.3);
}

/* Fix description */
.restaurant-card-vertical .restaurant-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

/* Fix details container */
.restaurant-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #e0f2e9;
    border-bottom: 1px solid #e0f2e9;
}

/* Fix detail items */
.restaurant-address,
.restaurant-distance,
.restaurant-price {
    color: #777;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 120px;
}

.restaurant-distance {
    color: #4CAF50;
    font-weight: 600;
}

.restaurant-price {
    color: #FF9800;
    font-weight: 600;
}

/* Fix rating badge */
.restaurant-rating {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #FF9800;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
    z-index: 2;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

/* Fix establishment tag */
.restaurant-establishment-tag {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: rgba(5, 55, 23, 0.9);
    color: white;
    padding: 8px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    z-index: 2;
    border: none;
}

/* Fix view details button */
.view-details-btn {
    background-color: #053717;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    margin-top: auto;
    align-self: flex-start;
}

.view-details-btn:hover {
    background-color: #0a4d23;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(5, 55, 23, 0.2);
}

/* No results message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(5, 55, 23, 0.08);
    border: 1px solid #e0f2e9;
}

/* Responsive fixes */
@media (max-width: 1200px) {
    .restaurant-card-vertical .restaurant-image {
        flex: 0 0 250px;
    }
}

@media (max-width: 992px) {
    .restaurant-card-vertical {
        flex-direction: column;
    }
    
    .restaurant-card-vertical .restaurant-image {
        flex: none;
        height: 200px;
        width: 100%;
        border-radius: 12px 12px 0 0;
    }
    
    .restaurant-card-vertical .restaurant-info {
        border-radius: 0 0 12px 12px;
    }
}

@media (max-width: 768px) {
    .restaurant-card-vertical .restaurant-image {
        height: 180px;
    }
    
    .restaurant-details {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .restaurant-card-vertical .restaurant-image {
        height: 150px;
    }
    
    .restaurant-card-vertical h4 {
        font-size: 1.2rem;
    }
    
    .restaurant-card-vertical .restaurant-info {
        padding: 20px;
    }
    
    .view-details-btn {
        width: 100%;
    }
}

/* ==================== MAP CONTROLS FIX ==================== */

/* Fix for Leaflet zoom control overlapping navbar */
.leaflet-control-zoom {
    position: absolute !important;
    bottom: 10px !important;
    left: 5px !important;
    right: auto !important;
    top: auto !important;

    border: none !important;
    box-shadow: 0 3px 10px rgba(5, 55, 23, 0.15) !important;
    border-radius: 10px !important;
    overflow: hidden;
    z-index: 400 !important; /* inside map */
}

.leaflet-control-zoom a {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    background-color: white !important;
    color: #053717 !important;
    border: 1px solid #e0f2e9 !important;
    border-radius: 0 !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    transition: all 0.3s !important;
}

.leaflet-control-zoom a:hover {
    background-color: #053717 !important;
    color: white !important;
    border-color: #053717 !important;
}

.leaflet-control-zoom a:first-child {
    border-bottom: 1px solid #e0f2e9 !important;
    border-radius: 10px 10px 0 0 !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 10px 10px !important;
}

.leaflet-control-zoom a.leaflet-disabled {
    background-color: #000000 !important;
    color: #aaa !important; 
    cursor: not-allowed !important;
}

/* Fix for attribution control */
.leaflet-control-attribution {
    display: none !important;
}

.leaflet-control-attribution a {
    color: #053717 !important;
    font-weight: 600 !important;
}

.leaflet-control-attribution a:hover {
    color: #4CAF50 !important;
    text-decoration: underline !important;
}

/* For hiding attribution completely */
.leaflet-control-attribution.leaflet-control {
    display: none !important;
}

.leaflet-top.leaflet-left {
    top: 80px !important; /* Move below navbar (navbar is ~70px) */
    left: 15px !important;
    z-index: 700 !important; /* Below navbar (1000) */
}

/* Alternative: Hide only on mobile */
@media (max-width: 768px) {
    .leaflet-control-zoom {
        transform: scale(0.9);
        bottom: 15px !important;
        left: 15px !important;
    }
}
