/* ==========================================================================
   I.G. Delhi Public School — site styles
   Colours, fonts and spacing are carried over from the original Elementor kit.
   ========================================================================== */

@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Averia Sans Libre";
  src: url("../fonts/averia-sans-libre-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Averia Sans Libre";
  src: url("../fonts/averia-sans-libre-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1e2c67;
  --cyan: #25bdd8;
  --pink: #ff4986;
  --green: #5fc24b;
  --amber: #f9b001;
  --coral: #ff4e31;
  --text: #696478;
  --on-navy: #c3c9e2;
  --line: #e5eaeb;
  --soft: #f2f5f6;
  --white: #fff;

  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Averia Sans Libre", "Nunito", system-ui, sans-serif;

  --container: 1172px;
  --radius: 7px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.875;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .3s; }
p { margin: 0 0 1em; }
button { font: inherit; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  text-transform: capitalize;
}

.icon { width: 1em; height: 1em; flex: none; display: inline-block; vertical-align: middle; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 30px);
  margin: 0 auto;
  padding: 0 15px;
}
.container-narrow { max-width: 1150px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--white);
  color: var(--navy);
  padding: .5rem 1rem;
  font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.btn {
  display: inline-block;
  background: var(--cyan);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  padding: 10px 30px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .3s;
}
.btn:hover, .btn:focus-visible { background: var(--navy); color: var(--white); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn-sm { font-size: 16px; padding: 8px 22px; }

.section-title {
  font-size: 60px;
  line-height: 1;
  text-align: center;
  margin: 0 0 30px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy);
  color: var(--on-navy);
  padding: 17px 0 11px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.57;
}
.topbar-inner { display: flex; justify-content: center; flex-wrap: wrap; }
.topbar-item { display: flex; align-items: center; gap: 8px; padding: 0 50px; }
.topbar-item + .topbar-item { border-left: 1px solid #ddd; }
.topbar .icon { color: var(--cyan); font-size: 15px; }
.topbar a:hover { color: var(--white); }

/* ---------- Header & navigation ---------- */
.site-header { position: relative; z-index: 40; background: var(--white); }

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 75px;
}

.brand {
  position: absolute;
  left: 15px;
  top: -36px;
  z-index: 2;
  line-height: 0;
  background: var(--soft);
  padding: 14px 10px;
  border-radius: 100px;
}
.brand img { width: 118px; }

.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.menu > li { position: relative; }

.menu > li > a,
.submenu-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 22px 17px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.875;
  color: var(--text);
  background: none;
  border: 0;
  cursor: pointer;
}
.submenu-toggle .icon { font-size: 13px; transition: transform .3s; }

.menu > li > a:hover,
.submenu-toggle:hover,
.menu > li > a[aria-current="page"],
.has-submenu[data-current] > .submenu-toggle { color: var(--navy); }

.submenu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--white);
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(30, 44, 103, .15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.has-submenu.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }

.submenu a {
  display: block;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--navy);
}
.submenu a:hover,
.submenu a[aria-current="page"] { background: #f5f5f5; color: #3858e9; }

.nav-toggle, .nav-close, .nav-panel-head, .nav-overlay { display: none; }

/* ---------- Hero slider ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--white); }
.hero-slides { display: grid; }

.hero-slide {
  grid-area: 1 / 1;
  position: relative;
  background-size: cover;
  background-position: 50%;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility .9s;
}
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 28, 66, .45) 0%, rgba(20, 28, 66, .1) 55%, rgba(20, 28, 66, 0) 100%);
}
.hero-slide.is-active { opacity: 1; visibility: visible; }

.hero-inner {
  position: relative;
  max-width: 1230px;
  margin: 0 auto;
  padding: 245px 15px 230px;
}
.hero-star { width: 22px; height: 26px; margin: 0 0 12px 165px; }
.hero-sub {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  color: var(--white);
  margin: 0 0 16px;
  text-transform: capitalize;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 100px;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  margin: 0;
  max-width: 780px;
  text-transform: capitalize;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 60px;
  height: 60px;
  margin-top: -30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 78, 49, .75);
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
  transition: background-color .3s;
}
.hero-arrow:hover { background: var(--cyan); }
.hero-prev { left: 25px; }
.hero-next { right: 25px; }

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 120px;
  max-width: 1230px;
  margin: 0 auto;
  padding: 0 15px 0 165px;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(229, 234, 235, .39);
  cursor: pointer;
  transition: background-color .3s;
}
.hero-dot:hover, .hero-dot[aria-current="true"] { background: var(--white); }

/* ---------- Welcome ---------- */
.welcome { padding: 80px 0; }
.welcome-title {
  font-size: 60px;
  line-height: 74px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto 50px;
}
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 0 20px;
}
.welcome-text p { margin-bottom: 1.4em; }

.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video-frame iframe,
.video-lite { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-lite { padding: 0; background: #000 center / cover no-repeat; cursor: pointer; }
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 50px;
  margin: -25px 0 0 -36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(230, 0, 0, .9);
  color: var(--white);
  font-size: 28px;
  transition: transform .2s, background-color .2s;
}
.video-lite:hover .video-play, .video-lite:focus-visible .video-play { background: #f00; transform: scale(1.06); }

/* ---------- Stats ---------- */
.stats { padding: 123px 0 69px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: 60px;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 10px;
  font-variant-numeric: tabular-nums;
}
.stat-label { margin: 0 0 12px; }
.stat-bar { display: block; width: 30px; height: 4px; margin: 0 auto; background: var(--bar, var(--cyan)); }

/* ---------- Courses ---------- */
.courses { background: var(--soft); padding: 118px 0 119px; }
.section-intro { text-align: center; margin-bottom: 20px; }
.section-intro p { margin-bottom: .6em; }

.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.course-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--white); }
.course-media img { width: 100%; aspect-ratio: 740 / 660; object-fit: cover; }
.course-body {
  flex: 1;
  background: var(--white);
  border: solid var(--line);
  border-width: 0 1px;
  padding: 54px 30px 37px;
}
.course-body h3 { font-size: 24px; line-height: 1.33; }
.course-body a:hover { color: var(--cyan); }
.course-more {
  display: block;
  text-align: center;
  background: var(--cyan);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  padding: 9px 0 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: background-color .3s;
}
.course-more:hover { background: var(--navy); color: var(--white); }

/* ---------- Events ---------- */
.events { padding: 120px 0 90px; }
.events .section-title { margin-bottom: 40px; }
.events-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 30px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 40px 29px;
}
.events-media { display: grid; gap: 14px; }
.events-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 16px; }

.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: grid; grid-template-columns: 32px 1fr; gap: 0 14px; align-items: center; margin-bottom: 6px; }
.event-list img { width: 32px; height: 32px; }
.event-list h3 { font-size: 20px; line-height: 1.3; }
.event-list p { margin: 0; }

/* ---------- Home gallery carousel ---------- */
.home-gallery { background: var(--soft); padding: 118px 0 119px; }
.carousel { position: relative; padding: 0 30px; }
.carousel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 40px) / 3);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item { scroll-snap-align: start; }
.carousel-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--cyan);
  font-size: 26px;
  cursor: pointer;
}
.carousel-arrow:hover { color: var(--navy); }
.carousel-prev { left: -5px; }
.carousel-next { right: -5px; }

/* ---------- Inner page banner ---------- */
.page-banner {
  position: relative;
  isolation: isolate;
  background: var(--navy) center / cover no-repeat;
  padding: 121px 15px 118px;
  text-align: center;
}
.page-banner--overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(30, 44, 103, .5);
}
.page-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 24' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 0Q720 34 1440 0V24H0Z'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}
.page-banner h1 {
  font-family: var(--font-body);
  font-size: 100px;
  font-weight: 700;
  line-height: 1.36;
  color: var(--white);
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .15);
}
.banner-home {
  position: absolute;
  left: 50%;
  bottom: -44px;
  z-index: 2;
  transform: translateX(-50%);
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--navy);
  font-size: 32px;
}
.banner-home .icon { margin-top: -26px; }
.banner-home:hover { color: var(--pink); }

.page-section { padding: 120px 0 70px; }

/* ---------- About ---------- */
.about-intro .section-title { text-align: left; }
.profiles { padding: 0 0 40px; }
.profile { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: center; margin-bottom: 40px; }
.profile--reverse { grid-template-columns: 1fr 360px; }
.profile-photo { width: 100%; }
.profile-text h2 { font-size: 25px; line-height: 1.3; margin-bottom: 14px; }
.profile-text sup { font-size: .6em; line-height: 0; }

/* ---------- Class pages ---------- */
.class-section { padding: 70px 0 5em; }
.class-intro { margin-bottom: 26px; }
.sub-heading { font-size: 20px; line-height: 1.4; margin: 0 0 14px; }

.table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.info-table { width: 100%; border-collapse: collapse; color: #1a1a1a; font-size: 16px; line-height: 1.5; }
.info-table th {
  background: var(--cyan);
  color: var(--white);
  font-weight: 700;
  text-align: center;
  padding: 12px 10px;
  border: 1px solid #8fd6e3;
}
.info-table td { padding: 10px 8px; border: 1px solid #9a9a9a; }
.info-table tbody tr:nth-child(even) td { background: #f5f5f5; }
.table-note { margin: 20px 0 30px; }

.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; }
.feature-grid li { display: flex; align-items: center; gap: 14px; }
.feature-grid img { width: 24px; height: 24px; }
.feature-grid h3 { font-size: 20px; }

/* ---------- Forms ---------- */
.site-form { position: relative; }
.form-section .site-form { max-width: 900px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; margin-bottom: 14px; }
.field--full { grid-column: 1 / -1; }

.site-form input:not([type="hidden"]),
.site-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: var(--white);
  border: 1px solid #dadbdd;
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.site-form textarea { min-height: 90px; resize: vertical; }
.site-form ::placeholder { color: #868e96; opacity: 1; }
.site-form input:focus,
.site-form textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(37, 189, 216, .2); }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); font-weight: 600; line-height: 1.5; }
.form-status.is-success { background: #e9f7ec; color: #1f6b35; border: 1px solid var(--green); }
.form-status.is-error { background: #fff0f4; color: #a3163f; border: 1px solid var(--pink); }

/* ---------- Contact ---------- */
.contact-section { padding: 5em 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; align-items: start; }
.contact-kicker {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.875;
  margin: 0 0 20px;
}

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.contact-list .icon { color: var(--cyan); font-size: 18px; margin-top: .35em; }
.contact-info .contact-list { margin-top: 26px; font-size: 18px; line-height: 1.67; }
.contact-info .contact-list a:hover { color: var(--navy); }

/* ---------- Gallery page & lightbox ---------- */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery-grid a { display: block; overflow: hidden; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 70px;
  background: rgba(10, 12, 30, .94);
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: min(1200px, 100%); max-height: calc(100vh - 140px); width: auto; height: auto; margin: 0 auto; }
.lightbox-count { color: var(--white); margin-top: 10px; font-size: 14px; }
.lightbox button {
  position: absolute;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
}
.lightbox button:hover { background: var(--cyan); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev, .lightbox-next { top: 50%; margin-top: -26px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
body.lightbox-open { overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy) url("../img/footer-bg.png") no-repeat center top;
  color: var(--on-navy);
  padding: 121px 0;
}
.footer-grid { display: grid; grid-template-columns: 1fr .85fr 1.1fr; gap: 30px; }
.footer-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.33;
  color: var(--white);
  margin: 0 0 25px;
}
.footer-links { padding-left: 40px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { position: relative; padding-left: 18px; margin-bottom: 9px; font-weight: 600; line-height: 1.55; }
.footer-links li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
}
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--white); }
.site-footer .contact-list a:hover { color: var(--pink); }

.footer-bottom {
  background: var(--navy) url("../img/pattern.png") center / cover;
  border-top: 1px solid rgba(229, 234, 235, .6);
  color: var(--on-navy);
  padding: 53px 0 46px;
}
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 30px; }
.footer-bottom p { margin: 0; }
.footer-bottom a:hover { color: var(--white); }

/* ---------- 404 ---------- */
.notfound { padding: 100px 0 120px; text-align: center; }
.notfound p { margin-bottom: 1.5em; }

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1024px) {
  .section-title, .welcome-title { font-size: 44px; line-height: 1.15; }

  /* Off-canvas menu */
  .navbar { justify-content: space-between; min-height: 88px; }
  .brand { position: static; padding: 6px; margin: 8px 0; }
  .brand img { width: 64px; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    background: none;
    color: #000;
    font-size: 28px;
    cursor: pointer;
  }
  .site-nav {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    width: 300px;
    max-width: 85vw;
    overflow-y: auto;
    background: #0a0a0a;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .3s, visibility .3s;
  }
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, .8);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-nav { transform: none; visibility: visible; }
  body.nav-open .nav-overlay { opacity: 1; visibility: visible; }

  .nav-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .nav-panel-head img { width: 64px; background: var(--soft); border-radius: 50%; padding: 4px; }
  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 3px solid var(--white);
    background: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
  }

  .menu { flex-direction: column; align-items: stretch; }
  .menu > li > a,
  .submenu-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 16px 20px;
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .menu > li > a:hover,
  .submenu-toggle:hover,
  .menu > li > a[aria-current="page"],
  .has-submenu[data-current] > .submenu-toggle { color: #8ea2ff; }
  .has-submenu.is-open .submenu-toggle .icon { transform: rotate(180deg); }

  .submenu,
  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }
  .has-submenu.is-open > .submenu { display: block; }
  .submenu a { padding: 12px 20px 12px 36px; font-size: 15px; color: var(--white); text-transform: uppercase; }
  .submenu a:hover, .submenu a[aria-current="page"] { background: rgba(255, 255, 255, .06); color: #8ea2ff; }

  /* Hero */
  .hero-inner { padding: 150px 90px; }
  .hero-star { margin-left: 100px; }
  .hero-sub { font-size: 24px; }
  .hero-title { font-size: 64px; }
  .hero-dots { bottom: 50px; padding-left: 90px; }

  .welcome { padding: 60px 0; }
  .welcome-grid { gap: 30px; padding: 0; }
  .stats { padding: 70px 0 50px; }
  .courses, .home-gallery { padding: 80px 0; }
  .events { padding: 80px 0 60px; }
  .events-box { grid-template-columns: 1fr; padding: 30px; }
  .events-media { grid-template-columns: 1fr 1fr; }
  .carousel-track { grid-auto-columns: calc((100% - 20px) / 2); }

  .page-banner { padding: 100px 15px 100px; }
  .page-banner h1 { font-size: 64px; }
  .page-section { padding: 90px 0 60px; }
  .profile { grid-template-columns: 300px 1fr; }
  .profile--reverse { grid-template-columns: 1fr 300px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  .site-footer { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 767px) {
  body { font-size: 15px; }
  .section-title, .welcome-title { font-size: 34px; }

  .topbar { padding: 10px 0; }
  .topbar-inner { flex-direction: column; align-items: center; gap: 2px; }
  .topbar-item { padding: 0; }
  .topbar-item + .topbar-item { border-left: 0; }

  .hero-inner { padding: 90px 20px 120px; text-align: center; }
  .hero-star { margin: 0 auto 10px; }
  .hero-sub { font-size: 20px; }
  .hero-title { font-size: 36px; margin: 0 auto; }
  /* Arrows move below the text on phones so they never cover the heading */
  .hero-dots { bottom: 38px; padding: 0; justify-content: center; }
  .hero-arrow { top: auto; bottom: 28px; margin-top: 0; width: 40px; height: 40px; font-size: 18px; }
  .hero-prev { left: calc(50% - 100px); }
  .hero-next { right: calc(50% - 100px); }

  .welcome-grid,
  .contact-grid,
  .table-grid,
  .feature-grid,
  .form-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 40px 20px; }
  .stat-number { font-size: 44px; }

  .course-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .course-body { padding: 30px 24px 26px; }

  .events-box { padding: 20px; }
  .events-media { grid-template-columns: 1fr; }
  .carousel-track { grid-auto-columns: 100%; }

  .page-banner { padding: 80px 15px; }
  .page-banner h1 { font-size: 42px; }
  .banner-home { width: 70px; height: 70px; bottom: -35px; font-size: 26px; }
  .banner-home .icon { margin-top: -20px; }
  .page-section { padding: 70px 0 50px; }
  .class-section { padding: 60px 0 50px; }

  .profile, .profile--reverse { grid-template-columns: 1fr; }
  .profile-photo { max-width: 320px; margin: 0 auto; }
  .profile--reverse .profile-photo { order: -1; }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .lightbox { padding: 60px 10px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { padding-left: 0; }
  .footer-bottom { padding: 30px 0; }
  .footer-bottom-inner { flex-direction: column; align-items: center; text-align: center; }
}

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