/* ============================
   SAJJ GLOBAL SCHOOL – FRONTEND
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0A1E3D;
  --navy-mid: #123266;
  --gold: #C89B2A;
  --gold-light: #F0C84A;
  --gold-pale: #FDF6E3;
  --white: #ffffff;
  --gray-50: #F8F9FA;
  --gray-100: #EAECEF;
  --gray-300: #CED4DA;
  --gray-500: #6C757D;
  --gray-700: #343A40;
  --text: #1A1A2E;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 6px;
}

body { font-family: var(--font-body); color: var(--text); background: var(--white); line-height: 1.6; }

/* TOPBAR */
.topbar { background: var(--navy); color: rgba(255,255,255,0.75); font-size: 12px; padding: 7px 0; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar-links { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.topbar-links a { color: var(--gold-light); text-decoration: none; }
.topbar-links a:hover { color: #fff; }

/* HEADER */
header { background: var(--white); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; height: 80px; gap: 20px; }
.logo-wrap { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }
.logo-emblem { width: 58px; height: 58px; background: var(--navy); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2.5px solid var(--gold); }
.logo-emblem span { color: var(--gold); font-size: 17px; font-family: var(--font-display); font-weight: 700; line-height: 1; }
.logo-emblem small { color: rgba(255,255,255,0.55); font-size: 7px; letter-spacing: 1px; text-transform: uppercase; margin-top: 1px; }
.logo-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.logo-subtitle { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* NAV */
nav { margin-left: auto; }
.nav-list { display: flex; list-style: none; height: 80px; align-items: stretch; }
.nav-item { position: relative; display: flex; align-items: stretch; }
.nav-item > a { display: flex; align-items: center; gap: 4px; padding: 0 13px; font-size: 12.5px; font-weight: 600; color: var(--navy); text-decoration: none; letter-spacing: 0.2px; border-bottom: 3px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav-item > a:hover, .nav-item > a.active { color: var(--gold); border-bottom-color: var(--gold); }
.arrow { font-size: 9px; color: var(--gray-500); }
.dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--white); border: 1px solid var(--gray-100); border-top: 3px solid var(--gold); box-shadow: var(--shadow-md); z-index: 999; }
.nav-item:hover .dropdown { display: block; }
.dropdown a { display: block; padding: 10px 18px; font-size: 12.5px; color: var(--gray-700); text-decoration: none; border-bottom: 1px solid var(--gray-100); transition: background 0.15s, padding-left 0.15s; }
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--gold-pale); color: var(--navy); padding-left: 24px; }
.hamburger { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--navy); margin-left: auto; padding: 8px; }

/* HERO */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a4080 100%); color: var(--white); padding: 90px 24px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E"); }
.hero-inner { position: relative; max-width: 780px; margin: 0 auto; }
.hero-badge { display: inline-block; background: rgba(200,155,42,0.2); border: 1px solid var(--gold); color: var(--gold-light); font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; padding: 6px 18px; border-radius: 20px; margin-bottom: 24px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 54px); font-weight: 700; line-height: 1.15; margin-bottom: 18px; }
.hero h1 em { color: var(--gold-light); font-style: normal; display: block; }
.hero p { font-size: 16px; color: rgba(255,255,255,0.8); max-width: 540px; margin: 0 auto 36px; line-height: 1.75; }
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* BUTTONS */
.btn-primary { background: var(--gold); color: var(--navy); padding: 13px 30px; border-radius: var(--radius); font-weight: 600; font-size: 14px; text-decoration: none; letter-spacing: 0.3px; transition: background 0.2s, transform 0.15s; display: inline-block; }
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.5); padding: 12px 30px; border-radius: var(--radius); font-weight: 500; font-size: 14px; text-decoration: none; transition: border-color 0.2s, background 0.2s; display: inline-block; }
.btn-outline:hover { border-color: var(--gold-light); background: rgba(200,155,42,0.12); }

/* STATS STRIP */
.stats-strip { background: var(--gold); padding: 22px; }
.stats-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat-item { padding: 10px 16px; border-right: 1px solid rgba(10,30,61,0.2); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 26px; font-weight: 700; color: var(--navy); font-family: var(--font-display); }
.stat-label { font-size: 11px; color: rgba(10,30,61,0.7); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* SECTION */
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-label { font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.section-title { font-family: var(--font-display); font-size: clamp(24px, 3vw, 36px); font-weight: 600; color: var(--navy); margin-bottom: 12px; }

/* QUICK LINKS */
.quicklinks { padding: 60px 24px; background: var(--gray-50); }
.ql-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 28px; }
.ql-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 22px 16px; text-align: center; text-decoration: none; color: var(--navy); transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s; }
.ql-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--gold); }
.ql-icon { width: 48px; height: 48px; background: var(--navy); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-size: 20px; }
.ql-name { font-size: 12.5px; font-weight: 600; color: var(--navy); }

/* NOTICE BOARD */
.notice-board { background: var(--navy); border-radius: var(--radius); overflow: hidden; }
.notice-header { background: var(--gold); padding: 13px 20px; font-size: 13px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: 1px; }
.notice-list { list-style: none; }
.notice-item { padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: flex-start; gap: 12px; }
.notice-item.pinned { background: rgba(200,155,42,0.08); }
.notice-item:last-child { border-bottom: none; }
.notice-date { background: rgba(200,155,42,0.2); border: 1px solid rgba(200,155,42,0.5); color: var(--gold-light); font-size: 11px; font-weight: 700; text-align: center; padding: 5px 8px; border-radius: 4px; min-width: 44px; flex-shrink: 0; }
.notice-date small { display: block; font-size: 9px; }
.notice-body { flex: 1; }
.pin-badge { background: rgba(200,155,42,0.2); color: var(--gold-light); font-size: 9px; padding: 2px 6px; border-radius: 3px; margin-right: 6px; }
.notice-cat { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); font-size: 9px; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; }
.notice-text { font-size: 12.5px; color: rgba(255,255,255,0.85); line-height: 1.5; margin-top: 4px; }

/* EVENTS */
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.event-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 14px; display: flex; align-items: flex-start; gap: 14px; box-shadow: var(--shadow-sm); }
.event-date-box { background: var(--navy); color: var(--gold); text-align: center; min-width: 52px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 6px; flex-shrink: 0; }
.event-day { font-size: 20px; font-weight: 700; line-height: 1; }
.event-month { font-size: 9px; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(200,155,42,0.8); }
.event-title { font-size: 13.5px; font-weight: 600; color: var(--navy); line-height: 1.4; }
.event-venue { font-size: 11px; color: var(--gray-500); margin-top: 3px; }
.event-cat-badge { font-size: 10px; background: var(--gold-pale); color: var(--gold); border: 1px solid var(--gold); padding: 2px 8px; border-radius: 10px; margin-top: 6px; display: inline-block; }

/* GALLERY HOME */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--navy); display: block; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.gallery-overlay { position: absolute; inset: 0; background: rgba(10,30,61,0.55); display: flex; align-items: flex-end; padding: 12px; opacity: 0; transition: opacity 0.2s; }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { color: var(--white); font-size: 12px; font-weight: 600; }

/* CTA STRIP */
.cta-strip { background: var(--navy); padding: 60px 24px; text-align: center; color: var(--white); }
.cta-strip h2 { font-family: var(--font-display); font-size: 30px; margin-bottom: 10px; }
.cta-strip p { color: rgba(255,255,255,0.7); margin-bottom: 28px; }

/* FOOTER */
footer { background: #06132A; color: rgba(255,255,255,0.7); }
.footer-top { max-width: 1200px; margin: 0 auto; padding: 56px 24px 40px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo-title { font-family: var(--font-display); color: var(--white); font-size: 17px; margin-bottom: 10px; }
.footer-brand p { font-size: 12.5px; line-height: 1.7; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 32px; height: 32px; background: rgba(255,255,255,0.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); text-decoration: none; font-size: 13px; font-weight: 700; transition: background 0.2s; }
.footer-social a:hover { background: var(--gold); color: var(--navy); }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 12.5px; color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); max-width: 1200px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; font-size: 11.5px; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 8px; }

/* PAGE HERO */
.page-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%); padding: 48px 24px; color: var(--white); }
.page-hero-inner { max-width: 1200px; margin: 0 auto; }
.breadcrumb { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 10px; }
.breadcrumb a { color: var(--gold-light); text-decoration: none; }
.page-hero h1 { font-family: var(--font-display); font-size: 34px; font-weight: 600; }
.page-hero p { color: rgba(255,255,255,0.75); margin-top: 8px; font-size: 14px; }

/* PAGE LAYOUT */
.page-layout { max-width: 1200px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 240px 1fr; gap: 32px; }
.page-sidebar { }
.sidebar-widget { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.sidebar-title { background: var(--navy); color: var(--gold); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 12px 16px; }
.sidebar-nav { list-style: none; }
.sidebar-nav li a { display: block; padding: 10px 16px; font-size: 13px; color: var(--gray-700); text-decoration: none; border-bottom: 1px solid var(--gray-100); transition: background 0.15s, color 0.15s, padding-left 0.15s; }
.sidebar-nav li a:hover, .sidebar-nav li a.active { background: var(--gold-pale); color: var(--navy); padding-left: 20px; }
.sidebar-cta { background: var(--navy); color: var(--white); padding: 20px; }
.sidebar-cta .sidebar-cta-title { font-family: var(--font-display); font-size: 16px; color: var(--gold-light); margin-bottom: 8px; }
.sidebar-cta p { font-size: 12.5px; color: rgba(255,255,255,0.7); margin-bottom: 14px; }

/* PAGE CONTENT */
.page-main { }
.page-content { background: var(--white); }
.page-content h2 { font-family: var(--font-display); font-size: 22px; color: var(--navy); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); display: inline-block; }
.page-content h3 { font-size: 17px; color: var(--navy); margin: 20px 0 10px; }
.page-content p { color: var(--gray-700); line-height: 1.8; margin-bottom: 14px; }
.page-content ul, .page-content ol { padding-left: 22px; color: var(--gray-700); line-height: 2; margin-bottom: 14px; }
.page-content table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.page-content table th { background: var(--navy); color: var(--white); padding: 11px 14px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.page-content table td { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); }
.page-content table tr:nth-child(even) td { background: var(--gray-50); }
.page-content a { color: var(--gold); }
.page-content blockquote { border-left: 4px solid var(--gold); padding: 16px 20px; background: var(--gold-pale); margin: 16px 0; font-style: italic; }

/* FEE TABLE */
.fee-display-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fee-display-table th { background: var(--navy); color: var(--white); padding: 12px 16px; text-align: left; font-size: 12px; text-transform: uppercase; }
.fee-display-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); }
.fee-display-table tr:nth-child(even) td { background: var(--gray-50); }

/* EMPTY STATE */
.empty-page-notice { text-align: center; padding: 60px 24px; color: var(--gray-500); }
.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-page-notice h3 { font-size: 20px; color: var(--navy); margin-bottom: 10px; }
.contact-info { margin-top: 20px; font-size: 14px; line-height: 2; background: var(--gray-50); padding: 16px; border-radius: var(--radius); display: inline-block; text-align: left; }

/* GALLERY PAGE */
.gallery-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.gallery-tab { padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--gray-700); border: 1px solid var(--gray-300); transition: all 0.2s; }
.gallery-tab.active, .gallery-tab:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.gallery-full-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery-full-item { border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.gallery-full-item img { width: 100%; height: 180px; object-fit: cover; display: block; transition: transform 0.3s; }
.gallery-full-item:hover img { transform: scale(1.05); }
.gallery-full-caption { padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; }
.gallery-full-caption span { color: rgba(255,255,255,0.85); font-size: 12.5px; }
.gallery-cat-tag { background: rgba(200,155,42,0.25); color: var(--gold-light); font-size: 10px; padding: 2px 8px; border-radius: 10px; }

/* APPLY FORM */
.content-card { background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius); padding: 32px; }
.apply-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group-fe { display: flex; flex-direction: column; gap: 6px; }
.form-group-fe label { font-size: 12.5px; font-weight: 600; color: var(--navy); }
.form-group-fe input, .form-group-fe select, .form-group-fe textarea { padding: 10px 13px; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-family: var(--font-body); font-size: 14px; color: var(--text); transition: border-color 0.2s; width: 100%; }
.form-group-fe input:focus, .form-group-fe select:focus, .form-group-fe textarea:focus { outline: none; border-color: var(--gold); }

/* NOTICES PAGE */
.notices-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab-fe { padding: 7px 16px; border-radius: 20px; font-size: 12.5px; text-decoration: none; color: var(--gray-700); border: 1px solid var(--gray-300); transition: all 0.2s; }
.filter-tab-fe.active, .filter-tab-fe:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.notice-full-item { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--gray-100); }
.notice-full-item.notice-pinned { background: linear-gradient(90deg, var(--gold-pale) 0%, transparent 100%); border-left: 4px solid var(--gold); padding-left: 16px; }
.nfd-day { font-size: 28px; font-weight: 700; color: var(--navy); font-family: var(--font-display); line-height: 1; display: block; }
.nfd-month { font-size: 11px; color: var(--gray-500); }
.notice-full-date { min-width: 50px; text-align: center; }
.notice-full-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.notice-cat-fe { background: var(--navy); color: var(--gold-light); font-size: 10px; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; font-weight: 600; }
.notice-expiry { font-size: 11px; color: var(--gray-500); }
.notice-full-title { font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.notice-full-text { font-size: 13.5px; color: var(--gray-700); line-height: 1.7; }

/* FLASH MESSAGES */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* RESPONSIVE */
@media (max-width: 960px) {
  nav { display: none; position: absolute; top: 80px; left: 0; right: 0; background: var(--white); box-shadow: var(--shadow-md); z-index: 998; }
  nav.open { display: block; }
  .nav-list { flex-direction: column; height: auto; }
  .nav-item { flex-direction: column; }
  .nav-item > a { padding: 13px 20px; border-bottom: 1px solid var(--gray-100); border-bottom-width: 1px; border-right: none; }
  .dropdown { display: none !important; position: static; box-shadow: none; border: none; background: var(--gray-50); border-top: none; }
  .hamburger { display: block; }
  .header-inner { position: relative; }
  .two-col-grid { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .page-layout { grid-template-columns: 1fr; }
  .apply-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .ql-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
}
