/* 
 * pages.css
 * Purpose: Specific styles for individual pages (Home, Mosque Profile, etc.)
 */

/* Homepage Hero */
.section-hero {
    text-align: center;
    padding: 6rem 0;
    background-color: var(--color-white);
    background-image: linear-gradient(to bottom, #f8f9fa, #fff);
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Prayer Times */
.section-prayer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 3rem 0;
}

.prayer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.location-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.btn-locate {
    background: var(--color-white);
    color: var(--color-primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-locate:hover {
    background: var(--color-secondary);
    color: #222;
    transform: rotate(90deg);
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.zone-select {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: var(--color-white); /* White text on the dark/blurred header */
    font-size: 0.95rem;
    font-weight: 600; /* Slightly bolder for better visibility */
    padding: 0.8rem 3rem 0.8rem 1.2rem;
    cursor: pointer;
    width: 100%;
    min-width: 0;
    font-family: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

/* Custom styling for options (won't affect main display on some browsers, but good for fallback) */
.zone-select option {
    background-color: #fff;
    color: #333;
    font-weight: normal;
    padding: 10px;
}

.zone-select option:disabled {
    color: #999;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 300px;
    flex: 1;
    min-width: 0;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
}

.zone-select:focus {
    outline: none;
}

/* Hover effect on wrapper to indicate interactivity */
.location-controls:hover .zone-select {
    color: var(--color-secondary); /* Gold accent on hover */
}

/* Optgroup Styling attempt (browser support varies) */
optgroup {
    font-weight: bold;
    color: var(--color-primary);
    background-color: #f9f9f9;
}

@media (max-width: 480px) {
    .select-wrapper {
        max-width: 200px; /* Tighter constraint on very small screens */
    }
    .zone-select {
        font-size: 0.85rem;
    }
}

.select-icon {
    position: absolute;
    right: 1rem;
    pointer-events: none;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    transition: transform 0.3s ease;
}

.select-wrapper:hover .select-icon {
    color: var(--color-secondary);
    transform: translateY(2px);
}

.zone-select:focus {
    outline: none;
}

.location-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.prayer-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.prayer-card {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}

.prayer-card.active {
    background: var(--color-secondary);
    color: #222;
    border-color: var(--color-secondary);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.prayer-name {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prayer-time {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Events Section */
.section-events {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.link-arrow {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.event-card {
    display: flex;
    gap: 1rem;
    transition: transform 0.2s;
}

.event-card:hover {
    transform: translateY(-5px);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    min-width: 70px;
    height: fit-content;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.event-date .month {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
}

.event-details {
    flex: 1;
}

.event-tag {
    font-size: 0.75rem;
    background: #e0f2f1;
    color: var(--color-primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.event-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.event-location, .event-time {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.event-details .btn {
    margin-top: 0;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Features/Why Us */
.section-features {
    padding: 4rem 0;
    background-color: var(--color-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-item {
    padding: 2rem;
    background: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .prayer-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prayer-card:last-child {
        grid-column: span 2;
    }
}


/* Mosque Profile Page */
.masjid-hero {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/masjid-bg-placeholder.jpg'); /* Placeholder BG */
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    padding: 6rem 0;
    text-align: center;
}

.masjid-header-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.section-masjid-details {
    padding: 4rem 0;
}

.masjid-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.info-list {
    list-style: none;
    margin-top: 1rem;
}

.info-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-list i {
    color: var(--color-primary);
    width: 20px;
}

@media (max-width: 768px) {
    .masjid-grid {
        grid-template-columns: 1fr;
    }
}


/* Shared Article Card Styles */
.article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.article-img {
    height: 200px;
    background-color: #eee;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}
.article-meta {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.5rem;
}
.article-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.article-title a {
    text-decoration: none; 
    color: inherit;
}
.article-excerpt {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.category-tag {
    width: fit-content;
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}


/* Enhanced Mosque Card Styles */
.mosque-card-icon {
    background: var(--color-bg);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 2rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.mosque-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mosque-card-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
    line-height: 1.3;
}

.mosque-card-content p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.mosque-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* Refined Spacing & Hierarchy 2025 */

/* 1. Global Section Spacing */
section[class^='section-'] {
    padding: 5rem 0; /* Increased from ~3rem or 4rem */
}

/* 2. Hero Enhancements */
.section-hero, .masjid-hero {
    padding: 8rem 0 6rem; /* More top padding for breathing room under header */
}

.hero-title {
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* 3. Card Internal Spacing */
.card {
    padding: 1.5rem; /* Standardize card padding */
}

.event-details h3, 
.article-title, 
.mosque-card-content h3 {
    margin-bottom: 0.75rem; /* More space below titles */
    line-height: 1.4;
}

.event-time, 
.event-location, 
.article-meta, 
.mosque-card-content p {
    margin-bottom: 0.8rem; /* Adjusted for better hierarchy */
    line-height: 1.6;
}

/* 4. Action Areas */
.hero-actions {
    gap: 1rem;
}

.mosque-card-actions {
    gap: 0.5rem; /* Reduced for smaller buttons */
}

/* 5. Section Headers */
.section-header {
    margin-bottom: 3rem; /* More space between header and grid */
}

.section-header h2 {
    font-size: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

/* Add a subtle underline decoration */
.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--color-secondary);
    border-radius: 2px;
}

