:root {
    --primary: #0A1931;
    --secondary: #112544;
    --gold: #D4AF37;
    --gold-dark: #b5952f;
    --bg-main: #061020;
    --bg-card: #0c1c35;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border: rgba(212, 175, 55, 0.15);
    --shadow: 0 10px 30px rgba(0,0,0,0.3);
    --transition: all 0.3s ease;
}

body.light-mode {
    --primary: #ffffff;
    --secondary: #f8fafc;
    --gold: #C5A059;
    --gold-dark: #a8833e;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(0, 0, 0, 0.08);
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Tajawal', sans-serif; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { background: var(--bg-main); color: var(--text-main); line-height: 1.6; overflow-x: hidden; transition: background 0.3s ease, color 0.3s ease; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.bg-light { background: var(--secondary); }
.text-center { text-align: center; }

/* FIX: iOS Input Styling */
input, select, textarea {
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Tajawal', sans-serif;
}

.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--gold); width: 0%; z-index: 10001; transition: width 0.1s; }

/* Header */
.header { position: fixed; top: 0; width: 100%; z-index: 1000; background: var(--primary); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); transition: var(--transition); }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 85px; }
.nav-controls { display: flex; align-items: center; justify-content: center; gap: 15px; flex-direction: row; }
.theme-toggle { background: transparent !important; border: none; outline: none; color: var(--gold); font-size: 26px; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; transition: transform 0.3s; }
.theme-toggle:hover { transform: scale(1.1); }
.menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; }
.menu-toggle span { width: 30px; height: 2px; background: var(--gold); transition: var(--transition); }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 32px; color: var(--gold); margin-left: 5px; }
.logo-text h1 { font-size: 22px; font-weight: 300; color: var(--text-main); }
.logo-text h1 span { color: var(--gold); font-weight: 900; }
.logo-text p { font-size: 11px; color: var(--text-muted); }

.nav-list { display: flex; gap: 20px; }
.nav-link { font-weight: 500; font-size: 15px; color: var(--text-main); position: relative; transition: var(--transition); }
.nav-link:hover { color: var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer; border: 2px solid transparent; transition: var(--transition); text-align: center; }
.btn-gold { background: var(--gold); color: #111; }
.btn-gold:hover { background: var(--gold-dark); transform: translateY(-3px); }
.btn-outline { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #111; }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 85px; position: relative; }
.hero-title { font-size: 42px; font-weight: 900; margin-bottom: 24px; min-height: 120px; line-height: 1.5; color: var(--text-main); }
.hero-title span { color: var(--gold); }
.hero-desc { font-size: 18px; color: var(--text-muted); margin-bottom: 30px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 15px; }
.hero-badge { display: inline-block; padding: 8px 16px; background: rgba(212, 175, 55, 0.1); border: 1px solid var(--gold); color: var(--gold); border-radius: 50px; font-size: 14px; margin-bottom: 24px; font-weight: 700; }
.type-cursor { animation: blink 0.8s infinite; color: var(--text-main) !important; }
@keyframes blink { 50% { opacity: 0; } }

/* Deep Copywriting */
.values-section { padding: 80px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.values-box { border-right: 4px solid var(--gold); padding-right: 25px; }
.values-content p { font-size: 17px; color: var(--text-muted); margin-bottom: 15px; font-style: italic; line-height: 1.9; }

/* Sections */
.section { padding: 90px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 34px; font-weight: 900; margin-bottom: 10px; color: var(--text-main); }
.section-title h2 span { color: var(--gold); }
.section-title p { font-size: 16px; color: var(--text-muted); }

/* Ministries */
.grid-ministries { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.min-card { background: var(--bg-card); border-radius: 16px; padding: 30px 20px; text-align: center; border: 1px solid var(--border); box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; }
.min-icon { font-size: 40px; margin-bottom: 15px; color: var(--gold); }
.min-card h3 { font-size: 20px; margin-bottom: 10px; color: var(--text-main); font-weight: 800; }
.min-badge { display: inline-block; background: var(--primary); border: 1px solid var(--border); color: var(--text-muted); padding: 5px 15px; border-radius: 50px; font-size: 13px; font-weight: 700; margin-bottom: 15px; }
.min-btn { color: var(--gold); font-weight: 700; font-size: 14px; }

/* Services */
.search-container { display: flex; gap: 10px; max-width: 800px; margin: 0 auto 40px; align-items: center; }
.search-container input { flex-grow: 1; padding: 16px 20px; border-radius: 50px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-main); font-size: 16px; outline: none; width: 100%; }
.search-container input:focus { border-color: var(--gold); }
.fav-filter-btn.active { background: var(--gold); color: #111; border-color: var(--gold); }

.grid-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.srv-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 25px; position: relative; transition: var(--transition); }
.fav-btn { position: absolute; top: 15px; left: 15px; font-size: 22px; background: none; border: none; cursor: pointer; transition: var(--transition); outline: none; -webkit-tap-highlight-color: transparent;}
.srv-title { font-size: 18px; font-weight: 800; color: var(--gold); margin-bottom: 10px; padding-left: 30px; }
.srv-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.mt-30 { margin-top: 30px; margin-bottom: 30px; display: block; width: 100%; padding: 10px 0; }

/* Tools */
.grid-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tool-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 30px 25px; box-shadow: var(--shadow); text-align: center; }
.tool-icon { font-size: 35px; margin-bottom: 15px; }
.tool-card h3 { font-size: 18px; margin-bottom: 20px; font-weight: 800; color: var(--text-main); }
.tool-card input { display: block; width: 100%; padding: 14px; margin-bottom: 15px; border-radius: 8px; border: 1px solid var(--border); background: var(--primary); color: var(--text-main); font-size: 15px; outline: none; }
.tool-card .btn-tool { background: var(--gold); color: #111; font-weight: bold; font-size: 15px; border: none; cursor: pointer; padding: 12px; width: 100%; border-radius: 8px; transition: 0.3s; }
.tool-card .btn-tool:hover { background: var(--gold-dark); }
.tool-res { margin-top: 15px; font-weight: 800; color: var(--gold); font-size: 15px; min-height: 22px; }

/* Timeline */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; top: 0; right: 25px; width: 2px; height: 100%; background: var(--gold); opacity: 0.3; }
.time-item { position: relative; margin-bottom: 40px; padding-right: 70px; }
.time-dot { position: absolute; right: 0; top: 0; width: 50px; height: 50px; background: var(--gold); border-radius: 50%; color: #111; font-size: 24px; font-weight: 900; display: flex; align-items: center; justify-content: center; z-index: 1; box-shadow: 0 0 0 5px var(--bg-main), var(--shadow); }
.time-content { background: var(--bg-card); padding: 30px; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.time-content h3 { font-size: 20px; color: var(--text-main); font-weight: 800; margin-bottom: 10px; }
.time-content p { color: var(--text-muted); }

/* Accordion */
.accordion { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.acc-item { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.acc-btn { width: 100%; text-align: right; padding: 20px 25px; background: transparent; border: none; font-size: 17px; font-weight: 800; color: var(--text-main); cursor: pointer; display: flex; justify-content: space-between; align-items: center; outline: none; }
.acc-btn::after { content: '+'; font-size: 24px; color: var(--gold); transition: var(--transition); }
.acc-btn.active::after { content: '−'; transform: rotate(180deg); }
.acc-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; background: var(--primary); }
.acc-content p { padding: 0 25px 20px; color: var(--text-muted); font-size: 15px; }

/* Footer */
.footer { background: #030811; padding: 80px 0 20px; border-top: 3px solid var(--gold); color: #fff; }
.grid-footer { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 50px; }
.footer-col h3 { font-size: 20px; color: var(--gold); margin-bottom: 25px; font-weight: 800; }
.footer-col p { color: #94a3b8; font-size: 15px; margin-top: 15px; line-height: 1.8; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a { color: #94a3b8; transition: var(--transition); }
.footer-col ul a:hover { color: var(--gold); padding-right: 5px; }
.phone-num { font-size: 26px !important; color: #fff !important; font-weight: 900; letter-spacing: 2px; direction: ltr; display: inline-block;}
.footer-bottom { text-align: center; padding-top: 25px; border-top: 1px solid rgba(255,255,255,0.05); color: #64748b; font-size: 14px; }

/* FIX: Modal Smooth Scroll on iOS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: var(--transition); backdrop-filter: blur(5px); }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box { background: var(--bg-card); width: 92%; max-width: 450px; border-radius: 16px; position: relative; transform: scale(0.9); transition: var(--transition); max-height: 85vh; overflow-y: auto; padding: 30px; border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-close { position: absolute; top: 15px; left: 15px; background: none; border: none; font-size: 32px; color: var(--text-muted); cursor: pointer; }
.m-title { font-size: 22px; color: var(--text-main); margin-bottom: 15px; }
.m-desc { color: var(--text-muted); margin-bottom: 20px; font-size: 15px; line-height: 1.7; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.modal-actions .btn { width: 100%; }

/* Toasts */
.toast-container { position: fixed; bottom: 100px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--bg-card); border: 1px solid var(--border); border-right: 4px solid var(--gold); padding: 15px; border-radius: 8px; color: var(--text-main); font-size: 13px; box-shadow: var(--shadow); transform: translateX(120%); transition: transform 0.4s ease; display: flex; align-items: center; gap: 10px; }
.toast.show { transform: translateX(0); }

/* WhatsApp Float */
.float-wa { position: fixed; bottom: 30px; left: 30px; width: 60px; height: 60px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 20px rgba(37,211,102,0.4); z-index: 999; transition: var(--transition); }
.float-wa svg { width: 32px !important; height: 32px !important; display: block; }
.float-wa:hover { transform: scale(1.1) translateY(-5px); }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container { width: 92%; padding: 0 10px; }
    .header-container { height: 75px; }
    .logo-text h1 { font-size: 18px; }
    .menu-toggle { display: flex; }
    .nav { position: fixed; top: 75px; right: -100%; width: 100%; height: calc(100vh - 75px); background: var(--primary); flex-direction: column; justify-content: center; align-items: center; transition: var(--transition); padding: 20px; z-index: 999; }
    .nav.active { right: 0; }
    .nav-list { flex-direction: column; gap: 30px; text-align: center; }
    .nav-contact { display: none; }
    
    .hero { padding-top: 75px; text-align: center; }
    .hero-title { font-size: 28px; min-height: 80px; line-height: 1.5; margin-bottom: 20px; }
    .hero-desc { font-size: 16px; margin-bottom: 25px; }
    .hero-buttons { display: flex; flex-direction: column; width: 100%; gap: 15px; max-width: 320px; margin: 0 auto; }
    .hero-buttons .btn { width: 100%; font-size: 15px; padding: 14px 20px; }
    
    .section { padding: 60px 0; }
    .section-title h2 { font-size: 28px; }
    
    .search-container { flex-direction: column; align-items: stretch; }
    .search-container input { width: 100%; border-radius: 12px; }
    .fav-filter-btn { width: 100%; }
    
    .time-item { padding-right: 60px; }
    .time-dot { width: 40px; height: 40px; font-size: 18px; }
    .time-content { padding: 20px; }

    .toast-container { bottom: 100px; left: 20px; right: 20px; align-items: center; }
    .toast { transform: translateY(100px); width: 100%; max-width: 350px; justify-content: center; }
    .toast.show { transform: translateY(0); }
    
    .float-wa { bottom: 20px; left: 20px; width: 55px; height: 55px; }
    .float-wa svg { width: 28px !important; height: 28px !important; }
}
