:root {
    --bg-color: #f8fafc;
    --text-main: #475569;
    --heading-color: #0f172a;
    --primary-teal: #0f766e;
    --light-teal: #14b8a6;
    --accent-gold: #d4af37;
    --red-btn: #e11d48;
    
    --font-heading: 'Cinzel', serif;
    --font-arabic: 'Noto Kufi Arabic', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-soft: 0 20px 40px -10px rgba(0,0,0,0.08);
    --shadow-hover: 0 30px 60px -15px rgba(15, 118, 110, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background-color: var(--bg-color); color: var(--text-main); line-height: 1.7; overflow-x: hidden; }

h1, h2, h3, h4, h5, h6 { color: var(--heading-color); font-family: var(--font-heading); font-weight: 700; }
a { text-decoration: none; color: var(--primary-teal); transition: color 0.3s ease; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mt-3 { margin-top: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.section-padding { padding: 6rem 0; }
.bg-light { background-color: #f1f5f9; }

/* Top Bar */
.top-bar { background-color: #020617; color: #94a3b8; font-size: 0.85rem; padding: 10px 0; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; }
.contact-info span { margin-right: 25px; display: inline-flex; align-items: center; gap: 8px;}
.contact-info i { color: var(--accent-gold); }
.top-social a { color: #94a3b8; margin-left: 18px; transition: color 0.3s, transform 0.3s; display: inline-block;}
.top-social a:hover { color: var(--accent-gold); transform: translateY(-2px); }

/* Main Nav (Glassmorphism) */
.main-nav { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0; 
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo-title { font-size: 1.8rem; color: var(--primary-teal); letter-spacing: 1px; background: linear-gradient(45deg, var(--primary-teal), var(--light-teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { color: var(--heading-color); font-weight: 600; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1.5px; position: relative; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0; background-color: var(--primary-teal); transition: width 0.3s ease; }
.nav-links a:hover::after { width: 100%; }

/* Buttons */
.btn { 
    padding: 12px 32px; border-radius: 50px; font-weight: 700; display: inline-block; cursor: pointer; border: none; text-align: center;
    position: relative; overflow: hidden; z-index: 1; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    letter-spacing: 1px; text-transform: uppercase; font-size: 0.9rem;
}
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: rgba(255,255,255,0.2); transition: left 0.4s; z-index: -1; }
.btn:hover::before { left: 0; }
.btn:hover { transform: translateY(-3px); }
.btn-red { background: linear-gradient(135deg, var(--red-btn), #be123c); color: white; box-shadow: 0 10px 20px rgba(225, 29, 72, 0.3); }
.btn-red:hover { box-shadow: 0 15px 25px rgba(225, 29, 72, 0.4); color: white;}
.btn-outline { border: 2px solid var(--primary-teal); color: var(--primary-teal); background: transparent; }
.btn-outline:hover { background: var(--primary-teal); color: white; box-shadow: 0 10px 20px rgba(15, 118, 110, 0.2); }

/* Hero */
.hero { 
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.85), rgba(15, 23, 42, 0.9)), url('hero-bg.png') center/cover fixed; 
    height: 60vh; min-height: 400px; display: flex; justify-content: center; align-items: center; text-align: center; color: white;
    position: relative; overflow: hidden;
}
/* Slanted bottom edge for hero */
.hero::after {
    content: ''; position: absolute; bottom: -50px; left: 0; right: 0; height: 100px; background: var(--bg-color); transform: skewY(-2deg);
}
.hero-content { position: relative; z-index: 2; animation: fadeInDown 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hero-title { font-size: 4rem; letter-spacing: 6px; color: white; margin-bottom: 15px; text-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.hero-subtitle.arabic { font-family: var(--font-arabic); font-size: 2.5rem; text-shadow: 0 10px 30px rgba(0,0,0,0.5); color: var(--accent-gold); }

/* Keyframes */
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* Scroll Reveal Classes */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }

/* Sections */
.sub-heading { color: var(--accent-gold); font-size: 1.6rem; margin-bottom: 15px; }
.section-title { font-size: 2.8rem; margin-bottom: 1.5rem; position: relative; display: inline-block; padding-bottom: 15px; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: var(--accent-gold); border-radius: 2px;}
.section-desc { max-width: 750px; margin-bottom: 2.5rem; font-size: 1.15rem; color: #64748b; }

/* Prayer Times */
.prayer-flex { display: flex; gap: 4rem; justify-content: space-between; align-items: center; }
.prayer-table-container, .juma-schedule { flex: 1; min-width: 320px; }
.prayer-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 16px; overflow: hidden; background: white; box-shadow: var(--shadow-soft); }
.prayer-table th, .prayer-table td { padding: 1.5rem 1.2rem; text-align: left; }
.prayer-table th { background: linear-gradient(90deg, var(--primary-teal), var(--light-teal)); color: white; font-size: 1.1rem; }
.prayer-table td { border-bottom: 1px solid #f1f5f9; font-weight: 600; color: var(--heading-color); }
.prayer-table tr:hover td { background-color: #f8fafc; color: var(--primary-teal); transition: all 0.2s;}
.location-note { font-size: 0.9rem; color: #94a3b8; margin-top: 15px; text-align: right; font-style: italic; }

.juma-title { background: linear-gradient(90deg, var(--primary-teal), var(--light-teal)); color: white; padding: 1rem; text-align: center; border-radius: 12px; margin-bottom: 1.5rem; box-shadow: 0 10px 20px rgba(15, 118, 110, 0.2); }
.khutba-card { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); padding: 1.2rem; border-radius: 16px; box-shadow: var(--shadow-soft); border: 1px solid rgba(255,255,255,0.8); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;}
.khutba-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-hover); border-color: var(--light-teal);}
.imam-img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid white; box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.khutba-details h4 { margin-bottom: 5px; font-size: 1.1rem; }
.khutba-details p { margin-bottom: 4px; font-size: 0.95rem; color: #64748b;}

/* Services */
.service-card { 
    background: linear-gradient(145deg, #ffffff, #f8fafc); 
    padding: 3rem 2rem; border-radius: 20px; text-align: center; 
    box-shadow: var(--shadow-soft); 
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease; 
    border: 1px solid #e2e8f0; 
}
.service-card:hover { transform: translateY(-12px); box-shadow: var(--shadow-hover); border-color: rgba(20, 184, 166, 0.3); }
.service-icon { font-size: 3.5rem; background: linear-gradient(45deg, var(--accent-gold), #fef08a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 1.8rem; display: inline-block; animation: float 6s ease-in-out infinite; }
.service-card h3 { margin-bottom: 1rem; font-size: 1.4rem; }

/* Events */
.event-card { 
    display: flex; gap: 2rem; background: white; padding: 1.5rem; border-radius: 20px; 
    box-shadow: var(--shadow-soft); align-items: center; border: 1px solid #e2e8f0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}
.event-card:hover { transform: translateX(10px); box-shadow: var(--shadow-hover); border-left: 4px solid var(--primary-teal); }
.event-date { background: linear-gradient(135deg, var(--primary-teal), var(--light-teal)); color: white; width: 100px; height: 100px; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; flex-shrink: 0; box-shadow: 0 10px 20px rgba(15, 118, 110, 0.3); }
.event-date .day { font-size: 2.5rem; font-weight: 800; line-height: 1; }
.event-date .month { font-size: 1.1rem; font-weight: 600; letter-spacing: 1px;}
.event-info h3 { margin-bottom: 10px; font-size: 1.4rem; line-height: 1.3;}
.event-info h3 a { color: var(--heading-color); }
.event-info h3 a:hover { color: var(--primary-teal); }
.event-info p { color: #64748b; font-size: 1rem; }
.event-info i { color: var(--accent-gold); margin-right: 8px; }

/* Contact Form inside Newsletter */
.subscription-form input {
    padding: 15px 20px; border-radius: 50px; border: 2px solid #e2e8f0; font-family: var(--font-body); font-size: 1rem;
    transition: all 0.3s; background: white; flex: 1; min-width: 250px;
}
.subscription-form input:focus { outline: none; border-color: var(--light-teal); box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1); }

/* Footer */
.site-footer { background-color: #0f172a; color: #94a3b8; padding-top: 6rem; position: relative; overflow: hidden;}
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, var(--primary-teal), var(--accent-gold)); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand { color: white; margin-bottom: 1.5rem; font-size: 1.8rem; background: linear-gradient(45deg, var(--primary-teal), var(--light-teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.footer-widget h4 { color: white; margin-bottom: 2rem; font-size: 1.3rem; position: relative; padding-bottom: 12px; display: inline-block;}
.footer-widget h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--accent-gold); border-radius: 3px;}
.footer-widget ul li { margin-bottom: 1rem; }
.footer-widget ul li a { color: #94a3b8; transition: all 0.3s; display: inline-block;}
.footer-widget ul li a:hover { color: var(--light-teal); transform: translateX(5px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 2rem 0; font-size: 0.95rem; text-align: center; }

/* Other Pages specific */
.page-header { background: linear-gradient(135deg, rgba(15, 118, 110, 0.8), rgba(15, 23, 42, 0.9)), url('hero-bg.png') center/cover; height: 250px; display:flex; align-items:center; justify-content:center; box-shadow: inset 0 -20px 20px -20px rgba(0,0,0,0.5); }
.page-header h1 { color:white; font-size: 3.5rem; text-shadow: 0 4px 15px rgba(0,0,0,0.3); animation: fadeInDown 1s ease;}

/* Responsive */
@media (max-width: 992px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .prayer-flex { flex-direction: column; }
    .hero-title { font-size: 3rem; }
}
@media (max-width: 768px) {
    .top-bar { display: none; }
    .grid-2, .grid-3, .footer-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .hero { height: 50vh; min-height: 350px; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle.arabic { font-size: 1.8rem; }
    .subscription-form { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
}
