/* ========================================
   GLOBAL STYLES & RESET
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Islamic Green & White Theme */
    --primary-green: #2d8659;
    --primary-green-dark: #1f5a3f;
    --primary-green-light: #4aab7a;
    --secondary-gold: #d4af37;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(45, 134, 89, 0.15);

    /* Typography */
    --font-arabic: 'Arial', 'Tahoma', 'Segoe UI', sans-serif;
    --font-english: 'Arial', 'Helvetica', sans-serif;

    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 4rem 1rem;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-arabic);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: var(--font-english);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-green-dark);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-green-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ========================================
   HEADER
   ======================================== */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo-text {
    font-size: 1.5rem;
    color: var(--primary-green);
    margin: 0;
    white-space: nowrap;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.nav {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link:hover::after {
    width: 100%;
}

.lang-toggle {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.lang-toggle:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-hover);
}

.mobile-menu-toggle {
    display: none;
    background: var(--primary-green);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: var(--primary-green-dark);
}

.menu-line {
    width: 18px;
    height: 2px;
    background: var(--white);
    display: block;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100%;
    background: var(--white);
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    padding: 1rem;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.mobile-menu-title {
    font-weight: 700;
    color: var(--primary-green-dark);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-gray);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

body[dir="rtl"] .mobile-menu-links {
    text-align: right;
}

.mobile-menu-link {
    padding: 0.75rem 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-menu-link:hover {
    background: var(--light-bg);
    color: var(--primary-green);
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1500;
}

.mobile-menu-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}


/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
    padding: var(--section-padding);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
}

.hero-time {
    margin: 2rem 0;
    animation: fadeInUp 1.2s ease;
}

.current-time {
    font-size: 3.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.date-info {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0.9;
}

.hijri-date,
.gregorian-date {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.next-prayer {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1.4s ease;
}

.next-prayer-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.next-prayer-name {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.countdown {
    font-size: 2.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   TODAY'S PRAYER TIMES
   ======================================== */
.today-prayers {
    padding: var(--section-padding);
    background: var(--light-bg);
}

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

.prayer-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.prayer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-green);
    transform: scaleX(0);
    transition: var(--transition);
}

.prayer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.prayer-card:hover::before {
    transform: scaleX(1);
}

.prayer-card.active {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
    transform: scale(1.05);
}

.prayer-card.active .prayer-name,
.prayer-card.active .prayer-time {
    color: var(--white);
}

.prayer-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-green-dark);
    margin-bottom: 0.5rem;
}

.prayer-time {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
}

.prayer-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ========================================
   AZAN SECTION (DETAILED CARDS)
   ======================================== */
.azan-section {
    padding: var(--section-padding);
}

.azan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.azan-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
    border-right: 4px solid var(--primary-green);
}

body[dir="ltr"] .azan-card {
    border-right: none;
    border-left: 4px solid var(--primary-green);
}

.azan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.azan-card.active {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
    border-color: var(--secondary-gold);
}

.azan-card.active .azan-card-title,
.azan-card.active .azan-card-time,
.azan-card.active .azan-card-explanation,
.azan-card.active .azan-card-hadith {
    color: var(--white);
}

.azan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.azan-card.active .azan-card-header {
    border-color: rgba(255, 255, 255, 0.3);
}

.azan-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    margin: 0;
}

.azan-card-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    font-variant-numeric: tabular-nums;
}

.azan-card-explanation {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.azan-card-hadith {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-dark);
    text-align: right;
}

body[dir="ltr"] .azan-card-hadith {
    text-align: left;
}

.azan-card.active .azan-card-hadith {
    background: rgba(255, 255, 255, 0.15);
}

.azan-card-hadith-source {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

.azan-card.active .azan-card-hadith-source {
    color: rgba(255, 255, 255, 0.8);
}

/* ========================================
   CALENDAR SECTION
   ======================================== */
.calendar-section {
    padding: var(--section-padding);
    background: var(--light-bg);
}

.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.calendar-btn {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-btn:hover {
    background: var(--primary-green-dark);
    transform: scale(1.1);
}

.download-btn {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(45, 134, 89, 0.3);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.download-btn:hover::before {
    width: 100%;
    height: 100%;
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--primary-green-dark) 0%, var(--primary-green) 100%);
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.4);
}

.download-btn span {
    position: relative;
    z-index: 1;
}

.calendar-month {
    font-size: 1.8rem;
    color: var(--primary-green-dark);
    margin: 0;
}

.calendar-wrapper {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    overflow-x: auto;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.calendar-table th {
    background: #f0f0f0;
    color: var(--text-dark);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
    font-size: 1rem;
}

.calendar-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.calendar-table tr.today {
    background: var(--primary-green);
    color: var(--white);
}

.calendar-table tr.today td {
    font-weight: 700;
    color: var(--white);
}

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

.calendar-table tr.today:hover {
    background: var(--primary-green-dark);
}

.calendar-day {
    font-weight: 600;
}

/* ========================================
   RAMADAN SECTION
   ======================================== */
.ramadan-section {
    padding: var(--section-padding);
}

.ramadan-mode-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.toggle-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary-green);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.ramadan-cards {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ramadan-cards.active {
    display: grid;
}

.ramadan-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.ramadan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.ramadan-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
}

.ramadan-card-icon.imsak {
    background: #e3f2fd;
    color: #1976d2;
}

.ramadan-card-icon.iftar {
    background: #fff3e0;
    color: #e65100;
}

.ramadan-card-icon.taraweeh {
    background: #f3e5f5;
    color: #7b1fa2;
}

.ramadan-card-label {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    margin-bottom: 1rem;
}

.ramadan-card-time {
    font-size: 2.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin: 1rem 0;
    line-height: 1.2;
}

.ramadan-card-time.imsak {
    color: #1976d2;
}

.ramadan-card-time.iftar {
    color: #d32f2f;
}

.ramadan-card-label-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-green);
    margin: 0.75rem 0 0.5rem 0;
}

.ramadan-card-explanation {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-top: 0.5rem;
}

.ramadan-card-description {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
}

.ramadan-card.highlighted {
    border: 2px solid var(--primary-green);
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%);
}

.ramadan-card.highlighted:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 25px rgba(45, 134, 89, 0.3);
}

.ramadan-card.highlighted .ramadan-card-icon {
    transform: scale(1.1);
}

.ramadan-card article,
.ramadan-card {
    min-height: 280px;
}

@media (max-width: 768px) {
    .ramadan-card {
        min-height: auto;
    }

    .ramadan-card.highlighted {
        transform: none;
    }

    .ramadan-card.highlighted:hover {
        transform: translateY(-5px);
    }
}

.ramadan-note {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 2rem;
    font-style: italic;
}

/* ========================================
   OPTIONAL PRAYER TIMES SECTION
   ======================================== */
.optional-prayer-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.optional-prayer-banner {
    display: none;
    background: linear-gradient(135deg, var(--primary-green) 0%, #4aab7a 100%);
    color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.optional-prayer-banner .banner-left,
.optional-prayer-banner .banner-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.optional-prayer-banner .banner-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.optional-prayer-banner .banner-time {
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.optional-prayer-banner .banner-icon {
    font-size: 1.5rem;
}

.optional-prayer-banner .banner-text {
    font-size: 1rem;
    font-weight: 500;
}

.optional-prayer-banner .banner-prayer-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.optional-prayer-banner .banner-status {
    font-size: 0.9rem;
    opacity: 0.9;
}

.optional-prayer-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.optional-prayer-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-top: 4px solid transparent;
}

.optional-prayer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-green);
    opacity: 0;
    transition: var(--transition);
}

.optional-prayer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.optional-prayer-card:hover::before {
    opacity: 1;
}

.optional-prayer-card.active {
    border-top-color: var(--primary-green);
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%);
}

.optional-prayer-card.active::before {
    opacity: 1;
}

.optional-prayer-card.tahajjud {
    border-top-color: #4a90e2;
}

.optional-prayer-card.tahajjud.active {
    background: linear-gradient(135deg, #ffffff 0%, #e8f4fd 100%);
}

.optional-prayer-card.ishraq {
    border-top-color: #ff9800;
}

.optional-prayer-card.ishraq.active {
    background: linear-gradient(135deg, #ffffff 0%, #fff3e0 100%);
}

.optional-prayer-card.duha {
    border-top-color: #ffc107;
}

.optional-prayer-card.duha.active {
    background: linear-gradient(135deg, #ffffff 0%, #fffde7 100%);
}

.optional-prayer-card.awwabin {
    border-top-color: #9c27b0;
}

.optional-prayer-card.awwabin.active {
    background: linear-gradient(135deg, #ffffff 0%, #f3e5f5 100%);
}

.optional-prayer-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    background: var(--light-bg);
    transition: var(--transition);
}

.optional-prayer-card:hover .optional-prayer-icon {
    transform: scale(1.1);
}

.optional-prayer-card.tahajjud .optional-prayer-icon {
    background: #e3f2fd;
}

.optional-prayer-card.ishraq .optional-prayer-icon {
    background: #fff3e0;
}

.optional-prayer-card.duha .optional-prayer-icon {
    background: #fffde7;
}

.optional-prayer-card.awwabin .optional-prayer-icon {
    background: #f3e5f5;
}

.optional-prayer-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    text-align: center;
    margin-bottom: 1.5rem;
}

.optional-prayer-timings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.timing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--light-bg);
    border-radius: 8px;
    transition: var(--transition);
}

.timing-row:hover {
    background: #e8f5e9;
}

.timing-row.best-time {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid var(--primary-green);
}

.timing-label {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
}

.timing-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green-dark);
    font-variant-numeric: tabular-nums;
}

.timing-row.best-time .timing-value {
    color: var(--primary-green);
}

.optional-prayer-note {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-align: center;
    line-height: 1.6;
    margin-top: 1rem;
    font-style: italic;
}

.optional-prayer-status {
    display: inline-block;
    background: var(--primary-green);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    text-align: center;
    width: 100%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* ========================================
   JUMMAH & EID SECTION
   ======================================== */
.jummah-eid-section {
    padding: var(--section-padding);
    background: var(--light-bg);
}

.jummah-eid-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.jummah-card,
.eid-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.jummah-card:hover,
.eid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.card-title {
    color: var(--primary-green-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card-text {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ========================================
   HADITH & DUA SECTION
   ======================================== */
.hadith-dua-section {
    padding: var(--section-padding);
}

.hadith-dua-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.hadith-card,
.dua-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px var(--shadow);
    transition: var(--transition);
}

.hadith-card:hover,
.dua-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.hadith-content,
.dua-content {
    position: relative;
    padding: 1.5rem;
    background: var(--white);
    border: 2px solid #e8f5e9;
    border-radius: var(--border-radius);
    min-height: 200px;
}

.dua-block+.dua-block {
    margin-top: 1.5rem;
}

.hadith-main-arabic,
.dua-main-arabic {
    font-size: 1.4rem;
    line-height: 2;
    color: var(--primary-green-dark);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: right;
}

.dua-divider {
    border-top: 1px solid var(--border-color);
    margin: 1.25rem auto;
    width: 70%;
}

body[dir="ltr"] .hadith-main-arabic,
body[dir="ltr"] .dua-main-arabic {
    text-align: left;
}

.hadith-secondary-arabic,
.dua-secondary-arabic {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    text-align: right;
    font-weight: 400;
}

body[dir="ltr"] .hadith-secondary-arabic,
body[dir="ltr"] .dua-secondary-arabic {
    text-align: left;
}

.hadith-source,
.dua-reference {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1.5rem;
    font-style: italic;
    text-align: right;
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
}

.dua-reference-inline {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    font-style: italic;
    text-align: right;
}

body[dir="ltr"] .hadith-source,
body[dir="ltr"] .dua-reference {
    text-align: left;
    right: auto;
    left: 1.5rem;
}

body[dir="ltr"] .dua-reference-inline {
    text-align: left;
}

/* ========================================
   SUNNAH TICKER SECTION
   ======================================== */
.sunnah-section {
    padding: var(--section-padding);
    background: var(--light-bg);
}

.sunnah-marquee {
    margin-top: 2rem;
    overflow: hidden;
    direction: ltr;
}

.sunnah-track {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    width: max-content;
    animation: sunnah-marquee 35s linear infinite;
    direction: ltr;
    animation-direction: normal;
    animation-play-state: running;
}

.sunnah-marquee:hover .sunnah-track {
    animation-play-state: paused;
}

.sunnah-card {
    background: var(--white);
    border: 1px solid #e8f5e9;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    min-width: 300px;
    max-width: 300px;
}

.sunnah-arabic {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--primary-green-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: right;
}

.sunnah-english {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-gray);
    margin-bottom: 1.25rem;
    text-align: left;
    font-weight: 400;
}

html[dir="rtl"] .sunnah-english {
    text-align: right;
}

.sunnah-source {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    text-align: right;
}

html[dir="ltr"] .sunnah-source {
    text-align: left;
}

@keyframes sunnah-marquee {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

/* ========================================
   INFO SECTION
   ======================================== */
.info-section {
    padding: var(--section-padding);
}

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

.info-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.info-card-title {
    font-size: 1.5rem;
    color: var(--primary-green-dark);
    margin-bottom: 1rem;
}

.info-card-text {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.info-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.info-tip-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--white);
    border: 2px solid var(--primary-green);
    border-radius: var(--border-radius);
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
    cursor: default;
    text-align: right;
    transition: var(--transition);
    width: 100%;
    justify-content: space-between;
}

body[dir="ltr"] .info-tip-button {
    text-align: left;
}

.info-tip-button:hover {
    background: var(--light-bg);
    border-color: var(--primary-green-dark);
}

.info-tip-button:first-child {
    margin-top: 0;
}

/* ========================================
   FAQ SECTION
   ======================================== */
.faq-section {
    padding: var(--section-padding);
    background: var(--light-bg);
}

.faq-container-full {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.faq-list {
    max-width: 100%;
    margin: 2rem auto 0;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px var(--shadow);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--light-bg);
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--primary-green-dark);
    margin: 0;
    flex: 1;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-green);
    transition: var(--transition);
    margin-inline-start: 1rem;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-gray);
    line-height: 1.8;
    margin: 0;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--primary-green-dark);
    color: var(--white);
    padding: 3rem 1rem 1rem;
}

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

.footer-title {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-right: 0.5rem;
}

body[dir="ltr"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 0.5rem;
}

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

.copyright {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Global: English start left, Arabic start right (dir on html) */
html[dir="ltr"] .footer .footer-section,
html[dir="ltr"] .footer .footer-title,
html[dir="ltr"] .footer .footer-text,
html[dir="ltr"] .footer .footer-links,
html[dir="ltr"] .footer .footer-links li,
html[dir="ltr"] .footer .footer-bottom {
    text-align: left;
}

html[dir="rtl"] .footer .footer-section,
html[dir="rtl"] .footer .footer-title,
html[dir="rtl"] .footer .footer-text,
html[dir="rtl"] .footer .footer-links,
html[dir="rtl"] .footer .footer-links li,
html[dir="rtl"] .footer .footer-bottom {
    text-align: right;
}

html[dir="ltr"] .internal-links,
html[dir="ltr"] .internal-links h2,
html[dir="ltr"] .internal-links-container,
html[dir="ltr"] .internal-links-grid {
    text-align: left;
}

html[dir="ltr"] .internal-links-grid {
    justify-items: start;
}

html[dir="rtl"] .internal-links,
html[dir="rtl"] .internal-links h2,
html[dir="rtl"] .internal-links-container,
html[dir="rtl"] .internal-links-grid {
    text-align: right;
}

html[dir="rtl"] .internal-links-grid {
    justify-items: end;
}

html[dir="ltr"] .legal-content,
html[dir="ltr"] .legal-content h1,
html[dir="ltr"] .legal-content h2,
html[dir="ltr"] .legal-content p,
html[dir="ltr"] .legal-content ul,
html[dir="ltr"] .legal-content li {
    text-align: left;
}

html[dir="rtl"] .legal-content,
html[dir="rtl"] .legal-content h1,
html[dir="rtl"] .legal-content h2,
html[dir="rtl"] .legal-content p,
html[dir="rtl"] .legal-content ul,
html[dir="rtl"] .legal-content li {
    text-align: right;
}

/* Eid page: English (LTR) → left; Arabic (RTL) stays default right */
html[dir="ltr"] body.eid-page .eid-content,
html[dir="ltr"] body.eid-page .eid-section,
html[dir="ltr"] body.eid-page .eid-section h2,
html[dir="ltr"] body.eid-page .eid-section h3,
html[dir="ltr"] body.eid-page .eid-section p,
html[dir="ltr"] body.eid-page .eid-section ul,
html[dir="ltr"] body.eid-page .eid-section li {
    text-align: left;
}

html[dir="ltr"] body.eid-page .eid-section li {
    padding-right: 0;
    padding-left: 2rem;
}

html[dir="ltr"] body.eid-page .eid-section li::before {
    right: auto;
    left: 0;
}

/* Eid related-links: always equal size + centered text (incl. English) */
html[dir="ltr"] body.eid-page .eid-section .internal-links {
    justify-items: stretch;
}

html[dir="ltr"] body.eid-page .eid-section .internal-links a {
    text-align: center;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition);
}

body[dir="ltr"] .modal-close {
    right: auto;
    left: 1rem;
}

.modal-close:hover {
    color: var(--primary-green);
}

.modal-title {
    margin-bottom: 1.5rem;
    color: var(--primary-green-dark);
}

.modal-body {
    color: var(--text-gray);
    line-height: 1.8;
}

.modal-body p {
    margin-bottom: 1rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 0.75rem;
        direction: ltr;
    }

    .nav {
        display: none;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .lang-toggle {
        justify-self: center;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        justify-self: end;
    }

    .logo {
        justify-self: start;
    }


    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .current-time {
        font-size: 2.5rem;
    }

    .countdown {
        font-size: 2rem;
    }

    .prayer-cards {
        grid-template-columns: 1fr;
    }

    .hadith-dua-content {
        grid-template-columns: 1fr;
    }

    .jummah-eid-content {
        grid-template-columns: 1fr;
    }

    .ramadan-cards {
        grid-template-columns: 1fr;
    }

    .optional-prayer-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .optional-prayer-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .azan-cards {
        grid-template-columns: 1fr;
    }

    .faq-container-full {
        padding: 0 1rem;
    }

    .calendar-table {
        font-size: 0.85rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 0.5rem;
    }

    .calendar-controls {
        gap: 0.6rem;
    }

    .calendar-month {
        font-size: 1.2rem;
    }

    .calendar-btn,
    .download-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .download-btn span {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .current-time {
        font-size: 2rem;
    }

    .date-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .optional-prayer-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calendar-controls {
        gap: 0.5rem;
    }

    .calendar-month {
        font-size: 1.05rem;
    }

    .calendar-btn,
    .download-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
}

/* ========================================
   ANIMATIONS & EFFECTS
   ======================================== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.prayer-card.active {
    animation: pulse 2s infinite;
}

/* Scroll animations */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}