/* Performance & CLS — PageSpeed-driven overrides */

@font-face {
  font-family: "Flaticon";
  src: url("../fonts/Flaticon.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "FontAwesome";
  src: url("../fonts/fontawesome-webfont.woff2?v=4.7.0") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.class-item .ci-pic {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  line-height: 0;
}

.class-item .ci-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

/* ========== Global responsive base (all pages) ========== */
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  min-width: 0;
}

img,
video,
iframe,
embed,
object,
svg {
  max-width: 100%;
  height: auto;
}

section,
header,
footer,
main,
.container,
.container-fluid {
  max-width: 100%;
}

/* Template skew bars extend past viewport on mobile (style.css sets 600–750px) */
@media only screen and (max-width: 991px) {
  .class-item .ci-text::after {
    width: 100% !important;
    max-width: 100%;
    left: 0 !important;
    transform: skewY(-2deg) !important;
  }

  .class-item .ci-pic img {
    min-width: 0 !important;
    max-width: 100%;
    width: 100% !important;
  }

  .class-item {
    max-width: 100%;
    overflow: hidden;
  }

  .ss-text::after,
  .ts-item .ts_text::after {
    display: none;
  }

  .gallery,
  .gallery-section {
    overflow: hidden;
    max-width: 100%;
  }

  .gallery .gs-item {
    max-width: 100%;
  }

  .ss-pic img,
  .ss-item .ss-pic img {
    min-width: 0 !important;
    width: 100%;
  }

  .about-text,
  .about-video {
    max-width: 100%;
    height: auto;
    min-height: 0;
    padding-left: 20px;
    padding-right: 20px;
  }

  .table-responsive,
  .class-timetable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .class-timetable table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  li,
  a,
  span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .section-title h2 {
    font-size: clamp(1.25rem, 5.5vw, 2rem);
    line-height: 1.2;
    padding-left: 10px;
    padding-right: 10px;
  }

  .section-title span {
    font-size: clamp(0.75rem, 3.2vw, 1rem);
  }

  .cs-item h4,
  .cs-item p {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* —— Header: desktop logo cap —— */
@media only screen and (min-width: 992px) {
  .header-section .logo img {
    max-height: 88px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
  }
}

/* —— Hero typography & CTAs —— */
.hero-section .hi-text h1 .hero-line {
  display: block;
  white-space: nowrap;
}

.hero-section .hi-text h1 strong.hero-line {
  color: #ff00ea;
  margin-top: 0.06em;
}

.hero-section .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 100%;
}

.hero-section .hero-cta .primary-btn {
  margin: 0;
  width: auto;
  min-width: 132px;
  max-width: 180px;
  flex: 0 1 auto;
  padding: 16px 22px;
  text-align: center;
}

/* Desktop: hide header search + social icons */
@media only screen and (min-width: 992px) {
  .header-section .top-option {
    display: none !important;
  }
}

/* Desktop: reserve hero space before Owl Carousel JS runs (CLS) */
@media only screen and (min-width: 992px) {
  .hero-section {
    min-height: 1040px;
    background-color: #0a0a0a;
  }

  .hero-section .hs-slider.owl-carousel {
    display: block;
    min-height: 1040px;
  }

  .hero-section .hs-item {
    min-height: 1040px;
    height: 1040px;
  }

  .hero-section .hero-hi-text {
    text-align: left;
  }

  .hero-section .hero-cta {
    justify-content: flex-start;
  }

  .hero-section .hs-slider .hs-item .hi-text h1 {
    font-size: clamp(2.75rem, 4.5vw, 4.5rem);
    line-height: 1.05;
  }
}

@media only screen and (max-width: 991px) {
  .hero-section {
    position: relative;
    overflow: hidden;
    min-height: calc(100svh - 68px);
    max-height: calc(100svh - 68px);
    background-color: #0a0a0a;
  }

  .hero-section .hs-slider.owl-carousel {
    display: block;
    height: 100%;
    min-height: calc(100svh - 68px);
  }

  .hero-section .owl-stage-outer {
    height: calc(100svh - 68px) !important;
    overflow: hidden;
  }

  .hero-section .hs-item {
    max-width: 100%;
    min-height: calc(100svh - 68px);
    display: flex;
    align-items: center;
    padding-top: 88px;
    padding-bottom: 56px;
    box-sizing: border-box;
    background-size: cover;
    background-position: center center;
  }

  .hero-section .hs-item > .container {
    width: 100%;
  }

  .hero-section .hs-slider .owl-item.active .hs-item .hi-text span,
  .hero-section .hs-slider .owl-item.active .hs-item .hi-text h1,
  .hero-section .hs-slider .owl-item.active .hs-item .hi-text .hero-cta,
  .hero-section .hs-slider .owl-item.active .hs-item .hi-text .primary-btn {
    opacity: 1;
    top: 0;
  }

  .hero-section .hero-hi-text {
    text-align: center;
    padding: 0 18px;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-section .hi-text span {
    display: block;
    font-size: clamp(0.7rem, 2.6vw, 0.85rem);
    letter-spacing: 0.22em;
    margin-bottom: 14px;
  }

  .hero-section .hs-slider .hs-item .hi-text h1 {
    /* sized so "BUILDING STRENGTH" stays one line on phones */
    font-size: clamp(1.55rem, 7.4vw, 2.35rem);
    line-height: 1.1;
    max-width: 100%;
    white-space: normal;
    margin-bottom: 26px;
    letter-spacing: 0.01em;
  }

  .hero-section .hs-slider.owl-carousel .owl-nav button {
    left: 4px;
    z-index: 5;
  }

  .hero-section .hs-slider.owl-carousel .owl-nav button.owl-next {
    right: 4px;
    left: auto;
  }

  .hero-section .col-12 {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-section .hero-cta {
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    gap: 10px;
  }

  .hero-section .hero-cta .primary-btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    max-width: 146px;
    padding: 13px 12px;
    font-size: 12px;
    letter-spacing: 0.6px;
  }
}

@media only screen and (max-width: 479px) {
  .hero-section .hero-hi-text {
    max-width: 18.5rem;
    padding: 0 14px;
  }

  .hero-section .hs-slider .hs-item .hi-text h1 {
    font-size: clamp(1.45rem, 7vw, 1.85rem);
    margin-bottom: 22px;
  }

  .hero-section .hero-cta {
    max-width: 268px;
  }

  .hero-section .hero-cta .primary-btn {
    max-width: 128px;
    padding: 12px 10px;
    font-size: 11px;
  }
}

@media only screen and (min-width: 768px) and (max-width: 991px) {
  .hero-section .hs-slider .hs-item {
    padding-top: 110px;
    padding-bottom: 72px;
  }

  .hero-section .hero-hi-text {
    max-width: 28rem;
  }

  .hero-section .hs-slider .hs-item .hi-text h1 {
    font-size: clamp(2.5rem, 5.5vw, 3.25rem);
  }

  .hero-section .hero-cta {
    max-width: 340px;
  }

  .hero-section .hero-cta .primary-btn {
    max-width: 160px;
    padding: 15px 18px;
    font-size: 13px;
  }
}

/* —— Sticky glass header (tablet & mobile) —— */
@media only screen and (max-width: 991px) {
  .header-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    padding-top: 8px;
    padding-bottom: 10px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    margin: 0;
    background: rgba(10, 10, 10, 0.52);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    z-index: 1000;
  }

  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .header-section {
      background: rgba(10, 10, 10, 0.92);
    }
  }

  .header-section .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .header-section .container-fluid > .row {
    flex: 1 1 auto;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
    min-height: 48px;
    width: auto;
  }

  .header-section .container-fluid > .row > .col-lg-3:first-child {
    flex: 0 1 auto;
    max-width: calc(100% - 48px);
    padding-left: 0;
    padding-right: 0;
  }

  .header-section .container-fluid > .row > .col-lg-6,
  .header-section .container-fluid > .row > .col-lg-3:last-child {
    display: none;
  }

  .header-section .logo a {
    display: block;
    line-height: 0;
  }

  .header-section .logo img {
    max-width: 120px;
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }

  .header-section .canvas-open.menu-toggle {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
    margin: 0;
    z-index: 1001;
    font-size: 0;
    line-height: 0;
  }

  .breadcrumb-section {
    padding-top: 130px;
  }
}

@media only screen and (max-width: 767px) {
  .container,
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
  }

  .header-section .logo img {
    max-width: 108px;
    max-height: 48px;
  }

  .hero-section .hs-slider .hs-item .hi-text h1 {
    margin-bottom: 18px;
  }

  .banner-section,
  .breadcrumb-section {
    max-width: 100%;
    overflow: hidden;
  }

  .breadcrumb-text h2 {
    font-size: clamp(1.5rem, 8vw, 2.25rem);
    line-height: 1.15;
    padding: 0 10px;
  }

  .bs-text h2 {
    font-size: clamp(1.35rem, 6vw, 2rem);
    padding: 0 12px;
  }
}

@media only screen and (max-width: 479px) {
  .header-section {
    padding: 6px 12px 8px;
  }

  .header-section .logo img {
    max-width: 96px;
    max-height: 44px;
  }

  .breadcrumb-section {
    padding-top: 115px;
  }
}

/* —— General mobile polish (all pages) —— */
@media only screen and (max-width: 767px) {
  .map iframe {
    min-height: 280px;
    max-width: 100%;
  }

  .gettouch-section .gt-text,
  .contact-widget .cw-text {
    text-align: center;
  }

  .gettouch-section .gt-text i,
  .contact-widget .cw-text i {
    float: none;
    display: block;
    margin: 0 auto 12px;
  }

  .footer-section .fs-about,
  .footer-section .fs-widget {
    text-align: center;
  }
}

/* CSS fallbacks so hero banners show even before jQuery runs */
.hero-section .hs-item[data-setbg="img/hero/hero-1.webp"] {
  background-image: url("../img/hero/hero-1.webp");
}

.hero-section .hs-item[data-setbg="img/hero/hero-2.webp"] {
  background-image: url("../img/hero/hero-2.webp");
}

/* Animated hamburger → X (all pages) — must stay above overlay */
.canvas-open.menu-toggle {
  /* keep theme default: hidden on desktop, flex layout when shown on mobile */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 1px solid #ffffff;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

@media only screen and (max-width: 991px) {
  .canvas-open.menu-toggle {
    display: flex;
  }
}

.canvas-open.menu-toggle .menu-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.25s ease, width 0.3s ease;
  transform-origin: center;
}

.canvas-open.menu-toggle.is-open {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}

.canvas-open.menu-toggle.is-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.canvas-open.menu-toggle.is-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.canvas-open.menu-toggle.is-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/*
 * Mobile menu + sticky glass header layering
 * Root issue: white drawer opened at top:0 under the fixed header, so the
 * sticky bar overlapped the menu. Offset the drawer below the header.
 */
@media only screen and (max-width: 991px) {
  body {
    --mobile-header-h: 72px;
  }

  /*
   * When menu is open: white drawer is full-height.
   * Sticky bar becomes transparent so it no longer covers the white navbar;
   * logo + X stay on top for closing.
   */
  body.menu-is-open .header-section {
    z-index: 10050;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }

  body.menu-is-open .header-section .logo {
    visibility: hidden;
    pointer-events: none;
  }

  body.menu-is-open .canvas-open.menu-toggle {
    position: relative;
    z-index: 10060;
    border-color: #151515;
    background: rgba(255, 255, 255, 0.95);
  }

  body.menu-is-open .canvas-open.menu-toggle .menu-toggle__bar {
    background: #151515;
  }

  body.menu-is-open .offcanvas-menu-wrapper,
  body.menu-is-open .offcanvas-menu-wrapper.show-offcanvas-menu-wrapper {
    top: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    padding-top: calc(var(--mobile-header-h) + 8px);
    z-index: 10040 !important;
  }

  /* Sticky header X is the close control */
  body.menu-is-open .offcanvas-menu-wrapper .canvas-close {
    display: none !important;
  }

  body.menu-is-open .offcanvas-menu-overlay,
  body.menu-is-open .offcanvas-menu-overlay.active {
    top: 0 !important;
    height: 100% !important;
    z-index: 10030 !important;
  }
}

@media only screen and (max-width: 479px) {
  body {
    --mobile-header-h: 68px;
  }
}

/* ========== PageSpeed Insights Accessibility & Performance Fixes ========== */

/* 1. Button Contrast Ratio (WCAG AA >= 4.5:1) */
.primary-btn {
  background: #006cd8 !important;
  color: #ffffff !important;
}

.primary-btn:hover,
.primary-btn:focus {
  background: #0056b3 !important;
  color: #ffffff !important;
}

/* 2. Distinguishable Links (WCAG 1.4.1 - non-color indicator) */
.faq-section p a,
.copyright-text a,
.cs-item a,
.about-text a,
main p a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  color: #ffffff !important;
}

.faq-section p a:hover,
.faq-section p a:focus,
.copyright-text a:hover,
.copyright-text a:focus,
main p a:hover,
main p a:focus {
  color: #0088f7 !important;
}

/* 3. Heading Structure Styles for h3 elements */
.cs-item h3 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.class-item .ci-text h3 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ts_slider .ts_item .ts_text h3 {
  font-size: 20px;
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 16px;
  margin-bottom: 4px;
}

/* —— Desktop footer: center-aligned —— */
.footer-section .footer-main {
  justify-content: center;
  text-align: center;
}

.footer-section .fs-about,
.footer-section .fs-widget {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.footer-section .fa-logo a {
  display: inline-block;
}

.footer-section .fa-logo img {
  max-width: 160px;
  width: 160px;
  height: auto;
  margin: 0 auto;
}

.footer-section .fa-social {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.footer-section .fs-widget ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.footer-section .fs-widget ul li {
  display: inline-block;
}

.footer-section .fs-widget ul li a {
  display: inline-block;
}

.footer-section .fs-widget h3,
.footer-section .fs-widget h4 {
  color: #ffffff !important;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 14px;
}

/* Contrast fixes (PageSpeed a11y) */
.ts_slider .ts_item .ti_text h3,
.ts_slider .ts_item .ti_text h5,
.testimonial-section .ti_text h3 {
  color: #ffffff !important;
}

.footer-section .fs-about p {
  color: #e0e0e0;
}

.footer-section .fs-widget ul li a {
  color: #e8e8e8;
}

.footer-section .fs-widget ul li a:hover,
.footer-section .fs-widget ul li a:focus {
  color: #ffffff;
}

/* CLS: reserve space for chose-us block (desktop CLS culprit) */
.choseus-section .section-title {
  min-height: 78px;
}

.choseus-section .cs-item {
  min-height: 220px;
}

.choseus-section .cs-item > span {
  height: 90px;
  width: 90px;
  display: inline-block;
  line-height: 90px;
  flex-shrink: 0;
}

.choseus-section .cs-item h4 {
  min-height: 28px;
}

.choseus-section .cs-item p {
  min-height: 72px;
}

.header-section .logo img {
  width: 160px;
  max-width: 160px;
  height: auto;
  aspect-ratio: 220 / 173;
  display: block;
}

@media only screen and (min-width: 992px) {
  .header-section .logo img {
    max-height: none;
    max-width: 180px;
    width: 180px;
  }

  .footer-section .fs-about {
    margin-bottom: 10px;
  }

  .footer-section .fs-widget {
    margin-bottom: 20px;
  }
}

/* 4. GPU-Composited Animations (Avoid non-composited animations) */
.hs-slider .hs-item .hi-text span,
.hs-slider .hs-item .hi-text h1,
.hs-slider .hs-item .hi-text .primary-btn {
  top: 0 !important;
  -webkit-transition: opacity 0.5s ease, -webkit-transform 0.5s ease !important;
  transition: opacity 0.5s ease, transform 0.5s ease !important;
}

