/* Nearby Mosques Specific Styles */

.mosques-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    gap: 24px;
    display: flex;
    flex-direction: column;
}

/* Search & Filter Section */
.search-filter-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-alpha);
}

.filter-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.location-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.location-btn i {
    font-size: 16px;
}

/* Location Status */
.location-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.status-item i {
    color: var(--primary-color);
    font-size: 16px;
}

/* View Controls */
.view-section {
    margin-bottom: 24px;
}

.view-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    background: var(--card-bg);
    padding: 4px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    width: 100%; /* Full width like other buttons */
    max-width: 400px; /* Reasonable max width */
    margin: 0 auto;
}

.view-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.view-btn:hover:not(.active) {
    background: var(--hover-bg);
    color: var(--text-primary);
}

/* Content Views */
.content-view {
    display: none;
}

.content-view.active {
    display: block;
}

/* Favorites Section */
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
}

.favorites-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.favorites-title i {
    color: #e74c3c;
    font-size: 24px;
}

.favorites-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.favorites-actions {
    display: flex;
    gap: 12px;
}

.clear-all-btn {
    padding: 10px 16px;
    border: 2px solid #e74c3c;
    border-radius: 10px;
    background: transparent;
    color: #e74c3c;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-all-btn:hover {
    background: #e74c3c;
    color: white;
}

.browse-nearby-btn {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.browse-nearby-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Small version of browse nearby button */
.browse-nearby-btn-small {
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.browse-nearby-btn-small:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Favorite Mosque Cards */
.favorite-mosque-card {
    position: relative;
}

.favorite-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: #e74c3c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    z-index: 2;
}

.favorite-btn.favorited {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
}

/* Additional favorite styles */
.favorite-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 2px 8px;
    background: var(--surface-secondary);
    border-radius: 8px;
}

.remove-favorite-btn {
    background: transparent;
    border: 2px solid var(--error);
    color: var(--error);
    transition: all 0.3s ease;
}

.remove-favorite-btn:hover {
    background: var(--error);
    color: white;
}

/* Map content styles */
.map-stats {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--surface-secondary);
    border-radius: 8px;
    font-size: 0.9rem;
}

.stat-item i {
    color: var(--accent-primary);
    width: 16px;
}

/* Organized Map Content Styles - No Scroll */
.map-content-organized {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Compact Map Header */
.map-header-compact {
    margin-bottom: 20px;
}

.map-title-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.map-title-compact i {
    font-size: 24px;
    color: var(--accent-primary);
}

.map-title-compact h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.location-coords {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--surface-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

/* Compact Statistics */
.map-stats-compact {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-compact {
    flex: 1;
    background: var(--card-bg);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.stat-compact:hover {
    border-color: var(--accent-primary);
}

.stat-compact i {
    font-size: 20px;
    color: var(--accent-primary);
    margin-bottom: 6px;
    display: block;
}

.stat-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Compact Nearest Mosque */
.nearest-mosque-compact {
    background: var(--card-bg);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mosque-info-compact .mosque-name-compact {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-align: center;
}

.mosque-info-compact .mosque-address-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
}

.mosque-info-compact .mosque-address-compact i {
    color: var(--accent-primary);
    font-size: 12px;
}

.mosque-actions-compact {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Compact Buttons */
.btn-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 2px solid var(--border-primary);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-compact.primary {
    background: var(--gradient-primary);
    border-color: var(--accent-primary);
    color: white;
}

.btn-compact.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb), 0.3);
}

.btn-compact.secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.1);
}

/* Compact Map Note */
.map-note-compact {
    background: var(--surface-secondary);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.map-note-compact i {
    color: var(--accent-primary);
}

/* No Location State - Compact */
.map-no-location-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

.no-location-icon i {
    font-size: 48px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 16px;
}

.no-location-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-location-text p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 280px;
}

.enable-location-btn-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.enable-location-btn-compact:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(var(--accent-primary-rgb), 0.3);
}

/* Empty State - Compact */
.map-empty-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

.empty-icon i {
    font-size: 48px;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-bottom: 16px;
}

.empty-text h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-text p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.empty-actions-compact {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Remove scrollbar and ensure fit */
.map-container {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* Light mode - Beautiful blue and gray color scheme for map container */
[data-theme="light"] .map-title-compact h3,
[data-theme="light"] .mosque-name-compact,
[data-theme="light"] .no-location-text h3,
[data-theme="light"] .empty-text h3 {
    color: #3b82f6 !important; /* Beautiful blue for main headings */
}

[data-theme="light"] .map-title-compact i,
[data-theme="light"] .stat-compact i,
[data-theme="light"] .no-location-icon i,
[data-theme="light"] .empty-icon i {
    color: #3b82f6 !important; /* Consistent blue for icons */
}

[data-theme="light"] .location-coords,
[data-theme="light"] .mosque-address-compact,
[data-theme="light"] .no-location-text p,
[data-theme="light"] .empty-text p {
    color: #6b7280 !important; /* Gray for secondary text */
}

[data-theme="light"] .map-note-compact,
[data-theme="light"] .stat-compact .stat-label {
    color: #9ca3af !important; /* Light gray for notes and labels */
}

[data-theme="light"] .stat-compact .stat-value {
    color: #374151 !important; /* Darker gray for values */
}

[data-theme="light"] .map-content-organized p,
[data-theme="light"] .map-content-organized span {
    color: #4b5563 !important; /* Medium gray for general text */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-content-organized {
        padding: 16px;
    }
    
    .map-stats-compact {
        gap: 8px;
    }
    
    .stat-compact {
        padding: 10px 6px;
    }
    
    .stat-compact i {
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 14px;
    }
    
    .mosque-actions-compact {
        flex-direction: column;
        gap: 6px;
    }
    
    .btn-compact {
        padding: 10px 16px;
        justify-content: center;
    }
}

.favorite-btn.favorited:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Error State */
.error-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
    text-align: center;
}

.error-state i,
.empty-state i {
    font-size: 64px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.error-state h3,
.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.error-state p,
.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
}

.retry-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Mosques List */
.mosques-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mosque-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
}

.mosque-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.mosque-card.expanded {
    border-color: var(--primary-color);
    box-shadow: 0 8px 32px var(--primary-color-alpha);
}

.mosque-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
}

.real-data-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #10b981;
    color: white;
    font-size: 8px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mosque-info {
    flex: 1;
    min-width: 0;
}

.mosque-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.mosque-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.mosque-address i {
    margin-top: 2px;
    flex-shrink: 0;
}

.mosque-quick-info {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.distance-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.rating-badge {
    background: #f39c12;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.expand-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mosque-card:hover .expand-btn {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Expandable Details */
.mosque-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    display: none;
}

.mosque-card.expanded .mosque-details {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-item {
    display: grid;
    grid-template-columns: 24px 1fr 2fr;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-item i {
    color: var(--primary-color);
    text-align: center;
}

.detail-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary) !important;
    font-weight: 400 !important;
}

.detail-value.link {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500 !important;
}

.detail-value.link:hover {
    text-decoration: underline;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-content {
    text-align: center;
    color: var(--text-secondary);
}

.map-content i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.map-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.map-content p {
    font-size: 16px;
    margin-bottom: 24px;
}

.enable-location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.enable-location-btn:hover {
    background: var(--primary-dark);
}

/* Modal Styles */
.mosque-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    display: none;
}

.mosque-card.expanded .mosque-details {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-item {
    display: grid;
    grid-template-columns: 24px 1fr 2fr;
    gap: 12px;
    align-items: center;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-item i {
    color: var(--primary-color);
    text-align: center;
}

.detail-item span {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary) !important;
    font-weight: 400 !important;
}

.detail-value.link {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500 !important;
}

.detail-value.link:hover {
    text-decoration: underline;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.action-btn.primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-btn.primary:hover {
    background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mosques-container {
        padding: 16px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select,
    .location-btn {
        min-width: 0;
    }
    
    .location-status {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .view-controls {
        margin-left: 0;
        margin-right: 0;
        width: 100%; /* Full width on mobile */
        max-width: none; /* No max width restriction on mobile */
    }
    
    .view-btn {
        flex: 1;
        justify-content: center;
        padding: 12px 8px; /* Reduce horizontal padding for mobile */
    }
    
    /* Hide text, show only icons on mobile */
    .view-btn span {
        display: none;
    }
    
    .view-btn {
        gap: 0; /* Remove gap since there's only icon */
    }
    
    .view-btn i {
        font-size: 18px; /* Slightly larger icon for better touch target */
    }
    
    .favorites-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        text-align: center;
    }
    
    .favorites-actions {
        justify-content: center;
    }
    
    .mosque-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 16px; /* Reduced padding for mobile */
        margin-bottom: 12px; /* Tighter spacing between cards */
    }
    
    .mosque-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        align-self: center; /* Center the icon */
    }
    
    .mosque-info {
        text-align: left;
        width: 100%;
    }
    
    .mosque-name {
        font-size: 16px;
        text-align: center; /* Center mosque name on mobile */
        margin-bottom: 8px;
    }
    
    .mosque-address {
        font-size: 13px; /* Smaller address text */
        justify-content: center; /* Center address */
        margin-bottom: 8px;
    }
    
    .mosque-quick-info {
        justify-content: center;
        flex-wrap: wrap; /* Allow badges to wrap on mobile */
        gap: 6px;
    }
    
    /* Make badges smaller on mobile */
    .distance-badge,
    .rating-badge,
    .favorite-date {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .expand-btn {
        align-self: center;
        width: 36px; /* Smaller expand button */
        height: 36px;
        font-size: 14px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 12px; /* Reduce gap between detail items */
    }
    
    .detail-item {
        grid-template-columns: 24px 1fr;
        gap: 8px;
        padding: 8px 12px; /* Smaller padding */
        font-size: 13px; /* Smaller text */
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 8px; /* Tighter button spacing */
    }
    
    .action-btn {
        padding: 10px 16px; /* Smaller buttons */
        font-size: 13px;
    }
    
    /* Hover effects disabled on touch devices */
    .mosque-card:hover {
        transform: none;
    }
    
    /* Better spacing for mosque list */
    .mosques-list {
        gap: 12px;
        padding: 0 8px; /* Add some horizontal padding */
    }
    
    .detail-item span:first-of-type {
        display: none;
    }
    
    .map-container {
        height: 300px;
    }
    
    .mosque-modal .modal-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .filter-controls {
        gap: 8px;
    }
}
