/*
 * Edu Rise responsive safety layer
 * Loaded after page CSS to prevent horizontal overflow and normalize layouts.
 */

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

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

#app,
.container,
.container-fluid,
main,
section,
footer {
  min-width: 0;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

img,
video {
  height: auto;
}

iframe {
  max-width: 100% !important;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

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

[id] {
  scroll-margin-top: 92px;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
}

.pagination {
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.modal-dialog {
  max-width: calc(100vw - 24px);
  margin-inline: auto;
}

.whatsapp-float {
  max-width: none;
}

@media (max-width: 1199px) {
  .container {
    width: 100%;
    max-width: calc(100% - 32px);
  }

  .site-top-banner h1,
  .cart-banner h1,
  .search-top-banner h1 {
    font-size: clamp(1.65rem, 4.5vw, 2.4rem) !important;
    line-height: 1.4 !important;
  }

  .contact-cards-wrapper {
    grid-template-columns: 1fr !important;
    max-width: 820px !important;
  }

  .contact-info-card,
  .contact-form-card {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 991px) {
  [id] {
    scroll-margin-top: 82px;
  }

  .row > [class*="col-"] {
    min-width: 0;
  }

  .hero-section-modern,
  .fl-hero,
  .site-top-banner,
  .cart-banner,
  .search-top-banner {
    background-position: center !important;
  }

  .hero-section-modern .container,
  .fl-hero .container {
    width: 100%;
  }

  .os-final,
  .v2-compare,
  .v2-other__grid,
  .er-blog-related__grid {
    grid-template-columns: 1fr !important;
  }

  .about-story-grid,
  .about-values-grid,
  .about-features-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  .container {
    max-width: calc(100% - 24px);
    padding-inline: 0;
  }

  section {
    max-width: 100%;
  }

  .site-top-banner,
  .search-top-banner,
  .cart-banner {
    min-height: 0 !important;
    height: auto !important;
  }

  .site-top-banner h1,
  .cart-banner h1,
  .search-top-banner h1,
  .contact-header-section h1.contact-header-title {
    font-size: clamp(1.45rem, 7vw, 2rem) !important;
    line-height: 1.4 !important;
  }

  .contact-header-section {
    padding-inline: 14px !important;
  }

  .contact-header-section .contact-header-icon {
    display: none !important;
  }

  .contact-form-card .form-group.col-6 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .contact-form-card .form-group label,
  .contact-info-content h4 {
    font-size: 1rem !important;
  }

  .contact-info-content p,
  .contact-info-content a {
    font-size: .92rem !important;
  }

  .contact-info-item {
    flex-direction: row !important;
    align-items: flex-start !important;
  }

  .fl-hero__actions,
  .fl-final__actions,
  .os-mid-cta__actions,
  .v2-free-cta__actions,
  .v2-pricing__actions,
  .er-blog-cta__actions,
  .er-contact-cta__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .fl-hero__actions > *,
  .fl-final__actions > *,
  .os-mid-cta__actions > *,
  .v2-free-cta__actions > *,
  .v2-pricing__actions > *,
  .er-blog-cta__actions > *,
  .er-contact-cta__actions > * {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .fl-card,
  .fl-track,
  .fl-quote,
  .v2-card,
  .v2-stage,
  .v2-price-card,
  .v2-other-card,
  .os-stage,
  .os-curr-card,
  .gp-gat,
  .la-info-card {
    min-width: 0;
    padding-inline: 16px;
  }

  .fl-pricing,
  .fl-final,
  .os-final,
  .v2-free-cta__box,
  .er-blog-cta__inner,
  .er-contact-cta__inner {
    padding-inline: 16px !important;
    border-radius: 18px;
  }

  .os-schedule__row {
    grid-template-columns: 1fr !important;
  }

  .os-schedule__time {
    white-space: normal;
  }

  .v2-stage-block__summary {
    grid-template-columns: 6px minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 14px 12px !important;
  }

  .v2-stage-block__hint {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .blog-grid-card,
  .er-blog-card {
    height: auto;
  }

  .shadow-effect {
    height: auto !important;
    min-height: 0;
  }

  .home-video-container {
    min-height: 320px !important;
    padding-inline: 16px;
  }

  .reward-program-section .mt-35.d-flex,
  .find-instructor-section .mt-35.d-flex {
    flex-wrap: wrap;
    gap: 10px;
  }

  .reward-program-section .mt-35.d-flex > *,
  .find-instructor-section .mt-35.d-flex > * {
    margin-inline: 0 !important;
  }

  .feature-icon-bubble {
    display: none !important;
  }

  .post-img img,
  .er-blog-card__media img {
    width: 100%;
    object-fit: cover;
  }

  .auth-page .container,
  .login-container,
  .register-container {
    max-width: 100%;
  }

  .login-container {
    min-height: 0 !important;
    margin-block: 24px !important;
  }

  .login-container > .col-md-6:first-child {
    display: none;
  }

  .login-container > .col-md-6:last-child {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
  }

  .login-card {
    width: 100%;
    max-width: 620px;
    min-height: 0 !important;
    margin-inline: auto;
    padding: 24px 16px !important;
  }

  .other-page-content,
  .blog-post-content,
  .post-show,
  .er-blog-content {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .other-page-content img,
  .other-page-content video,
  .other-page-content iframe,
  .blog-post-content img,
  .blog-post-content video,
  .blog-post-content iframe,
  .post-show img,
  .post-show video,
  .post-show iframe,
  .er-blog-content img,
  .er-blog-content video,
  .er-blog-content iframe {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .other-page-content table,
  .blog-post-content table,
  .post-show table,
  .er-blog-content table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .ta-wrap {
    padding-inline: 12px;
  }

  .ta-card {
    padding-inline: 14px;
  }

  .thanks-hero-section {
    min-height: 0 !important;
    padding: 44px 14px !important;
  }

  .grid-3-cols {
    grid-template-columns: 1fr !important;
  }

  .whatsapp-float {
    width: 52px !important;
    height: 52px !important;
    right: 12px !important;
    bottom: 12px !important;
  }

  .whatsapp-float i {
    line-height: 52px !important;
  }
}

@media (max-width: 575px) {
  .container {
    max-width: calc(100% - 20px);
  }

  .hero-section-modern.v2-hero,
  .hero-section-modern.v2-hero.has-video-bg {
    min-height: calc(100svh - 68px);
  }

  .hero-section-modern.v2-hero .hero-content-wrapper {
    min-height: calc(100svh - 68px);
  }

  .hero-section-modern.v2-hero .hero-text-wrapper {
    padding: 34px 0 28px !important;
  }

  .v2-hero .hero-meta {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .v2-hero .hero-meta li {
    width: 100%;
    text-align: center;
  }

  .fl-section,
  .v2-section {
    padding-block: 36px;
  }

  .fl-hero {
    padding-block: 34px;
  }

  .fl-hero h1 {
    font-size: clamp(1.55rem, 8vw, 2rem);
  }

  .fl-hero__sub {
    font-size: .95rem;
    line-height: 1.75;
  }

  .fl-hero__features {
    align-items: stretch;
    width: 100%;
  }

  .fl-hero__features li {
    width: 100%;
  }

  .v2-stage__subjects,
  .v2-card-grid,
  .v2-pricing__grid,
  .fd-schedule,
  .la-card-grid,
  .ta-grid-2,
  .ta-check-grid {
    grid-template-columns: 1fr !important;
  }

  .subscribe-form {
    width: 100%;
  }
}
