/* =========================================================
   MTSPM - Enhanced Responsive Stylesheet
   Breakpoints:
     xs  : < 576px   (phone portrait)
     sm  : 576-767px (phone landscape)
     md  : 768-991px (tablet)
     lg  : 992-1199px (small desktop)
     xl  : >= 1200px (desktop)
   ========================================================= */

/* ---------- Base fixes ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; }
body { overflow-x: hidden; }

/* ---------- Top Header ---------- */
.top-header { font-size: 11px; }

@media (max-width: 767px) {
  .top-header .row { flex-direction: column; align-items: center; }
  .top-header .col-lg-4,
  .top-header .col-lg-8 { text-align: center !important; }
  .top-header ul.list-inline li a { padding: 4px 6px; }
  .top-header a.text-color.mr-3 { display: block; margin-bottom: 4px; }
}

@media (max-width: 575px) {
  .top-header { display: none; }   /* hide top bar on phone – saves space */
}

/* ---------- Navigation ---------- */
.navigation .navbar-brand img { max-height: 54px; width: auto; }

@media (max-width: 991px) {
  .navbar-expand-lg .navbar-nav .nav-link { padding: 14px 18px; }
  .navbar-collapse {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    border-top: 1px solid rgba(255,255,255,0.15);
  }
  .navbar .dropdown-menu { background: #232350; border: 0; }
  .navbar .dropdown .dropdown .dropdown-toggle,
  .navbar .dropdown-item { color: #e8e8f5 !important; }
  .navbar .dropdown-item:hover { color: #ffbc3b !important; }
}

@media (max-width: 575px) {
  .navigation .navbar-brand img { max-height: 44px; }
  .navbar-toggler { padding: 6px 10px; }
}

/* ---------- Hero Section ---------- */
.hero-section {
  padding: 220px 0 260px;
  background-attachment: scroll !important; /* fixes iOS fixed bg */
}

@media (max-width: 1199px) {
  .hero-section { padding: 180px 0 200px; }
}

@media (max-width: 991px) {
  .hero-section { padding: 140px 0 160px; }
  .hero-section h1 { font-size: 34px; }
  .hero-section p { font-size: 14px; }
}

@media (max-width: 575px) {
  .hero-section { padding: 110px 0 120px; }
  .hero-section h1 { font-size: 26px; line-height: 1.3; }
  .hero-section p  { font-size: 13px; line-height: 1.7; }
  .hero-section .btn { padding: 10px 22px; font-size: 14px; }
}

/* Hero slider arrows */
@media (max-width: 575px) {
  .hero-slider .prevArrow,
  .hero-slider .nextArrow { font-size: 20px; padding: 10px; }
  .hero-slider .slick-dots { bottom: -80px; }
}

/* ---------- Banner Feature (Gate + People blocks) ---------- */
@media (max-width: 991px) {
  .feature-blocks {
    margin-top: 0;
    padding: 30px 20px;
  }
}

@media (max-width: 767px) {
  /* Stack gate image above feature blocks */
  .col-xl-4.col-lg-5.align-self-end { order: -1; }
  .feature-blocks { padding: 24px 16px; }
  .feature-blocks .col-sm-6 { margin-bottom: 24px; }
  .feature-blocks img.img-thumbnail {
    max-width: 120px;
    margin: 0 auto 12px;
    display: block;
  }
  .feature-blocks h3 { font-size: 16px; margin-bottom: 6px !important; }
  /* Marquee notice box */
  .feature-blocks marquee { height: 130px !important; }
}

@media (max-width: 575px) {
  .feature-blocks .col-sm-6 { width: 100%; }
}

/* ---------- Statistics / Funfacts Bar ---------- */
.section-sm.bg-primary .count { font-size: 36px; }
.section-sm.bg-primary h5 { font-size: 13px; letter-spacing: 1px; }

@media (max-width: 767px) {
  .section-sm.bg-primary .col-sm-6 { margin-bottom: 16px; }
  .section-sm.bg-primary .count { font-size: 30px; }
}

@media (max-width: 575px) {
  .section-sm.bg-primary { padding: 24px 0; }
  .section-sm.bg-primary .count { font-size: 28px; }
  .section-sm.bg-primary h5 { font-size: 11px; }
  /* 2-column on phone */
  .section-sm.bg-primary .col-md-3 { flex: 0 0 50%; max-width: 50%; }
}

/* ---------- About Section ---------- */
@media (max-width: 767px) {
  .section { padding-top: 50px; padding-bottom: 50px; }
  .section p { font-size: 14px; }
}

/* ---------- Institutions (CTA) List ---------- */
.section.bg-primary ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 0;
  margin-top: 12px;
}

.section.bg-primary ul li {
  flex: 0 0 calc(50% - 8px);
  min-width: 220px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
}

.section.bg-primary ul li i { margin-right: 6px; }

@media (max-width: 767px) {
  .section.bg-primary ul li { flex: 0 0 100%; font-size: 13px; }
}

@media (max-width: 575px) {
  .section.bg-primary h2.section-title { font-size: 22px; }
  .section.bg-primary h6 { font-size: 12px; }
}

/* ---------- Events / Gallery Cards ---------- */
@media (max-width: 575px) {
  .col-sm-6.mb-5 { margin-bottom: 20px !important; }
  .card-img img { height: 200px; object-fit: cover; width: 100%; }
}

/* ---------- Page Title Section ---------- */
@media (max-width: 991px) {
  .page-title-section { padding: 140px 0 60px; }
}

@media (max-width: 575px) {
  .page-title-section { padding: 110px 0 40px; }
  .page-title-section h1 { font-size: 28px; }
}

/* ---------- Footer ---------- */
.bg-footer { font-size: 14px; }

@media (max-width: 991px) {
  .bg-footer .col-lg-8,
  .bg-footer .col-lg-4 { margin-bottom: 24px; }
}

@media (max-width: 575px) {
  .bg-footer { padding: 30px 0 10px; }
  .bg-footer .logo-footer img { max-height: 50px; }
  .bg-footer li { font-size: 13px; }
  .copyright .col-sm-7,
  .copyright .col-sm-5 { text-align: center !important; }
  .copyright .col-sm-5 { margin-top: 6px; }
}

/* ---------- College / BEd Sub-site Hero ---------- */
.hero-sectionweb {
  padding: 140px 0 20px;
  background-attachment: scroll !important;
}

@media (max-width: 991px) {
  .hero-sectionweb { padding: 110px 0 15px; }
}

@media (max-width: 575px) {
  .hero-sectionweb { padding: 90px 0 10px; }
}

/* ---------- Tables (Staff, Results) ---------- */
@media (max-width: 767px) {
  .table-responsive-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 540px; }
}

/* ---------- Contact / Form ---------- */
@media (max-width: 575px) {
  .form-control { height: 48px; font-size: 14px; }
  textarea.form-control { height: 150px; }
  #map_canvas { height: 280px; }
}

/* ---------- Gallery / Filterizr ---------- */
@media (max-width: 575px) {
  .filtr-container .filtr-item { width: 100% !important; }
  .filter-controls { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
  .filter-controls li { font-size: 13px; padding: 4px 10px; border: 1px solid #ddd; border-radius: 3px; }
}

/* ---------- Section Title (Events section) ---------- */
@media (max-width: 575px) {
  .section-title h2 { font-size: 22px; }
  .d-flex.align-items-center.section-title { flex-direction: column; align-items: flex-start !important; gap: 8px; }
  .d-flex.align-items-center.section-title .border-top { display: none; }
  .d-flex.align-items-center.section-title .btn { margin-left: 0 !important; }
}

/* ---------- Admission / Placement / Other inner pages ---------- */
@media (max-width: 767px) {
  .col-md-6.mb-4 { margin-bottom: 20px !important; }
  .pl-150 { padding-left: 0 !important; }
}

/* ---------- Sticky header height compensation ---------- */
@media (max-width: 575px) {
  .fixed-top { z-index: 1050; }
}

/* ---------- Accessibility & Touch ---------- */
.nav-link, .btn, .dropdown-item { min-height: 44px; display: inline-flex; align-items: center; }
.navbar-toggler { min-height: 44px; }

/* ---------- Print ---------- */
@media print {
  .top-header, .navigation, footer, .btn { display: none !important; }
  .hero-section, .hero-sectionweb { padding: 0 !important; }
  body { font-size: 12pt; }
}
