/* ===== Core Design System ===== */
:root {
    --navy: #0A192F;
    --navy-light: #112240;
    --gold: #D4AF37;
    --gold-light: #edc954;
    --charcoal: #333333;
    --gray-bg: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--charcoal);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

html { overflow-x: hidden; scroll-behavior: smooth; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }

/* Utilities & Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 30px; }
.section-gray { background-color: var(--gray-bg); }
.section-dark { background: var(--navy); color: var(--white); }
.text-light { color: var(--white) !important; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }

/* Reusable Grid Systems */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.grid-display-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* Reusable Card Component */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* Section Structural Defaults */
section { padding: 100px 0; position: relative; }
.section-title {
    text-align: center;
    font-size: 2.6rem;
    color: var(--navy);
    margin-bottom: 50px;
    position: relative;
    font-weight: 800;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 60px; height: 4px;
    background: var(--gold);
    bottom: -15px; left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ===== Header & Navigation ===== */
.header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(10, 25, 47, 0.9) 100%), url('images/pngtree-a-righteous-lawyer-providing-legal-advice-and-counsel-researching-and-gathering-image_15646791.jpg') center/cover no-repeat;
    background-attachment: fixed;
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex; justify-content: center; align-items: center;
    padding: 20px 50px; width: 100%;
    position: fixed; top: 0; left: 0; z-index: 100;
    transition: all 0.4s ease-in-out;
}
.navbar.scrolled {
    padding: 10px 50px;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.logo-container { position: absolute; right: 50px; display: flex; align-items: center; }
.logo { height: 70px; border-radius: 50%; border: 2px solid var(--gold); transition: var(--transition); }
.navbar.scrolled .logo { height: 50px; }

.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { color: var(--white); font-weight: 500; font-size: 1.1rem; position: relative; }
.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    background: var(--gold); bottom: -5px; right: 0; transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: var(--gold); }

/* Hero Content */
.hero-content {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    align-items: center; text-align: center; color: var(--white);
    padding: 100px 30px 0; z-index: 10;
}
.quran-verse { font-family: 'Amiri', serif; color: var(--gold); font-size: 2rem; margin-bottom: 20px; font-weight: 400; }
.main-headline { font-size: clamp(2.2rem, 5vw + 1rem, 5rem); font-weight: 800; margin-bottom: 25px; animation: fadeInUp 1s ease-out forwards; }
.subtitle { font-size: 1.3rem; max-width: 800px; margin-bottom: 40px; font-weight: 300; opacity: 0.9; }

/* Primary Button */
.primary-btn, .cta-button {
    background-color: var(--navy); color: var(--white);
    padding: 15px 35px; font-size: 1.2rem; font-weight: 700;
    border-radius: 50px; display: inline-flex; align-items: center;
    gap: 15px; border: 2px solid var(--gold); cursor: pointer; transition: var(--transition);
}
.primary-btn:hover, .cta-button:hover {
    background-color: var(--gold); color: var(--navy);
    transform: translateY(-5px); box-shadow: 0 10px 20px rgba(212, 175, 55, 0.4);
}

/* ===== Components specific Overrides ===== */

/* Founders */
.founder-card { padding: 0; overflow: hidden; border-top: none; }
.founder-card .image-wrapper { height: 350px; overflow: hidden; }
.founder-card img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.founder-card:hover img { transform: scale(1.05); }
.founder-card .card-content { padding: 25px; border-top: 4px solid var(--gold); }
.founder-card h3 { color: var(--navy); font-size: 1.4rem; margin-bottom: 5px; }
.founder-card .role { color: var(--gold); font-weight: 700; }
.founder-card .edu { color: var(--charcoal); font-size: 0.9rem; opacity: 0.8; }

/* Services */
.service-card { border-bottom: 3px solid transparent; }
.service-card:hover { border-bottom-color: var(--gold); }
.service-card .icon { font-size: 2.8rem; color: var(--gold); margin-bottom: 15px; }
.service-card h3 { color: var(--navy); font-size: 1.4rem; margin-bottom: 10px; }

/* Values */
.value-item { background: rgba(255,255,255,0.05); color: var(--white); border-color: rgba(255,255,255,0.1); }
.value-item:hover { background: rgba(255,255,255,0.1); }
.value-item .value-icon { font-size: 2.8rem; color: var(--gold); margin-bottom: 15px; }
.value-item h4 { font-size: 1.3rem; margin-bottom: 10px; }
.value-item p { color: rgba(255,255,255,0.8); }

/* Event & Contact Section */
.event-contact-section { background: linear-gradient(135deg, var(--navy-light) 0%, var(--navy) 100%); padding: 100px 0; }
.event-details { border-right: 5px solid var(--gold); text-align: right; }
.event-details h3 { color: var(--navy); font-size: 2rem; margin-bottom: 10px; }
.event-list { list-style: none; margin-top: 20px; }
.event-list li { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; text-align: right; }
.event-list i { font-size: 1.5rem; color: var(--gold); margin-top: 5px; }

.contact-form-wrapper { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--white); }
.contact-form-wrapper h3 { color: var(--gold); font-size: 2rem; margin-bottom: 25px; }
.input-group { margin-bottom: 15px; }
.input-group input, .input-group textarea {
    width: 100%; padding: 15px; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    color: var(--white); font-family: inherit; font-size: 1rem; transition: var(--transition);
}
.input-group input:focus, .input-group textarea:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.12); }
.submit-btn { width: 100%; background: var(--gold); color: var(--navy); border: none; }

.social-links-contact { display: flex; gap: 20px; font-size: 1.8rem; margin-top: 20px; }
.social-links-contact a { color: var(--navy); transition: var(--transition); }
.social-links-contact a:hover { color: var(--gold); transform: translateY(-3px); }

/* ===== Footer ===== */
.footer { background: var(--navy-light); color: var(--white); padding: 50px 0 20px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; padding-bottom: 30px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-contact h4 { color: var(--gold); margin-bottom: 15px; }
.footer-contact p { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-logo-area { text-align: center; }
.footer-logo { height: 60px; border-radius: 50%; border: 2px solid var(--gold); margin-bottom: 10px; }
.footer-socials { display: flex; justify-content: center; align-items: center; gap: 20px; font-size: 1.8rem; }
.footer-socials a { color: var(--white); transition: var(--transition); }
.footer-socials a:hover { color: var(--gold); transform: translateY(-5px); }
.copyright { text-align: center; padding-top: 20px; font-size: 0.9rem; opacity: 0.7; }

/* Utilities: Buttons & UI */
#backToTop, .floating-whatsapp {
    position: fixed; right: 30px; width: 60px; height: 60px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; cursor: pointer; transition: var(--transition); z-index: 999;
}
#backToTop { bottom: 30px; background: var(--gold); color: var(--navy); font-size: 1.5rem; opacity: 0; visibility: hidden; border: none; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
#backToTop.show { opacity: 1; visibility: visible; }
#backToTop:hover { background: var(--white); transform: translateY(-5px); }

.floating-whatsapp { bottom: 100px; background-color: #25d366; color: var(--white); font-size: 2.2rem; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); animation: pulse-whatsapp 2s infinite; }
.floating-whatsapp:hover { transform: scale(1.1); color: var(--white); }

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.floating-emoji {
    display: inline-block;
    animation: floatEmoji 3s ease-in-out infinite;
}

/* Typed.js Cursor color */
.typed-cursor {
    color: var(--gold);
    font-weight: 800;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.reveal { opacity: 0; visibility: hidden; transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; visibility: visible; }
.fade-bottom { transform: translateY(40px); }
.fade-bottom.active { transform: translateY(0); }
.hamburger { display: none; font-size: 2rem; color: var(--gold); cursor: pointer; z-index: 1000; }

/* ===== Media Queries: Mobile First & Consolidation ===== */
@media (max-width: 992px) {
    .grid-display-2 { grid-template-columns: 1fr; }
    .navbar { justify-content: space-between; padding: 15px 20px; }
    .logo-container { position: relative; right: auto; }
    .navbar .logo { height: 50px; }
    .hamburger { display: block; }
    
    .nav-links {
        position: fixed; top: 0; right: -120%; height: 100vh; width: 100%;
        background: rgba(10, 25, 47, 0.98); flex-direction: column;
        justify-content: center; align-items: center; transition: all 0.4s ease;
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 20px 0; }
    .nav-links a { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    section { padding: 60px 0; }
    .section-title { font-size: 2.2rem; }
    
    .footer { padding: 60px 0 30px; }
    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 45px;
    }
    .footer-contact, .footer-logo-area, .footer-socials {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .footer-contact p { 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        justify-content: center; 
        width: 100%; 
        gap: 10px;
        margin-bottom: 20px;
    }
    .footer-contact p i {
        font-size: 1.4rem;
        color: var(--gold);
    }
    .footer-logo { margin: 0 auto 15px; }

    .event-details { border-right: none; border-bottom: 3px solid var(--gold); padding-bottom: 30px; margin-bottom: 30px; text-align: center; }
    .event-list li { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
    
    #backToTop { bottom: 20px; right: 20px; width: 50px; height: 50px; font-size: 1.2rem; }
    .floating-whatsapp { bottom: 85px; right: 20px; width: 50px; height: 50px; font-size: 1.8rem; }
}
