/* ==========================================================
   Muhammad Ali College & School System Attock
   Main stylesheet — self-contained, no external libraries
   ========================================================== */

:root {
  --navy: #0b2545;
  --navy-2: #123a68;
  --navy-3: #1b4f89;
  --gold: #d4a017;
  --gold-2: #f0c75e;
  --gold-text: #8a6500;
  --ink: #1e2d3f;
  --muted: #5b6a7d;
  --line: #e4e9f0;
  --bg: #f6f8fb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(11, 37, 69, .10);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 95px; }

body {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
svg { width: 20px; height: 20px; fill: currentColor; }

.container { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: #d9e3f0;
  font-size: 13px;
  padding: 9px 0;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.topbar-item { display: inline-flex; align-items: center; gap: 8px; }
.topbar-item svg { width: 15px; height: 15px; color: var(--gold-2); }
.topbar a.topbar-item:hover { color: var(--gold-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 8px 24px rgba(11, 37, 69, .10); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.brand-logo-box {
  width: 54px; height: 62px; flex: 0 0 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: grid; place-items: center;
  padding: 3px;
  overflow: hidden;
}
.brand-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 20px; color: var(--navy); letter-spacing: -.3px; }
.brand-text > span { font-size: 13px; font-weight: 600; color: var(--navy-2); }
.brand-text small { font-size: 11px; color: var(--muted); letter-spacing: .4px; margin-top: 2px; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  position: relative;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--navy-3); background: #eef3f9; }
.main-nav a.nav-cta {
  background: var(--gold);
  color: #2b1d00;
  margin-left: 8px;
  padding: 11px 20px;
  border-radius: 8px;
}
.main-nav a.nav-cta:hover { background: var(--gold-2); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 11px 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; margin: 5px 0; transition: .25s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .2px;
  transition: transform .2s, box-shadow .2s, background .2s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: #2b1d00; box-shadow: 0 8px 20px rgba(212, 160, 23, .28); }
.btn-gold:hover { background: var(--gold-2); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 8px 20px rgba(11, 37, 69, .2); }
.btn-primary:hover { background: var(--navy-2); }
.btn-outline-light { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.14); }

/* ---------- Hero carousel ---------- */
.hero { position: relative; background: var(--navy); }
.carousel { position: relative; height: min(660px, 82vh); min-height: 540px; overflow: hidden; }
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s;
}
.slide.active { opacity: 1; visibility: visible; }
.slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.04);
  transition: transform 7s ease;
}
.slide.active img { transform: scale(1); }
.slide-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5, 22, 43, .92) 0%, rgba(7, 30, 58, .78) 42%, rgba(7, 30, 58, .25) 100%);
}
.slide-content {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: #fff;
  max-width: 760px;
}
.slide-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 16px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}
.slide h1 {
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.12;
  letter-spacing: -1.5px;
  font-weight: 800;
  margin-bottom: 20px;
}
.slide h1 em { font-style: normal; color: var(--gold-2); display: block; }
.slide p { font-size: 17px; color: #dbe5f1; max-width: 620px; margin-bottom: 30px; }
.slide-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 4;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(11, 37, 69, .45);
  color: #fff;
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.carousel-arrow:hover { background: var(--gold); color: #2b1d00; }
.carousel-arrow svg { width: 26px; height: 26px; }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

.carousel-dots {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 4;
  display: flex; gap: 10px;
}
.dot {
  position: relative;
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  padding: 0;
}
.dot::after {
  content: "";
  position: absolute; left: 9px; top: 9px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
  transition: .25s;
}
.dot.active::after { background: var(--gold); border-color: var(--gold); width: 20px; left: 5px; border-radius: 8px; }
.hero-wave { display: none; }

/* ---------- Generic sections ---------- */
.section { padding: 100px 0; }
.section-heading { margin-bottom: 48px; }
.section-heading.centered { text-align: center; max-width: 740px; margin-inline: auto; }
.section-tag {
  display: inline-block;
  font-size: 12px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: 12px;
}
.section-tag.light { color: var(--gold-2); }
.section-heading h2, .admissions h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.2;
  letter-spacing: -1px;
  color: var(--navy);
  margin-bottom: 14px;
}
.section-heading h2 span { color: var(--gold-text); }
.section-heading p { color: var(--muted); font-size: 17px; max-width: 640px; margin-inline: auto; }
.admissions h2 { color: #fff; }
.admissions h2 span { color: var(--gold-2); }

/* ---------- About ---------- */
.about { background: #fff; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-image { position: relative; }
.about-image img { width: 100%; height: 520px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }
.about-badge {
  position: absolute; right: -20px; bottom: 32px;
  background: var(--gold);
  color: #2b1d00;
  padding: 18px 26px;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(212, 160, 23, .35);
  display: flex; flex-direction: column;
}
.about-badge strong { font-size: 22px; line-height: 1.2; }
.about-badge span { font-size: 12px; font-weight: 600; }
.about-copy .lead { font-size: 18px; color: var(--navy-2); font-weight: 600; margin-bottom: 16px; }
.about-copy > p:not(.lead) { color: var(--muted); margin-bottom: 24px; }
.about-points { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; margin: 30px 0 34px; }
.point { display: flex; gap: 12px; align-items: flex-start; }
.point-icon { color: var(--gold-text); font-size: 14px; margin-top: 4px; }
.point strong { display: block; font-size: 15px; color: var(--navy); }
.point small { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; }

/* ---------- Stats ---------- */
.stats { background: var(--navy); padding: 54px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat { color: #fff; position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px;
  width: 1px; background: rgba(255,255,255,.18);
}
.stat-num { font-size: 46px; font-weight: 800; color: var(--gold-2); letter-spacing: -1px; }
.stat-plus { font-size: 30px; font-weight: 800; color: var(--gold-2); }
.stat p { font-size: 14px; color: #cbd8e8; letter-spacing: .5px; margin-top: 2px; }

/* ---------- Programs ---------- */
.programs { background: var(--bg); }
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.program-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 30px 32px;
  position: relative;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.program-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: transparent; transition: .3s; }
.program-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); border-color: transparent; }
.program-card:hover::before, .program-card.featured::before { background: var(--gold); }
.program-card.featured { box-shadow: var(--shadow); border-color: transparent; }
.program-icon {
  width: 58px; height: 58px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: #eef3fa;
  color: var(--navy-3);
  margin-bottom: 22px;
}
.program-icon svg { width: 28px; height: 28px; }
.program-card.featured .program-icon { background: var(--gold); color: #2b1d00; }
.program-card h3 { font-size: 23px; color: var(--navy); margin-bottom: 4px; }
.program-level { display: block; font-size: 13px; font-weight: 700; color: var(--gold-text); margin-bottom: 16px; }
.program-card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.program-card ul li { position: relative; padding-left: 20px; font-size: 14px; color: var(--ink); margin: 8px 0; }
.program-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-text); font-weight: 800; }

/* ---------- Facilities ---------- */
.facility-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.facility-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.facility-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.facility-img { height: 220px; overflow: hidden; }
.facility-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.facility-card:hover .facility-img img { transform: scale(1.07); }
.facility-body { padding: 24px 26px 28px; }
.facility-body h3 { font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.facility-body p { font-size: 14px; color: var(--muted); }

/* ---------- Student life ---------- */
.student-life { background: var(--bg); }
.student-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.student-card {
  position: relative;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.student-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.student-card:hover img { transform: scale(1.08); }
.student-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 24, 46, .94) 0%, rgba(6, 24, 46, .35) 55%, transparent 100%);
}
.student-overlay { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 28px; color: #fff; }
.student-label {
  display: inline-block;
  font-size: 11px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--gold-2); margin-bottom: 8px;
}
.student-overlay h3 { font-size: 22px; line-height: 1.25; margin-bottom: 8px; }
.student-overlay p { font-size: 14px; color: #dbe5f1; }

.gallery-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.gallery-strip img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; box-shadow: 0 8px 20px rgba(11, 37, 69, .08); transition: transform .3s; }
.gallery-strip img:hover { transform: translateY(-4px); }

/* ---------- Admissions ---------- */
.admissions {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  position: relative;
  overflow: hidden;
  padding: 70px 0;
}
.admissions::before {
  content: ""; position: absolute;
  width: 420px; height: 420px; border-radius: 50%;
  right: -120px; top: -180px;
  border: 60px solid rgba(212, 160, 23, .10);
}
.admissions-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.admissions h2 { max-width: 680px; margin-bottom: 12px; }
.admissions p { color: #cbd8e8; max-width: 640px; }
.admissions-actions { display: flex; gap: 14px; flex-wrap: wrap; flex: 0 0 auto; }

/* ---------- Contact ---------- */
.contact { background: #fff; }
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-item { display: flex; gap: 18px; align-items: flex-start; }
.contact-icon {
  flex: 0 0 52px; height: 52px;
  border-radius: 14px;
  background: #eef3fa; color: var(--navy-3);
  display: grid; place-items: center;
}
.contact-icon svg { width: 24px; height: 24px; }
.contact-item h3 { font-size: 17px; color: var(--navy); margin-bottom: 4px; }
.contact-item p { color: var(--muted); font-size: 15px; }
.contact-item a:hover { color: var(--gold-text); text-decoration: underline; }
.map-btn {
  display: inline-flex; align-items: center; gap: 9px;
  align-self: flex-start;
  padding: 12px 20px;
  border-radius: 8px;
  background: var(--navy); color: #fff;
  font-size: 14px; font-weight: 700;
}
.map-btn:hover { background: var(--navy-2); }
.map-btn svg { width: 17px; height: 17px; color: var(--gold-2); }

.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 34px;
}
.contact-card h3 { font-size: 23px; color: var(--navy); margin-bottom: 6px; }
.contact-card > p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.contact-phone {
  display: flex; align-items: center; gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color .2s, transform .2s;
}
.contact-phone:hover { border-color: var(--gold); transform: translateX(4px); }
.contact-phone > span:first-child { width: 42px; height: 42px; border-radius: 10px; background: #eef3fa; color: var(--navy-3); display: grid; place-items: center; }
.contact-phone small { display: block; font-size: 12px; color: var(--muted); }
.contact-phone strong { display: block; font-size: 17px; color: var(--navy); }
.contact-card-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.contact-card-foot a { color: var(--navy); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: #07182f; color: #aebdd0; padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1.2fr .9fr; gap: 45px; padding-bottom: 50px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { width: 62px; height: 82px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; }
.footer-brand h3 { font-size: 17px; color: #fff; margin-bottom: 8px; line-height: 1.35; }
.footer-brand p { font-size: 13px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; letter-spacing: .4px; }
.footer-col a { display: block; font-size: 14px; margin: 8px 0; }
.footer-col a:hover { color: var(--gold-2); }
.footer-col p { font-size: 14px; margin-bottom: 12px; }
.footer-note { color: var(--gold-2); font-weight: 600; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 22px 0;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 12px;
}

/* ---------- Floating buttons ---------- */
.float-call, .back-to-top {
  position: fixed; right: 26px; z-index: 90;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
  transition: transform .2s, opacity .2s;
}
.float-call { bottom: 26px; background: var(--gold); color: #2b1d00; }
.float-call svg { width: 24px; height: 24px; }
.back-to-top { bottom: 88px; background: var(--navy); color: #fff; border: none; opacity: 0; pointer-events: none; }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.float-call:hover, .back-to-top:hover { transform: translateY(-3px); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .about-grid { gap: 45px; }
  .about-image img { height: 440px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid .footer-col:last-child { grid-column: span 2; }
}

@media (max-width: 992px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 22px;
    box-shadow: 0 18px 30px rgba(11,37,69,.12);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .main-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
  .program-grid, .facility-grid, .student-grid { grid-template-columns: repeat(2, 1fr); }
  .student-card:last-child { grid-column: span 2; }
  .admissions-inner { flex-direction: column; align-items: flex-start; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .container { width: min(100% - 36px, 1180px); }
  .topbar-hide-sm { display: none; }
  .topbar-left, .topbar-right { gap: 14px; }
  .section { padding: 70px 0; }
  .carousel { height: 600px; min-height: 0; }
  .slide-content { text-align: center; }
  .slide-shade { background: linear-gradient(to top, rgba(5,22,43,.95) 0%, rgba(5,22,43,.72) 55%, rgba(5,22,43,.35) 100%); }
  .slide-kicker { border: 0; padding: 0; }
  .slide p { margin-inline: auto; }
  .slide-actions { justify-content: center; }
  .carousel-arrow { width: 42px; height: 42px; }
  .carousel-prev { left: 10px; }
  .carousel-next { right: 10px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-image img { height: 380px; }
  .about-badge { right: 16px; bottom: -20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 10px; }
  .stat + .stat::before { display: none; }
  .program-grid, .facility-grid, .student-grid, .gallery-strip { grid-template-columns: 1fr 1fr; }
  .student-card:last-child { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .footer-grid .footer-col:last-child { grid-column: span 2; }
}

@media (max-width: 560px) {
  .topbar { font-size: 11px; }
  .topbar-right { display: none; }
  .header-inner { min-height: 74px; }
  .brand-logo-box { width: 44px; height: 52px; flex-basis: 44px; }
  .brand-text strong { font-size: 16px; }
  .brand-text > span { font-size: 11px; }
  .brand-text small { font-size: 10px; }
  .carousel { height: 560px; }
  .slide h1 { font-size: 34px; }
  .slide p { font-size: 15px; }
  .btn { padding: 11px 20px; font-size: 13px; }
  .about-points { grid-template-columns: 1fr; }
  .about-image img { height: 320px; }
  .program-grid, .facility-grid, .student-grid, .gallery-strip { grid-template-columns: 1fr; }
  .student-card:last-child { grid-column: auto; }
  .student-card { height: 340px; }
  .gallery-strip img { height: 130px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 38px; }
  .contact-card { padding: 26px 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand, .footer-grid .footer-col:last-child { grid-column: auto; }
  .float-call, .back-to-top { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
