/* Dhara Theme redesign for DSTSS */

:root {
  --brand-green: #1e5d42;
  --brand-green-dark: #164331;
  --brand-green-light: #2a7556;
  --brand-soft: #f5f9f7;
  --brand-border: #dce5e0;
  --brand-text: #1c1e1d;
  --brand-muted: #666d69;
  --brand-blue: #1d3551;
  --brand-accent: #e91e63;
  --hotline-card: #f4f7f5;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Better mobile tap highlight */
* {
  -webkit-tap-highlight-color: rgba(30, 93, 66, 0.2);
  -webkit-touch-callout: none;
}

/* Smooth scrolling for all devices */
html {
  scroll-behavior: smooth;
}

/* Prevent horizontal overflow */
img,
video,
iframe,
embed {
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
  width: 100%;
  table-layout: auto;
}

html {
  overflow-x: hidden;
  width: 100%;
}

html,
body {
  min-height: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }
}

/* Performance optimizations for mobile */
img {
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
}

/* Better font rendering on mobile */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'SolaimanLipi', 'Kalpurush', 'Nikosh', Arial, sans-serif;
  line-height: 1.6;
  color: var(--brand-text);
  background-color: #ffffff;
  background-image: url('../../../image/bgmain.gif');
  background-repeat: repeat-y;
  background-position: center top;
  background-attachment: fixed;
  background-size: 100% auto;
  min-height: 100vh;
  padding-bottom: 0;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 20px;
  }
}

/* Better link and button interactions on mobile */
a,
button {
  touch-action: manipulation;
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }
}

/* White background only for main content area */
.main-wrapper .container,
section:not(.header-top):not(.navigation):not(.hero-section) .container {
  background-color: rgba(255, 255, 255, 0.98);
}

/* Ensure main wrapper doesn't overflow */
.main-wrapper {
  width: 100%;
  overflow-x: hidden;
}

/* Ensure all sections stay within bounds */
section {
  max-width: 100%;
  overflow-x: hidden;
}

.primary-column {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

@media (max-width: 991px) {
  .primary-column {
    gap: 15px;
  }
}

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 991px) {
  .sidebar-column {
    gap: 15px;
    margin-top: 20px;
  }
}

.links-grid {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 18px;
}

.header-top {
  background: var(--brand-green);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.3px;
  padding: 10px 0;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
}

@media (max-width: 768px) {
  .header-top {
    font-size: 11px;
    padding: 8px 0;
  }
}

@media (max-width: 480px) {
  .header-top {
    font-size: 10px;
    padding: 6px 0;
  }
}

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background-color: transparent !important;
}

@media (max-width: 768px) {
  .header-top .container {
    padding: 0 10px;
    flex-direction: column;
    gap: 5px;
  }
}

.header-top .contact-info {
  display: flex;
  gap: 26px;
  align-items: center;
}

@media (max-width: 768px) {
  .header-top .contact-info {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-top .contact-info {
    gap: 8px;
    font-size: 9px;
  }
}

.header-top .contact-info span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0.96;
  font-weight: 500;
}

.header-top .motto {
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .header-top .motto {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .header-top .motto {
    font-size: 11px;
    text-align: center;
  }
}

.header-top i {
  color: #fff;
  font-size: 14px;
}

@media (max-width: 480px) {
  .header-top i {
    font-size: 12px;
  }
}

.header-main {
  background: #fff;
  border-bottom: 2px solid var(--brand-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
}

.header-main .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  background-color: transparent !important;
}

@media (max-width: 768px) {
  .header-main .header-content {
    padding: 15px 10px;
    gap: 10px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .header-main .header-content {
    padding: 10px 8px;
    gap: 8px;
  }
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 18px;
}

@media (max-width: 768px) {
  .logo-section {
    gap: 8px;
    flex-direction: row;
    text-align: left;
    flex: 1;
  }
}

@media (max-width: 480px) {
  .logo-section {
    gap: 8px;
  }
}

.logo-section img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .logo-section img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .logo-section img {
    width: 40px;
    height: 40px;
  }
}

.school-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.school-info h1 {
  font-size: 36px;
  margin: 0;
  color: var(--brand-green);
  letter-spacing: 0.5px;
  font-weight: 800;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .school-info h1 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .school-info h1 {
    font-size: 14px;
  }
}

.school-info .address {
  font-size: 16px;
  color: var(--brand-muted);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

@media (max-width: 768px) {
  .school-info .address {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .school-info .address {
    font-size: 11px;
  }
}

.right-logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .right-logo-section {
    order: 3;
    margin-bottom: 0;
  }
}

.govt-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .govt-logo {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .govt-logo {
    width: 40px;
    height: 40px;
  }
}

.principal-section {
  text-align: center;
  padding: 14px 20px;
  border: 2px solid var(--brand-border);
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fbfa 0%, var(--brand-soft) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .principal-section {
    display: none;
  }
}

.principal-section img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

.principal-section .name {
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-green-dark);
  margin-top: 10px;
}

.principal-section .title {
  font-size: 13px;
  color: var(--brand-muted);
  margin-top: 4px;
  font-weight: 600;
}

.navigation {
  background: #ffffff;
  border-top: 1px solid var(--brand-border);
  border-bottom: 3px solid #e5ebe8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 10000;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: visible;
  min-height: 60px;
}

@media (max-width: 991px) {
  .navigation {
    overflow: hidden;
    min-height: 55px;
  }
}

.navigation .container {
  padding: 0;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 10001;
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991px) {
  .navigation .container {
    padding: 0;
    display: block;
    min-height: 55px;
  }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: var(--brand-green);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10003;
  min-height: 44px;
  min-width: 54px;
}

@media (max-width: 991px) {
  .mobile-menu-toggle {
    display: block;
  }
}

.mobile-menu-toggle:hover {
  background: var(--brand-green-dark);
}

.mobile-menu-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.mobile-menu-toggle i {
  pointer-events: none;
  font-size: 20px;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: visible;
  overflow-y: visible;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 10002;
}

@media (max-width: 991px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    background: #ee1e57;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px;
    padding-top: 70px;
    z-index: 99999;
    overflow-y: auto;
  }

  .nav-menu > li {
    margin: 0;
    padding: 0;
  }

  .nav-menu > li > a {
    padding: 12px 0 !important;
    color: white !important;
    font-size: 16px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-menu-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #002147;
    font-size: 28px;
    padding: 8px;
    cursor: pointer;
    z-index: 100000;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: white;
  }

  .mobile-menu-close:hover {
    transform: rotate(90deg);
  }

  .mobile-menu-close:active {
    transform: rotate(90deg) scale(0.95);
  }

  .mobile-menu-close:hover {
    background: rgba(255,255,255,0.1);
  }

  .mobile-menu-close i {
    font-size: 24px;
  }
  
  .nav-menu.active {
    display: flex !important;
  }

  .nav-menu > li > a {
    color: #fff !important;
    border: none !important;
    font-size: 16px !important;
    padding: 12px 0 !important;
  }

  .nav-menu .dropdown-menu {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 20px !important;
  }

  .nav-menu .dropdown-menu a {
    color: #fff !important;
    padding: 8px 0 !important;
    font-size: 14px !important;
  }

  .dropdown > a > i {
    float: right;
    margin-top: 5px;
  }
}

/* Mobile overlay mode when body.mobile-nav-open is set by JS */
@media (max-width: 991px) {
  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .nav-menu {
    display: flex !important;
    position: fixed !important;
    inset: 0 0 0 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ee1e57; /* match screenshot main color */
    padding: 70px 18px 30px;
    z-index: 10050;
    overflow-y: auto;
  }

  body.mobile-nav-open .nav-menu li a {
    color: #fff;
  }
}

.nav-menu > li {
  position: relative;
  flex-shrink: 0;
  z-index: 10002;
}

@media (max-width: 991px) {
  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid #e5ebe8;
  }
}

.nav-menu > li > a {
  display: block;
  padding: 16px 26px;
  color: #2c2e2d;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-right: 1px solid var(--brand-border);
  transition: all 0.3s ease;
  background: transparent;
}

@media (max-width: 991px) {
  .nav-menu > li > a {
    padding: 14px 20px;
    font-size: 14px;
    border-right: none;
  }
}

@media (max-width: 480px) {
  .nav-menu > li > a {
    padding: 12px 15px;
    font-size: 13px;
  }
}

.nav-menu > li:first-child > a {
  border-left: 1px solid var(--brand-border);
}

@media (max-width: 991px) {
  .nav-menu > li:first-child > a {
    border-left: none;
  }
}

.dropdown {
  position: relative;
}

.nav-menu > li > a:hover,
.nav-menu > li:hover > a,
.nav-menu > li > a:focus {
  background: var(--brand-green);
  color: #fff;
}

.nav-menu > li > a:not(:hover):not(:focus) {
  background: transparent;
  color: #2c2e2d;
}

.dropdown-toggle i {
  margin-left: 6px;
  font-size: 11px;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  border: 2px solid var(--brand-border);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  list-style: none;
  z-index: 999999;
  border-radius: 0 0 8px 8px;
  margin: 0;
  padding: 0;
}

@media (max-width: 991px) {
  .dropdown-menu {
    position: static;
    width: 100%;
    min-width: 100%;
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: #f8fbfa;
    display: none;
  }
  
  .dropdown-menu.active {
    display: block !important;
  }
  /* Ensure JS-toggled .open on .dropdown shows submenu on mobile */
  .dropdown.open > .dropdown-menu {
    display: block !important;
  }
}

.dropdown-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-menu li a {
  display: block;
  padding: 14px 20px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

@media (max-width: 991px) {
  .dropdown-menu li a {
    padding: 12px 30px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .dropdown-menu li a {
    padding: 10px 25px;
    font-size: 12px;
  }
}

.dropdown-menu li:last-child a {
  border-bottom: none;
}

.dropdown-menu li a:hover {
  background: var(--brand-soft);
  color: var(--brand-green);
  padding-left: 24px;
}

.dropdown:hover .dropdown-menu,
.dropdown .dropdown-menu:hover {
  display: block !important;
  animation: fadeInDown 0.3s ease;
}

/* Keep dropdown open while hovering over it */
.dropdown:hover > .dropdown-menu {
  display: block !important;
}

.dropdown-toggle {
  cursor: pointer;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section {
  margin: 20px 0;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

@media (max-width: 768px) {
  .hero-section {
    margin: 15px 0;
  }
}

@media (max-width: 480px) {
  .hero-section {
    margin: 10px 0;
  }
}

.hero-section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background-color: transparent !important;
}

@media (max-width: 768px) {
  .hero-section .container {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .hero-section .container {
    padding: 0 8px;
  }
}

.hero-slider {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--brand-border);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
  z-index: 1;
  max-width: 100%;
  min-height: 450px;
  background: #ffffff;
}

@media (max-width: 768px) {
  .hero-slider {
    min-height: 300px;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .hero-slider {
    min-height: 220px;
    border-radius: 4px;
    border-width: 1px;
  }
}

.hero-slider .slider-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  z-index: 1;
  background: #ffffff;
}

.hero-slider .slider-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-slider .slider-item img {
  width: 100%;
  max-width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
  filter: none;
}

@media (max-width: 768px) {
  .hero-slider .slider-item img {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .hero-slider .slider-item img {
    height: 220px;
  }
}

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
  .slider-dots {
    bottom: 8px;
    gap: 6px;
    padding: 5px 10px;
  }
}

@media (max-width: 480px) {
  .slider-dots {
    bottom: 6px;
    gap: 5px;
    padding: 4px 8px;
  }
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .slider-dots .dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .slider-dots .dot {
    width: 7px;
    height: 7px;
  }
}

.slider-dots .dot:hover {
  background: rgba(255, 255, 255, 0.75);
}

.slider-dots .dot.active {
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.notice-scroll-bar {
  margin: 0 0 20px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .notice-scroll-bar {
    margin: 0 0 15px;
  }
}

@media (max-width: 480px) {
  .notice-scroll-bar {
    margin: 0 0 10px;
  }
}

.notice-scroll-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background-color: transparent !important;
}

@media (max-width: 768px) {
  .notice-scroll-bar .container {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .notice-scroll-bar .container {
    padding: 0 8px;
  }
}

.notice-container {
  background: #fff;
  border: 2px solid var(--brand-border);
  border-left: 5px solid var(--brand-green);
  border-radius: 8px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .notice-container {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .notice-container {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
}

.notice-label {
  background: var(--brand-blue);
  color: #fff;
  padding: 8px 22px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .notice-label {
    padding: 6px 16px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .notice-label {
    padding: 5px 12px;
    font-size: 12px;
  }
}

.scrolling-text {
  overflow: hidden;
  white-space: nowrap;
  color: #2c2e2d;
  font-weight: 600;
  font-size: 15px;
}

@media (max-width: 768px) {
  .scrolling-text {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .scrolling-text {
    font-size: 12px;
  }
}

.scrolling-text span {
  display: inline-block;
  padding-right: 80px;
}

.notice-date-chip {
  background: var(--brand-green);
  color: #fff;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .notice-date-chip {
    display: none;
  }
}

.notice-marquee {
  display: inline-block;
  animation: noticeTicker 28s linear infinite;
}

@keyframes noticeTicker {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

.main-wrapper {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid var(--brand-border);
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.09);
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 991px) {
  .main-wrapper {
    padding: 20px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .main-wrapper {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .main-wrapper {
    padding: 12px;
    margin-bottom: 12px;
    border-width: 1px;
  }
}

.layout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 26px;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 991px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.notice-section {
  background: #fff;
  border: 2px solid var(--brand-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  max-width: 100%;
}

@media (max-width: 768px) {
  .notice-section {
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .notice-section {
    border-width: 1px;
  }
}

.notice-header {
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.notice-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.more-notice-btn {
  background: var(--brand-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(233, 30, 99, 0.3);
  min-height: 40px; /* Better touch target */
}

.more-notice-btn:hover {
  background: #d81b60;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(233, 30, 99, 0.4);
}

.more-notice-btn:active {
  transform: translateY(0);
}

.notice-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  position: relative;
}

.notice-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

/* Responsive table wrapper */
@media (max-width: 767px) {
  .notice-table {
    border: 1px solid var(--brand-border);
    border-radius: 8px;
  }
  
  .notice-table table {
    min-width: 100%;
    display: block;
  }
  
  .notice-table thead {
    display: block;
  }
  
  .notice-table tbody {
    display: block;
  }
  
  .notice-table tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    overflow: hidden;
  }
  
  .notice-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .notice-table td {
    display: block;
    text-align: right;
    padding-left: 50%;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .notice-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    top: 15px;
    font-weight: 700;
    text-align: left;
    color: var(--brand-green);
  }
  
  .notice-table td:last-child {
    border-bottom: none;
  }
}

.notice-table thead th {
  background: #f7faf9;
  color: #1e1f1e;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  border-bottom: 2px solid var(--brand-border);
}

.notice-table tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid #e8ecea;
  font-size: 14px;
  color: #333;
  vertical-align: middle;
}

.notice-table tbody tr:last-child td {
  border-bottom: none;
}

.notice-table tbody tr:hover {
  background: #f9fcfb;
}

.view-btn {
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 20px;
  font-weight: 700;
  text-transform: lowercase;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
  transition: all 0.2s ease;
  min-height: 40px; /* Better touch target */
  min-width: 80px;
}

.view-btn:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.4);
}

.view-btn:active {
  transform: translateY(0);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 24px;
  width: 100%;
  max-width: 100%;
}

/* For larger screens, keep 2 columns */
@media (min-width: 992px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* For medium screens, keep 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* For small mobile, 1 column */
@media (max-width: 767px) {
  .links-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
  }
}

.link-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 20px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: all 0.3s ease;
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 768px) {
  .link-card {
    padding: 15px;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .link-card {
    padding: 12px;
    gap: 12px;
  }
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--brand-green);
}

@media (max-width: 768px) {
  .link-card:hover {
    transform: translateY(-2px);
  }
}

.link-card .icon-wrap {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
}

@media (max-width: 768px) {
  .link-card .icon-wrap {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .link-card .icon-wrap {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

.link-card .icon-wrap i {
  color: #fff !important;
  font-size: 40px;
  line-height: 1;
  display: block;
}

@media (max-width: 768px) {
  .link-card .icon-wrap i {
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .link-card .icon-wrap i {
    font-size: 24px;
  }
}

/* Individual card icon colors - Circular solid backgrounds */
.link-card:nth-child(1) .icon-wrap {
  background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.3);
}

.link-card:nth-child(2) .icon-wrap {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
}

.link-card:nth-child(3) .icon-wrap {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.3);
}

.link-card:nth-child(4) .icon-wrap {
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.link-card:nth-child(5) .icon-wrap {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
  box-shadow: 0 4px 12px rgba(14, 116, 144, 0.3);
}

.link-card:nth-child(6) .icon-wrap {
  background: linear-gradient(135deg, #a16207 0%, #ca8a04 100%);
  box-shadow: 0 4px 12px rgba(161, 98, 7, 0.3);
}

.link-card:nth-child(7) .icon-wrap {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.link-card:nth-child(8) .icon-wrap {
  background: linear-gradient(135deg, #c2410c 0%, #ea580c 100%);
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.3);
}

.link-card:nth-child(9) .icon-wrap {
  background: linear-gradient(135deg, #be185d 0%, #db2777 100%);
  box-shadow: 0 4px 12px rgba(190, 24, 93, 0.3);
}

.link-card:nth-child(10) .icon-wrap {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

.link-card .content {
  flex: 1;
  min-width: 0;
}

.link-card h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1f2937;
  letter-spacing: 0.3px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .link-card h4 {
    font-size: 15px;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .link-card h4 {
    font-size: 14px;
    margin-bottom: 8px;
  }
}

.link-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-card li {
  position: relative;
  padding-left: 22px;
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
  line-height: 1.5;
  font-weight: 500;
}

@media (max-width: 768px) {
  .link-card li {
    font-size: 13px;
    padding-left: 20px;
    margin-bottom: 7px;
  }
}

@media (max-width: 480px) {
  .link-card li {
    font-size: 12px;
    padding-left: 18px;
    margin-bottom: 6px;
  }
}

.link-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 0;
  height: 0;
  border-left: 8px solid #22c55e;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.link-card li:hover::before {
  border-left-color: var(--brand-green);
}

.link-card li a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.link-card li a:hover {
  color: var(--brand-green);
  padding-left: 3px;
  transition: all 0.2s ease;
}

.link-card li a:hover {
  color: #16a34a;
}

.sidebar-section {
  background: #fff;
  border: 2px solid var(--brand-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

@media (max-width: 768px) {
  .sidebar-section {
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .sidebar-section {
    border-width: 1px;
  }
}

.sidebar-header {
  background: var(--brand-green);
  color: #fff;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

@media (max-width: 768px) {
  .sidebar-header {
    padding: 12px 15px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .sidebar-header {
    padding: 10px 12px;
    font-size: 14px;
  }
}

.sidebar-content {
  padding: 18px 20px;
}

@media (max-width: 768px) {
  .sidebar-content {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .sidebar-content {
    padding: 12px;
  }
}

.sidebar-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-content li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 12px;
  color: #3c4842;
  font-weight: 500;
}

.sidebar-content li::before {
  content: '✓';
  font-weight: 900;
  color: #22c55e;
  font-size: 14px;
}

/* Important Links Styling */
.sidebar-content ul.link-list li::before {
  content: none;
}

.sidebar-content ul.link-list li {
  display: block;
  margin-bottom: 8px;
}

.sidebar-content ul.link-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2d5f3f;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: rgba(30, 93, 66, 0.05);
}

.sidebar-content ul.link-list li a:hover {
  background: var(--brand-green);
  color: #fff;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.principal-photo {
  width: 130px;
  height: 130px;
  border-radius: 8px;
  margin-bottom: 14px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  border: 3px solid #fff;
}

.principal-name {
  font-weight: 700;
  color: var(--brand-green-dark);
  font-size: 16px;
  margin-top: 8px;
}

.principal-title {
  color: var(--brand-muted);
  font-size: 14px;
  margin-top: 5px;
  font-weight: 600;
}

.sidebar-content audio {
  width: 100%;
  height: 40px;
}

.service-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.service-card {
  background: var(--hotline-card);
  border: 2px solid var(--brand-border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.service-card:hover {
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.service-icon {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.service-card h6 {
  font-size: 14px;
  margin: 0;
  color: var(--brand-text);
  font-weight: 600;
  line-height: 1.4;
}

.sidebar-content img {
  max-width: 160px;
  border-radius: 8px;
}

.footer-info {
  margin: 30px 0 0;
  background: linear-gradient(135deg, #f8faf9 0%, #f1f5f3 100%);
  border-top: 3px solid #d5ddd8;
  padding: 30px 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  width: 100%;
  position: relative;
  left: 0;
  right: 0;
  margin-left: 0;
  margin-right: 0;
  overflow: visible;
  clear: both;
}

@media (max-width: 768px) {
  .footer-info {
    padding: 25px 0;
    margin: 20px 0 0;
    overflow: visible;
  }
}

@media (max-width: 480px) {
  .footer-info {
    padding: 20px 0;
    margin: 15px 0 0;
  }
}

.footer-info .grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  color: #3c4842;
  font-size: 15px;
  line-height: 1.8;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  background-color: transparent !important;
  min-height: 100px;
}

@media (max-width: 768px) {
  .footer-info .grid {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
    font-size: 14px;
    padding: 0 15px;
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .footer-info .grid {
    font-size: 13px;
    padding: 0 10px;
    gap: 15px;
  }
}

.footer-info strong {
  color: var(--brand-green-dark);
  font-weight: 700;
  font-size: 16px;
}

@media (max-width: 768px) {
  .footer-info strong {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .footer-info strong {
    font-size: 14px;
  }
}

.footer-info small {
.footer-info small {
  color: #6c716f;
  font-size: 13px;
  display: block;
  margin-top: 8px;
}

@media (max-width: 480px) {
  .footer-info small {
    font-size: 11px;
  }
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

@media (max-width: 768px) {
  .text-right {
    text-align: center;
  }
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Desktop - Ensure dropdowns work on hover for screens > 575px */
@media (min-width: 576px) {
  .dropdown:hover > .dropdown-menu {
    display: block !important;
  }
  
  .dropdown-menu {
    position: absolute !important;
    width: auto !important;
    min-width: 240px;
    background: #fff !important;
    border: 2px solid var(--brand-border) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important;
    border-radius: 0 0 8px 8px !important;
  }
}

/* Extra Large Screens - 1400px+ */
@media (min-width: 1400px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .container {
    max-width: 1320px;
  }
}

/* Large Tablets & Small Desktops - 992px to 1199px */
@media (max-width: 1199px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .school-info h1 {
    font-size: 30px;
  }
  
  .container {
    max-width: 960px;
  }
  
  .notice-table table {
    font-size: 14px;
  }
}

/* Tablets - 768px to 991px */
@media (max-width: 991px) {
  /* Header adjustments */
  .header-main .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    gap: 15px;
  }
  
  .logo-section {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .school-logo,
  .govt-logo {
    width: 80px;
    height: 80px;
  }
  
  .school-info h1 {
    font-size: 26px;
  }
  
  .school-info .address {
    font-size: 14px;
  }
  
  .right-logo-section {
    margin-top: 15px;
  }
  
  /* Principal Section - Better mobile layout */
  .principal-section {
    padding: 12px 16px;
    margin-top: 10px;
  }
  
  .principal-section img {
    width: 80px;
    height: 80px;
  }
  
  .principal-section .name {
    font-size: 15px;
  }
  
  .principal-section .title {
    font-size: 12px;
  }

  /* Navigation */
  .nav-menu {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: auto;
  }
  
  .nav-menu > li > a {
    padding: 14px 20px;
    font-size: 14px;
    min-height: 48px; /* Better touch target */
  }

  /* Layout Grid */
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Links Grid */
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .link-card {
    padding: 18px;
  }
  
  .link-card .icon-wrap {
    width: 70px;
    height: 70px;
  }
  
  .link-card .icon-wrap i {
    font-size: 32px;
  }

  /* Sidebar */
  .sidebar-column {
    margin-top: 24px;
  }
  
  /* Hero Slider */
  .hero-slider {
    min-height: 350px;
  }
  
  .hero-slider .slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
  }
  
  .hero-slider .slider-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }
  
  .hero-slider .slider-item img {
    height: 350px;
  }
  
  /* Notice Table */
  .notice-table {
    overflow-x: auto;
  }
  
  /* Container */
  .container {
    max-width: 720px;
    padding: 0 15px;
  }
  
  /* Main Wrapper */
  .main-wrapper {
    padding: 20px 15px;
  }
  
  /* Hero Section */
  .hero-section {
    margin: 15px 0;
  }
  
  .hero-section .container {
    padding: 0 15px;
  }
  
  /* Notice Scroll Bar */
  .notice-scroll-bar .container {
    padding: 0 15px;
  }
  
  /* Touch-friendly buttons */
  .more-notice-btn,
  .view-btn {
    min-height: 44px;
    padding: 10px 18px;
  }
}

/* Mobile Landscape & Small Tablets - 576px to 767px */
@media (max-width: 767px) {
  /* Header Top */
  .header-top {
    font-size: 12px;
    padding: 8px 0;
  }
  
  .header-top .contact-info {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .header-top .motto {
    font-size: 13px;
  }
  
  /* School Info */
  .school-info h1 {
    font-size: 22px;
  }
  
  .school-info .address {
    font-size: 13px;
  }
  
  /* Logos */
  .school-logo,
  .govt-logo {
    width: 70px;
    height: 70px;
  }
  
  /* Principal Section */
  .principal-section {
    padding: 10px 14px;
  }
  
  .principal-section img {
    width: 70px;
    height: 70px;
  }
  
  .principal-section .name {
    font-size: 14px;
  }
  
  .principal-section .title {
    font-size: 11px;
  }
  
  /* Navigation */
  .nav-menu > li > a {
    padding: 12px 16px;
    font-size: 13px;
    min-height: 44px;
  }
  
  /* Hero Slider */
  .hero-slider {
    min-height: 300px;
  }
  
  .hero-slider .slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
  }
  
  .hero-slider .slider-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }
  
  .hero-slider .slider-item img {
    height: 300px;
    object-fit: cover;
  }
  
  /* Cards */
  .links-grid {
    grid-template-columns: 1fr;
  }
  
  .link-card h4 {
    font-size: 16px;
  }
  
  .link-card li {
    font-size: 13px;
  }
  
  /* Notice Section */
  .notice-section {
    border-radius: 6px;
  }
  
  .notice-header {
    padding: 12px 15px;
    flex-direction: column;
    align-items: stretch;
  }
  
  .notice-title {
    font-size: 16px;
    text-align: center;
    margin-bottom: 8px;
  }
  
  .more-notice-btn {
    width: 100%;
    min-height: 44px;
  }
  
  .notice-table {
    font-size: 12px;
  }
  
  .notice-table th,
  .notice-table td {
    padding: 10px 12px;
  }
  
  /* Main Wrapper */
  .main-wrapper {
    padding: 18px 12px;
  }
  
  /* Hero Section - Full width on mobile */
  .hero-section {
    margin: 0;
    padding: 0;
    width: 100%;
  }
  
  .hero-section .container {
    padding: 0;
    max-width: 100%;
    width: 100%;
  }
  
  .hero-slider {
    width: 100%;
    height: 280px;
    overflow: hidden;
  }
  
  .slider-item {
    width: 100%;
    height: 280px;
  }
  
  .hero-section img,
  .slider-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
  }
  
  /* Notice Scroll Bar - Full width */
  .notice-scroll-bar {
    margin: 0;
    width: 100%;
  }
  
  .notice-scroll-bar .container {
    padding: 0;
    max-width: 100%;
  }
  
  .notice-container {
    padding: 10px 15px;
  }
  
  .notice-label {
    font-size: 14px;
    padding: 8px 12px;
  }
  
  .scrolling-text {
    font-size: 13px;
  }
  
  .notice-date-chip {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Main Content - Serial stacked view */
  .main-wrapper {
    padding: 15px 10px;
  }
  
  .layout-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .primary-column,
  .secondary-column, 
  .tertiary-column {
    width: 100%;
    order: initial;
  }
  
  /* Reorder for better mobile UX */
  .primary-column {
    order: 1;
  }
  
  .secondary-column {
    order: 2;
  }
  
  .tertiary-column {
    order: 3;
  }
  
  /* Cards Grid - Single column */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0;
  }
  
  .card {
    width: 100%;
    margin: 0;
  }
  
  .card-title {
    font-size: 16px;
  }

  /* Notice Section - Full width table */
  .notice-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .notice-table table {
    font-size: 12px;
    min-width: 100%;
  }
  
  .notice-table th,
  .notice-table td {
    padding: 8px 6px;
  }
  
  .notice-table th:nth-child(2),
  .notice-table td:nth-child(2) {
    display: none; /* Hide date on very small screens */
  }
  
  /* Sidebar sections */
  .sidebar-section {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .section-title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  /* Sidebar Sections - Stacked serial view */
  .sidebar-section {
    padding: 16px;
  }
  
  .section-title {
    font-size: 17px;
  }
  
  /* Main Content Layout - Stacked on mobile */
  .main-wrapper {
    display: block;
    width: 100%;
  }
  
  .layout-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .primary-column,
  .secondary-column,
  .tertiary-column {
    width: 100%;
    max-width: 100%;
    flex: none;
  }
  
  /* Cards Grid - Full width on mobile */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .card {
    width: 100%;
  }
  
  /* Notice Section */
  .notice-section {
    margin-bottom: 20px;
  }
  
  .notice-table table {
    font-size: 13px;
  }
  
  .notice-table th,
  .notice-table td {
    padding: 10px 8px;
  }
  
  /* Improve scrolling performance */
  .notice-table,
  .nav-menu {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}

/* Mobile Portrait - up to 575px */
@media (max-width: 575px) {
  /* MOBILE RESET */
  * {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    padding: 0;
    width: 100vw;
    overflow-x: hidden;
  }
  
  .container {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0 15px;
  }
  
  /* HEADER TOP */
  .header-top {
    padding: 8px 0;
    width: 100%;
  }
  
  .header-top .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    padding: 0 10px;
  }
  
  .header-top .contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }
  
  .header-top .contact-info span {
    font-size: 11px;
  }
  
  .header-top .motto {
    font-size: 12px;
    margin: 0;
  }
  
  /* HEADER MAIN - LOGO LAYOUT */
  .header-main {
    padding: 10px 0;
    width: 100%;
  }
  
  .header-main .container {
    padding: 0 15px;
  }
  
  .header-main .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  
  .header-main .logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    text-decoration: none;
    color: inherit;
  }
  
  .school-logo {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
  }
  
  .govt-logo {
    width: 35px !important;
    height: 35px !important;
    flex-shrink: 0;
  }
  
  .school-info {
    flex: 1;
  }
  
  .school-info h1 {
    font-size: 14px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    text-align: left;
  }
  
  .school-info .address {
    font-size: 10px !important;
    margin-top: 2px !important;
    text-align: left;
  }
  
  /* NAVIGATION - STICKY */
  .navigation {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%;
  }
  
  .navigation .container {
    padding: 0;
  }
  
  /* MOBILE MENU TOGGLE */
  .mobile-menu-toggle {
    display: block !important;
    width: calc(100% - 30px);
    margin: 10px 15px;
    text-align: center;
    font-size: 16px !important;
    padding: 12px;
    background: var(--brand-blue);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-toggle::before {
    content: "☰ মেনু";
  }
  
  .mobile-menu-toggle.active::before {
    content: "✕ বন্ধ করুন";
    font-size: 18px;
  }
  
  .mobile-menu-toggle:hover {
    background: var(--brand-green);
  }
  
  /* NAVIGATION MENU */
  .nav-menu {
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    display: flex !important;
  }
  
  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }
  
  .nav-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    font-size: 15px;
    text-decoration: none;
    color: var(--brand-text);
    min-height: 48px;
    border: none;
  }
  
  .nav-menu > li > a:hover {
    background: #f5f5f5;
    color: var(--brand-blue);
  }
  
  .dropdown-menu {
    position: static !important;
    width: 100%;
    box-shadow: none;
    border: none;
    background: #f9f9f9;
    display: none !important;
    margin: 0;
    padding: 0;
  }
  
  .dropdown-menu.active {
    display: block !important;
  }
  
  .dropdown-menu li a {
    padding: 12px 30px;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
  }
  
  /* Header Top - Mobile optimization */
  .header-top {
    display: block;
  }
  
  .header-top .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding: 8px 10px;
  }

  .header-top .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }
  
  .header-top .contact-info span {
    font-size: 11px;
  }
  
  .header-top .motto {
    font-size: 12px;
    font-weight: 600;
  }
  
  /* Header Main - Logo left, Gov logo right layout as per sketch */
  .header-main {
    padding: 10px 0;
    display: block;
  }
  
  .header-main .header-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
  }
  
  .header-main .logo-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 8px;
    flex: 1;
  }
  
  .header-main .right-logo-section {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
  }
  
  /* School Info */
  .school-info {
    text-align: left;
  }
  
  .school-info h1 {
    font-size: 14px;
    line-height: 1.2;
    margin: 0;
  }
  
  .school-info .address {
    font-size: 10px;
    margin-top: 2px;
  }
  
  /* Logos - Smaller on mobile as per sketch */
  .school-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  
  .govt-logo {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
  }
  
  /* Principal Section - Better mobile display */
  .principal-section {
    padding: 10px 12px;
    margin-top: 10px;
  }
  
  .principal-section img {
    width: 65px;
    height: 65px;
  }
  
  .principal-section .name {
    font-size: 13px;
    margin-top: 8px;
  }
  
  .principal-section .title {
    font-size: 11px;
    margin-top: 3px;
  }
  
  /* Navigation - Sticky on mobile as per sketch */
  .navigation {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  .navigation .container {
    overflow-x: hidden;
    padding: 0;
  }
  
  /* Hide desktop navigation menu on mobile */
  .nav-menu {
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
  }
  
  .nav-menu.active {
    display: flex !important;
  }
  
  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid var(--brand-border);
  }
  
  .nav-menu > li > a {
    padding: 15px 20px;
    font-size: 15px;
    text-align: left;
    border-right: none;
    border-bottom: none;
    white-space: normal;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .nav-menu > li:first-child > a {
    border-left: none;
  }
  
  .dropdown-menu {
    position: static !important;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    border-left: 3px solid var(--brand-green);
    background: #f9f9f9;
    display: none !important;
  }
  
  .dropdown-menu.active {
    display: block !important;
  }
  
  .dropdown-menu li a {
    padding: 12px 30px;
    min-height: 44px;
    font-size: 14px;
  }

  /* Header Top */
  .header-top .container {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding: 10px;
  }

  .header-top .contact-info {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .header-top .contact-info span {
    font-size: 11px;
  }
  
  .header-top .motto {
    font-size: 12px;
  }
  
  /* School Info */
  .school-info h1 {
    font-size: 18px;
    line-height: 1.3;
  }
  
  .school-info .address {
    font-size: 12px;
  }
  
  /* HERO SECTION - FULL WIDTH */
  .hero-section {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
  }
  
  .hero-section .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .hero-slider {
    width: 100% !important;
    height: 280px !important;
    border-radius: 0 !important;
    border: none !important;
    min-height: 280px !important;
  }
  
  .slider-item,
  .slider-item img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
  }
  
  /* NOTICE SCROLL BAR - FULL WIDTH */
  .notice-scroll-bar {
    margin: 0 !important;
    width: 100vw !important;
    position: relative;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
  }
  
  .notice-scroll-bar .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
  }
  
  .notice-container {
    padding: 10px 15px !important;
  }
  
  .notice-label {
    font-size: 14px !important;
    padding: 8px 12px !important;
  }
  
  .scrolling-text {
    font-size: 13px !important;
  }
  
  /* MAIN CONTENT - STACKED LAYOUT */
  .main-wrapper {
    padding: 15px 10px !important;
  }
  
  .layout-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }
  
  .primary-column,
  .secondary-column,
  .tertiary-column {
    width: 100% !important;
    order: initial !important;
  }
  
  /* NOTICE SECTION */
  .notice-section {
    margin-bottom: 20px !important;
  }
  
  .notice-table {
    overflow-x: auto !important;
  }
  
  .notice-table table {
    font-size: 12px !important;
    min-width: 100% !important;
  }
  
  .notice-table th,
  .notice-table td {
    padding: 8px 6px !important;
  }
  
  /* CARDS GRID - SINGLE COLUMN */
  .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .card {
    width: 100% !important;
    margin: 0 !important;
  }
  
  .card-title {
    font-size: 15px !important;
  }
  
  /* SIDEBAR SECTIONS */
  .sidebar-section {
    padding: 15px !important;
    margin-bottom: 15px !important;
  }
  
  .section-title {
    font-size: 16px !important;
  }

  .hero-slider .slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
  }
  
  .hero-slider .slider-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }

  .hero-slider .slider-item img {
    height: 250px;
  }
  
  .slider-dots {
    bottom: 12px;
  }
  
  .slider-dots .dot {
    width: 8px;
    height: 8px;
  }

  /* Notice Scrolling Bar - Mobile optimization */
  .notice-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 8px;
    padding: 10px 8px;
    flex-direction: column;
    display: flex;
  }

  .notice-label {
    font-size: 13px;
    padding: 7px 16px;
    width: 100%;
    text-align: center;
  }
  
  .notice-date-chip {
    font-size: 11px;
    padding: 6px 14px;
    order: 3;
  }
  
  .scrolling-text {
    font-size: 13px;
    order: 2;
    width: 100%;
    padding: 5px 0;
  }

  /* Notice Table */
  .notice-section {
    padding: 15px;
  }
  
  .notice-title {
    font-size: 16px;
  }
  
  .more-notice-btn {
    font-size: 12px;
    padding: 6px 14px;
  }
  
  .notice-table table {
    font-size: 12px;
  }
  
  .notice-table th,
  .notice-table td {
    padding: 10px 8px;
  }
  
  .view-btn {
    padding: 6px 12px;
    font-size: 11px;
  }

  /* Link Cards */
  .links-grid {
    gap: 14px;
  }
  
  .link-card {
    padding: 16px;
    flex-direction: column;
    text-align: center;
  }
  
  .link-card .icon-wrap {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
  }
  
  .link-card .icon-wrap i {
    font-size: 28px;
  }
  
  .link-card h4 {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  .link-card li {
    font-size: 12px;
    padding-left: 16px;
  }
  
  .link-card li::before {
    font-size: 8px;
  }

  /* Sidebar */
  .sidebar-section {
    padding: 14px;
  }
  
  .section-title {
    font-size: 16px;
    padding: 10px 14px;
  }
  
  .quick-link {
    font-size: 13px;
    padding: 10px 14px;
  }
  
  .hotline-card {
    padding: 14px;
  }
  
  .hotline-number {
    font-size: 22px;
  }

  /* Footer */
  .footer-info {
    padding: 20px 0;
  }
  
  .footer-info .grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    font-size: 13px;
  }
  
  .footer-info strong {
    font-size: 14px;
  }
  
  .text-right {
    text-align: center;
  }
  
  /* Main Wrapper */
  .main-wrapper {
    padding: 15px 10px;
  }
  
  /* Container */
  .container {
    padding: 0 10px;
    max-width: 100%;
  }
  
  /* Hero Section */
  .hero-section {
    margin: 10px 0;
  }
  
  .hero-section .container {
    padding: 0 10px;
  }
  
  /* Notice Scroll Bar */
  .notice-scroll-bar {
    margin: 0 0 15px;
  }
  
  .notice-scroll-bar .container {
    padding: 0 10px;
  }
  
  /* Background Image */
  body {
    background-size: 150% auto;
    background-attachment: scroll; /* Better performance on mobile */
  }
  
  /* Improve scroll performance */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* Extra Small Mobile - up to 375px */
@media (max-width: 375px) {
  .school-info h1 {
    font-size: 16px;
  }
  
  .school-logo,
  .govt-logo {
    width: 50px;
    height: 50px;
  }
  
  .hero-slider {
    min-height: 200px;
  }
  
  .hero-slider .slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
  }
  
  .hero-slider .slider-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
  }
  
  .hero-slider .slider-item img {
    height: 200px;
  }
  
  .link-card .icon-wrap {
    width: 50px;
    height: 50px;
  }
  
  .link-card .icon-wrap i {
    font-size: 24px;
  }
  
  .link-card h4 {
    font-size: 14px;
  }
  
  body {
    background-size: 200% auto;
    background-attachment: scroll; /* Better performance on mobile */
  }
  
  /* Better spacing for extra small screens */
  .container {
    padding: 0 8px;
  }
  
  .main-wrapper {
    padding: 12px 8px;
  }
  
  /* Header adjustments for very small screens */
  .school-logo {
    width: 35px;
    height: 35px;
  }
  
  .govt-logo {
    width: 30px;
    height: 30px;
  }
  
  .school-info h1 {
    font-size: 12px;
  }
  
  .school-info .address {
    font-size: 9px;
  }
  
  /* Mobile menu toggle smaller */
  .mobile-menu-toggle {
    font-size: 14px;
    padding: 10px;
  }
  
  /* Cards even more compact */
  .card {
    padding: 12px;
  }
  
  .card-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
  }
  
  .card-title {
    font-size: 14px;
  }
}

/* ========================================
   MOBILE TOUCH OPTIMIZATION
   ======================================== */

/* Ensure all clickable elements have minimum 44px touch target */
a,
button,
.view-btn,
.more-notice-btn,
.dropdown-toggle,
.mobile-menu-toggle,
.nav-menu > li > a {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Better tap feedback on mobile */
@media (max-width: 991px) {
  a:active,
  button:active,
  .view-btn:active,
  .more-notice-btn:active {
    opacity: 0.7;
    transform: scale(0.98);
  }
}

/* Prevent text selection on buttons/links during tap */
a,
button {
  -webkit-tap-highlight-color: rgba(45, 95, 63, 0.1);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Allow text selection for regular content */
p,
span,
td,
th,
li {
  -webkit-user-select: text;
  user-select: text;
}

/* Improve scrolling performance on mobile */
@media (max-width: 991px) {
  * {
    -webkit-overflow-scrolling: touch;
  }
  
  body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Mobile-specific dropdown improvements */
@media (max-width: 991px) {
  .dropdown-menu {
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      max-height: 0;
    }
    to {
      opacity: 1;
      max-height: 500px;
    }
  }
}

/* Improve image loading on mobile */
@media (max-width: 991px) {
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Better spacing for mobile cards */
@media (max-width: 480px) {
  .notice-section,
  .sidebar-section,
  .link-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
}

/* Mobile landscape orientation optimization */
@media (max-width: 991px) and (orientation: landscape) {
  .header-main .header-content {
    padding: 10px;
  }
  
  .school-info h1 {
    font-size: 16px;
  }
  
  .hero-slider {
    min-height: 250px;
  }
  
  .hero-slider .slider-item img {
    height: 250px;
  }
}

/* Extra small devices (very small phones) */
@media (max-width: 360px) {
  .container {
    padding: 0 5px;
  }
  
  .main-wrapper {
    padding: 10px;
  }
  
  .notice-container {
    padding: 8px 10px;
  }
  
  .school-info h1 {
    font-size: 14px;
  }
  
  .school-info .address {
    font-size: 10px;
  }
  
  .nav-menu > li > a {
    padding: 10px 12px;
    font-size: 12px;
  }
  
  .link-card {
    padding: 10px;
  }
  
  .link-card h4 {
    font-size: 13px;
  }
  
  .link-card li {
    font-size: 11px;
  }
}

