/* ============================================================
   NAMO WEBSITE — MOBILE RESPONSIVE SYSTEM v3
   Audited & comprehensive. Every section covered.
   ============================================================ */

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

html,
body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  -webkit-tap-highlight-color: transparent;
}

/* -- Fluid type ----------------------------------------------- */
body {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.6;
}

/* -- Top info bar ------------------------------------------- */
@media (max-width: 575px) {
  .header-top-info-bar {
    display: none !important;
  }
}

/* -- Header / Logo ----------------------------------------- */
.namo-logo {
  height: clamp(38px, 7vw, 58px) !important;
  width: auto !important;
}

@media (max-width: 1199px) {
  .header-1 .container-fluid {
    padding: 0 clamp(12px, 3vw, 20px) !important;
  }
}

/* -- NavThemeToggle pill ----------------------------------- */
@media (max-width: 575px) {

  /* hide "Dark"/"Light" text on very small phones, keep icon */
  .nav-theme-text {
    display: none !important;
  }
}

/* -- Page hero strip --------------------------------------- */
.n-page-hero {
  padding: clamp(20px, 4vw, 44px) 0 clamp(16px, 3vw, 30px) !important;
}

.n-page-hero h1 {
  font-size: clamp(1.05rem, 4vw, 1.9rem) !important;
}

@media (max-width: 575px) {
  .n-page-hero .badge-pill {
    display: none !important;
  }

  .n-page-hero nav {
    align-self: flex-start !important;
  }
}

/* -- Hero / Home ------------------------------------------- */
/* Responsive sizing is now handled directly in HeroHomeMain.js via clamp() */

/* -- Notice board / ticker --------------------------------- */
@media (max-width: 575px) {

  .notice-ticker-label,
  .d-none-xs {
    display: none !important;
  }
}

/* -- InstitutesSwitcher card ------------------------------- */
@media (max-width: 767px) {

  /* Stack image + content vertically */
  div[class*="institute-switcher-card"],
  div[style*="display: \"flex\""][style*="min-height: 380"] {
    flex-direction: column !important;
  }
}

/* -- Section padding --------------------------------------- */
@media (max-width: 767px) {
  section {
    padding: clamp(24px, 5vw, 40px) 0 !important;
  }

  .section-padding {
    padding: clamp(24px, 5vw, 40px) 0 !important;
  }
}

@media (max-width: 400px) {
  section {
    padding: 20px 0 !important;
  }
}

/* -- Section title ----------------------------------------- */
@media (max-width: 575px) {
  .section-title h2 {
    font-size: 1.2rem !important;
  }

  .section-title h6 {
    font-size: 0.7rem !important;
  }
}

/* -- About home (dark section) ----------------------------- */
@media (max-width: 767px) {

  /* Stats grid: 2×2 */
  div[style*="grid-template-columns: \"1fr 1fr\""] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* -- Programs / Courses cards ------------------------------ */
@media (max-width: 400px) {
  .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* -- Department cards --------------------------------------- */
@media (max-width: 575px) {
  .col-xl-3.col-lg-4.col-sm-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

@media (max-width: 360px) {
  .col-xl-3.col-lg-4.col-sm-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* -- Doctor cards ------------------------------------------ */
/* One per row on phones — photo+bio cards are too dense at 50% width.
   Selector must match/exceed the Department-cards rule's specificity
   (.col-xl-3.col-lg-4.col-sm-6 = 3 classes) since both rules use
   !important and the browser then falls back to specificity to decide
   which wins — a bare .namo-doctor-col (1 class) was losing to it. */
@media (max-width: 767px) {
  .col-xl-3.col-lg-4.col-sm-6.namo-doctor-col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* -- Gallery grid ------------------------------------------ */
@media (max-width: 575px) {

  .gallery-col,
  .col-xl-4.col-lg-6.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  .gallery-col img {
    height: 150px !important;
  }
}

@media (max-width: 360px) {

  .gallery-col,
  .col-xl-4.col-lg-6.col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* -- Event cards ------------------------------------------- */
@media (max-width: 575px) {
  .col-lg-3.col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* -- News / Blog cards ------------------------------------- */
@media (max-width: 575px) {
  .col-lg-3.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* -- FAQ section ------------------------------------------- */
@media (max-width: 767px) {
  .faq-sidebar {
    position: static !important;
    margin-bottom: 24px;
  }
}

/* -- Info section sidebar ---------------------------------- */
@media (max-width: 767px) {

  div[style*="position:\"sticky\""],
  div[style*="position: \"sticky\""] {
    position: static !important;
  }
}

/* -- CTA institute cards ----------------------------------- */
@media (max-width: 575px) {
  .col-lg-3.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* -- Institute page tab bar -------------------------------- */
.tab-nav-scroll {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
}

.tab-nav-scroll::-webkit-scrollbar {
  display: none;
}

/* Tab buttons smaller on mobile */
@media (max-width: 575px) {

  .inst-tab-btn,
  button[style*="padding: \"clamp(11px"] {
    padding: 11px 10px !important;
    font-size: 0.75rem !important;
  }

  .inst-tab-btn i {
    display: none !important;
  }
}

/* -- Tables ------------------------------------------------ */
.table-responsive,
div[style*="overflow-x: \"auto\""] {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: 340px;
}

/* -- Hospital stats strip (overlaid on image) -------------- */
@media (max-width: 480px) {
  div[style*="grid-template-columns: \"repeat(4,1fr)\""] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* -- Hospital phase cards ---------------------------------- */
@media (max-width: 575px) {
  .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* -- Dean / MS profile – sidebar sticky ------------------- */
@media (max-width: 767px) {

  div[style*="position:\"sticky\", top:88"],
  div[style*="position: \"sticky\""] {
    position: static !important;
  }
}

/* -- Contact per-institute cards --------------------------- */
@media (max-width: 575px) {
  .col-lg-3.col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* -- Notice board 3 columns -------------------------------- */
@media (max-width: 767px) {
  .col-lg-4 {
    margin-bottom: 12px;
  }
}

/* -- Testimonial counter grid ------------------------------ */
@media (max-width: 575px) {
  div[style*="grid-template-columns: \"1fr 1fr\""] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* -- Footer ------------------------------------------------ */
@media (max-width: 767px) {
  .footer-bottom-wrapper {
    flex-direction: column !important;
    text-align: center;
    gap: 8px;
  }

  .footer-menu {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 575px) {
  .footer-widget-wrapper .row>div {
    margin-bottom: 20px;
  }
}

/* -- OffCanvas drawer -------------------------------------- */
@media (max-width: 400px) {
  div[style*="width: \"min(340px,92vw)\""] {
    width: 96vw !important;
  }
}

/* -- Scroll to top button ---------------------------------- */
.scroll-top {
  width: 44px !important;
  height: 44px !important;
  bottom: 14px !important;
  right: 14px !important;
}

/* -- Generic utility --------------------------------------- */
.text-2lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-3lines {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.w-full {
  width: 100% !important;
}

/* -- Touch targets: min 44×44px --------------------------- */
@media (max-width: 767px) {

  a[href],
  button {
    min-height: 36px;
  }
}

/* Container padding on small screens */
@media (max-width: 575px) {
  .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

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