/* Mobile: match desktop notice board layout, just smaller */
@media (max-width: 600px) {
  .notice-item {
    font-size: 1rem;
    padding: 1.1rem 0.7rem 1.5rem 0.7rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 1.2rem;
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    background: #fff;
    overflow: visible !important;
    min-height: unset !important;
    z-index: auto !important;
  }
  .notice-item.expanded {
    overflow: visible !important;
    min-height: unset !important;
    z-index: auto !important;
  }
  .notice-item .main-notice-pin {
    position: static !important;
    margin: 0 auto 0.5rem auto;
    display: block;
    left: unset;
    top: unset;
    transform: none;
    z-index: 1;
  }
  .notice-badge {
    margin: 0 auto 0.5rem auto;
    display: block;
    font-size: 0.95rem;
    position: static;
    z-index: 1;
    width: fit-content;
  }
  .notice-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: stretch;
    width: 100%;
  }
  .main-notice-title {
    font-size: 1.08rem;
    margin-bottom: 0.2rem;
    word-break: break-word;
    text-align: left;
    font-weight: 600;
  }
  .notice-meta {
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: left;
  }
  .main-notice-description {
    font-size: 0.98rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
    text-align: left;
  }
  .main-notice-action {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
    margin-bottom: 0.1rem;
    width: 100%;
  }
  .main-notice-read-more-btn,
  .main-notice-read-less-btn {
    font-size: 0.92rem;
    padding: 0.18rem 0.7rem;
    min-width: unset;
    min-height: unset;
    line-height: 1.2;
    border-radius: 6px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #f5f5fa;
    border: 1px solid #e0e0f0;
    color: #4b3ca7;
    box-shadow: none;
    font-weight: 500;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }
  /* Remove any absolute positioning for pin on mobile */
  .notice-item .main-notice-pin,
  .main-notice-pin-inner {
    position: static !important;
    left: unset !important;
    top: unset !important;
    transform: none !important;
  }
}
/* Notice board pin: yellow center with red border/shadow (matches sample image 2) */
/* Main notice board pin (matches panel pin, but separate class) */
.notice-item.main-board-pin::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  background: #7c3aed; /* purple fill */
  border-radius: 50%;
  box-shadow: 0 2px 8px 0 rgba(124,58,237,0.18), 0 0 0 4px #fff;
  z-index: 2;
}
.notice-item.main-board-pin::after {
  content: '';
  position: absolute;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  z-index: 3;

}

/* Main Notice Board Pin (matches notice panel pin, unique class) */
.main-notice-pin {
  position: absolute;
  left: 18px;
  top: 10px;
  width: 22px;
  height: 22px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.main-notice-pin-inner {
  width: 14px;
  height: 14px;
  background: #e74c3c;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), 0 0 0 2px #fff inset;
  border: 2px solid #fff;
  position: relative;
}
.main-notice-pin-inner::after {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 10px;
  background: #b03a2e;
  border-radius: 1px;
  transform: translateX(-50%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.notice-item .main-notice-pin {
  /* Ensure pin is above badge and content */
  pointer-events: none;
}
.notice-item {
  position: relative;
}
/* Notice badge category colors (match admin panel) */
.notice-badge-urgent {
  background: #e53935 !important; /* Red for urgent */
  color: #fff !important;
}
.notice-badge-academic {
  background: #1976d2 !important; /* Blue for academic */
  color: #fff !important;
}
.notice-badge-events {
  background: #43a047 !important; /* Green for events */
  color: #fff !important;
}
/* General badge color - match admin panel */
/* General badge color - match admin panel (purple) */
/* General badge color - match admin panel (gradient purple) */
.notice-badge-general {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%) !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
/* Notice badge category colors (match admin panel) */
.notice-badge-urgent {
  background: #e53935; /* Red for urgent */
  color: #fff;
}
.notice-badge-academic {
  background: #1976d2; /* Blue for academic */
  color: #fff;
}
.notice-badge-events {
  background: #43a047; /* Green for events */
  color: #fff;
}
/* General badge color - match admin panel */
/* Modern CSS Variables - Admin Panel */
:root {
  /* Color Palette (Admin Panel Style) */
  --primary-color: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #e0e7ff;
  --secondary-color: #059669;
  --success-color: #10b981;
  --danger-color: #dc2626;
  --warning-color: #d97706;
  --background: #ffffff;
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --header-height: 70px;
  --transition: all 0.2s ease;
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --gradient-secondary: linear-gradient(135deg, #059669 0%, #047857 100%);
  --gradient-accent: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* SEO-optimized Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Breadcrumbs for SEO navigation */
.breadcrumbs {
  position: sticky;
  top: calc(var(--header-height, 80px) + 50px); /* Position below header + notice ticker */
  z-index: 998; /* Below notice ticker */
  background: #ffffff;
  padding: 0.8rem 0 0 0;
  border-bottom: 1px solid #f1f5f9;
  border-top: 1px solid #f8fafc;
  font-size: 0.875rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  max-width: 1200px;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  margin: 0 0.5rem;
  color: var(--text-muted);
  font-weight: normal;
}

.breadcrumbs a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.breadcrumbs a:hover {
  color: var(--primary-dark);
  background: var(--primary-light);
  text-decoration: none;
}

.breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 600;
  background: var(--border-light);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* Hero Section Optimization */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Default background overlay for when no custom image is set */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../assets/school.jpg') center/cover;
  opacity: 0.1;
  z-index: 1;
  transition: all 0.3s ease;
}

/* When custom hero image is uploaded, apply theme-based filters */
.hero.has-custom-image {
  background: none; /* Remove gradient */
}

.hero.has-custom-image::before {
  background: var(--hero-bg-image, url('../assets/school.jpg')) center/cover;
  opacity: 0.7;
  /* No filters for clean, natural appearance */
}

/* Add a subtle overlay for text readability when custom image is used */
.hero.has-custom-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg, 
    rgba(0, 0, 0, 0.4) 0%, 
    rgba(0, 0, 0, 0.3) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  line-height: 1.6;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
  color: #ffffff;
  font-style: normal; /* Ensure no italics */
  font-weight: 400; /* Clean, readable weight */
}

/* Loading state for hero content */
.hero-loading {
  opacity: 0.6;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
}

/* Beautiful Skeleton Loader for Hero */
.hero-skeleton {
  text-align: center;
  animation: fadeIn 0.3s ease-in;
}

/* Force hide actual content initially */
.hero-actual-content {
  display: none;
  opacity: 0;
  transition: all 0.3s ease-out;
}

.hero-actual-content.loaded {
  display: block !important;
  opacity: 1 !important;
}

.skeleton-title {
  height: 4rem;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.1) 25%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0.1) 75%);
  background-size: 200% 100%;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.skeleton-subtitle {
  height: 2.5rem;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.1) 25%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0.1) 75%);
  background-size: 200% 100%;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 3px 15px rgba(255, 255, 255, 0.08);
}

.skeleton-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.skeleton-button {
  height: 3.5rem;
  width: 180px;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.15) 25%, 
    rgba(255, 255, 255, 0.35) 50%, 
    rgba(255, 255, 255, 0.15) 75%);
  background-size: 200% 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Faster, more responsive skeleton animations */
.skeleton-title {
  animation: shimmer 1s infinite;
}

.skeleton-subtitle {
  animation: shimmer 1s infinite 0.1s;
}

.skeleton-button {
  animation: shimmer 1s infinite 0.2s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-actual-content.loaded {
  display: block !important;
  opacity: 1 !important;
}

@keyframes slideInFromBelow {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skeleton loader transitions */
.hero-skeleton {
  transition: all 0.3s ease-out;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  align-items: center;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  min-width: 180px;
  text-align: center;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button.primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border-color: #4f46e5;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.cta-button.primary:hover {
  background: linear-gradient(135deg, #3730a3 0%, #6b21a8 100%);
  color: white;
  border-color: #3730a3;
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(79, 70, 229, 0.5);
}

.cta-button.secondary {
  background: rgba(255, 255, 255, 0.95);
  color: #4f46e5;
  border-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  text-shadow: none;
}

.cta-button.secondary:hover {
  background: white;
  color: #3730a3;
  border-color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

/* Footer Styling for SEO */
footer {
  background: var(--text-primary);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.footer-section p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.footer-section address {
  font-style: normal;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

.footer-section address a {
  color: var(--primary-light);
  text-decoration: none;
}

.footer-section address a:hover {
  text-decoration: underline;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: white;
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
  color: var(--primary-light);
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  .cta-button {
    width: 100%;
    max-width: 280px;
    padding: 1rem 2rem;
    font-size: 1rem;
    min-width: auto;
  }
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Accessibility Improvements */
/* Focus indicators - optimized for nav links */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Enhanced focus for nav links to prevent white flash */
.nav-link:focus:not(:active) {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

/* Body styling */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* Improved text rendering for better readability */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --border: #000000;
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.5);
  }
}

/* Support for users who prefer dark color schemes */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #fefefe;
    --surface: #fdfdfd;
    --text-primary: #0f172a;
    --border: #cbd5e1;
  }
  
  header {
    background: rgba(254, 254, 254, 0.98);
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
  cursor: wait;
}

/* Print styles */
@media print {
  .hamburger,
  .hero,
  footer {
    display: none !important;
  }
  
  .section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  
  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}

html {
  scroll-behavior: smooth;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Main container for all sections */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

/* Modern Header Styles */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  flex-wrap: nowrap;
  overflow: visible;
  gap: 1rem; /* Reduced from 2rem to 1rem for tighter spacing */
  min-height: 80px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  min-width: 0;
  max-width: 400px;
  overflow: hidden;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.logo-text .school-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(79, 70, 229, 0.1);
}

.logo-text .school-tagline {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
  font-weight: 500;
  font-style: normal; /* Clean, non-italic styling */
}

/* Modern Navigation */
.main-nav {
  display: flex;
  flex-shrink: 1;
  min-width: 0;
  overflow: visible;
  margin-right: 0;
  position: relative;
  flex: 1 1 auto;
  justify-content: flex-start;
  z-index: 10;
  padding-left: 3rem; /* Added padding for better spacing */
  margin-left: 0rem; /* Reduced from 1rem to 0.5rem for tighter spacing */
}

/* Enhanced Navigation scroll indicators with context awareness */
.main-nav::before,
.main-nav::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.main-nav::before {
  left: -5px;
  background: linear-gradient(to right, rgba(254, 254, 254, 0.95), transparent);
  border-radius: 0 8px 8px 0;
}

.main-nav::after {
  right: -5px;
  background: linear-gradient(to left, rgba(254, 254, 254, 0.95), transparent);
  border-radius: 8px 0 0 8px;
}

.main-nav.scrollable-left::before {
  opacity: 1;
}

.main-nav.scrollable-right::after {
  opacity: 1;
}

/* Ensure navigation is visible on desktop */
@media (min-width: 901px) {
  .main-nav {
    display: flex !important;
  }
  
  .hamburger {
    display: none !important;
  }
}

/* Extra small desktop screens - further compact navigation */
@media (max-width: 1000px) and (min-width: 901px) {
  .header-container {
    gap: 0.75rem; /* Further reduced for smaller screens */
  }
  
  .nav-menu {
    gap: 0.3rem;
    padding: 0.4rem;
  }
  
  .nav-link {
    padding: 0.2rem 0.3rem;
    font-size: 0.65rem;
    margin: 0 1px;
  }
  
  .nav-link.active {
    margin: 0 1px;
  }
  
  .logo-section {
    max-width: 250px;
  }
  
  .logo-text .school-name {
    font-size: 1.2rem;
  }
  
  .logo-text .school-tagline {
    font-size: 0.65rem;
  }
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.75rem;
  margin: 0;
  padding: 0.5rem;
  flex-wrap: nowrap;
  justify-content: flex-start;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  min-width: 0;
  flex-shrink: 1;
  /* Enhanced scrolling animations */
  scroll-snap-type: x proximity;
  transition: all 0.3s ease;
  /* Ensure proper padding from logo and right side */
  padding-left: calc(50px + 1rem);
  padding-right: 2rem;
  margin-left: -50px;
}

/* Hide scrollbar for webkit browsers */
.nav-menu::-webkit-scrollbar {
  display: none;
}

/* Enhanced active navigation link styling */
.nav-link.active {
  color: var(--primary-color);
  background: var(--primary-light);
  border-radius: var(--border-radius);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
  position: relative;
  margin: 0 2px;
  /* Enhanced visual feedback for auto-scrolling */
  animation: activeNavPulse 0.6s ease-out;
}

@keyframes activeNavPulse {
  0% {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
  }
  50% {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
  }
  100% {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
  }
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

/* Ensure nav menu is visible on desktop */
@media (min-width: 901px) {
  .nav-menu {
    display: flex !important;
  }
}

.nav-link {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-margin-left: 20px;
  scroll-margin-right: 20px;
  margin: 0 2px;
  /* Enhanced scroll snapping */
  scroll-snap-align: center;
  background: transparent;
  border: 1px solid transparent;
}

/* Special styling for Home link to ensure visibility */
.nav-link[href="#hero"] {
  position: relative;
  margin-left: 0;
  scroll-snap-align: start;
  scroll-margin-left: 0;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: translateY(-1px);
  border: 1px solid #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.nav-link:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  margin: 0 2px;
}

/* Smooth focus transition - removed to prevent conflicts with global focus */
.nav-link:focus:not(:active) {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary-color);
}

/* Active state (when clicked) for better readability */
.nav-link:active {
  color: #ffffff;
  background: linear-gradient(135deg, #3730a3 0%, #5b21b6 100%);
  transform: translateY(0);
  border: 1px solid #3730a3;
  box-shadow: 0 2px 8px rgba(55, 48, 163, 0.3);
  transition: all 0.1s ease;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  min-width: 50px;
}

/* Modern Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  gap: 4px;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.hamburger:hover {
  background: var(--primary-light);
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
  display: block;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 1);
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  background-size: 100px 100px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 1000px;
  padding: 2rem;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-highlight {
  display: block;
  background: linear-gradient(45deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-arrow {
  color: white;
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Modern Button Styles */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.btn-modern.primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-modern.secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Modern Section Styles */
.modern-section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* About Section */
.about-content {
  max-width: 1200px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.about-story h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.about-story p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.about-features {
  display: grid;
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  gap: 1.25rem;
  padding: 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #f8fafc;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.1);
  border-color: #e0e7ff;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.feature-content h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.feature-content p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Leadership Section */
.about-leadership h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.leader-card {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.leader-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.leader-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.leader-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.leader-info h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.leader-role {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.leader-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.about-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Academics Section */
.academics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.academics-programs h3,
.academics-facilities h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.program-levels {
  display: grid;
  gap: 1.5rem;
}

.program-card {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.program-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.program-icon {
  font-size: 2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.program-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.program-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.facilities-grid {
  display: grid;
  gap: 1.5rem;
}

.facility-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.facility-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.facility-icon {
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.facility-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.facility-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.academic-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.highlight-card {
  text-align: center;
  padding: 2rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.highlight-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.highlight-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Glass Morphism */
.glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-xl);
}

/* Modern Section Styles - Clean & Professional */
.section {
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  padding: 3.5rem 3rem;
  margin: 3rem auto;
  max-width: 1200px;
  overflow: hidden;
  transition: all 0.3s ease;
  /* Improved text spacing for better readability */
  line-height: 1.7;
  letter-spacing: 0.01em;
  position: relative;
}

.section:hover {
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.08);
  transform: translateY(-4px);
}

.section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  text-align: center;
  position: relative;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 4px;
}

.section p {
  color: #64748b;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  text-align: left;
}

.section ul {
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.section ul:not(.faculty-list):not(.notices-list):not(.testimonial-list):not(.faq-list) li {
  margin: 1rem 0;
  color: #1e293b;
  line-height: 1.7;
  position: relative;
  padding-left: 2rem;
  font-size: 1.05rem;
}

.section ul:not(.faculty-list):not(.notices-list):not(.testimonial-list):not(.faq-list) li::before {
  content: '✓';
  color: white;
  background: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Button Styles */
.buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.buttons a {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.buttons a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.buttons a:nth-child(2) {
  background: var(--gradient-secondary);
}

/* CTA Button */
.cta-wrapper {
  text-align: center;
  margin-top: 2rem;
}

.cta-button {
  background: var(--gradient-primary);
  color: white;
  padding: 1.25rem 2.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* Modern About Section Styles */
.section#about {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.section#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23e2e8f0" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23cbd5e1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.5;
  pointer-events: none;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.about-header {
  text-align: center;
  margin-bottom: 4rem;
}

.about-header h2 {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.about-intro {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* About main content wrapper for better organization */
.about-main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

/* Leadership Section */
.leadership-section h3,
.highlights-section h3 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

.leadership-section h3::after,
.highlights-section h3::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.profile-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.profile-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.profile-image {
  text-align: center;
  margin-bottom: 1.5rem;
}

.profile-image img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-light);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
  transition: all 0.3s ease;
}

.profile-card:hover .profile-image img {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.3);
}

.profile-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.profile-info h4 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

.profile-info .position {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
  background: var(--gradient-primary);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin: 0;
  line-height: 1;
}

.profile-info .description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0.5rem 0 0 0;
  text-align: center;
}

/* Highlights Section */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.highlight-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  position: relative;
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.highlight-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.highlight-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.highlight-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Call to Action */
.about-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-width: 160px;
}

.cta-button.primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.cta-button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
}

.cta-button.secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button.secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* Mobile Responsive for About Section */
@media (max-width: 768px) {
  .section#about {
    padding: 2.5rem 0;
  }
  
  .about-container {
    padding: 0 1rem;
  }
  
  .about-header h2 {
    font-size: 2.2rem;
  }
  
  .about-intro {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .about-content {
    gap: 2.5rem;
  }
  
  .about-main-content {
    gap: 2.5rem;
  }
  
  .leadership-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-width: none;
  }
  
  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    max-width: none;
  }
  
  .profile-card {
    padding: 1.5rem;
  }
  
  .profile-image img {
    width: 80px;
    height: 80px;
  }
  
  .profile-info h4 {
    font-size: 1.2rem;
  }
  
  .profile-info .description {
    font-size: 0.85rem;
  }
  
  .highlight-card {
    padding: 1.2rem;
  }
  
  .highlight-icon {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }
  
  .highlight-card h4 {
    font-size: 1rem;
  }
  
  .highlight-card p {
    font-size: 0.8rem;
  }
  
  .about-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  }
  
  .cta-button {
    width: 100%;
    max-width: 280px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .leadership-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
  }
  
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
  }
}

@media (min-width: 1025px) {
  .about-main-content {
    gap: 2.5rem;
  }
  
  .leadership-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .highlights-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .about-header h2 {
    font-size: 2rem;
  }
  
  .about-intro {
    font-size: 1rem;
  }
  
  .profile-image img {
    width: 100px;
    height: 100px;
  }
  
  .highlight-icon {
    font-size: 2.5rem;
  }
}

/* Modern Button Styles - Admin Panel Theme */
.buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.buttons a, .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.buttons a:hover, .btn:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

/* Modern Faculty Styles */
.faculty-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.faculty-member {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition);
  position: relative;
}

.faculty-member:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.faculty-photo {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px !important;
  min-height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--primary-color);
  float: none;
  margin-right: 0;
  display: block;
  flex-shrink: 0;
}

/* Specific handling for SVG faculty photos */
.faculty-photo[src$=".svg"] {
  object-fit: fill !important;
  background: transparent;
}

/* Default profile icon - only shows when image is broken/missing */
.faculty-photo.error {
  background: #e0e7ff !important;
  color: transparent; /* Hide the broken image */
  position: relative;
  overflow: hidden;
}

.faculty-photo.error::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #e0e7ff;
  z-index: 1;
}

.faculty-photo.error::after {
  content: '👤';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #4f46e5;
  font-size: 2.5rem;
  z-index: 2;
  opacity: 1;
  transition: none; /* Remove transition to prevent flickering */
}

.faculty-info h3 {
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
}

.faculty-info p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Notice Filters */
.notice-filters {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border: 2px solid var(--border);
  padding: 1rem 1.8rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.filter-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.filter-btn i {
  font-size: 1.1rem;
}

/* Notice Board List - Real Paper Style */
.notices-list {
  list-style: none;
  padding: 3rem 2rem 2rem 2rem;
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  position: relative;
  background: transparent;
  border-radius: 8px;
}

/* Events Section with Modern Board Background */
.section#events {
  background: 
    /* Modern gradient matching site theme */
    linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 
    0 4px 16px rgba(79, 70, 229, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.section#events::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Subtle grid pattern matching site theme */
    linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
    /* Subtle noise texture */
    radial-gradient(circle at 30% 40%, rgba(79, 70, 229, 0.02) 1px, transparent 1px),
    radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.02) 1px, transparent 1px);
  background-size: 20px 20px, 20px 20px, 30px 30px, 25px 25px;
  pointer-events: none;
  z-index: 0;
}

.section#events h2,
.section#events .notice-filters,
.section#events .notices-list,
.section#events .notice-actions {
  position: relative;
  z-index: 1;
}

.notice-item {
  width: 100%;
  /* max-width: 320px; */
  /* height: 280px; */
  position: relative;
  cursor: pointer;
  margin: 0 auto;
  background: #fefefe;
  border: 1px solid #d1d5db;
  box-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.12),
    0 1px 4px rgba(0, 0, 0, 0.08);
  overflow: visible !important;
  z-index: 2;
  transform: rotate(-2deg);
  transition: transform 0.15s ease;
  will-change: transform;
  backface-visibility: hidden;
  transition: box-shadow 0.3s, border 0.3s, background 0.3s, transform 0.3s, z-index 0.3s;
}

/* Beautify and grow only the expanded card */

/* Beautify only the Read more / Read less buttons for main notice board */
.main-notice-action {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.7rem;
}


/* Theme-blending Read more/less buttons for main notice board */
.main-notice-read-more-btn,
.main-notice-read-less-btn {
  background: #f3f4f6;
  color: #3730a3;
  border: 1.2px solid #e0e7ff;
  border-radius: 18px;
  padding: 0.22rem 0.7rem 0.22rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 400;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(55,48,163,0.07);
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s, transform 0.13s;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  outline: none;
}

.main-notice-read-more-btn:hover,
.main-notice-read-less-btn:hover {
  background: #e0e7ff;
  color: #312e81;
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(55,48,163,0.13);
  transform: translateY(-1px) scale(1.03);
}

.main-notice-read-more-btn svg,
.main-notice-read-less-btn svg {
  margin-left: 0.3rem;
  vertical-align: middle;
  fill: currentColor;
}

.notice-item:nth-child(2n) {
  transform: rotate(1.5deg);
}

.notice-item:nth-child(3n) {
  transform: rotate(-1deg);
}

.notice-item:nth-child(4n) {
  transform: rotate(2.5deg);
}

.notice-item:nth-child(5n) {
  transform: rotate(-3deg);
}

.notice-item:nth-child(6n) {
  transform: rotate(1deg);
}

.notice-item:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

/* Modern Pushpins - Theme Colors with Natural Positioning */
.notice-item::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: #4f46e5;
  border-radius: 50%;
  box-shadow: 
    0 2px 4px rgba(79, 70, 229, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
  z-index: 3;
  border: 1px solid #3730a3;
}

/* Slightly offset pushpins for more natural look */
.notice-item:nth-child(2n)::after {
  background: #7c3aed;
  border-color: #5b21b6;
  left: 48%;
  box-shadow: 
    0 2px 4px rgba(124, 58, 237, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.notice-item:nth-child(3n)::after {
  background: #059669;
  border-color: #047857;
  left: 52%;
  box-shadow: 
    0 2px 4px rgba(5, 150, 105, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.notice-item:nth-child(4n)::after {
  background: #dc2626;
  border-color: #991b1b;
  left: 49%;
  box-shadow: 
    0 2px 4px rgba(220, 38, 38, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.notice-item:nth-child(5n)::after {
  left: 53%;
}

.notice-item:nth-child(6n)::after {
  left: 47%;
}

/* Paper texture with notebook lines for realistic look */
.notice-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    /* Horizontal lines like notebook paper */
    repeating-linear-gradient(
      transparent,
      transparent 19px,
      rgba(79, 70, 229, 0.12) 20px,
      rgba(79, 70, 229, 0.12) 21px
    ),
    /* Left margin line */
    linear-gradient(
      90deg,
      transparent 39px,
      rgba(220, 38, 38, 0.15) 40px,
      rgba(220, 38, 38, 0.15) 41px,
      transparent 42px
    ),
    /* Paper texture */
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.02) 0%, transparent 40%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  pointer-events: none;
  z-index: 1;
}

.notice-item.hidden {
  display: none;
}

/* Realistic Push Pins - Removed for cleaner look */

/* Push pins for notice panel items */
.notice-item-panel {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  cursor: default;
  overflow: visible;
  word-wrap: break-word;
  box-sizing: border-box;
  width: 100%;
}

.notice-item-panel.expanded {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.98);
  z-index: 10;
  cursor: default;
  pointer-events: auto;
  border-width: 2px;
  border-style: solid;
}

.notice-item-panel.expanded * {
  pointer-events: auto;
}

.notice-item-panel.expanded .notice-read-less-btn {
  pointer-events: auto;
  cursor: pointer;
}

.notice-item-panel::before {
  content: '';
  position: absolute;
  top: -10px;
  right: 15px;
  width: 18px;
  height: 18px;
  background: 
    radial-gradient(circle at 30% 30%, #ff6b6b 0%, #dc2626 40%, #991b1b 100%);
  border-radius: 50%;
  box-shadow: 
    0 3px 8px rgba(0,0,0,0.4),
    inset 0 2px 3px rgba(255,255,255,0.3),
    inset 0 -2px 3px rgba(0,0,0,0.2);
  z-index: 15;
}

.notice-item-panel::after {
  content: '';
  position: absolute;
  top: -7px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: 
    radial-gradient(circle at 30% 30%, #fbbf24 0%, #f59e0b 60%, #d97706 100%);
  border-radius: 50%;
  box-shadow: 
    inset 0 1px 2px rgba(255,255,255,0.4),
    inset 0 -1px 2px rgba(0,0,0,0.2);
  z-index: 16;
}

/* Category-specific push pin colors for panel notices */
.notice-item-panel.urgent::before {
  background: 
    radial-gradient(circle at 30% 30%, #dc2626 0%, #991b1b 40%, #7f1d1d 100%);
}

.notice-item-panel.academic::before {
  background: 
    radial-gradient(circle at 30% 30%, #3b82f6 0%, #2563eb 40%, #1d4ed8 100%);
}

.notice-item-panel.events::before {
  background: 
    radial-gradient(circle at 30% 30%, #10b981 0%, #059669 40%, #047857 100%);
}

.notice-item-panel.general::before {
  background: 
    radial-gradient(circle at 30% 30%, #8b5cf6 0%, #7c3aed 40%, #6d28d9 100%);
}

/* Paper texture effect - Removed for cleaner look */

/* Notice Badges - Clean & Simple */
.notice-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.urgent-badge {
  background: #fee2e2;
  color: #dc2626;
}

.academic-badge {
  background: #dbeafe;
  color: #2563eb;
}

.events-badge {
  background: #d1fae5;
  color: #059669;
}

.general-badge {
  background: #ede9fe;
  color: #7c3aed;
}

.pinned-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  font-weight: 700;
}

.pinned-badge::after {
  content: ' 📌';
  font-size: 0.8rem;
}

/* Enhanced pinned notice item styling */
.notice-item.pinned {
  border: 2px solid rgba(79, 70, 229, 0.3);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 4px 12px rgba(79, 70, 229, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.05);
  transform: rotate(0deg) !important;
}

.notice-item.pinned::after {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: #d97706;
  width: 18px;
  height: 18px;
  top: 6px;
  box-shadow: 
    0 3px 8px rgba(251, 191, 36, 0.4),
    inset 0 1px 3px rgba(255, 255, 255, 0.4);
}

/* Notice Content - Fixed Overflow with Paper Lines */
.notice-content {
  padding: 2rem 1.2rem 1.2rem 3rem;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  overflow: visible !important;
  white-space: normal !important;
}

.notice-content h3 {
  color: #2d3748;
  margin: 0 0 0.8rem 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: block;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.notice-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.notice-date,
.notice-valid {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: #666;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

.notice-date i,
.notice-valid i {
  color: #4f46e5;
  font-size: 0.75rem;
}

.notice-valid {
  color: #dc2626;
}

.notice-content p {
  color: #4a5568;
  margin: 0;
  line-height: 1.6;
  font-size: 0.85rem;
  flex: 1;
  display: block;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Show full content when expanded */
.notice-item.expanded .notice-content h3,
.notice-item.expanded .notice-content p {
  display: block !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
}

/* Notice Actions */
.notice-actions {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* Responsive Notice Board - Maintains clean alignment */
@media (max-width: 768px) {
  #events {
    padding: 3rem 0;
    margin: 0;
  }
  
  #events .container {
    padding: 0 1rem;
  }
  
  #events h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
  }
  
  .notice-filters {
    gap: 0.8rem;
    margin-bottom: 2rem;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .notice-filters::-webkit-scrollbar {
    display: none;
  }
  
  .filter-btn {
    padding: 0.8rem 1.2rem;
    font-size: 0.85rem;
    min-width: fit-content;
    white-space: nowrap;
  }
  
  .filter-btn span {
    display: none;
  }
  
  /* Reduce animations on mobile for better performance */
  .notice-item {
    transform: rotate(0deg) !important;
    transition: none;
  }
  
  .notice-item:hover {
    transform: translateY(-1px);
  }
  
  /* Ensure pinned notices stand out on mobile */
  .notice-item.pinned {
    border-width: 3px;
    background: rgba(255, 255, 255, 0.98);
  }
  
  .notices-list {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .notice-item {
    transform: rotate(0deg) !important;
    min-height: 180px;
    max-height: 350px;
  }
  
  .notice-content {
    padding: 1rem;
  }
  
  .notice-content h3 {
    font-size: 1rem;
  }
  
  .notice-content p {
    font-size: 0.8rem;
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .notice-item {
    transform: rotate(0deg) !important;
    transition: none;
  }
  
  .notice-item:hover {
    transform: translateY(-1px);
  }
}

/* Screen Reader Only Class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Modern Gallery Styles */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-link {
  display: block;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.gallery-link:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-link:hover img {
  transform: scale(1.05);
}

/* Gallery Modal Styles */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding: 10px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  margin: auto;
  display: block;
  box-shadow: var(--shadow-xl);
  border-radius: var(--border-radius);
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
}

.gallery-modal.active .modal-content {
  opacity: 1;
  transform: scale(1);
}

.modal-content img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--border-radius);
}

.close-modal {
  position: absolute;
  right: 25px;
  top: 15px;
  color: #f1f1f1;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Previous & Next Buttons */
.modal-prev,
.modal-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.3s ease;
  border-radius: 50%;
  user-select: none;
  -webkit-user-select: none;
  background: rgba(0, 0, 0, 0.8);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-prev {
  left: 15px;
}

.modal-next {
  right: 15px;
}

.modal-prev:hover,
.modal-next:hover {
  background: var(--primary-color);
}

/* Social Icons Styles */
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.social-icons a {
  color: white;
  font-size: 1.1rem;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-icons a.facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
}

.social-icons a.twitter:hover {
  background: #1da1f2;
  border-color: #1da1f2;
}

.social-icons a.instagram:hover {
  background: #e4405f;
  border-color: #e4405f;
}

.social-icons a.linkedin:hover {
  background: #0077b5;
  border-color: #0077b5;
}

.social-icons a:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-icons a:hover i {
  transform: scale(1.1);
}

.social-icons a i {
  transition: transform 0.3s ease;
}

/* Quick Links Styles */
.quick-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.quick-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
  padding: 0.25rem 0.5rem;
}

.quick-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  width: calc(100% - 1rem);
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: right;
}

.quick-links a:hover {
  color: white;
}

.quick-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Modern Testimonials - Efficient for Multiple Items */
.testimonial-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--border-light);
  padding-right: 0.5rem;
}

.testimonial-list::-webkit-scrollbar {
  width: 8px;
}

.testimonial-list::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 4px;
}

.testimonial-list::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

.testimonial-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.testimonial-item {
  background: var(--gradient-primary);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  position: relative;
  transition: var(--transition);
  margin-bottom: 0;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.testimonial-item::before {
  content: '❝';
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: white;
  font-weight: 600;
}

.testimonial-info p {
  margin: 0;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Testimonial Navigation */
.testimonial-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.testimonial-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.testimonial-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.testimonial-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Testimonial Dots */
.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.testimonial-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.testimonial-dot:hover {
  background: var(--primary-light);
}

/* Grid View Option for Desktop */
@media (min-width: 768px) {
  .testimonial-grid-view .testimonial-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    transform: none !important;
  }
  
  .testimonial-grid-view .testimonial-item {
    min-width: auto;
    max-width: none;
  }
}

/* FAQ Styles - Enhanced */
.faq-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.faq-item {
  margin-bottom: 1.5rem;
  background: var(--surface-elevated);
  border-radius: var(--border-radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-question {
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  color: var(--text-primary);
  margin: 0;
  padding: 1.5rem;
  background: var(--surface);
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-question:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.faq-question:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  background: var(--primary-light);
  color: var(--primary-color);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  transition: var(--transition);
  flex-shrink: 0;
}

.faq-item.open .faq-question {
  background: var(--primary-light);
  color: var(--primary-color);
}

.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(0deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  background: var(--surface);
  border-top: 1px solid var(--border);
  animation: fadeInDown 0.3s ease-out;
}

.faq-item.open .faq-answer {
  display: block;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Form Styles - Enhanced Contact Section */
.section#contact {
  text-align: left;
}

.section#contact address {
  background: var(--surface-elevated);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  font-style: normal;
  transition: var(--transition);
}

.section#contact address:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.section#contact address p {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
}

.section#contact address p:first-child {
  margin-top: 0;
}

.section#contact address p:last-child {
  margin-bottom: 0;
}

.section#contact address strong {
  color: var(--primary-color);
  font-weight: 600;
  min-width: 100px;
  display: inline-block;
}

.section#contact address a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.section#contact address a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

form {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  transition: var(--transition);
}

form:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

form input,
form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  margin: 0;
  border: 2px solid var(--border);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
  background: var(--surface-elevated);
  color: var(--text-primary);
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: var(--surface);
}

form input::placeholder,
form textarea::placeholder {
  color: var(--text-muted);
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

form button[type="submit"] {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  margin-top: 0.5rem;
}

form button[type="submit"]:hover,
form button[type="submit"]:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  outline: none;
}

form button[type="submit"]:active {
  transform: translateY(0);
}

/* Form error styling */
form span[id$="-error"] {
  color: var(--danger-color) !important;
  font-size: 0.85rem !important;
  display: none !important;
  margin-top: -1rem;
  margin-bottom: 0.5rem;
}

form small {
  color: var(--text-muted) !important;
  font-size: 0.85rem;
  margin-top: -1rem;
}

/* Modern Footer */
footer {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(30, 64, 175, 0.9) 100%);
  z-index: 1;
}

footer > * {
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-icons a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.quick-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.quick-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.1);
}

.quick-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Main layout improvements */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
  background: var(--background);
  padding: 2rem 0;
}

.social-icons a:hover,
.social-icons a:focus {
  color: var(--secondary-color);
  transform: translateY(-3px);
  outline: none;
}

.quick-links {
  margin-bottom: 2rem;
  font-size: 1rem;
}

.quick-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  margin: 0 0.5rem;
  transition: var(--transition);
  font-weight: 600;
}

.quick-links a:hover,
.quick-links a:focus {
  color: var(--secondary-color);
  text-decoration: underline;
  outline: none;
}

/* Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close:hover {
  color: var(--secondary-color);
}

/* Modern Hero Section - Admin Panel Theme */
.hero {
  background: none;
  padding: 6rem 2rem;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* Background image layer */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('assets/school.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: -2;
}

/* Gradient overlay for better text readability */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(79, 70, 229, 0.7) 0%, 
    rgba(124, 58, 237, 0.7) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: -1;
}

/* Hero responsive design */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    padding: 4rem 1rem;
    min-height: 50vh;
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem;
    min-height: 40vh;
    font-size: 1.5rem;
  }
}

/* Hero content styling */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.hero p {
  font-size: 1.3rem;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Hero Image Variants - Choose your style */

/* Option 1: School Building Focus */
.hero.school-building {
  background-image: 
    linear-gradient(135deg, rgba(59, 130, 246, 0.75) 0%, rgba(30, 64, 175, 0.75) 100%),
    url('assets/school.jpg');
}

/* Option 2: Students/Campus Life Focus */
.hero.campus-life {
  background-image: 
    linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(30, 64, 175, 0.8) 100%),
    url('assets/campus-life.jpg');
}

/* Option 3: Subtle Pattern (Current Default) */
.hero.pattern-bg {
  background-image: 
    linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(30, 64, 175, 0.85) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><rect fill="%234f46e5" width="1200" height="800"/><circle fill="%236366f1" opacity="0.1" cx="200" cy="200" r="150"/><circle fill="%236366f1" opacity="0.1" cx="1000" cy="600" r="200"/></svg>');
}

/* Option 4: Pure Gradient (No Image) */
.hero.gradient-only {
  background: var(--gradient-primary);
}

main {
  background: var(--background);
  padding: 2rem 1rem;
  min-height: calc(100vh - 200px);
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Handle navigation overflow on smaller desktop screens */
@media (max-width: 1200px) {
  .header-container {
    padding: 0.8rem 1rem;
    gap: 0.8rem; /* Reduced from 1.5rem for better spacing */
  }
  
  .nav-menu {
    gap: 0.5rem;
    padding: 0.4rem;
  }
  
  .nav-link {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    margin: 0 1px;
  }
  
  .nav-link:hover,
  .nav-link.active {
    margin: 0 1px;
  }
  
  .main-nav {
    margin-right: 0;
  }
  
  .logo-section {
    max-width: 320px;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .academics-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Fix navigation overflow on medium screens */
  .header-container {
    padding: 1rem;
    gap: 0.6rem; /* Reduced from 1rem for better tablet spacing */
  }
  
  .nav-menu {
    gap: 0.4rem;
    flex-wrap: nowrap;
  }
  
  .nav-link {
    padding: 0.25rem 0.4rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }
  
  .main-nav {
    margin-right: 0;
    flex: 0 1 auto;
  }
  
  .logo-section {
    max-width: 280px;
  }
}

/* Show hamburger menu earlier to prevent overflow */
@media (max-width: 900px) {
  /* Show hamburger menu */
  .hamburger {
    display: flex !important;
  }
  
  /* Hide desktop navigation */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    border-top: 1px solid var(--border);
    z-index: 1000;
  }
  
  .main-nav.show {
    display: block !important;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    margin: 0;
  }
  
  .nav-link {
    display: block;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-align: center;
    border: 1px solid transparent;
    background: var(--surface-elevated);
  }
  
  .nav-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: none;
  }
  
  .nav-link:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  /* Mobile Header */
  .header-container {
    padding: 1rem;
    gap: 1rem;
  }
  
  .logo-section {
    gap: 0.75rem;
  }
  
  .logo-img {
    width: 40px;
    height: 40px;
  }
  
  .school-name {
    font-size: 1.25rem !important;
  }
  
  .school-tagline {
    font-size: 0.7rem !important;
  }
  
  /* Show hamburger menu */
  .hamburger {
    display: flex !important;
  }
  
  /* Hide desktop navigation */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    border-top: 1px solid var(--border);
    z-index: 1000;
  }
  
  .main-nav.show {
    display: block !important;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    margin: 0;
  }
  
  .nav-link {
    display: block;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    text-align: center;
    border: 1px solid transparent;
    background: var(--surface-elevated);
  }
  
  .nav-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    transform: none;
  }
  
  .nav-link:last-child {
    margin-bottom: 0;
  }
  
  /* Header actions on mobile */
  .header-actions {
    gap: 0.75rem;
  }
  
  /* Mobile section styles */
  .section {
    margin: 1rem auto;
    padding: 2rem 1.5rem;
  }
  
  .section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  
  .section p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .buttons a {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
  
  .cta-button {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .section {
    margin: 0.5rem auto;
    padding: 1.5rem 1rem;
  }
  
  .section h2 {
    font-size: 1.75rem;
  }
  
  .section ul li {
    font-size: 1rem;
  }
}

/* Tablet responsive design */
@media (max-width: 1024px) and (min-width: 769px) {
  .hero {
    padding: 4.5rem 2rem;
    min-height: 55vh;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero p {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 4rem 1rem;
    min-height: 50vh;
  }
  
  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  /* About section mobile responsiveness */
  .section#about .manager-profile,
  .section#about .principal-profile {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    gap: 1rem;
  }
  
  .section#about .manager-profile img,
  .section#about .principal-profile img {
    width: 100px;
    height: 100px;
    align-self: center;
  }
  
  .section#about > p {
    text-align: left;
    font-size: 1rem;
  }
  
  /* FAQ mobile responsiveness */
  .faq-question {
    padding: 1rem;
    font-size: 0.95rem;
  }
  
  .faq-answer {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.9rem;
  }
  
  .faq-question::after {
    font-size: 1.2rem;
  }
  
  .feature-item {
    flex-direction: column;
    text-align: center;
  }
  
  .leader-card {
    flex-direction: column;
    text-align: center;
  }
  
  .leader-image {
    align-self: center;
  }
  
  .faculty-member {
    flex-direction: column;
    text-align: center;
  }
  
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .gallery img {
    height: 180px;
  }

  /* Legacy responsive support */
  header {
    justify-content: space-between;
    padding: 1rem;
  }

  header h1 {
    flex-grow: 0;
    margin-left: 0;
    font-size: 1.3rem;
  }

  nav ul {
    display: flex !important;
    flex-direction: row;
    background: none;
    position: static;
    width: auto;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }
  
  nav ul.show {
    display: flex !important;
  }

  nav ul li {
    width: 100%;
    text-align: center;
    margin: 0.5rem 0;
  }

  .faculty-photo {
    width: 60px;
    height: 60px;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  /* Contact section mobile responsiveness */
  .section#contact address {
    padding: 1.5rem;
  }

  .section#contact address p {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.75rem 0;
  }

  .section#contact address strong {
    min-width: auto;
    margin-bottom: 0.25rem;
  }

  .section#contact address a {
    word-break: break-all;
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .modern-section {
    padding: 3rem 0;
  }
  
  .section {
    padding: 2rem 1.5rem;
  }
  
  .header-container {
    padding: 1rem;
  }

  /* Contact section for very small screens */
  .section#contact {
    padding: 1.5rem 1rem;
  }

  .section#contact address {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .section#contact address p {
    font-size: 0.9rem;
    margin: 0.5rem 0;
  }

  .section#contact address a {
    font-size: 0.85rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Form adjustments for small screens */
  form {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }

  form input,
  form textarea,
  form select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Active navigation highlighting */
.nav-link.active {
  color: var(--primary-color);
  background: var(--primary-light);
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  margin: 0 -1rem;
}

/* Floating Action Buttons - Constrained within viewport */
.refresh-fab {
  position: fixed;
  bottom: 100px;
  right: 15px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0.8;
  /* Ensure button stays within viewport */
  right: max(15px, min(15px, calc(100vw - 63px))); /* 48px width + 15px margin */
  bottom: max(100px, min(100px, calc(100vh - 148px))); /* 48px height + 100px from bottom */
}

.refresh-fab:hover {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

.refresh-fab:active {
  transform: scale(0.95);
}

.back-to-top {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  cursor: pointer;
  font-size: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0.9;
  /* Ensure button stays within viewport */
  right: max(15px, min(15px, calc(100vw - 71px))); /* 56px width + 15px margin */
  bottom: max(15px, min(15px, calc(100vh - 71px))); /* 56px height + 15px from bottom */
}

.back-to-top:hover {
  opacity: 1;
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.back-to-top:active {
  transform: scale(0.95);
}

/* Mobile responsive adjustments for floating buttons */
@media (max-width: 768px) {
  .refresh-fab {
    bottom: 85px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 14px;
    right: max(10px, min(10px, calc(100vw - 54px)));
    bottom: max(85px, min(85px, calc(100vh - 129px)));
  }
  
  .back-to-top {
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    font-size: 18px;
    right: max(10px, min(10px, calc(100vw - 60px)));
    bottom: max(10px, min(10px, calc(100vh - 60px)));
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .refresh-fab {
    bottom: 80px;
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 12px;
    right: max(8px, min(8px, calc(100vw - 48px)));
    bottom: max(80px, min(80px, calc(100vh - 120px)));
  }
  
  .back-to-top {
    bottom: 8px;
    right: 8px;
    width: 46px;
    height: 46px;
    font-size: 16px;
    right: max(8px, min(8px, calc(100vw - 54px)));
    bottom: max(8px, min(8px, calc(100vh - 54px)));
  }
}

/* Prevent floating buttons from interfering with content */
@media (max-width: 320px) {
  .refresh-fab, .back-to-top {
    display: none; /* Hide on very small screens to prevent interference */
  }
}

/* ===============================
   NOTICE TICKER BAR & PANEL
   =============================== */

/* Notice Ticker Bar - Sticky below header */
.notice-ticker-bar {
  position: sticky;
  top: var(--header-height, 80px); /* Use CSS variable or fallback */
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  height: 50px;
  z-index: 999; /* Above breadcrumb */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.notice-ticker-container {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 1rem;
}

/* Bell icon with notification badge */
.notice-bell-icon {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-bell-icon:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.bell-icon {
  font-size: 1rem;
  color: white;
  animation: bellRing 2s infinite;
}

@keyframes bellRing {
  0%, 50%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-10deg); }
  20%, 40% { transform: rotate(10deg); }
}

.notice-count-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

.notice-count-badge.show {
  opacity: 1;
  transform: scale(1);
}

/* Scrolling ticker content */
.notice-ticker-content {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.notice-ticker-text {
  white-space: nowrap;
  display: flex;
  animation: tickerScroll 30s linear infinite;
}

@keyframes tickerScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-item {
  margin-right: 3rem;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.95;
}

.ticker-item.urgent {
  color: #fef2f2;
  background: rgba(220, 38, 38, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

/* View All button */
.notice-view-all {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.notice-view-all:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Notice Panel - Collapsible */
.notice-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: white;
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notice-panel.open {
  right: 0;
}

.notice-panel-header {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.notice-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.notice-panel-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.notice-panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notice-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem 1rem 1rem;
  pointer-events: auto;
}

.notice-item {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.notice-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.notice-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.notice-category {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notice-category.urgent {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.notice-category.academic {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.notice-category.events {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.notice-category.general {
  background: #faf5ff;
  color: #9333ea;
  border: 1px solid #e9d5ff;
}

.notice-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.notice-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.notice-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notice-loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

.notice-item-panel:hover {
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
  transform: translateY(-1px);
}

.notice-item-panel .notice-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.notice-item-panel .notice-category {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notice-item-panel .notice-category.urgent {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.notice-item-panel .notice-category.academic {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.notice-item-panel .notice-category.events {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.notice-item-panel .notice-category.general {
  background: #faf5ff;
  color: #9333ea;
  border: 1px solid #e9d5ff;
}

.notice-item-panel .notice-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.notice-item-panel .notice-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.notice-item-panel .notice-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-bottom: 0.5rem;
}

/* Ensure expanded cards don't have any text truncation */
.notice-item-panel.expanded .notice-title,
.notice-item-panel.expanded .notice-description {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-box-orient: unset;
  max-height: none;
  height: auto;
}

.notice-item-panel .notice-action {
  text-align: right;
  margin-top: 0.5rem;
}

.notice-read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: transparent;
  border: 1px solid rgba(79, 70, 229, 0.3);
  border-radius: 16px;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.75rem;
  opacity: 0.8;
}

.notice-read-more-btn:hover {
  background: rgba(79, 70, 229, 0.1);
  border-color: var(--primary-color);
  opacity: 1;
  transform: translateY(-1px);
}

.notice-read-more-btn span {
  font-size: 0.75rem;
}

.notice-read-more-btn svg {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
}

.notice-read-more-btn:hover svg {
  transform: translateX(2px);
}

.notice-read-less-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid var(--primary-color);
  border-radius: 16px;
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.75rem;
  opacity: 1;
}

.notice-read-less-btn:hover {
  background: rgba(79, 70, 229, 0.2);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.notice-read-less-btn span {
  font-size: 0.75rem;
}

.notice-read-less-btn svg {
  width: 10px;
  height: 10px;
  transition: transform 0.2s ease;
}

.notice-read-less-btn:hover svg {
  transform: translateX(-2px);
}

.notice-read-more-btn svg {
  transition: transform 0.2s ease;
}

.notice-read-more-btn:hover svg {
  transform: translate(1px, -1px);
}

/* Notice Detail Modal */
.notice-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.notice-modal.show {
  display: flex;
  opacity: 1;
}

.notice-modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.notice-modal.show .notice-modal-content {
  transform: translateY(0);
}

.notice-modal-header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notice-modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.notice-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.notice-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notice-modal-body {
  padding: 2rem;
  max-height: 50vh;
  overflow-y: auto;
}

.notice-modal-category {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.notice-modal-category.urgent {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.notice-modal-category.academic {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.notice-modal-category.events {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.notice-modal-category.general {
  background: #faf5ff;
  color: #9333ea;
  border: 1px solid #e9d5ff;
}

.notice-modal-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.notice-modal-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.notice-modal-description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1rem;
}

.notice-modal-footer {
  background: var(--border-light);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.notice-modal-footer .cta-button {
  min-width: auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .notice-modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  .notice-modal-header {
    padding: 1rem;
  }
  
  .notice-modal-body {
    padding: 1.5rem;
  }
  
  .notice-modal-footer {
    padding: 1rem;
    flex-direction: column;
  }
  
  .notice-modal-footer .cta-button {
    width: 100%;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .notice-ticker-bar {
    height: 45px;
    /* top will be set dynamically by JavaScript */
  }
  
  .notice-ticker-container {
    padding: 0 0.5rem;
    gap: 0.5rem;
  }
  
  .ticker-item {
    font-size: 0.8rem;
    margin-right: 2rem;
  }
  
  .notice-view-all {
    padding: 4px 8px;
    font-size: 0.8rem;
  }
  
  .notice-panel {
    width: 100vw;
    right: -100vw;
  }
  
  .notice-panel-content {
    padding: 0.75rem;
  }
  
  .notice-item {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 480px) {
  .notice-ticker-bar {
    height: 40px;
    /* top will be set dynamically by JavaScript */
  }
  
  .bell-icon {
    font-size: 1rem;
  }
  
  .notice-count-badge {
    min-width: 16px;
    height: 16px;
    font-size: 0.7rem;
  }
  
  .ticker-item {
    font-size: 0.75rem;
    margin-right: 1.5rem;
  }
  
  .notice-view-all {
    font-size: 0.75rem;
    padding: 3px 6px;
  }
  
  /* Additional mobile optimizations for pinned badges */
  .pinned-badge {
    background: 
      linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    box-shadow: 
      0 2px 8px rgba(245, 158, 11, 0.7),
      inset 0 1px 2px rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.4);
  }
  
  .pinned-badge::after {
    display: none; /* Hide pin emoji on very small screens */
  }
  
  /* Ensure pinned notices stand out on mobile */
  .notice-item.pinned {
    border: 2px solid rgba(245, 158, 11, 0.3);
    background: 
      linear-gradient(135deg, #fffef7 0%, #fef7f0 100%);
  }
}
