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

.main-home
{
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

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

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #1a233b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

/* Location status */
.location-status {
    background: linear-gradient(to right, #ffffff, #f9f9f9);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    border-left: 4px solid #1a233b;
    font-weight: 500;
}

.location-status i {
    margin-right: 10px;
    color: #1a233b;
}

/* Prayer times */
.prayer-times-container {
    margin: 30px 0;
}

.prayer-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    padding: 10px 0 20px;
}

.prayer-cards::-webkit-scrollbar {
    height: 6px;
}

.prayer-cards::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.prayer-cards::-webkit-scrollbar-thumb {
    background-color: #c5c5c8;
    border-radius: 20px;
}

.prayer-card {
    min-width: 120px;
    flex: 1;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.prayer-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.prayer-card:focus-visible {
    outline: 2px solid #DB9E30;
    outline-offset: 4px;
}

.prayer-card.selected {
    background: linear-gradient(135deg, #1a233b 0%, #2d3854 100%);
    color: #c5c5c8;
    border: none;
}

.prayer-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Poppins', serif;
    font-size: 1.1rem;
}

.prayer-time {
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

.prayer-card.selected .prayer-time {
    color: rgba(197, 197, 200, 0.9);
}

/* Filter controls */
.filter-controls {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    margin: 15px 0;
    padding-bottom: 15px;
    padding-top: 10px;
    scrollbar-width: thin;
    scrollbar-color: #c5c5c8 #f8f9fa;
    -webkit-overflow-scrolling: touch;
}

.filter-controls::-webkit-scrollbar {
    height: 6px;
}

.filter-controls::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.filter-controls::-webkit-scrollbar-thumb {
    background-color: #c5c5c8;
    border-radius: 20px;
}

.filter-button {
    background-color: white;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-button.active {
    background: linear-gradient(135deg, #1a233b 0%, #2d3854 100%);
    color: #c5c5c8;
    border: none;
}

/* Section title */
.section-title {
    font-size: 1.5rem;
    margin: 30px 0 20px;
    color: #1a233b;
    font-family: 'Cinzel Decorative', cursive, serif;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
    
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #1a233b, #2d3854);
    border-radius: 3px;
}

/* Mosque list */
.mosque-list-container {
    margin-bottom: 30px;
}
#mosque-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.mosque-card {
    display: flex;
    background: linear-gradient(to right, #ffffff, #f9f9f9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.mosque-card:focus-visible {
    outline: 2px solid #1a233b;
    outline-offset: 4px;
}

.mosque-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.mosque-image-container {
    width: 80px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7eb 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.mosque-image {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1a233b;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mosque-info {
    flex: 1;
    padding: 16px;
    border-left: 1px solid rgba(0, 0, 0, 0.03);
}

.mosque-name {
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Poppins', serif;
    font-size: 1.1rem;
    color: #1a233b;
}

.mosque-address {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.4;
}

.mosque-distance {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #4a5568;
    background: rgba(26, 35, 59, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    margin-right: auto;
}

.distance-icon {
    color: #1a233b;
    margin-right: 5px;
}

.distance-text {
    margin-left: 5px;
    font-weight: 500;
}

.direction-link {
    color: #1a233b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    padding: 6px 15px;
    border: 1px solid #1a233b;
    border-radius: 20px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.direction-link:hover {
    background: #1a233b;
    color: #c5c5c8;
}

/* Map section */
.map-section {
    position: relative;
    margin-bottom: 30px;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-container {
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
}

.map-container.active {
    height: 450px;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Mosque popup */
.mosque-popup {
    padding: 10px;
    max-width: 250px;
}

.mosque-popup-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a233b;
    font-family: 'Poppins', serif;
}

.mosque-popup-address {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 8px;
    line-height: 1.4;
}

.mosque-popup-distance {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 12px;
    font-weight: 500;
}

.mosque-popup-button {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #1a233b 0%, #2d3854 100%);
    color: #c5c5c8;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mosque-popup-button:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .prayer-card {
        min-width: 100px;
        padding: 12px;
    }
    
    .prayer-name {
        font-size: 1rem;
    }
    
    .prayer-time {
        font-size: 0.9rem;
    }
    
    .mosque-name {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .mosque-address {
        font-size: 0.9rem;
    }
    
    .direction-link {
        padding: 5px 12px;
        font-size: 0.85rem;
    }
    
    .mosque-distance {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .dropdown-menu {
        width: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .prayer-card {
        min-width: 90px;
        padding: 10px;
    }
    
    .prayer-name {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .prayer-time {
        font-size: 0.8rem;
    }
    
    .filter-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .mosque-image-container {
        width: 60px;
    }
    
    .mosque-image {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .mosque-name {
        font-size: 0.9rem;
    }
    
    .mosque-address {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .mosque-distance {
        padding: 3px 8px;
    }
    
    .direction-link {
        padding: 4px 10px;
        font-size: 0.8rem;
    }
    
    .map-container.active {
        height: 350px;
    }
}