/* ==========================================================================
   Margilan State School No. 6 (W.C. Röntgen) — Official Design System
   Palette inspired by school facade: Anthracite, Crisp White, Classic Blue
   ========================================================================== */

:root {
  --anthracite-950: #11161c;
  --anthracite-900: #1b222a;
  --anthracite-800: #28313c;
  --anthracite-700: #384452;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --blue-800: #1e3a8a;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;

  --emerald-600: #059669;
  --emerald-50: #ecfdf5;
  --amber-600: #d97706;
  --amber-50: #fffbeb;
  --rose-600: #e11d48;
  --rose-50: #fff1f2;

  --shadow-sm: 0 1px 2px rgba(17, 22, 28, 0.06);
  --shadow-md: 0 6px 20px -4px rgba(17, 22, 28, 0.09);
  --shadow-lg: 0 18px 40px -12px rgba(17, 22, 28, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --container-max: 1240px;
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--anthracite-900);
  background: var(--slate-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* Top Utility & Social Bar */
.topbar {
  background: var(--anthracite-950);
  color: var(--slate-200);
  font-size: 0.82rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--slate-300);
}

.topbar-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--blue-500);
}

.topbar-socials {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topbar-socials-label {
  color: var(--slate-400);
  margin-right: 4px;
  font-weight: 500;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.social-pill svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.social-pill:hover {
  background: var(--blue-600);
  border-color: var(--blue-500);
  transform: translateY(-1px);
}

/* Main Header / Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--slate-200);
  background: var(--white);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--anthracite-900);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--blue-700);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-link {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--anthracite-700);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--blue-700);
  background: var(--blue-50);
}

.nav-link.active {
  color: var(--white);
  background: var(--blue-700);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--slate-100);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--anthracite-900);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--anthracite-900);
  cursor: pointer;
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

.mobile-drawer {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--slate-200);
  background: var(--white);
}

.mobile-drawer.open {
  display: flex;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--anthracite-950);
  color: var(--white);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 42%;
  filter: brightness(0.76) contrast(1.06);
  transform: scale(1.02);
}

.hero-overlay {
  position: relative;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(17, 22, 28, 0.92) 0%,
    rgba(27, 34, 42, 0.80) 48%,
    rgba(29, 78, 216, 0.42) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 72px 0 110px;
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.24);
  border: 1px solid rgba(96, 165, 250, 0.45);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hero-school-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #93c5fd;
  margin: 0 0 10px;
}

.hero-title {
  font-size: clamp(1.95rem, 4vw, 3.15rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--slate-200);
  margin: 0 0 28px;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, 0.55);
}

.btn-primary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.22);
}

.btn-outline {
  background: var(--white);
  color: var(--anthracite-900);
  border-color: var(--slate-300);
}

.btn-outline:hover {
  border-color: var(--blue-600);
  color: var(--blue-700);
}

/* Floating Stats Strip */
.stats-strip-wrap {
  position: relative;
  z-index: 5;
  margin-top: -54px;
  margin-bottom: 48px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
  border-top: 4px solid var(--blue-700);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--anthracite-900);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--slate-600);
  font-weight: 500;
  margin-top: 4px;
}

/* Section Layout */
.section {
  padding: 56px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.section-title {
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 800;
  color: var(--anthracite-900);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 0;
  color: var(--slate-600);
  font-size: 0.98rem;
  max-width: 660px;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
}

.motto-box {
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--blue-50);
  border-left: 4px solid var(--blue-700);
  color: var(--anthracite-900);
  font-weight: 600;
}

.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--white);
}

.about-media img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.about-media-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(17, 22, 28, 0.84);
  backdrop-filter: blur(8px);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.about-media-badge img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Filter Pills & Search Bars */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--anthracite-700);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover {
  border-color: var(--blue-600);
  color: var(--blue-700);
}

.filter-pill.active {
  background: var(--anthracite-900);
  color: var(--white);
  border-color: var(--anthracite-900);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 400px;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--slate-400);
}

.input-control, .select-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--slate-300);
  background: var(--white);
  color: var(--anthracite-900);
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box .input-control {
  padding-left: 42px;
}

.input-control:focus, .select-control:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* News Cards Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: pointer;
}

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

.news-thumb {
  position: relative;
  height: 220px;
  background: var(--anthracite-800);
  overflow: hidden;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.news-card:hover .news-thumb img {
  transform: scale(1.04);
}

.news-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(29, 78, 216, 0.92);
  color: var(--white);
  backdrop-filter: blur(4px);
}

.cat-badge.future {
  background: rgba(5, 150, 105, 0.92);
}

.cat-badge.announcement {
  background: rgba(217, 119, 6, 0.92);
}

.media-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(17, 22, 28, 0.78);
  color: var(--white);
}

.media-count-badge svg {
  width: 13px;
  height: 13px;
}

.news-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--slate-500);
  font-weight: 500;
  margin-bottom: 8px;
}

.news-date svg {
  width: 14px;
  height: 14px;
}

.news-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--anthracite-900);
}

.news-excerpt {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--slate-600);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--slate-100);
  color: var(--blue-700);
  font-weight: 600;
  font-size: 0.88rem;
}

.news-footer svg {
  width: 16px;
  height: 16px;
}

/* Teachers Grid (Privacy Enforced) */
.privacy-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  color: var(--blue-800);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.privacy-banner svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.teacher-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.teacher-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200, #bfdbfe);
}

.teacher-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--anthracite-800), var(--blue-700));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  font-weight: 700;
  border: 3px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
}

.teacher-name {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--anthracite-900);
  line-height: 1.35;
}

.teacher-subject {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--anthracite-900);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-card:hover img {
  transform: scale(1.06);
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 32px 16px 14px;
  background: linear-gradient(to top, rgba(17, 22, 28, 0.9), transparent);
  color: var(--white);
}

.gallery-album-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93c5fd;
  margin-bottom: 4px;
}

.gallery-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.contact-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--blue-50);
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
}

.contact-item-label {
  font-size: 0.78rem;
  color: var(--slate-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-item-val {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--anthracite-900);
}

.social-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.social-card-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--anthracite-900);
  transition: all 0.2s;
}

.social-card-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-card-btn.telegram svg { color: #0088cc; }
.social-card-btn.instagram svg { color: #e1306c; }
.social-card-btn.youtube svg { color: #ff0000; }
.social-card-btn.facebook svg { color: #1877f2; }
.social-card-btn.threads svg { color: #11161c; }

.social-card-btn:hover {
  background: var(--white);
  border-color: var(--blue-600);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.map-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
}

.map-frame {
  width: 100%;
  height: 360px;
  border: none;
  background: var(--slate-200);
}

.map-card-footer {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: var(--anthracite-950);
  color: var(--slate-300);
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--slate-300);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--slate-400);
}

.admin-entry-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-200);
  font-weight: 600;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.admin-entry-link:hover {
  background: var(--blue-700);
  color: var(--white);
}

.admin-entry-link svg {
  width: 14px;
  height: 14px;
}

/* Modals & Lightbox */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 22, 28, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  padding: 18px 24px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 24px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.modal-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
}

.video-container {
  margin: 18px 0;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.video-container iframe,
.video-container video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

.empty-state {
  background: var(--white);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  color: var(--slate-500);
}

/* Lightbox */
.lightbox-img {
  max-width: 92vw;
  max-height: 78vh;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--white);
  text-align: center;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Responsive Breakpoints */
@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .teachers-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .news-grid, .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-meta {
    display: none;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .teachers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid, .gallery-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-content {
    padding: 48px 0 92px;
  }
  .brand-title {
    font-size: 0.9rem;
  }
  .brand-sub {
    display: none;
  }
}

@media (max-width: 460px) {
  .teachers-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
