/* Prayer Times World - Main Stylesheet */

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --heading-color: #0f172a;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

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

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

/* Header */
.site-header {
    background: var(--dark-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo a {
    color: white;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.main-nav a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.islamic-date {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    display: inline-block;
}

/* Quick Search */
.quick-search {
    max-width: 600px;
    margin: 2rem auto 0;
    position: relative;
}

#citySearch {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
}

#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-result-item {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--light-bg);
}

.search-result-item strong {
    color: var(--heading-color);
}

.search-result-item span {
    color: #64748b;
    font-size: 0.9rem;
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #64748b;
}

/* Sections */
.intro, .info-section, .cities-section {
    padding: 4rem 0;
}

.intro {
    background: var(--light-bg);
}

h2 {
    color: var(--heading-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

h3 {
    color: var(--heading-color);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
}

.feature p {
    color: #64748b;
    margin: 0;
}

/* Cities Grid */
.country-group {
    margin-bottom: 3rem;
}

.country-heading {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.city-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.city-card h4 {
    color: var(--heading-color);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.city-card p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* Prayer Info */
.prayer-info, .calculation-methods {
    margin: 2rem 0;
}

.prayer-details {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.prayer-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.prayer-item h4 {
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

/* City Page */
.city-page {
    padding: 2rem 0 4rem;
}

.breadcrumbs {
    padding: 1rem 0;
    color: #64748b;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.city-header {
    text-align: center;
    margin: 2rem 0;
}

.city-header h1 {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 0.5rem;
}

.city-meta {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.date-info {
    font-size: 1rem;
    color: #64748b;
}

.date-info .islamic-date {
    display: inline-block;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
    color: var(--primary-color);
}

/* Next Prayer Alert */
.next-prayer-alert {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.next-prayer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 1.1rem;
}

.next-prayer-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.next-prayer-time {
    font-size: 1.5rem;
    font-weight: 600;
}

.next-prayer-remaining {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 1rem;
    border-radius: 50px;
}

/* Prayer Times Grid */
.prayer-times-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.prayer-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
    transition: transform 0.2s;
}

.prayer-card:hover {
    transform: translateY(-4px);
}

.prayer-card.sunrise {
    border-top-color: #f59e0b;
    opacity: 0.8;
}

.prayer-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.prayer-card h3 {
    font-size: 1.25rem;
    margin: 0.5rem 0;
}

.prayer-time {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.prayer-desc {
    font-size: 0.9rem;
    color: #64748b;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--light-bg);
}

/* Weekly Schedule */
.weekly-schedule-section {
    margin: 3rem 0;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.weekly-table, .calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 12px;
    overflow: hidden;
}

.weekly-table th, .calendar-table th {
    background: var(--dark-color);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.weekly-table td, .calendar-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.weekly-table tbody tr:hover, .calendar-table tbody tr:hover {
    background: var(--light-bg);
}

.sunrise-col {
    color: #64748b;
    font-style: italic;
}

.today-row {
    background: #fef3c7 !important;
    font-weight: 600;
}

/* City Content */
.city-content {
    margin: 3rem 0;
    line-height: 1.8;
}

.city-content p {
    margin-bottom: 1rem;
}

.info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.info-box {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
}

.info-box h4 {
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

/* FAQ Section */
.faq-section {
    margin: 3rem 0;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.faq-item h3 {
    font-size: 1.1rem;
    color: var(--heading-color);
    margin: 0 0 0.75rem 0;
}

.faq-item p {
    margin: 0;
    line-height: 1.6;
}

/* Nearby Cities */
.nearby-cities-section {
    margin: 3rem 0;
}

.nearby-cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.nearby-city-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    text-align: center;
    border: 2px solid transparent;
}

.nearby-city-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.nearby-city-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: var(--heading-color);
}

.nearby-city-card p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

/* Calendar Page */
.calendar-page {
    padding: 2rem 0;
}

.calendar-header {
    text-align: center;
    margin: 2rem 0;
}

.calendar-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.calendar-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.calendar-info {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 12px;
}

.note-box {
    background: #fef3c7;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    margin-top: 1rem;
}

.month-selector {
    margin: 3rem 0;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.month-link {
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    font-weight: 500;
}

.month-link:hover, .month-link.active {
    border-color: var(--primary-color);
    background: var(--light-bg);
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .prayer-times-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
    }
    
    .city-header h1 {
        font-size: 2rem;
    }
    
    .weekly-table, .calendar-table {
        font-size: 0.9rem;
    }
    
    .weekly-table th, .weekly-table td,
    .calendar-table th, .calendar-table td {
        padding: 0.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .prayer-times-grid {
        grid-template-columns: 1fr;
    }
    
    .next-prayer-content {
        font-size: 0.9rem;
    }
    
    .next-prayer-name, .next-prayer-time {
        font-size: 1.25rem;
    }
}
