/* File: static/css/web.css */
/* Web/desktop styles for landing page and web-specific components */
/* Version: 1.1.0 */
/* Last Modified: 2026-01-31 */
/* Change: Add mobile hamburger menu and responsive navbar - Fixes #13 */

/* ========================================
   Navbar
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: #1a5f3c;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo:hover {
    color: #1a5f3c;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: #555;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #1a5f3c;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    outline: none;
}

.lang-selector:hover {
    border-color: #1a5f3c;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    padding: 140px 24px 80px;
    background: linear-gradient(135deg, #1a5f3c, #0d3320);
    color: #fff;
    text-align: center;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 64px;
}

.hero-btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.hero-btn:hover {
    transform: translateY(-2px);
}

.hero-btn-primary {
    background: #fff;
    color: #1a5f3c;
}

.hero-btn-primary:hover {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
    display: block;
    margin-top: 4px;
}

/* ========================================
   Live Section
   ======================================== */

.live-section {
    padding: 80px 24px;
    background: #fff;
}

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

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1a5f3c;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: #666;
}

.live-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.live-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.live-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.live-card-header {
    background: linear-gradient(135deg, #1a5f3c, #2e7d32);
    padding: 24px;
    color: #fff;
    position: relative;
}

.live-card-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.live-card-live-badge .live-dot {
    width: 8px;
    height: 8px;
    background: #ff5252;
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.live-card-mosque {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.live-card-location {
    font-size: 14px;
    opacity: 0.85;
}

.live-card-body {
    padding: 24px;
}

.live-card-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.live-card-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.lang-badge {
    padding: 6px 12px;
    background: #e8f5e9;
    color: #1a5f3c;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.live-card-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #1a5f3c;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.live-card-btn:hover {
    background: #0d4a2b;
}

/* ========================================
   Features Section
   ======================================== */

.features-section {
    padding: 80px 24px;
    background: #f8f9fa;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: #e8f5e9;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a5f3c;
    margin: 0 auto 20px;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* ========================================
   Languages Section
   ======================================== */

.languages-section {
    padding: 80px 24px;
    background: #fff;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.language-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 2px solid transparent;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.language-card:hover {
    border-color: #1a5f3c;
    background: #e8f5e9;
    transform: translateY(-2px);
}

.language-card .lang-emoji {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.language-card .lang-endonym {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.language-card .lang-name {
    font-size: 14px;
    color: #666;
    display: block;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, #1a5f3c, #0d3320);
    color: #fff;
    text-align: center;
}

.cta-container {
    max-width: 700px;
    margin: 0 auto;
}

.cta-container h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-container p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.app-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: #fff;
    color: #333;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.app-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.app-btn svg {
    width: 24px;
    height: 24px;
}

.app-btn-label {
    text-align: left;
}

.app-btn-label small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #888;
}

.app-btn-label span {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: #111;
    color: #fff;
    padding: 60px 24px 24px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    color: #4CAF50;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #4CAF50;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.social-links a:hover {
    color: #4CAF50;
    background: rgba(255, 255, 255, 0.15);
}

.social-links a svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   Responsive: Tablet (max-width: 1024px)
   ======================================== */

@media (max-width: 1024px) {
    .live-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .languages-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-stats {
        gap: 40px;
    }
}

/* ========================================
   Hamburger Button (hidden on desktop)
   ======================================== */

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Mobile Menu Overlay (hidden on desktop)
   ======================================== */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    padding: 16px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.mobile-menu-link {
    display: block;
    padding: 12px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-link:hover {
    color: #1a5f3c;
}

.mobile-menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.mobile-lang-selector {
    width: 100%;
    margin-bottom: 8px;
}

.mobile-menu-btn {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: block;
}

/* ========================================
   Responsive: Mobile (max-width: 768px)
   ======================================== */

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-actions {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .hero {
        padding: 110px 20px 60px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .live-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .languages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .app-buttons {
        flex-direction: column;
        align-items: center;
    }

    .app-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .cta-container h2 {
        font-size: 28px;
    }

    .stat-value {
        font-size: 28px;
    }
}

/* ========================================
   RTL Support
   ======================================== */

[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero {
    text-align: right;
}

[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-stats {
    flex-direction: row-reverse;
}

[dir="rtl"] .live-card-body {
    text-align: right;
}

[dir="rtl"] .live-card-info {
    flex-direction: row-reverse;
}

[dir="rtl"] .live-card-languages {
    flex-direction: row-reverse;
}

[dir="rtl"] .feature-card {
    text-align: right;
}

[dir="rtl"] .feature-icon {
    margin: 0 0 20px auto;
}

[dir="rtl"] .app-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .app-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .app-btn-label {
    text-align: right;
}

[dir="rtl"] .footer-bottom {
    flex-direction: row-reverse;
}

[dir="rtl"] .social-links {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    [dir="rtl"] .hero-stats {
        flex-direction: column;
    }

    [dir="rtl"] .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    [dir="rtl"] .app-buttons {
        flex-direction: column;
        align-items: center;
    }

    [dir="rtl"] .footer-bottom {
        flex-direction: column;
    }
}
