/* ============================================================
   Mahnar St. John's Public School – Main Stylesheet
   ============================================================ */

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

:root {
  --navy:   #0a2463;
  --red:    #c0392b;
  --gold:   #f0a500;
  --light:  #f4f6fb;
  --white:  #ffffff;
  --text:   #333344;
  --muted:  #6b7280;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(10,36,99,.10);
}

html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; color: var(--text); background: var(--white); }

/* ── TOP BAR ── */
.topbar {
  background: var(--navy);
  color: #ccd6f6;
  font-size: .78rem;
  padding: .45rem 0;
}
.topbar .wrap {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
}
.topbar a { color: #ccd6f6; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar span { margin-right: 1.4rem; }
.topbar i { margin-right: .35rem; color: var(--gold); }

/* ── HEADER ── */
header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  position: sticky; top: 0; z-index: 1000;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: .9rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.logo-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 3px solid var(--gold);
  box-shadow: 0 2px 10px rgba(192,57,43,.35);
  overflow: hidden;
}
.logo-circle .logo-img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover;
  /* zoom into the top-left circular logo in img1.jpeg */
  object-position: 5% 8%;
  transform: scale(2.2);
  transform-origin: 8% 10%;
}
.logo-circle span {
  color: var(--white); font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -1px;
}
.brand-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; color: var(--navy); line-height: 1.2;
}
.brand-text p { font-size: .7rem; color: var(--muted); margin-top: .1rem; }

nav { display: flex; align-items: center; gap: .2rem; }
nav a {
  padding: .5rem .85rem; font-size: .85rem; font-weight: 500;
  color: var(--navy); text-decoration: none; border-radius: 6px;
  transition: background .2s, color .2s;
}
nav a:hover, nav a.active { background: var(--navy); color: var(--white); }
.btn-admit {
  background: var(--red); color: var(--white) !important;
  padding: .5rem 1.1rem !important; border-radius: 30px !important;
  font-weight: 600 !important; margin-left: .4rem;
  box-shadow: 0 3px 10px rgba(192,57,43,.35);
}
.btn-admit:hover { background: #a93226 !important; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: .4rem; border: none; background: transparent;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: .3s; }

/* ── NOTICE TICKER ── */
.ticker-wrap {
  background: var(--gold); overflow: hidden; padding: .5rem 0;
}
.ticker-inner { display: flex; align-items: center; }
.ticker-label {
  background: var(--red); color: var(--white); font-weight: 700;
  font-size: .8rem; padding: .4rem 1rem; white-space: nowrap; flex-shrink: 0;
}
.ticker-track { overflow: hidden; flex: 1; }
.ticker-content {
  display: inline-block; white-space: nowrap;
  animation: ticker 35s linear infinite;
  font-size: .82rem; font-weight: 600; color: var(--navy);
  padding-left: 100%;
}
.ticker-content span { margin: 0 2.5rem; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a3a8f 60%, #0e2056 100%);
  color: var(--white); padding: 5rem 1.5rem 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(240,165,0,.08);
}
.hero::after {
  content: '';
  position: absolute; bottom: -100px; left: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.hero-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  position: relative; z-index: 1;
}
.hero-badge {
  display: inline-block; background: var(--gold);
  color: var(--navy); font-size: .75rem; font-weight: 700;
  padding: .3rem .9rem; border-radius: 30px; margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: 1px;
}
.hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2;
  margin-bottom: 1rem;
}
.hero h2 em { color: var(--gold); font-style: normal; }
.hero p { font-size: 1rem; color: #ccd6f6; line-height: 1.7; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  background: var(--red); color: var(--white);
  padding: .75rem 1.8rem; border-radius: 30px; font-weight: 600;
  text-decoration: none; font-size: .9rem;
  box-shadow: 0 4px 16px rgba(192,57,43,.45);
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(192,57,43,.5); }

.btn-outline {
  border: 2px solid rgba(255,255,255,.5); color: var(--white);
  padding: .75rem 1.8rem; border-radius: 30px; font-weight: 600;
  text-decoration: none; font-size: .9rem;
  transition: background .2s, border-color .2s;
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.hero-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 2.5rem;
}
.stat {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 1rem; text-align: center; backdrop-filter: blur(6px);
}
.stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--gold); }
.stat span { font-size: .72rem; color: #ccd6f6; }

.hero-card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px; padding: 2rem; backdrop-filter: blur(10px);
}
.hero-card h3 { font-size: 1.1rem; margin-bottom: 1.5rem; color: var(--gold); }
.hero-card .form-group { margin-bottom: 1rem; }
.hero-card input, .hero-card select {
  width: 100%; padding: .7rem 1rem; border-radius: 8px;
  border: 2px solid rgba(255,255,255,.25); background: var(--white);
  color: var(--text); font-size: .875rem; font-family: 'Poppins', sans-serif;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.hero-card input::placeholder { color: #999; }
.hero-card input:focus, .hero-card select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(240,165,0,.2);
}
.hero-card select { color: #555; }
.hero-card select option { color: var(--text); background: var(--white); }
.hero-card .btn-submit {
  width: 100%; padding: .8rem; background: var(--gold); color: var(--navy);
  border: none; border-radius: 8px; font-weight: 700; font-size: .9rem;
  cursor: pointer; font-family: 'Poppins', sans-serif;
  transition: background .2s, transform .2s;
}
.hero-card .btn-submit:hover { background: #e09400; transform: translateY(-1px); }

/* ── SECTION COMMON ── */
section { padding: 5rem 1.5rem; }
.section-wrap { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block; font-size: .75rem; font-weight: 700;
  color: var(--red); text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: .5rem;
}
.section-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--navy); margin-bottom: .75rem;
}
.section-head p { color: var(--muted); font-size: .95rem; max-width: 600px; margin: 0 auto; }
.divider {
  width: 60px; height: 4px;
  background: linear-gradient(to right, var(--red), var(--gold));
  border-radius: 2px; margin: .75rem auto 0;
}

/* ── ABOUT ── */
.about { background: var(--light); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-img {
  border-radius: 16px; overflow: hidden;
  min-height: 380px; display: flex; align-items: flex-end; justify-content: center;
  position: relative; box-shadow: 0 8px 32px rgba(10,36,99,.18);
}
.about-img .about-photo {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  border-radius: 16px;
}
.about-img-inner {
  position: relative; z-index: 1;
  width: 100%; padding: 1.2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(10,36,99,.85) 0%, transparent 100%);
}
.about-badges { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; justify-content: center; }
.badge {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: .3rem .8rem; border-radius: 20px; font-size: .72rem; color: var(--gold);
}
.about-content h2 { font-family: 'Playfair Display', serif; font-size: 1.9rem; color: var(--navy); margin-bottom: 1rem; }
.about-content p { color: var(--muted); line-height: 1.8; margin-bottom: 1rem; font-size: .92rem; }
.about-list { list-style: none; margin-top: 1.2rem; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.about-list li { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--text); }
.about-list li i { color: var(--red); font-size: .8rem; flex-shrink: 0; }

/* ── FEATURES ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--white); border-radius: var(--radius);
  padding: 2rem 1.5rem; text-align: center;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
  border-top: 4px solid transparent;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(10,36,99,.14); }
.feature-card:nth-child(1) { border-top-color: var(--red); }
.feature-card:nth-child(2) { border-top-color: var(--gold); }
.feature-card:nth-child(3) { border-top-color: #27ae60; }
.feature-card:nth-child(4) { border-top-color: #8e44ad; }
.feature-card:nth-child(5) { border-top-color: #2980b9; }
.feature-card:nth-child(6) { border-top-color: var(--navy); }
.feature-icon {
  width: 64px; height: 64px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem; font-size: 1.6rem;
}
.feature-card:nth-child(1) .feature-icon { background: #fdecea; color: var(--red); }
.feature-card:nth-child(2) .feature-icon { background: #fef9ec; color: var(--gold); }
.feature-card:nth-child(3) .feature-icon { background: #eafaf1; color: #27ae60; }
.feature-card:nth-child(4) .feature-icon { background: #f5eef8; color: #8e44ad; }
.feature-card:nth-child(5) .feature-icon { background: #eaf4fb; color: #2980b9; }
.feature-card:nth-child(6) .feature-icon { background: #eaf0fb; color: var(--navy); }
.feature-card h3 { font-size: .95rem; font-weight: 600; color: var(--navy); margin-bottom: .5rem; }
.feature-card p { font-size: .8rem; color: var(--muted); line-height: 1.6; }

/* ── CLASSES ── */
.classes { background: var(--light); }
.classes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.class-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.4rem 1rem; text-align: center;
  box-shadow: var(--shadow); cursor: default;
  transition: transform .2s, box-shadow .2s;
}
.class-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(10,36,99,.15); }
.class-num {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), #1a3a8f);
  color: var(--white); font-weight: 700; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .9rem;
}
.class-card h4 { font-size: .85rem; font-weight: 600; color: var(--navy); }
.class-card p { font-size: .72rem; color: var(--muted); margin-top: .25rem; }

/* ── ADMISSION / INQUIRY ── */
#admission { background: var(--white); }

.admission-layout {
  display: flex; gap: 2rem; align-items: flex-start;
}
.admission-img-panel {
  width: 260px; flex-shrink: 0; border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 32px rgba(10,36,99,.15);
  position: sticky; top: 90px;
}
.admission-img-panel img {
  width: 100%; display: block; border-radius: 16px 16px 0 0;
}
.adm-img-caption {
  background: var(--navy); color: var(--white);
  text-align: center; padding: .75rem 1rem;
  font-size: .8rem; font-weight: 600;
  border-radius: 0 0 16px 16px;
}
.adm-img-caption i { color: var(--gold); margin-right: .4rem; }

@media (max-width: 900px) {
  .admission-layout { flex-direction: column; }
  .admission-img-panel { width: 100%; position: static; }
  .admission-img-panel img { border-radius: 16px 16px 0 0; max-height: 280px; object-fit: cover; }
}

.form-card {
  background: var(--white); border-radius: 20px;
  box-shadow: 0 8px 40px rgba(10,36,99,.12);
  overflow: hidden; max-width: 900px; margin: 0 auto;
}
.form-card-header {
  background: linear-gradient(135deg, var(--navy), #1a3a8f);
  color: var(--white); padding: 2rem 2.5rem;
}
.form-card-header h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: .35rem; }
.form-card-header p { font-size: .85rem; color: #ccd6f6; }
.form-body { padding: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; }
.form-row.full { grid-template-columns: 1fr; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-group label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--navy); margin-bottom: .4rem;
}
.form-group label span { color: var(--red); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: .7rem 1rem; border-radius: 8px;
  border: 1.5px solid #dde3ef; background: #f9fafc;
  color: var(--text); font-size: .875rem; font-family: 'Poppins', sans-serif;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy); box-shadow: 0 0 0 3px rgba(10,36,99,.08);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-submit { text-align: center; margin-top: .5rem; }
.btn-form-submit {
  background: linear-gradient(135deg, var(--red), #a93226);
  color: var(--white); border: none; padding: .85rem 3rem;
  border-radius: 30px; font-size: .95rem; font-weight: 700;
  font-family: 'Poppins', sans-serif; cursor: pointer;
  box-shadow: 0 4px 16px rgba(192,57,43,.4);
  transition: transform .2s, box-shadow .2s;
}
.btn-form-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(192,57,43,.5); }

/* ── CONTACT ── */
#contact { background: var(--light); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
  display: flex; gap: 1rem; align-items: flex-start;
}
.contact-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy), #1a3a8f);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.1rem;
}
.contact-card h4 { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: .3rem; }
.contact-card p, .contact-card a {
  font-size: .9rem; color: var(--navy); font-weight: 500; text-decoration: none;
}
.contact-card a:hover { color: var(--red); }
.contact-hours {
  background: linear-gradient(135deg, var(--navy), #1a3a8f);
  border-radius: var(--radius); padding: 1.5rem; color: var(--white);
}
.contact-hours h4 { color: var(--gold); font-size: .9rem; margin-bottom: .8rem; }
.contact-hours table { width: 100%; font-size: .82rem; }
.contact-hours td { padding: .3rem 0; }
.contact-hours td:last-child { text-align: right; color: #ccd6f6; }
.contact-form-card {
  background: var(--white); border-radius: 20px;
  box-shadow: 0 8px 40px rgba(10,36,99,.10); overflow: hidden;
}
.contact-form-card .form-card-header { padding: 1.5rem 2rem; }
.contact-form-card .form-body { padding: 2rem; }

/* ── MAP ── */
#map { padding: 0; }
.map-wrap { position: relative; }
.map-header {
  background: var(--navy); color: var(--white);
  text-align: center; padding: 2.5rem 1.5rem;
}
.map-header h2 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-bottom: .4rem; }
.map-header p { color: #ccd6f6; font-size: .9rem; }
.map-container { height: 420px; width: 100%; }
.map-container iframe { width: 100%; height: 100%; border: none; display: block; }

/* ── FOOTER ── */
footer { background: #07193d; color: #ccd6f6; padding: 4rem 1.5rem 0; }
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .footer-logo {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--red); border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; overflow: hidden;
}
.footer-brand .footer-logo .logo-img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover;
  object-position: 5% 8%;
  transform: scale(2.2);
  transform-origin: 8% 10%;
}
.footer-brand .footer-logo span {
  color: var(--white); font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 800;
}
.footer-brand h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--white); margin-bottom: .5rem; }
.footer-brand p { font-size: .8rem; line-height: 1.7; color: #8a9bc0; }
.footer-socials { display: flex; gap: .6rem; margin-top: 1.2rem; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.07); color: #ccd6f6;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: .9rem;
  transition: background .2s, color .2s;
}
.footer-socials a:hover { background: var(--red); color: var(--white); }
.footer-col h4 {
  color: var(--white); font-size: .9rem; font-weight: 600;
  margin-bottom: 1rem; position: relative; padding-bottom: .6rem;
}
.footer-col h4::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 30px; height: 2px; background: var(--gold);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .5rem; }
.footer-col ul li a { color: #8a9bc0; text-decoration: none; font-size: .82rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--gold); }
.footer-col ul li.footer-addr { color: #8a9bc0; font-size: .82rem; margin-top: .2rem; }
.footer-col ul li.footer-addr i { color: var(--gold); margin-right: .4rem; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding: 1.2rem 0; display: flex;
  justify-content: space-between; align-items: center;
  font-size: .78rem; color: #5a6e8a; flex-wrap: wrap; gap: .5rem;
}
.footer-bottom i { color: var(--red); }

/* ── SUCCESS MESSAGE ── */
.success-msg {
  display: none; background: #eafaf1; border: 1.5px solid #27ae60;
  color: #1a7a3c; border-radius: 8px; padding: 1rem 1.2rem;
  font-size: .875rem; font-weight: 500; margin-bottom: 1rem; text-align: center;
}
.success-msg i { margin-right: .5rem; }

/* ── SCROLL TO TOP ── */
#scrollTop {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  border: none; cursor: pointer; font-size: 1rem;
  box-shadow: 0 4px 16px rgba(10,36,99,.35);
  display: none; align-items: center; justify-content: center;
  transition: background .2s;
}
#scrollTop:hover { background: var(--red); }
#scrollTop.show { display: flex; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { max-width: 480px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 1rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.1); border-top: 1px solid #eef;
  }
  nav.open { display: flex; }
  nav a { padding: .7rem 1rem; border-radius: 8px; }
  .hamburger { display: flex; }
  .header-inner { position: relative; }
  .form-row { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .brand-text h1 { font-size: 1rem; }
}
