/*
=========================================================
 SANAWAR SMART SCHOOL - RESPONSIVE OVERRIDES
 Dedicated responsive stylesheet
=========================================================
 Load this AFTER your existing main stylesheet.
=========================================================
*/

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

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

img {
  height: auto;
}

.container,
.container-fluid {
  width: 100%;
}

/* Prevent long text / URLs from breaking mobile layouts */
h1, h2, h3, h4, h5, h6, p, a, li, td, th, span {
  overflow-wrap: break-word;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

/* -----------------------------
   Large tablets / small laptops
------------------------------ */
@media (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }

  .display-1 { font-size: clamp(3rem, 6vw, 5rem); }
  .display-2 { font-size: clamp(2.75rem, 5vw, 4.5rem); }
  .display-3 { font-size: clamp(2.4rem, 4.5vw, 4rem); }

  .hero,
  .banner,
  .page-banner,
  .inner-banner,
  .slider,
  .carousel {
    max-width: 100%;
  }

  .hero img,
  .banner img,
  .page-banner img,
  .inner-banner img {
    object-fit: cover;
  }
}

/* -----------------------------
   Tablets
------------------------------ */
@media (max-width: 991.98px) {
  .container {
    max-width: 720px;
  }

  section {
    overflow: hidden;
  }

  /* Navigation */
  .navbar-nav {
    align-items: stretch !important;
  }

  .navbar-collapse {
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar-nav .nav-link {
    white-space: normal;
  }

  /* Common two-column layouts */
  .row > [class*="col-lg-"],
  .row > [class*="col-xl-"] {
    margin-bottom: 1.5rem;
  }

  /* Hero / sliders */
  .carousel-item img,
  .slider img,
  .hero img {
    width: 100%;
    max-height: 65vh;
    object-fit: cover;
  }

  .carousel-caption {
    left: 7%;
    right: 7%;
  }

  /* Cards */
  .card,
  .service-card,
  .feature-card {
    height: auto !important;
  }

  /* Fixed-width content */
  [style*="width:"],
  [style*="width :"] {
    max-width: 100%;
  }

  /* Footer columns */
  footer .row > div {
    margin-bottom: 1.75rem;
  }
}

/* -----------------------------
   Phones
------------------------------ */
@media (max-width: 767.98px) {
  body {
    font-size: 15px;
  }

  .footer-padding{
  margin-top: 0px;
  text-align: start;
    margin-left: 15px;
}

.hero-kicker {
    font-size: 0.6rem;
}

.hero-headline {
    font-size: clamp(1.25rem, 4.2vw, 3.85rem);
}

.hero-subtext {
    font-size: 14px;
}


  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }

  section {
    padding-left: 0;
    padding-right: 0;
  }

  h1 {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.15;
  }

  h2 {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    line-height: 1.2;
  }

  h3 {
    font-size: clamp(1.35rem, 5.5vw, 1.8rem);
  }

  p {
    line-height: 1.65;
  }

  /* Header / logo */
  header img,
  .navbar-brand img,
  .logo img {
    max-height: 60px!important;
    width: auto!important;
  }

  .navbar-brand {
    max-width: 75%;
  }

  /* Hero */
  .carousel-item img,
  .slider img,
  .hero img,
  .banner img,
  .page-banner img,
  .inner-banner img {
    min-height: 280px;
    max-height: 55vh;
    object-fit: cover;
  }

  .carousel-caption {
    position: absolute;
    left: 6%;
    right: 6%;
    bottom: 8%;
    padding: 0.5rem;
  }

  .carousel-caption h1,
  .carousel-caption h2 {
    font-size: clamp(1.7rem, 7vw, 2.5rem);
  }

  .carousel-caption p {
    font-size: 0.9rem;
  }

  /* Buttons */
  .btn {
    white-space: normal;
  }

  .btn-group {
    flex-wrap: wrap;
  }

  /* Images */
  .img-fluid {
    max-width: 100%;
    height: auto;
  }

  /* Cards / grids */
  .row {
    --bs-gutter-x: 1.25rem;
  }

  .card,
  .service-card,
  .feature-card,
  .room-card,
  .gallery-item {
    margin-bottom: 1rem;
  }

  /* Gallery */
  .gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* Forms */
  .form-control,
  .form-select {
    width: 100%;
    min-height: 44px;
  }

  textarea.form-control {
    min-height: 120px;
  }

  /* Footer */
  footer {
    text-align: center;
  }

  footer ul {
    padding-left: 0;
    list-style-position: inside;
  }

  /* Horizontal overflow protection */
  .table-responsive,
  .overflow-auto,
  .overflow-scroll {
    max-width: 100%;
  }
}

/* -----------------------------
   Small phones
------------------------------ */
@media (max-width: 575.98px) {
  body {
    font-size: 14px;
  }

  .container,
  .container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  h1 {
    font-size: clamp(1.75rem, 10vw, 2.5rem);
  }

  h2 {
    font-size: clamp(1.5rem, 8vw, 2.1rem);
  }

  h3 {
    font-size: 1.3rem;
  }

  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .my-5 {
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important;
  }

  .carousel-item img,
  .slider img,
  .hero img {
    min-height: 230px;
    max-height: 61vh;
  }

  .small, small,p {
    font-size: 16px;
}

.card-body-luxury {
    padding: 1.25rem;
}

  .carousel-caption {
    bottom: 4%;
    left: 4%;
    right: 4%;
  }

  .carousel-caption p {
    display: none;
  }

  .carousel-caption .btn {
    font-size: 0.82rem;
    padding: 0.45rem 0.8rem;
  }

  /* Stack common inline controls */
  .d-flex.flex-row {
    flex-direction: column !important;
  }

  /* Keep social/action rows usable */
  .social-links,
  .social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  /* Avoid oversized fixed elements */
  iframe,
  embed,
  object {
    width: 100% !important;
    max-width: 100%;
  }
}

/* -----------------------------
   Very small devices
------------------------------ */
@media (max-width: 380px) {
  .container,
  .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
  }

  .navbar-brand img,
  .logo img {
    max-height: 220px;
  }

  .btn {
    font-size: 0.82rem;
    padding: 0.45rem 0.7rem;
  }
}

/* Accessibility / touch */
@media (hover: none) and (pointer: coarse) {
  .nav-link,
  .btn,
  button,
  a {
    -webkit-tap-highlight-color: transparent;
  }

  .btn,
  button {
    min-height: 42px;
  }
}
