/* Medium Layout: 1280px. */
@media only screen and (min-width: 992px) and (max-width: 1200px) {
 
  
  section .navbar-nav > li > a {
    display: inline-block;
    font-size: 14px;
    color: #000;
    padding: 28px 12px 20px;
  }

  .banner h2 {
    font-size: 32px;
  }

  .banner h3 {
    font-size: 23px;
  }

  .news a.news_bg {
    padding: 10px 10px;
    font-size: 15px;
  }

  .news .news_content a {
    font-size: 15px;
  }

  .welcome_area .welcome_content h2 {
    font-size: 23px;
  }

  .responsive_map {
    width: 293px;
  }
}
/* Tablet Layout: 768px. */
@media only screen and (min-width: 768px) and (max-width: 991px) {
 
  .banner h2 {
    font-size: 30px;
  }

  .banner h3 {
    font-size: 22px;
  }

  .center_menu {
    margin-left: 0px;
  }

  section .navbar-nav > li > a {
    font-size: 12px;
    padding: 28px 8px 20px;
  }

  section .navbar-nav > li > .dropdown-menu a {
    font-size: 12px;
  }

  .news .news_content {
    margin-left: -15px;
  }

  .news a.news_bg {
    padding: 8px 10px;
  }

  .news .news_content a {
    font-size: 13px;
  }

  .welcome_area .welcome_content img {
    height: 170px;
    width: 170px;
  }

  .welcome_area .submenu_one ul li a {
    font-size: 12px;
    padding: 10px 20px;
  }

  .submenu_one ul li a.useful_links {
    font-size: 14px;
  }

  .welcome_area .welcome_content h2 {
    font-size: 20px;
  }

  .welcome_area .welcome_content p {
    font-size: 13px;
  }

  .responsive_map {
    width: 220px;
  }

  .footer_area p {
    font-size: 14px;
  }

  .footer_up_area .location h2, .footer_up_area .quick_navigation_header h2, .footer_contact h2 {
    font-size: 17px;
  }

  .footer_contact i {
    font-size: 20px;
  }

  .footer_contact p {
    font-size: 14px;
  }
}
/* Mobile Layout: 320px. */
@media only screen and (max-width: 767px) {
 
 
  .top-bar {
    display: none;
  }

  .boxed {
    width: 100%;
  }

  section {
    height: 60px; /* Reduced from 80px for more compact design */
    padding: 0;
    margin: 0;
  }

  section .navbar-header .logo {
    width: 150px;
    margin-top: 8px; /* Reduced margin for better alignment */
  }

  section .navbar-header .logo img {
    width: 100%;
  }

  section .navbar-nav {
    width: 100%;
    float: left;
    background: #008080;
    margin-top: 0; /* Remove any extra margin */
  }

  section .navbar-nav {
    margin: 0px;
  }

  section .navbar-nav > li > a {
    padding: 10px 0;
    width: 100%;
  }

  .is-sticky header .navbar-nav > li > a {
    padding: 10px 0;
    width: 100%;
  }

  section .dropdown-menu {
    width: 100%;
    text-align: center;
  }

  /* ===== IMPROVED MOBILE TOGGLE BUTTON ===== */
  .navbar-toggle {
    margin: 0;
    margin-top: 8px; /* Reduced from 17px for better positioning */
    margin-right: 10px; /* Add right margin for better spacing */
    padding: 8px 12px; /* More compact padding */
    border: 2px solid #008080;
    border-radius: 6px;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    min-height: 44px; /* Ensure touch-friendly size */
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .navbar-toggle .icon-bar {
    background-color: #008080;
    width: 22px;
    height: 3px;
    border-radius: 2px;
    margin: 3px 0;
    transition: all 0.3s ease;
  }

  .navbar-default .navbar-toggle:hover, 
  .navbar-default .navbar-toggle:focus {
    background: #008080;
    color: #fff;
    border-color: #008080;
    box-shadow: 0 2px 8px rgba(0, 150, 136, 0.3);
    transform: translateY(-1px);
  }

  .navbar-default .navbar-toggle:hover .icon-bar,
  .navbar-default .navbar-toggle:focus .icon-bar {
    background-color: #ffffff;
  }

  /* Animation for toggle button */
  .navbar-toggle.collapsed .icon-bar:nth-child(2) {
    opacity: 1;
  }

  .navbar-toggle:not(.collapsed) .icon-bar:nth-child(2) {
    opacity: 0;
  }

  .navbar-toggle:not(.collapsed) .icon-bar:nth-child(3) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .navbar-toggle:not(.collapsed) .icon-bar:nth-child(4) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Improved navbar collapse spacing */
  .navbar-collapse {
    border-top: 1px solid #e0e0e0;
    margin-top: 5px;
    padding-top: 10px;
  }

  .navbar-collapse.in,
  .navbar-collapse.collapsing {
    border-top: 1px solid #008080;
  }

  .banner {
    margin-top: 5px;
  }

  .banner img {
    width: 70px;
    height: 70px;
  }

  .banner h2 {
    font-size: 25px;
    line-height: 30px;
    margin-top: 5px;
  }

  .banner h3 {
    font-size: 15px;
    margin-bottom: 2px;
  }

  .banner h3 {
    font-size: 12px;
  }

  .news .news_content {
    margin-left: 0px;
  }

  .news a.news_bg {
    padding: 8px 10px;
  }

  .welcome_area .submenu_one {
    margin-top: 10px;
  }

  .welcome_area .welcome_content h2 {
    font-size: 20px;
    padding: 3px 10px;
  }

  .welcome_area .welcome_content {
    margin-top: 5px;
  }

  .welcome_area .welcome_content p {
    font-size: 12px;
    padding: 0px 10px;
  }

  .welcome_area .welcome_content img {
    margin: 0px;
  }

  .welcome_area .submenu_one ul li a.notice_board, .welcome_area .submenu_one ul li a.admission, .welcome_area .submenu_one ul li a.download, .welcome_area .submenu_one ul li a.useful_links {
    font-size: 14px;
  }

  .welcome_area .submenu_one ul li a {
    font-size: 12px;
    padding: 10px 20px;
  }

  .footer_up_area {
    margin-top: 10px;
    padding-bottom: 0px;
  }

  .footer_up_area .location h2, .footer_up_area .quick_navigation_header h2, .footer_contact h2 {
    font-size: 18px;
    margin: 10px 0px 0px;
    border-bottom: 2px solid #647382;
    padding-bottom: 5px;
  }

  .footer_up_area .quick_navigation_content ul li a {
    font-size: 12px;
  }

  .footer_contact p {
    font-size: 12px;
  }

  .footer_contact ul {
    margin-top: 5px;
  }

  .footer_contact i {
    font-size: 18px;
  }

  .footer_contact p {
    margin-left: 35px;
  }

  .footer_contact ul li {
    margin-top: opx;
  }

  .responsive_map {
    width: 255px;
  }

  .footer_area p {
    font-size: 14px;
  }
}
/* Wide Mobile Layout: 480px. */
@media only screen and (min-width: 480px) and (max-width: 767px) {
    .welcome_area .submenu_one ul.submenu_border li a {text-align: left;}
    .footer_up_area .quick_navigation_content ul li a {text-align: center;}
}

/* ===== COMPREHENSIVE RESPONSIVE FIXES ===== */

/* Global responsive image classes */
.founder-image, .principal-image, .assistant-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.founder-image:hover, .principal-image:hover, .assistant-image:hover {
  transform: scale(1.02);
}

/* Responsive Map Container */
.responsive-map-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.responsive-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* Global Image Responsiveness */
.submenu_one img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Enhanced Mobile Layout: All devices under 768px */
@media only screen and (max-width: 767px) {
  
  /* Container padding */
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  /* Footer columns stack properly */
  .footer_up_area .col-sm-4 {
    margin-bottom: 30px;
  }
  
  /* Location section mobile fixes */
  .footer_up_area .location {
    text-align: center;
  }
  
  .responsive-map-container {
    margin: 15px auto;
    max-width: 100%;
    padding-bottom: 60%; /* Adjust aspect ratio for mobile */
  }
  
  /* Sidebar images responsive */
  .submenu_one li img {
    width: 120px !important;
    height: 120px !important;
    margin: 0 auto;
    display: block;
  }
  
  /* Login form improvements */
  .login_style .form-group {
    margin-bottom: 15px;
  }
  
  .login_style .form-control {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 6px;
  }
  
  .login_style .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 10px;
  }
  
  /* Welcome content improvements */
  .welcome_area .welcome_content {
    padding: 15px;
  }
  
  .welcome_area .welcome_content h2 {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 15px;
  }
  
  .welcome_area .welcome_content p {
    font-size: 14px;
    line-height: 1.6;
    text-align: justify;
  }
  
  /* Sidebar menu improvements */
  .submenu_one {
    margin-bottom: 20px;
    width: 100%;
    overflow: hidden;
  }
  
  .submenu_one ul li a {
    padding: 12px 15px;
    font-size: 14px;
    line-height: 1.4;
    text-align: left !important;
  }
  
  /* Force left alignment for all sidebar menu items */
  .submenu_border li a,
  .welcome_area .submenu_one ul li a,
  .welcome_area .submenu_one ul.submenu_border li a {
    text-align: left !important;
  }
  
  /* Ensure sidebar container doesn't overflow */
  .col-sm-2 {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }
  
  /* Notice board scrolling area - only for specific sections */
  .submenu_border:not(.submenu_one:last-child .submenu_border) {
    max-height: 200px !important;
    overflow-y: auto;
  }
  
  /* Important links section should show all items */
  .submenu_one:last-child .submenu_border {
    max-height: none !important;
    overflow: visible !important;
  }
  
  /* Footer contact section */
  .footer_contact ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
  }
  
  .footer_contact i {
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
  }
  
  .footer_contact p {
    margin: 0;
    line-height: 1.5;
  }
}

/* Extra Small Devices: 320px and below */
@media only screen and (max-width: 480px) {
  
  /* Even more compact navigation for very small screens */
  section {
    height: 50px !important; /* Extra compact for small screens */
  }
  
  .navbar-toggle {
    margin-top: 5px !important;
    padding: 6px 10px !important;
    min-height: 40px !important;
  }
  
  .navbar-toggle .icon-bar {
    width: 20px !important;
    height: 2px !important;
    margin: 2px 0 !important;
  }
  
  section .navbar-header .logo {
    width: 120px !important;
    margin-top: 5px !important;
  }
  
  /* Even more compact spacing */
  .container {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  /* Smaller images for very small screens */
  .submenu_one li img {
    width: 100px !important;
    height: 100px !important;
  }
  
  /* Tighter welcome content */
  .welcome_area .welcome_content {
    padding: 10px;
  }
  
  .welcome_area .welcome_content h2 {
    font-size: 16px;
    padding: 5px;
  }
  
  .welcome_area .welcome_content p {
    font-size: 13px;
    line-height: 1.5;
    padding: 0 5px;
  }
  
  /* More compact footer */
  .footer_up_area .col-sm-4 {
    margin-bottom: 25px;
  }
  
  .footer_up_area .location h2, 
  .footer_up_area .quick_navigation_header h2, 
  .footer_contact h2 {
    font-size: 16px;
  }
  
  /* Smaller map for very small screens */
  .responsive-map-container {
    padding-bottom: 70%;
    margin: 10px auto;
  }
  
  /* Navigation adjustments */
  .submenu_one ul li a {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  /* Login form compact */
  .login_style .form-control {
    padding: 10px;
    font-size: 14px;
  }
  
  .login_style .btn {
    padding: 10px;
    font-size: 14px;
  }
}

/* Landscape Mobile Orientation */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  
  .responsive-map-container {
    padding-bottom: 40%; /* Shorter map in landscape */
  }
  
  .submenu_one li img {
    width: 80px !important;
    height: 80px !important;
  }
  
  .welcome_area .welcome_content h2 {
    font-size: 16px;
  }
}

/* High DPI / Retina Displays */
@media only screen and (-webkit-min-device-pixel-ratio: 2), 
       only screen and (min--moz-device-pixel-ratio: 2), 
       only screen and (-o-min-device-pixel-ratio: 2/1), 
       only screen and (min-device-pixel-ratio: 2), 
       only screen and (min-resolution: 192dpi), 
       only screen and (min-resolution: 2dppx) {
  
  .submenu_one li img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Mobile Login Form Optimization */
@media only screen and (max-width: 767px) {
  
  /* Sidebar container fixes for mobile */
  .col-sm-2 {
    width: 100% !important;
    padding: 0 10px !important;
    margin-bottom: 20px;
  }
  
  /* Sidebar menu items */
  .submenu_one {
    margin-bottom: 15px !important;
    width: 100% !important;
    overflow: visible !important;
  }
  
  .submenu_one ul {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  
  .submenu_one ul li {
    width: 100% !important;
    margin: 0 !important;
  }
  
  .submenu_one ul li a {
    text-align: left !important;
    padding: 10px 15px !important;
    font-size: 13px !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Remove height restrictions on mobile */
  .submenu_border {
    max-height: none !important;
    overflow: visible !important;
  }
  
  /* Force left alignment for all sidebar items on mobile */
  .welcome_area .submenu_one ul.submenu_border li a,
  .submenu_border li a {
    text-align: left !important;
    justify-content: flex-start !important;
  }
  
  /* Make login form more compact on mobile */
  .login_style .form-group {
    margin-bottom: 10px !important;
  }
  
  .login_style .form-control {
    padding: 8px 10px !important;
    font-size: 14px !important;
  }
  
  .login_style label {
    font-size: 13px !important;
    margin-bottom: 3px !important;
  }
  
  .login_btn-bg {
    width: 100% !important;
    margin: 10px 0 0 0 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
  }
  
  /* Make sidebar sections more compact */
  .submenu_one {
    margin-bottom: 15px !important;
  }
  
  .submenu_border {
    padding: 10px !important;
  }
}

@media only screen and (max-width: 480px) {
  
  /* Extra compact for very small screens */
  .login_style .form-control {
    padding: 6px 8px !important;
    font-size: 13px !important;
  }
  
  .login_btn-bg {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }
  
  .submenu_border {
    padding: 8px !important;
  }
}

/* Teacher Cards Layout - All Devices - Compact Version */

/* Welcome content styling */
.welcome_content {
  padding: 10px;
}

.welcome_content h2 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 15px;
  padding: 10px;
  background: linear-gradient(135deg, #12CC88, #0ea5e9);
  color: white;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(18, 204, 136, 0.3);
}

/* Teachers cards container */
.teachers-cards-container {
  display: grid;
  gap: 15px;
  padding: 0 10px;
}

/* Desktop Grid Layout */
@media only screen and (min-width: 992px) {
  .teachers-cards-container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 0 15px;
    gap: 20px;
  }
  
  .welcome_content {
    padding: 15px;
  }
  
  .welcome_content h2 {
    font-size: 22px;
    padding: 12px;
  }
}

/* Tablet Grid Layout */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .teachers-cards-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding: 0 12px;
    gap: 18px;
  }
}

/* Mobile Layout */
@media only screen and (max-width: 767px) {
  .teachers-cards-container {
    grid-template-columns: 1fr;
    padding: 0 8px;
    gap: 12px;
  }
  
  .welcome_content h2 {
    font-size: 16px;
    padding: 8px;
    margin-bottom: 12px;
  }
}

/* Individual teacher card - All devices - Compact */
.teacher-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  padding: 18px;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.teacher-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #12CC88, #0ea5e9);
}

.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Teacher photo container */
.teacher-photo-container {
  text-align: center;
  margin-bottom: 15px;
}

/* Standardized teacher photo - Compact */
.teacher-photo-img {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 3px solid #fff !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
  transition: all 0.3s ease;
}

.teacher-photo-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* No photo placeholder - Compact */
.teacher-no-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
  margin: 0 auto;
  border: 3px solid #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

/* Teacher info section */
.teacher-info-section {
  text-align: center;
}

/* Teacher name - Compact */
.teacher-name-card {
  color: #12CC88 !important;
  font-weight: bold !important;
  font-size: 18px !important;
  margin-bottom: 6px !important;
  text-align: center !important;
  line-height: 1.3;
}

/* Teacher designation - Compact */
.teacher-designation-card {
  color: #666 !important;
  font-style: italic !important;
  margin-bottom: 15px !important;
  text-align: center !important;
  font-size: 13px !important;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
  padding: 6px 12px !important;
  border-radius: 15px !important;
  display: inline-block;
  border: 1px solid #dee2e6;
}

/* Contact info section - Compact */
.teacher-contact-card {
  background: linear-gradient(135deg, #f8f9ff, #fff) !important;
  padding: 12px !important;
  border-radius: 10px !important;
  margin-top: 12px !important;
  text-align: left !important;
  border: 1px solid #e8f0fe;
}

.teacher-contact-card .contact-item {
  margin-bottom: 6px;
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: flex-start;
  padding: 4px 0;
}

.teacher-contact-card .contact-item:last-child {
  margin-bottom: 0;
}

.teacher-contact-card .contact-label {
  font-weight: bold;
  color: #555;
  width: 70px;
  display: block;
  margin-right: 10px;
  font-size: 12px;
  text-align: left;
  flex-shrink: 0;
}

.teacher-contact-card .contact-value {
  color: #333;
  flex: 1;
  word-break: break-word;
  font-size: 13px;
  margin-left: 0;
}

/* No data message styling */
.alert-danger {
  font-size: 14px !important;
  padding: 15px !important;
  margin: 15px 8px !important;
  border-radius: 8px !important;
  text-align: center;
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: none;
}

/* Student Cards Layout - All Devices - Similar to Teacher Cards */

/* Students cards container */
.students-cards-container {
  display: grid;
  gap: 15px;
  padding: 0 10px;
}

/* Desktop Grid Layout for Students */
@media only screen and (min-width: 992px) {
  .students-cards-container {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 0 15px;
    gap: 20px;
  }
}

/* Tablet Grid Layout for Students */
@media only screen and (min-width: 768px) and (max-width: 991px) {
  .students-cards-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding: 0 12px;
    gap: 18px;
  }
}

/* Mobile Layout for Students */
@media only screen and (max-width: 767px) {
  .students-cards-container {
    grid-template-columns: 1fr;
    padding: 0 8px;
    gap: 12px;
  }
}

/* Individual student card - All devices - Consistent design */
.student-card {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
  padding: 18px !important;
  border: 1px solid #f0f0f0 !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 280px !important;
  display: flex !important;
  flex-direction: column !important;
}

.student-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F78022, #ff9f43);
}

.student-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

/* Student photo container - Consistent spacing */
.student-photo-container {
  text-align: center !important;
  margin-bottom: 15px !important;
  min-height: 96px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Standardized student photo - Compact - Consistent circular design */
.student-photo-img {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 3px solid #fff !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
  transition: all 0.3s ease;
  display: block !important;
  margin: 0 auto !important;
}

.student-photo-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
}

/* No photo placeholder - Exact same size and styling as photo */
.student-no-photo {
  width: 90px !important;
  height: 90px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #F78022, #ff9f43) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  font-size: 12px !important;
  font-weight: bold !important;
  margin: 0 auto !important;
  border: 3px solid #fff !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
  transition: all 0.3s ease !important;
}

/* Student info section */
.student-info-section {
  text-align: center;
}

/* Student name - Compact */
.student-name-card {
  color: #F78022 !important;
  font-weight: bold !important;
  font-size: 18px !important;
  margin-bottom: 6px !important;
  text-align: center !important;
  line-height: 1.3;
}

/* Student class - Compact */
.student-class-card {
  color: #666 !important;
  font-style: italic !important;
  margin-bottom: 15px !important;
  text-align: center !important;
  font-size: 13px !important;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
  padding: 6px 12px !important;
  border-radius: 15px !important;
  display: inline-block;
  border: 1px solid #dee2e6;
}

/* Student details section - Compact */
.student-details-card {
  background: linear-gradient(135deg, #fff8f0, #fff) !important;
  padding: 12px !important;
  border-radius: 10px !important;
  margin-top: 12px !important;
  text-align: left !important;
  border: 1px solid #f5e6d3;
}

.student-details-card .detail-item {
  margin-bottom: 6px;
  font-size: 13px;
  color: #333;
  display: flex;
  align-items: center;
  padding: 4px 0;
}

.student-details-card .detail-item:last-child {
  margin-bottom: 0;
}

.student-details-card .detail-label {
  font-weight: bold;
  color: #555;
  width: 60px;
  display: block;
  margin-right: 10px;
  font-size: 12px;
  text-align: left;
  flex-shrink: 0;
}

.student-details-card .detail-value {
  color: #333;
  flex: 1;
  word-break: break-word;
  font-size: 13px;
  margin-left: 0;
}

/* Calendar Responsive Design - Start */
.calender {
    font-size: 12px;
}

/* Calendar wrapper improvements */
.calender-form {
    padding: 0;
}

.calender-form .form-group label {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.calender-form .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.calender-form .form-control:focus {
    border-color: #12CC88;
    box-shadow: 0 0 0 0.2rem rgba(18, 204, 136, 0.25);
}

@media (max-width: 768px) {
    /* Calendar form responsive layout */
    .calender-add .col-md-2,
    .calender-add .col-md-10 {
        width: 100%;
        padding: 0 15px;
    }
    
    .calender-add .profile_content {
        margin: 0;
        padding: 15px;
    }
    
    .calender-add .form-group {
        margin-bottom: 20px;
    }
    
    .calender-add input[type="date"],
    .calender-add input[type="text"],
    .calender-add textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px;
        border-radius: 5px;
    }
    
    .calender-add .btn {
        padding: 10px 20px;
        margin: 5px;
        min-width: 100px;
    }
    
    /* Calendar table responsive */
    .table.calender {
        font-size: 10px;
        min-width: 100%;
        table-layout: fixed;
        margin-bottom: 20px;
    }
    
    .table.calender td {
        padding: 5px 2px;
        vertical-align: middle;
        text-align: center;
        width: 14.28%; /* 7 columns equal width */
        height: 40px;
        border: 1px solid #ddd;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .table.calender td:hover {
        background-color: #f0f8ff !important;
        border-color: #007bff;
    }
    
    .table.calender td#vacation {
        background-color: #f8d7da !important;
        color: #721c24 !important;
        font-weight: bold;
    }
    
    .table.calender td#normal {
        background-color: #d4edda !important;
        color: #155724 !important;
    }
    
    .table.calender th {
        background-color: #EFEFEF !important;
        font-weight: bold;
        text-align: center;
        padding: 8px 4px;
        border: 1px solid #ddd;
    }
    
    /* Holiday list table responsive */
    .table-bordered {
        font-size: 12px;
    }
    
    .table-bordered th,
    .table-bordered td {
        padding: 8px 4px;
        word-wrap: break-word;
    }
    
    .table-bordered th:first-child,
    .table-bordered td:first-child {
        width: 40px; /* Serial number column */
    }
    
    .table-bordered th:nth-child(2),
    .table-bordered td:nth-child(2) {
        width: 80px; /* Date column */
    }
    
    .table-bordered th:last-child,
    .table-bordered td:last-child {
        width: 70px; /* Delete button column */
    }
    
    .table-bordered .btn-danger {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    /* Calendar navigation buttons */
    .text-center .col-md-2 {
        width: 50%;
        float: left;
        padding: 5px;
    }
    
    .text-center .col-md-8 {
        display: none; /* Hide empty space on mobile */
    }
    
    /* Calendar header styling */
    .welcome_content h2 {
        font-size: 18px;
        margin-bottom: 15px;
        text-align: center;
    }
    
    /* Calendar page specific layout */
    .calender-page .col-sm-7 {
        width: 100%;
        padding: 0 15px;
    }
    
    .calender-page .welcome_content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .table.calender {
        font-size: 9px;
    }
    
    .table.calender td {
        height: 35px;
        padding: 3px 1px;
    }
    
    .table-bordered {
        font-size: 11px;
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table-bordered th,
    .table-bordered td {
        padding: 6px 3px;
        white-space: normal;
    }
    
    /* Make holiday list table more readable on mobile */
    .table-bordered th:nth-child(3),
    .table-bordered td:nth-child(3) {
        max-width: 150px;
        word-wrap: break-word;
        white-space: normal;
    }
    
    .calender-add .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .calender-add .form-group.text-center {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    /* Calendar navigation improvements for small screens */
    .text-center .col-md-2 {
        width: 50%;
        margin-bottom: 10px;
    }
    
    .text-center .col-md-2 form {
        margin: 0;
    }
    
    .text-center .col-md-2 .btn {
        width: 100%;
        font-size: 12px;
        padding: 8px;
    }
}
    /* Better table responsiveness for mobile */
    .table-responsive {
        border: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive .table {
        margin-bottom: 0;
    }
    
    /* Calendar form enhancements for mobile */
    .calender-form .alert {
        border-radius: 6px;
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .calender-form .btn-primary {
        background: linear-gradient(135deg, #12CC88, #0ea5e9);
        border: none;
        padding: 10px 20px;
        border-radius: 6px;
        transition: transform 0.2s ease;
    }
    
    .calender-form .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(18, 204, 136, 0.3);
    }
    
    .calender-form .btn-secondary {
        background: #6c757d;
        border: none;
        padding: 10px 20px;
        border-radius: 6px;
    }
/* Calendar Responsive Design - End */

/* Sidebar Header Text Centering - Both Left and Right */
.submenu_one ul li a.admission,
.submenu_one ul li a.notice_board,
.submenu_one ul li a.download,
.submenu_one ul li a.useful_links,
.welcome_area .submenu_one ul li a.admission,
.welcome_area .submenu_one ul li a.notice_board,
.welcome_area .submenu_one ul li a.download,
.welcome_area .submenu_one ul li a.useful_links {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    padding: 12px 10px !important;
    font-weight: bold !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Override any conflicting styles from submenu_border */
.submenu_one > ul:not(.submenu_border) > li > a.admission,
.submenu_one > ul:not(.submenu_border) > li > a.notice_board,
.submenu_one > ul:not(.submenu_border) > li > a.download,
.submenu_one > ul:not(.submenu_border) > li > a.useful_links {
    text-align: center !important;
    padding-left: 0 !important;
}

/* Center person names in sidebar on mobile */
@media only screen and (max-width: 767px) {
    .head_speech {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    
    .head_speech a {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        padding: 8px 10px !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        justify-content: center !important;
        align-items: center !important;
        line-height: 1.4 !important;
    }
    
    .head_speech a b {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    /* Override any left alignment from other styles */
    .submenu_one ul li.head_speech a {
        text-align: center !important;
        padding-left: 0 !important;
    }
    
    .submenu_one #sidebar-list li.head_speech a {
        text-align: center !important;
        padding-left: 0 !important;
    }
}

@media only screen and (max-width: 480px) {
    .head_speech,
    .head_speech a,
    .head_speech a b {
        text-align: center !important;
        padding: 6px 8px !important;
        font-size: 13px !important;
    }
    
    .submenu_one ul li.head_speech a {
        text-align: center !important;
        padding-left: 0 !important;
        font-size: 12px !important;
    }
}

/* Global rule to ensure person names are always centered */
.col-sm-3 .submenu_one #sidebar-list .head_speech a,
.col-sm-3 .submenu_one ul .head_speech a {
    text-align: center !important;
}

/* Comprehensive mobile centering for person names */
@media only screen and (max-width: 767px) {
    /* Force center alignment for all name elements - Override inline styles */
    .col-sm-3 .submenu_one #sidebar-list .head_speech,
    .col-sm-3 .submenu_one ul .head_speech,
    .col-sm-3 .submenu_one #sidebar-list .head_speech a,
    .col-sm-3 .submenu_one ul .head_speech a,
    .col-sm-3 .submenu_one #sidebar-list .head_speech a b,
    .col-sm-3 .submenu_one ul .head_speech a b,
    .col-sm-3 .submenu_one #sidebar-list .head_speech a[style],
    .col-sm-3 .submenu_one ul .head_speech a[style] {
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: block !important;
        width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure the container itself is centered */
    li.head_speech {
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* Remove any flex properties that might interfere */
    .head_speech a {
        display: block !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Specific override for right sidebar images and names */
    .col-sm-3 .submenu_one ul li[style*="text-align"],
    .col-sm-3 .submenu_one #sidebar-list li[style*="text-align"] {
        text-align: center !important;
    }
}

/* Ensure consistent styling across all devices */
@media only screen and (max-width: 767px) {
    .submenu_one ul li a.admission,
    .submenu_one ul li a.notice_board,
    .submenu_one ul li a.download,
    .submenu_one ul li a.useful_links,
    .welcome_area .submenu_one ul li a.admission,
    .welcome_area .submenu_one ul li a.notice_board,
    .welcome_area .submenu_one ul li a.download,
    .welcome_area .submenu_one ul li a.useful_links {
        text-align: center !important;
        font-size: 14px !important;
        padding: 10px 8px !important;
    }
}

@media only screen and (max-width: 480px) {
    .submenu_one ul li a.admission,
    .submenu_one ul li a.notice_board,
    .submenu_one ul li a.download,
    .submenu_one ul li a.useful_links,
    .welcome_area .submenu_one ul li a.admission,
    .welcome_area .submenu_one ul li a.notice_board,
    .welcome_area .submenu_one ul li a.download,
    .welcome_area .submenu_one ul li a.useful_links {
        text-align: center !important;
        font-size: 13px !important;
        padding: 8px 6px !important;
    }
}

/* ============================================
   COMPACT TEACHER CARD DESIGN - Horizontal Layout
   ============================================ */

/* Compact Card - Horizontal layout with photo on left */
.teacher-card-compact {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.teacher-card-compact:hover {
    border-color: #12CC88;
    box-shadow: 0 4px 12px rgba(18, 204, 136, 0.15);
    transform: translateY(-2px);
}

/* Photo section on the left - Compact */
.teacher-photo-compact {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.teacher-photo-img-compact {
    width: 80px !important;
    height: 80px !important;
    border-radius: 6px !important;
    object-fit: cover !important;
    border: 2px solid #e8e8e8 !important;
    display: block;
}

.teacher-no-photo-compact {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border: 2px solid #e8e8e8;
    text-align: center;
}

/* Info section on the right */
.teacher-info-compact {
    flex: 1;
    min-width: 0;
}

.teacher-name-compact {
    font-size: 16px;
    font-weight: bold;
    color: #12CC88;
    margin-bottom: 4px;
    line-height: 1.3;
}

.teacher-detail-compact {
    font-size: 13px;
    color: #555;
    margin-bottom: 3px;
    line-height: 1.4;
    word-wrap: break-word;
}

.teacher-detail-compact:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments for compact cards */
@media only screen and (max-width: 767px) {
    .teacher-card-compact {
        padding: 10px;
        gap: 12px;
    }
    
    .teacher-photo-compact {
        width: 70px;
        height: 70px;
    }
    
    .teacher-photo-img-compact {
        width: 70px !important;
        height: 70px !important;
    }
    
    .teacher-no-photo-compact {
        width: 70px;
        height: 70px;
        font-size: 10px;
    }
    
    .teacher-name-compact {
        font-size: 14px;
    }
    
    .teacher-detail-compact {
        font-size: 12px;
    }
}

@media only screen and (max-width: 480px) {
    .teacher-card-compact {
        padding: 8px;
        gap: 10px;
    }
    
    .teacher-photo-compact {
        width: 60px;
        height: 60px;
    }
    
    .teacher-photo-img-compact {
        width: 60px !important;
        height: 60px !important;
    }
    
    .teacher-no-photo-compact {
        width: 60px;
        height: 60px;
        font-size: 9px;
    }
    
    .teacher-name-compact {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .teacher-detail-compact {
        font-size: 11px;
        margin-bottom: 2px;
    }
}
