/* =========================================================
   Imam Addaniy College, Azare — Main Stylesheet
   ========================================================= */

:root {
  --clr-green: #0B6E3A;
  --clr-green-dark: #084d28;
  --clr-gold: #D4AF37;
  --clr-white: #FFFFFF;
  --clr-light-gray: #F5F6F8;
  --clr-dark-gray: #2E2E2E;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--clr-dark-gray);
  background: var(--clr-white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .navbar-brand strong { font-family: var(--font-heading); }

a { text-decoration: none; }

/* ---------- Loader ---------- */
#site-loader {
  position: fixed; inset: 0; z-index: 99999; background: var(--clr-white);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
#site-loader.loaded { opacity: 0; visibility: hidden; }
.loader-spinner {
  width: 50px; height: 50px; border: 5px solid var(--clr-light-gray);
  border-top-color: var(--clr-green); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top bar & Header ---------- */
.top-bar { background: var(--clr-green-dark); color: #fff; font-size: .85rem; }
.top-bar a { color: #fff; margin-left: 10px; }
.site-header { background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); z-index: 1030; }
.navbar-brand .brand-text small { color: var(--clr-green); font-size: .7rem; font-weight: 500; }
.navbar-nav .nav-link { color: var(--clr-dark-gray); font-weight: 500; padding: .6rem .9rem !important; }
.navbar-nav .nav-link:hover { color: var(--clr-green); }
.mega-menu { min-width: 560px; border: none; border-top: 3px solid var(--clr-gold); }
.btn-gold { background: var(--clr-gold); border-color: var(--clr-gold); color: #1a1a1a; font-weight: 600; }
.btn-gold:hover { background: #b9922b; color: #fff; }
.btn-green { background: var(--clr-green); border-color: var(--clr-green); color: #fff; font-weight: 600; }
.btn-green:hover { background: var(--clr-green-dark); color: #fff; }

/* ---------- Hero Slider ---------- */
.hero-slide {
  height: 90vh; min-height: 520px; background-size: cover; background-position: center;
  display: flex; align-items: center; position: relative;
}
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,110,58,.88), rgba(11,110,58,.35)); }
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 650px; }
.hero-content h1 { font-size: 2.6rem; font-weight: 800; }
.hero-content .badge-gold { background: var(--clr-gold); color: #1a1a1a; padding: .4rem 1rem; border-radius: 30px; font-weight: 600; }

/* ---------- Sections ---------- */
.section-title { font-weight: 800; color: var(--clr-green-dark); position: relative; }
.section-subtitle { color: var(--clr-gold); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: .85rem; }
.bg-light-gray { background: var(--clr-light-gray); }
.card-custom { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.07); transition: transform .3s ease, box-shadow .3s ease; }
.card-custom:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.card-custom img { height: 210px; object-fit: cover; width: 100%; }
.badge-category { background: var(--clr-green); color: #fff; font-size: .7rem; padding: .35rem .7rem; border-radius: 30px; }

.stat-box { text-align: center; padding: 2rem 1rem; }
.stat-box .num { font-size: 2.6rem; font-weight: 800; color: var(--clr-green); font-family: var(--font-heading); }
.stat-box .label { color: var(--clr-dark-gray); font-weight: 500; }

.arabic-motto { font-size: 1.1rem; color: var(--clr-gold); font-family: 'Traditional Arabic', serif; direction: rtl; }

/* ---------- Footer ---------- */
.site-footer { background: var(--clr-green-dark); color: #d9e6df; }
.footer-heading { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: #cfe3d7; }
.footer-links a:hover { color: var(--clr-gold); }
.footer-bottom { background: #06381d; color: #b6c9be; }
.social-icons a { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; align-items: center; justify-content: center; margin-right: 6px; }
.social-icons a:hover { background: var(--clr-gold); color: #1a1a1a; }

.newsletter-section { background: linear-gradient(135deg, var(--clr-green), var(--clr-green-dark)); }

/* ---------- Floating buttons ---------- */
.whatsapp-float { position: fixed; bottom: 90px; right: 24px; background: #25D366; color:#fff; width: 54px; height: 54px; border-radius: 50%; display:flex; align-items:center; justify-content:center; font-size: 1.6rem; z-index: 1050; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#backToTop { position: fixed; bottom: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--clr-green); color: #fff; display:none; z-index: 1050; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#backToTop.show { display:block; }

.cookie-notice { position: fixed; bottom: 0; left: 0; right: 0; background: #1c1c1c; color: #eee; padding: 14px 0; z-index: 1060; font-size: .9rem; display: none; }
.cookie-notice.show { display: block; }

/* ---------- Admin/Officer shared ---------- */
.admin-sidebar { background: var(--clr-green-dark); min-height: 100vh; color: #fff; }
.admin-sidebar a { color: #d9e6df; display: block; padding: .65rem 1.2rem; border-radius: 8px; }
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-topbar { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); }

/* Hamburger button — hidden on desktop, shown below the lg breakpoint */
.admin-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--clr-dark-gray);
  cursor: pointer;
  padding: .35rem .6rem;
  margin-right: .5rem;
  border-radius: 6px;
}
.admin-nav-toggle:hover { background: rgba(0,0,0,.06); }

/* Dark backdrop shown behind the sidebar while it's open on mobile */
.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1040;
}
.admin-sidebar-backdrop.show { display: block; }

@media (max-width: 991.98px) {
  .admin-nav-toggle { display: inline-block; }

  /* Off-canvas: hidden past the left edge until toggled open. !important is
     needed here because each admin/officer/portal page also sets a fixed
     width for .admin-sidebar in its own inline <style> block (loaded AFTER
     this shared stylesheet), which would otherwise win the cascade and
     silently defeat this behavior on small screens. */
  .admin-sidebar {
    position: fixed !important;
    top: 0; bottom: 0; left: 0;
    width: 260px !important;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
  }
  .admin-sidebar.show { transform: translateX(0); }

  .admin-main { width: 100%; }
}

/* Prevent background scroll while the mobile menu is open */
body.admin-nav-open { overflow: hidden; }
.smtp-warning { background: #fff3cd; border-left: 4px solid #d4af37; padding: 1rem 1.25rem; border-radius: 8px; }

/* ---------- Utilities ---------- */
.text-green { color: var(--clr-green) !important; }
.bg-green { background: var(--clr-green) !important; }
.rounded-xl { border-radius: 16px !important; }

@media (max-width: 768px) {
  .hero-content h1 { font-size: 1.8rem; }
  .mega-menu { min-width: auto; }
}
