/* ==========================================================================
   DRT KNOWLEDGEHUB INTERNATIONAL SCHOOL
/* --- Inner Pages Navbar Always Red Glassmorphed and Static --- */
#main-navbar, #main-navbar.sticky {
  background-color: rgba(229, 26, 34, 1) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
  border-bottom: 1px solid rgba(229, 26, 34, 0.1) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2) !important;
  padding: 10px 5% !important;
}

#main-navbar .navbar-brand-logo img, 
#main-navbar.sticky .navbar-brand-logo img {
  height: 52px !important;
}

/* --- Inner Page Hero Banner --- */
.inner-hero {
  position: relative;
  width: 100%;
  height: 40vh;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 80px; /* offset for fixed navbar */
  text-align: center;
}

.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 245, 245, 0.3);
  pointer-events: none;
}

.inner-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(0deg, #FFF5F5 0%, transparent 100%);
  pointer-events: none;
}

.inner-hero-content {
  position: relative;
  z-index: 2;
  animation: fadeUp 0.8s var(--ease-out-expo) forwards;
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.inner-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: var(--accent-gold);
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.inner-hero-title span {
  color: var(--text-primary);
  font-weight: 300;
}

.inner-hero-subtitle {
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 4px 15px rgba(0,0,0,0.7);
}

/* --- Content Wrapper for Legacy Content --- */
.inner-content-section {
  padding: 60px 0;
  background: var(--royal-dark);
}

.legacy-content-wrapper {
  background: var(--royal-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-card);
  color: var(--text-secondary);
}

.legacy-content-wrapper h1,
.legacy-content-wrapper h2,
.legacy-content-wrapper h3,
.legacy-content-wrapper h4,
.legacy-content-wrapper h5,
.legacy-content-wrapper h6 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-family: 'Montserrat', sans-serif;
}

.legacy-content-wrapper p {
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.legacy-content-wrapper ul, 
.legacy-content-wrapper ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.legacy-content-wrapper li {
  margin-bottom: 10px;
  color: var(--text-secondary);
}

.legacy-content-wrapper img {
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

/* Adjust old table styles if present */
.legacy-content-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.legacy-content-wrapper th, 
.legacy-content-wrapper td {
  padding: 12px;
  border: 1px solid var(--glass-border);
}

.legacy-content-wrapper th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Fix text colors that were black/dark in original CSS */
.text-dark, .col_red, .text-black {
  color: var(--accent-gold) !important;
}

.bg-light, .bg-white {
  background-color: transparent !important;
}

.legacy-content-wrapper a {
  color: var(--accent-gold-light);
}

.legacy-content-wrapper a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE OVERRIDES FOR INNER PAGES
   ========================================================================== */
@media (max-width: 1024px) {
  /* Scale down inner hero titles on tablet */
  body .inner-hero-title {
    font-size: 38px !important;
  }
}

@media (max-width: 768px) {
  /* Scale down inner hero titles on mobile */
  body .inner-hero-title {
    font-size: 30px !important;
  }

  body .inner-hero {
    height: 30vh !important;
    min-height: 200px !important;
  }

  /* Grid spacing and layout adjustments */
  body .facility-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 24px !important;
  }

  body .admission-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Elegant Compact Tables for Mobile (Prevents horizontal scroll while keeping professional table look) */
  body .table-responsive {
    overflow-x: hidden !important;
  }
  body .table {
    width: 100% !important;
    table-layout: fixed; /* Forces table to stay within screen width */
    margin-bottom: 0;
  }
  body .table th,
  body .table td {
    padding: 10px 8px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    white-space: normal !important;
  }
  
  /* Hide the S.No. column on mobile to save valuable horizontal space */
  body .table th:first-child,
  body .table td:first-child {
    display: none !important;
  }

  /* Make the remaining columns distribute space optimally */
  body .table th:nth-child(2),
  body .table td:nth-child(2) {
    width: 65% !important;
  }
  body .table th:nth-child(3),
  body .table td:nth-child(3) {
    width: 35% !important;
  }

  /* Specific override for General Information Table (Section A) */
  body #general-info-table th:nth-child(2),
  body #general-info-table td:nth-child(2) {
    width: 40% !important;
  }
  body #general-info-table th:nth-child(3),
  body #general-info-table td:nth-child(3) {
    width: 60% !important;
  }

  /* Compact the View Document buttons so they fit nicely */
  body .table td .view-btn {
    padding: 6px 8px !important;
    font-size: 11px !important;
    display: inline-block;
    width: 100%;
    text-align: center;
    border-radius: 4px;
    letter-spacing: 0;
  }
  body .table td .view-btn i {
    margin-right: 4px;
  }

  /* Padding adjustments to prevent layout squishing on mobile */
  body .legacy-content-wrapper {
    padding: 24px !important;
  }

  body .glass-panel {
    padding: 24px !important;
  }

  body .admission-info-side,
  body .admission-form-side {
    padding: 30px !important;
  }

  /* Override inline styled section paddings */
  section[style*="padding: 100px 0"],
  section[style*="padding: 80px 0"],
  section[style*="padding: 150px 0"] {
    padding: 60px 0 !important;
  }
}

@media (max-width: 480px) {
  /* Narrow mobile layout adjustments */
  body .inner-hero-title {
    font-size: 24px !important;
  }

  body .inner-hero {
    height: 25vh !important;
    min-height: 180px !important;
  }

  body .legacy-content-wrapper {
    padding: 16px !important;
  }

  body .glass-panel {
    padding: 16px !important;
  }

  body .admission-info-side,
  body .admission-form-side {
    padding: 20px !important;
  }

  section[style*="padding: 100px 0"],
  section[style*="padding: 80px 0"],
  section[style*="padding: 150px 0"] {
    padding: 40px 0 !important;
  }
}
