/* ============================================================
   Mobile App Shell — full homepage & global mobile UX
   Scoped to body (max-width: 991px)
   ============================================================ */

@media (max-width: 991px) {
  body {
    --app-header-h: 56px;
    --app-footer-h: calc(64px + env(safe-area-inset-bottom, 0));
    height: 100dvh;
    height: 100svh;
    overflow: hidden;
    padding-bottom: 0;
    background: #eef1f6;
    -webkit-tap-highlight-color: transparent;
  }

  html.is-mobile-app {
    -webkit-text-size-adjust: 100%;
    height: 100%;
    overflow: hidden;
  }

  body .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
  }

  body .main-navigation .navbar {
    position: relative !important;
    top: auto !important;
  }

  body .app-scroll-main {
    position: fixed;
    top: var(--app-header-h);
    left: 0;
    right: 0;
    bottom: var(--app-footer-h);
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    background: #eef1f6;
    z-index: 1;
    padding-bottom: 8px;
  }

  body.app-sidebar-open .app-scroll-main {
    overflow: hidden;
  }

  body .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* ---- Compact section spacing (was py-120 = huge on phone) ---- */
  body .py-120,
  body .about-modern.py-120,
  body .choose-modern.py-120,
  body .gallery-area.py-120 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  body .pt-80,
  body .pb-80,
  body .enroll-area.pt-80 {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  body .event-area.bg.py-120 {
    padding-top: 40px !important;
    padding-bottom: 48px !important;
  }

  /* ---- App header bar ---- */
  .navbar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }

  body .main-navigation .navbar {
    min-height: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
    box-shadow: 0 2px 20px rgba(56, 81, 133, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.97) !important;
  }

  body .navbar-brand img {
    width: 110px !important;
    max-height: 44px;
    object-fit: contain;
  }

  body .mobile-menu-right {
    gap: 12px;
  }

  body .mobile-menu-right .search-btn {
    display: none;
  }

  body .navbar-toggler-mobile-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-color-light);
    border-radius: 12px;
    color: var(--theme-color) !important;
    font-size: 20px !important;
  }

  /* ---- Hero slider — app banner card ---- */
  body .hero-slider:not(.owl-loaded) {
    max-height: 380px;
    overflow: hidden;
  }

  body .hero-slider:not(.owl-loaded) .hero-single:not(:first-child) {
    display: none !important;
  }

  body .hero-slider.owl-theme .owl-nav {
    display: none !important;
  }

  body .hero-section {
    margin-top: 0;
    border-radius: 0 0 22px 22px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(56, 81, 133, 0.15);
    touch-action: pan-y;
  }

  body .hero-slider,
  body .hero-slider .owl-stage-outer {
    touch-action: pan-y;
  }

  body .hero-single {
    padding-top: 32px;
    padding-bottom: 48px;
    min-height: 340px;
    max-height: 380px;
    align-items: flex-end;
  }

  body .hero-single .container {
    padding-bottom: 8px;
  }

  body .hero-single .hero-content .hero-title {
    font-size: 24px !important;
    line-height: 1.25;
    margin: 0 0 8px;
    font-weight: 700;
  }

  body .hero-single .hero-content p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
    -webkit-line-clamp: 2;
  }

  body .hero-single .hero-content .hero-btn .theme-btn {
    padding: 12px 16px;
    font-size: 13px;
  }

  /* show only primary CTA on mobile */
  body .hero-single .hero-content .hero-btn .theme-btn2 {
    display: none;
  }

  body .hero-single .hero-content .hero-btn {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    width: 100%;
  }

  body .hero-single .hero-content .hero-btn .theme-btn {
    width: auto;
    justify-content: center;
    border-radius: 50px;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 600;
  }

  body .hero-slider.owl-theme .owl-nav {
    display: none !important;
  }

  body .hero-slider.owl-theme .owl-dots {
    display: block !important;
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    margin: 0;
  }

  body .hero-slider.owl-theme .owl-dots .owl-dot span {
    width: 8px;
    height: 8px;
    margin: 4px 4px;
    background: rgba(255, 255, 255, 0.45);
  }

  body .hero-slider.owl-theme .owl-dots .owl-dot.active span {
    width: 22px;
    border-radius: 4px;
    background: var(--theme-color2);
  }

  /* ---- Section headings — app style ---- */
  body .site-heading {
    margin-bottom: 20px !important;
    text-align: left !important;
  }

  body .site-heading.text-center,
  body .row .site-heading.text-center {
    text-align: center !important;
  }

  body .site-heading .site-title-tagline {
    font-size: 11px;
    letter-spacing: 1.5px;
    padding-bottom: 6px;
    margin-bottom: 6px;
    display: inline-block;
  }

  body .site-heading .site-title-tagline i {
    font-size: 12px;
  }

  body .site-heading .site-title {
    font-size: 22px !important;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 4px;
  }

  body .site-heading p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 8px;
    color: var(--body-text-color);
  }

  body .preloader {
    transition: opacity 0.3s ease;
  }

  body.preloader-active {
    overflow: hidden;
  }

  /* ---- Feature section header ---- */
  body .app-mobile-section-head {
    padding: 20px 20px 8px;
  }

  body .app-section-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--theme-color2);
    margin-bottom: 4px;
  }

  body .app-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-dark);
    margin: 0;
    line-height: 1.3;
  }

  /* ---- Feature cards — horizontal swipe ---- */
  body .feature-area.fa-negative {
    margin-top: 16px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    background: transparent;
  }

  body .feature-area .col-xl-9 {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    padding: 0;
  }

  body .feature-wrapper {
    overflow: hidden;
    background: #fff;
    margin: 0 12px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(56, 81, 133, 0.08);
    padding: 16px 0 12px;
  }

  body .feature-app-row {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 14px 8px !important;
    margin: 0 !important;
    gap: 12px !important;
  }

  body .feature-app-row::-webkit-scrollbar {
    display: none;
  }

  body .feature-app-row > [class*="col-"] {
    flex: 0 0 78%;
    max-width: 78%;
    scroll-snap-align: center;
    padding-left: 0;
    padding-right: 0;
  }

  body .feature-app-card {
    border-radius: 16px;
    padding: 16px;
    box-shadow: none;
    border: 1px solid rgba(56, 81, 133, 0.1);
    background: #f8f9fc;
    height: 100%;
  }

  body .feature-app-card .count {
    font-size: 32px;
    right: 14px;
    top: 8px;
  }

  body .feature-app-card .feature-icon {
    width: 52px;
    height: 52px;
    line-height: 52px;
    margin-bottom: 12px;
    border-radius: 14px;
    box-shadow: none;
  }

  body .feature-app-card .feature-icon img {
    width: 28px;
  }

  body .feature-app-card .feature-content h4 {
    font-size: 16px;
    padding-right: 28px;
  }

  body .feature-app-card .feature-content p {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  body .feature-app-card .feature-app-btn .theme-btn {
    width: 100%;
    justify-content: center;
    border-radius: 10px;
    font-size: 12px;
    padding: 10px 16px;
  }

  /* ---- About section ---- */
  body .about-modern {
    background: #fff;
    margin: 12px;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(56, 81, 133, 0.08);
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  body .about-modern .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  body .about-modern-title {
    font-size: 24px !important;
  }

  body .about-modern-line {
    width: 48px;
    height: 3px;
    margin: 12px 0 24px;
    border-radius: 2px;
  }

  body .about-modern-badge {
    display: none;
  }

  body .about-modern-lead {
    font-size: 16px;
    line-height: 1.5;
  }

  body .about-modern-text,
  body .about-modern-text p {
    font-size: 14px;
    line-height: 1.65;
  }

  body .about-modern-btn {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
  }

  body .about-modern-btn-text {
    flex: 1;
    justify-content: center;
    font-size: 14px;
    padding: 14px 20px;
  }

  body .about-modern-stats-wrap {
    margin-top: 20px !important;
    padding: 0;
  }

  body .about-modern-stats {
    padding: 14px 10px !important;
    border-radius: 14px;
    box-shadow: none;
    background: #f8f9fc;
    border: 1px solid rgba(56, 81, 133, 0.08);
  }

  body .about-stat-card {
    min-height: 82px;
    padding: 12px 6px;
    border-radius: 12px;
  }

  body .about-stat-num {
    font-size: 22px !important;
  }

  body .about-stat-label {
    font-size: 9px;
  }

  /* ---- Why Choose Us ---- */
  body .choose-modern {
    margin: 12px;
    border-radius: 18px;
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  body .choose-modern-title {
    font-size: 22px !important;
  }

  body .choose-modern-line {
    width: 48px;
    height: 3px;
  }

  body .choose-modern-img-wrap {
    padding: 0 0 20px !important;
  }

  body .choose-modern-img-frame img {
    min-height: 200px !important;
    max-height: 240px !important;
    border-radius: 16px !important;
  }

  body .choose-modern-img-frame::before,
  body .choose-modern-img-frame::after {
    display: none;
  }

  body .choose-modern-cards {
    gap: 10px;
  }

  body .choose-modern-card {
    padding: 14px;
    border-radius: 14px;
    box-shadow: none;
    border: 1px solid rgba(56, 81, 133, 0.08);
    background: #fff;
  }

  body .choose-modern-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    font-size: 20px;
    border-radius: 12px;
  }

  body .choose-modern-info h4 {
    font-size: 15px;
  }

  body .choose-modern-info p {
    font-size: 13px;
    line-height: 1.55;
  }

  /* ---- Video section ---- */
  body .video-area {
    padding: 40px 0;
    background: #fff;
    margin: 12px;
    border-radius: 18px;
  }

  body .video-area .theme-btn {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  body .video-content {
    border-radius: 14px;
    overflow: hidden;
    min-height: 200px;
  }

  /* ---- Gallery — 2-column app grid ---- */
  body .gallery-area {
    background: transparent !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body .gallery-area .popup-gallery {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  body .gallery-area .popup-gallery > .col-md-4 {
    display: contents;
  }

  body .gallery-item {
    margin-bottom: 0 !important;
    border-radius: 12px;
    overflow: hidden;
  }

  body .gallery-img img {
    border-radius: 12px;
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
  }

  /* ---- Events ---- */
  body .event-area.bg {
    background: #fff !important;
    margin: 12px;
    border-radius: 18px;
  }

  body .event-item {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(56, 81, 133, 0.1);
    border: 1px solid rgba(56, 81, 133, 0.06);
  }

  body .event-slider.owl-theme .owl-nav {
    display: none !important;
  }

  body .event-slider.owl-theme .owl-dots {
    margin-top: 16px;
  }

  body .event-slider.owl-theme .owl-dots .owl-dot.active span {
    background: var(--theme-color2);
  }

  body .event-item .event-btn .theme-btn {
    width: 100%;
    justify-content: center;
    border-radius: 10px;
  }

  /* ---- Enroll / Skills ---- */
  body .enroll-area {
    background: transparent;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body .enroll-form {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(56, 81, 133, 0.1);
  }

  body .enroll-form .form-control,
  body .enroll-form .form-select {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid rgba(56, 81, 133, 0.15);
  }

  body .enroll-form .theme-btn {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  body .enroll-right {
    border-radius: 18px;
    overflow: hidden;
    margin-top: 16px;
  }

  /* ---- Footer — compact mobile layout ---- */
  body .footer-area {
    background: var(--footer-bg, var(--theme-color, #385185));
    margin-top: 8px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0) + 16px);
  }

  body .footer-shape {
    display: none !important;
  }

  body .footer-widget {
    display: block !important;
  }

  body .footer-widget-wrapper {
    padding-top: 40px !important;
    padding-bottom: 20px !important;
  }

  body .footer-widget-wrapper > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 10px;
  }

  body .footer-widget-box {
    margin-bottom: 8px;
  }

  body .footer-widget-box.about-us .footer-logo img {
    max-height: 48px;
    margin-bottom: 12px;
  }

  body .footer-widget-box.about-us > p {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
  }

  body .footer-contact li {
    font-size: 13px;
    margin-bottom: 6px;
  }

  body .footer-widget-title {
    font-size: 16px !important;
    margin-bottom: 12px !important;
  }

  body .footer-list li {
    margin-bottom: 6px;
  }

  body .footer-list li a {
    font-size: 13px;
  }

  body .footer-newsletter p {
    font-size: 13px;
    line-height: 1.5;
  }

  body .footer-newsletter .subscribe-form .form-control {
    font-size: 14px;
    border-radius: 10px;
  }

  body .footer-newsletter .subscribe-form .theme-btn {
    border-radius: 10px;
    font-size: 13px;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
  }

  body .copyright {
    border-top: 1px solid rgba(255,255,255,0.15);
  }

  body .copyright .copyright-wrapper {
    padding: 16px 16px 8px;
    border-top: none;
  }

  body .copyright-text {
    font-size: 12px !important;
    text-align: center;
    line-height: 1.5;
  }

  body .footer-social {
    justify-content: center;
    margin-top: 8px;
  }

  body #scroll-top {
    display: none !important;
  }

  /* ---- Buttons global ---- */
  body .theme-btn {
    border-radius: 12px;
    font-size: 14px;
  }

  /* ---- WOW.js fix: force all animated elements visible on mobile ---- */
  /* WOW.js sets visibility:hidden and waits for window scroll to reveal.
     On mobile the scroll container is .app-scroll-main (not window),
     so WOW never fires — force everything visible immediately. */
  body .wow {
    visibility: visible !important;
    animation-name: none !important;
    animation-delay: 0s !important;
  }

  /* ---- Native app scroll (no visible scrollbar / no horizontal bleed) ---- */
  html.is-mobile-app,
  body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  body .app-scroll-main {
    scrollbar-width: none;
    max-width: 100vw;
  }

  body .app-scroll-main::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  /* ---- Inner page breadcrumb ---- */
  body .site-breadcrumb {
    padding-top: 44px !important;
    padding-bottom: 32px !important;
    border-radius: 0 0 18px 18px;
    overflow: hidden;
  }

  body .site-breadcrumb .breadcrumb-title {
    font-size: 22px !important;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  body .site-breadcrumb .breadcrumb-menu li {
    font-size: 13px;
  }

  /* ---- Feature area: scroll inside card row only ---- */
  body .feature-area,
  body .feature-wrapper {
    max-width: 100%;
    overflow: hidden;
  }

  body .feature-app-row > [class*="col-"] {
    flex: 0 0 88%;
    max-width: 88%;
  }

  /* ---- Hero single CTA ---- */
  body .hero-single .hero-content .hero-btn .theme-btn {
    width: auto;
    max-width: 100%;
    align-self: flex-start;
    padding: 11px 20px;
    font-size: 13px;
  }

  body .about-area.about-modern,
  body .choose-area.choose-modern,
  body .event-area.bg,
  body .video-area {
    max-width: calc(100vw - 24px);
    margin-left: auto;
    margin-right: auto;
  }

  body .search-popup {
    margin-top: 0 !important;
  }

  body .search-active .search-popup {
    transform: translateY(0);
  }
}

@media (max-width: 575px) {
  body .hero-single .hero-content .hero-title {
    font-size: 23px !important;
  }

  body .feature-app-row > [class*="col-"] {
    flex: 0 0 85%;
    max-width: 85%;
  }
}

@media (min-width: 992px) {
  .feature-app-row {
    flex-wrap: wrap !important;
  }
}
