/* --- CSS VARIABLES --- */
:root {
    --primary-dark: #0f172a; 
    --primary-light: #1e293b;
    --accent-gold: #d4af37; 
    --accent-gold-hover: #b5952f;
    --text-main: #334155;
    --text-light: #f8fafc;
    --bg-main: #fcfcfc;
    --bg-secondary: #f1f5f9;
    --border-color: #e2e8f0;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-arabic: 'Amiri', serif;
}

/* --- GLOBAL RESETS --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: var(--font-body); background: var(--bg-main); color: var(--text-main); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; color: var(--primary-dark); }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 15px; position: relative; }
.section-title::after { content: ''; display: block; width: 60px; height: 3px; background: var(--accent-gold); margin: 15px auto 0; }
.section-subtitle { text-align: center; color: #64748b; font-size: 1.1rem; margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto; }
section { padding: 80px 0; }
.bg-light { background: var(--bg-secondary); }

/* --- Navbar Styling --- */

/* 1. Top Navbar (Branding & Auth) */
.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: #ffffff;
    border-bottom: 1px solid #eee;
}

.logo-container { display: flex; align-items: center; gap: 10px; }
.nav-logo { height: 60px; }
.logo-text { font-weight: 700; font-size: 1.2rem; }

.top-actions { display: flex; align-items: center; gap: 20px; }

/* 2. Sticky Navbar (Site Navigation) */
.navbar-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    padding: 15px 5%;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent-gold); }

/* --- Mobile Menu --- */
.menu-icon { display: none; cursor: pointer; font-size: 1.5rem; }

@media (max-width: 768px) {
    .menu-icon { display: block; }
    
    .nav-links {
        display: none; /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-links.active { display: flex; } /* Shown when toggled */
}

/* --- HERO HEADER --- */
header { background: linear-gradient(to right, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95)), url('assets/images/hero-bg.jpg') center/cover; color: var(--text-light); padding: 120px 20px; text-align: center; position: relative; }
.header-logos { display: flex;  justify-content: center; align-items: center; gap: 40px; margin-bottom: 30px; }
.header-logos img { height: 100px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.header-logos .divider { width: 1px; height: 80px; background: rgba(255,255,255,0.2); }
.arabic-text { font-family: var(--font-arabic); font-size: 2.8rem; margin-bottom: 20px; color: var(--accent-gold); }
.hero-title { font-size: 3.5rem; margin-bottom: 20px; color: #fff; }
.hero-subtitle { font-size: 1.2rem; font-weight: 300; max-width: 800px; margin: 0 auto 40px; line-height: 1.6; color: #cbd5e1; }
.patronage-text { font-size: 0.9rem; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-gold); margin-bottom: 10px; }
.patronage-title { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 30px; color: #fff; }

/* --- ABOUT SECTION --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { margin-bottom: 20px; font-size: 1.1rem; line-height: 1.7; }
.about-features { display: grid; grid-template-columns: 1fr; gap: 20px; }
.feature-item { display: flex; align-items: flex-start; gap: 15px; background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); border-left: 4px solid var(--accent-gold); transition: transform 0.3s; }
.feature-item:hover { transform: translateX(5px); }
.feature-item i { font-size: 1.8rem; color: var(--accent-gold); }
.feature-item h3 { font-size: 1.2rem; margin-bottom: 8px; }



/* --- GRIDS (COURSES & EVENTS) --- */
.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.academic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.3s; border: 1px solid var(--border-color); display: flex; flex-direction: column;}
.card:hover { transform: translateY(-5px); }
.card-img { height: 200px; background: var(--primary-dark); display: flex; align-items: center; justify-content: center; color: var(--accent-gold); font-size: 3rem; }
.card-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { font-size: 1.4rem; margin-bottom: 10px; }
.card-content p { color: #64748b; line-height: 1.6; margin-bottom: 20px; flex-grow: 1;}
.card-meta { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--primary-dark); font-weight: 500; border-top: 1px solid var(--border-color); padding-top: 15px; }

/* --- ACADEMIC RESOURCES --- */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.resource-card { background: #fff; padding: 30px; border-radius: 8px; text-align: center; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.02); transition: all 0.3s; }
.resource-card:hover { border-color: var(--accent-gold); box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1); }
.resource-card i { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 20px; }
.resource-card h3 { margin-bottom: 10px; font-size: 1.3rem; }
.resource-card p { color: #64748b; margin-bottom: 20px; font-size: 0.95rem; }
.btn-download { display: inline-block; padding: 8px 20px; border: 1px solid var(--primary-dark); color: var(--primary-dark); border-radius: 4px; font-weight: 500; }
.btn-download:hover { background: var(--primary-dark); color: #fff; }

/* --- Premium Button Styling --- */
.btn-apply {
    display: inline-block;
    padding: 12px 25px;
    background-color: #c5a059; /* Your Accent Gold */
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease; /* Smooth hover effect */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-apply:hover {
    background-color: #a38245; /* Darker gold on hover */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-apply:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

#backToTop {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    background-color: var(--accent-gold);
    color: #ffffff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

#backToTop:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}

/* Modal Overlay - Hidden by default */
.modal-overlay {
    display: none; /* Hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Modal Content Box */
.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-actions { margin-top: 25px; }


/* --- CONTACT SECTION --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; background: #fff; padding: 50px; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.contact-info h3 { font-size: 1.8rem; margin-bottom: 20px; }
.contact-info p { color: #64748b; margin-bottom: 30px; line-height: 1.6; }
.info-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.05rem;
    flex-wrap: wrap; /* Allows wrapping on very small screens */
}

/* Ensure text doesn't shrink buttons */
.contact-text {
    flex: 1; /* Pushes the button to the right */
    min-width: 200px;
}

/* Button style for these rows */
.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    background: var(--accent-gold);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm:hover {
    background: var(--primary-dark);
    color: #fff;
}.contact-form input, .contact-form textarea { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid var(--border-color); border-radius: 4px; font-family: var(--font-body); font-size: 1rem; background: var(--bg-secondary); transition: border-color 0.3s; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent-gold); background: #fff; }
.btn-submit { background: var(--primary-dark); color: #fff; border: none; padding: 15px 30px; font-size: 1.1rem; border-radius: 4px; cursor: pointer; width: 100%; font-family: var(--font-heading); font-weight: 600; transition: background 0.3s; }
.btn-submit:hover { background: var(--accent-gold); }

/* --- FOOTER --- */
footer { background: var(--primary-dark); color: #94a3b8; padding: 60px 20px 20px; text-align: center; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto 40px; text-align: left; }
.footer-col h4 { color: #fff; margin-bottom: 20px; font-size: 1.2rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--accent-gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.9rem; }
.footer-bottom a { color: var(--accent-gold); }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.5rem; }
}
@media (max-width: 768px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .menu-icon { display: block; }
    .header-logos { flex-direction: row; gap: 20px; }
    .header-logos .divider { width: 1px; height: 80px; }
    .contact-wrapper { padding: 30px 20px; }
}
.navbar-top {
    padding: 10px 15px; /* Reduce padding for mobile */
}

.nav-logo {
    height: 45px; /* Smaller logo for mobile screens */
}

.logo-text {
    font-size: 0.9rem; /* Smaller text for mobile */
}

.top-actions {
    gap: 10px; /* Reduce gap between auth items */
}

/* Optional: If the screen is VERY small (e.g., iPhone SE), hide the text to save space */
@media (max-width: 400px) {
    .logo-text {
        display: none;
    }
}