/* ========== متغيرات الوضع المظلم ========== */
:root {
    --main-gold: #e2b616;
    --dark-bg: #0a0b0d;
    --surface: #141619;
    --white: #ffffff;
    --gray: #a1a1a1;
    --card-border: rgba(255,255,255,0.05);
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.2);
    --shadow-lg: 0 20px 25px -12px rgba(0,0,0,0.4);
}
body.light-mode {
    --dark-bg: #f5f5f5;
    --surface: #ffffff;
    --white: #1a1a1a;
    --gray: #555;
    --card-border: rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background-color: var(--dark-bg);
    color: var(--white);
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* ========== Header ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5%;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    background: transparent;
}
header.scrolled {
    background: rgba(10, 11, 13, 0.98);
    box-shadow: var(--shadow-sm);
}
body.light-mode header.scrolled {
    background: rgba(245, 245, 245, 0.98);
}
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    width: 45px;
    height: auto;
}
.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--main-gold);
    letter-spacing: -1px;
}
nav {
    display: flex;
    align-items: center;
}
nav a {
    color: var(--white);
    text-decoration: none;
    margin-right: 25px;
    font-weight: 600;
    transition: 0.3s;
    opacity: 0.8;
}
nav a:hover {
    color: var(--main-gold);
    opacity: 1;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.dark-mode-btn {
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
}
.dark-mode-btn:hover {
    color: var(--main-gold);
    transform: rotate(15deg);
}
.social-links-header {
    display: flex;
    gap: 15px;
}
.social-links-header a {
    color: var(--white);
    font-size: 1.1rem;
    transition: 0.3s;
    opacity: 0.7;
}
.social-links-header a:hover {
    color: var(--main-gold);
    transform: translateY(-2px);
    opacity: 1;
}

/* ========== Mobile Menu ========== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: 0.3s;
}
.menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: var(--surface);
        flex-direction: column;
        padding: 20px;
        transition: 0.3s;
        z-index: 1000;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3);
        border-right: 1px solid var(--card-border);
    }
    nav.active {
        right: 0;
    }
    nav a {
        margin: 15px 0;
        font-size: 1.1rem;
    }
    .header-actions {
        margin-left: auto;
    }
}

/* ========== Ticker ========== */
#ticker {
    background: var(--main-gold);
    color: #000;
    padding: 10px 0;
    overflow: hidden;
    font-weight: bold;
    position: relative;
    z-index: 1001;
    white-space: nowrap;
}
.ticker-wrap {
    display: inline-block;
    animation: ticker 25s linear infinite;
    padding-left: 100%;
}
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ========== Hero ========== */
.hero {
    height: 85vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: relative;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--dark-bg) 5%, transparent 50%),
                linear-gradient(to right, rgba(10,11,13,0.9) 0%, transparent 70%);
}
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
    animation: fadeInUp 0.8s ease;
}
.hero-content h2 {
    margin: 0;
    line-height: 1.1;
    font-weight: 800;
}
.hero-content p {
    margin: 20px 0 30px;
    line-height: 1.6;
}
.btn {
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    border: none;
}
.btn-gold:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========== Sections ========== */
.section {
    padding: 40px 5%;
    position: relative;
    z-index: 20;
}
.fade-in {
    animation: fadeInUp 0.6s ease backwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    border-right: 4px solid var(--main-gold);
    padding-right: 15px;
    margin: 0;
}
.view-all {
    color: var(--main-gold);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}
.view-all i {
    transition: transform 0.3s;
}
.view-all:hover i {
    transform: translateX(-5px);
}

/* ========== Slider ========== */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.featured-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--main-gold) var(--surface);
    cursor: grab;
    user-select: none;
}
.featured-slider:active {
    cursor: grabbing;
}
.featured-slider::-webkit-scrollbar {
    height: 6px;
}
.featured-slider::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}
.featured-slider::-webkit-scrollbar-thumb {
    background: var(--main-gold);
    border-radius: 10px;
}
.program-card {
    flex: 0 0 300px;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.program-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(226, 182, 22, 0.4);
    box-shadow: var(--shadow-lg);
}
.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.badge {
    background: var(--main-gold);
    color: black;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
}
.card-body {
    padding: 20px;
}
.card-program-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--main-gold);
    margin: 0 0 5px 0;
}
.card-presenter {
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.timing-box {
    border-top: 1px solid var(--card-border);
    padding-top: 12px;
}
.time-row {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.slide-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: var(--main-gold);
    border: 1px solid var(--main-gold);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: opacity 0.3s, background 0.3s, transform 0.2s;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}
.slider-wrapper:hover .slide-btn {
    opacity: 1;
}
.slide-btn:hover {
    background: var(--main-gold);
    color: black;
    border-color: var(--main-gold);
    transform: translateY(-50%) scale(1.1);
}
.btn-next {
    left: -25px;
}
.btn-prev {
    right: -25px;
}
@media (max-width: 768px) {
    .slide-btn {
        display: none;
    }
}

/* ========== Prayer Section ========== */
.prayer-section {
    padding: 60px 5%;
    background: var(--dark-bg);
}
.prayer-container {
    background: #111317;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #1f2227;
    text-align: center;
    transition: var(--transition);
}
body.light-mode .prayer-container {
    background: #ffffff;
    border-color: #ddd;
}
.prayer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.prayer-card {
    background: #1a1d21;
    padding: 20px;
    border-radius: 10px;
    transition: var(--transition);
}
body.light-mode .prayer-card {
    background: #f0f0f0;
}
.prayer-card strong {
    display: block;
    font-size: 1.4rem;
    margin-top: 8px;
    color: var(--main-gold);
}

/* ========== Footer ========== */
footer {
    padding: 80px 5% 40px;
    text-align: center;
    background-color: #050505;
    border-top: 1px solid #1a1a1a;
}
body.light-mode footer {
    background-color: #e5e5e5;
    border-top-color: #ccc;
}
.footer-socials {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 30px;
}
.footer-socials a {
    color: var(--gray);
    font-size: 1.5rem;
    transition: var(--transition);
}
.footer-socials a:hover {
    color: var(--main-gold);
    transform: scale(1.2);
}
.footer-copy {
    color: #555;
    font-size: 0.85rem;
}

/* ========== Back to Top ========== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--main-gold);
    color: black;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
#backToTop.visible {
    opacity: 1;
    visibility: visible;
}
#backToTop:hover {
    transform: translateY(-3px);
    background: #c49d0c;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .hero-content h2:first-child {
        font-size: 2.5rem;
    }
    .hero-content h2 span {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
}
@media (max-width: 768px) {
    .hero-content h2:first-child {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .program-card {
        flex: 0 0 260px;
    }
    .prayer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .section-title {
        font-size: 1.4rem;
    }
    .prayer-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h2:first-child {
        font-size: 1.6rem;
    }
    .btn {
        padding: 12px 30px;
    }
}