/* ==========================================================================
   مصر للتكنولوجيا الحيوية والدوائية — صفحة هبوط عصرية
   ========================================================================== */

:root {
  --school-primary: #b91c1c;
  --school-accent: #dc2626;
  --school-gold: #d4af37;
  --school-gold-light: #f0d78c;
  --glass: rgba(15, 23, 42, 0.55);
  --glass-border: rgba(255, 255, 255, 0.12);
  --font-ar: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --page-bg: #0c1218;
  --section-bg: #111a22;
  --section-bg-alt: #0f1720;
  --text-primary: #f1f5f9;
  --text-muted: #94a3b8;
}

body[data-theme="light"] {
  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(15, 23, 42, 0.08);
  --page-bg: #f1f5f9;
  --section-bg: #ffffff;
  --section-bg-alt: #f8fafc;
  --text-primary: #0f172a;
  --text-muted: #64748b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ar);
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  height: auto;
  background: var(--page-bg);
  color: var(--text-primary);
  transition: background 0.35s ease, color 0.35s ease;
}

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

body.modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  body.chat-open {
    overflow: hidden;
  }
}

.site-page {
  width: 100%;
}

/* ─── Hero block — شاشة كاملة ───────────────────────────────────────── */

.hero-block {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.landing-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: kenBurns 24s ease-in-out infinite alternate;
  transition: margin-inline-start 0.35s ease, width 0.35s ease;
}

@keyframes kenBurns {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

.landing-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(4, 47, 46, 0.75) 0%,
    rgba(15, 23, 42, 0.55) 40%,
    rgba(4, 47, 46, 0.82) 100%
  );
  backdrop-filter: blur(2px);
  transition: margin-inline-start 0.35s ease, width 0.35s ease;
}

/* ─── Navigation glass bar ──────────────────────────────────────────── */

.landing-nav {
  position: relative;
  z-index: 20;
  padding: 16px 20px 0;
  flex-shrink: 0;
}

.nav-glass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.simple-topbar {
  max-width: 1280px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
  min-width: 0;
}

.nav-logo {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--school-accent), var(--school-primary));
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.modern-logo {
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.2), rgba(15, 118, 110, 0.55));
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.35);
}

.mbs-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.binostix-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  border-radius: 12px;
  display: block;
}

.nav-logo img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
}

.nav-brand-text {
  font-weight: 700;
  font-size: 1rem;
  max-width: 260px;
  line-height: 1.2;
  display: block;
}

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

.nav-btn-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}

.nav-btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.nav-lang {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 50%;
  border: none;
  background: var(--school-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav-lang:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.55);
}

body[data-theme="light"] .nav-brand {
  color: #0f172a;
}

body[data-theme="light"] .nav-brand-text {
  color: #0f172a;
}

body[data-theme="light"] .nav-btn-icon {
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.06);
}

/* ─── Hero center ───────────────────────────────────────────────────── */

.landing-hero {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 24px 24px;
  min-height: 0;
}

.scroll-hint {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  animation: fadeUp 0.8s 0.5s ease both, bounceHint 2s ease-in-out 1.5s infinite;
  transition: color 0.2s;
}

.scroll-hint:hover {
  color: var(--school-gold-light);
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.hero-footer-bar {
  position: relative;
  z-index: 15;
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-start;
}

.hero-title {
  font-size: clamp(1.35rem, 3.8vw, 2.35rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.45;
  max-width: 900px;
  margin: 0 0 12px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
  animation: fadeUp 0.7s ease both;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 20px;
  font-weight: 500;
  animation: fadeUp 0.7s 0.1s ease both;
}

/* زر محادثة جديدة — حدود ذهبية/تيل */
.btn-pill-gold {
  padding: 12px 36px;
  border-radius: 999px;
  border: 2px solid var(--school-gold);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s;
  animation: fadeUp 0.7s 0.2s ease both;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.btn-pill-gold:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(20, 184, 166, 0.25);
  border-color: var(--school-gold-light);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35);
}

/* روبوت المساعد — نفس فكرة المرجع */
.hero-robot-trigger {
  position: relative;
  margin-top: 20px;
  width: clamp(120px, 22vw, 168px);
  height: clamp(120px, 22vw, 168px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  animation: fadeUp 0.8s 0.35s ease both, floatRobot 3.5s ease-in-out 1.2s infinite;
}

.hero-robot-trigger:hover {
  animation: fadeUp 0.8s 0.35s ease both, floatRobot 2s ease-in-out infinite;
}

.hero-robot-trigger:hover .robot-glow {
  opacity: 1;
  transform: scale(1.08);
}

.hero-robot-trigger:active {
  transform: scale(0.96);
}

.robot-glow {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.55) 0%, transparent 70%);
  opacity: 0.75;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  animation: glowPulse 2.5s ease-in-out infinite;
}

.robot-ring {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  border: 3px solid transparent;
  background: linear-gradient(135deg, var(--school-accent), var(--school-primary)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: ringSpin 8s linear infinite;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes floatRobot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.robot-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

.hero-robot-trigger {
  width: clamp(140px, 24vw, 200px);
  height: clamp(140px, 24vw, 200px);
}

.hero-robot-trigger .bot-icon-img {
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.btn-pill-outline {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

.btn-pill-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ─── Gallery & sections ────────────────────────────────────────────── */

.media-section,
.contact-section {
  position: relative;
  z-index: 5;
  padding: 64px 20px;
}

.media-section {
  background: var(--section-bg);
}

.contact-section {
  background: var(--section-bg-alt);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 10px;
  text-align: center;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 32px;
  font-size: 1rem;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.gallery-tab {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--school-accent);
  background: transparent;
  color: var(--school-primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

body[data-theme="dark"] .gallery-tab {
  color: var(--school-accent);
  border-color: rgba(20, 184, 166, 0.5);
}

.gallery-tab.active,
.gallery-tab:hover {
  background: var(--school-accent);
  color: #fff;
  border-color: var(--school-accent);
}

.gallery-panel {
  display: none;
}

.gallery-panel.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.media-card {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--section-bg-alt);
  border: 1px solid rgba(128, 128, 128, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.media-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.media-card figcaption,
.video-caption {
  padding: 12px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.videos-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 520px;
  font-size: 1rem;
  color: var(--text-muted);
}

.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.contact-list strong {
  color: var(--text-primary);
  margin-inline-end: 8px;
}

.contact-link {
  color: var(--school-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.contact-link:hover {
  color: var(--school-primary);
  text-decoration: underline;
}

.site-footer {
  padding: 24px;
  text-align: center;
  background: var(--page-bg);
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid rgba(128, 128, 128, 0.12);
}

/* ─── About panel ───────────────────────────────────────────────────── */

.about-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.about-panel.open {
  opacity: 1;
  pointer-events: auto;
}

.about-panel.hidden {
  display: flex;
}

.about-panel-inner {
  position: relative;
  max-width: 480px;
  width: 100%;
  padding: 28px 32px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--glass-border);
  color: #fff;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.about-panel.open .about-panel-inner {
  transform: translateY(0) scale(1);
}

.about-panel h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  color: var(--school-gold-light);
}

.about-panel p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-details {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.about-details li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.about-close {
  position: absolute;
  top: 12px;
  left: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
}

.about-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

/* ─── Responsive ────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .nav-brand-text { display: block; }
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 10px 12px 0;
  }

  .nav-glass {
    padding: 8px 10px;
    border-radius: 14px;
    gap: 8px;
  }

  .nav-brand {
    gap: 8px;
  }

  .nav-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .nav-brand-text {
    max-width: 120px;
    font-size: 0.875rem;
    line-height: 1.3;
  }

  .landing-hero {
    padding: 8px 16px 4px;
  }

  .hero-robot-trigger {
    margin-top: 12px;
  }

  .media-section,
  .contact-section {
    padding: 48px 16px;
  }

  .media-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .about-panel {
    padding: 14px;
  }

  .about-panel-inner {
    padding: 20px;
    border-radius: 16px;
  }
}

@media (max-width: 560px) {
  .nav-brand-text {
    max-width: 90px;
    font-size: 0.8rem;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .nav-glass {
    padding: 8px;
  }

  .nav-logo {
    width: 38px;
    height: 38px;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-btn-icon,
  .nav-lang {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .hero-footer-bar {
    padding: 0 12px 16px;
  }

  .btn-pill-outline {
    width: 100%;
  }
}

@media (max-height: 700px) {
  .hero-title {
    font-size: clamp(1.1rem, 4vw, 1.65rem);
    margin-bottom: 8px;
  }

  .hero-subtitle {
    margin-bottom: 12px;
    font-size: 0.9rem;
  }

  .hero-robot-trigger {
    width: 100px;
    height: 100px;
    margin-top: 8px;
  }

  .btn-pill-gold {
    padding: 10px 28px;
    font-size: 0.9rem;
  }
}

/* ─── Lightbox Overlay (Comfortable, Modern, Glassmorphic) ───────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 14, 23, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  user-select: none;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 85vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: lightboxScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes lightboxScale {
  from {
    transform: scale(0.92) translateY(12px);
  }
  to {
    transform: scale(1) translateY(0);
  }
}

.lightbox-img {
  max-width: 100%;
  max-height: 68vh;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox-img.loaded {
  opacity: 1;
  transform: scale(1);
}

.lightbox-spinner {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left-color: var(--school-accent);
  border-radius: 50%;
  animation: lightboxSpin 0.8s linear infinite;
  display: none;
}

.lightbox-spinner.show {
  display: block;
}

@keyframes lightboxSpin {
  to { transform: rotate(360deg); }
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  z-index: 10005;
}

.lightbox-nav:hover {
  background: var(--school-accent);
  border-color: var(--school-accent);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
  left: 32px;
}
.lightbox-nav.next {
  right: 32px;
}

/* Fix direction icons for LTR/RTL correctly */
.lightbox-nav svg {
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  z-index: 10010;
}

.lightbox-close:hover {
  background: #ef4444;
  transform: scale(1.1) rotate(90deg);
}

.lightbox-caption-bar {
  display: none !important;
}

.lightbox-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right; /* Align right for Arabic */
}

.lightbox-counter {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--school-gold);
  letter-spacing: 0.5px;
}

.lightbox-caption {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0;
  color: #f8fafc;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lightbox-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
}

.lightbox-btn:hover {
  background: var(--school-accent);
  border-color: var(--school-accent);
  transform: scale(1.08);
}

.lightbox-thumbnails-wrap {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80%;
  overflow-x: auto;
  padding: 6px 4px;
  z-index: 10006;
}

.lightbox-thumbnails {
  display: flex;
  gap: 10px;
}

.lightbox-thumb {
  width: 60px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.45;
  transition: border-color 0.25s, opacity 0.25s, transform 0.25s;
}

.lightbox-thumb:hover {
  opacity: 0.8;
  transform: scale(1.06);
}

.lightbox-thumb.active {
  border-color: var(--school-accent);
  opacity: 1;
  transform: scale(1.06);
}

.lightbox-thumbnails-wrap::-webkit-scrollbar {
  height: 5px;
}
.lightbox-thumbnails-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.lightbox-thumbnails-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 99px;
}

/* Helper rule for toggling icons and elements */
.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .lightbox-nav {
    width: 46px;
    height: 46px;
  }
  .lightbox-nav.prev {
    left: 12px;
  }
  .lightbox-nav.next {
    right: 12px;
  }
  .lightbox-close {
    top: 16px;
    left: 16px;
    width: 42px;
    height: 42px;
    font-size: 24px;
  }
  .lightbox-content {
    max-width: 90vw;
  }
  .lightbox-thumbnails-wrap {
    display: none; /* Hide thumbnails on tablets and mobile for best viewing area */
  }
}

/* ─── Custom Photo Card Hover & Glow Effects ─────────────────────────── */
.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
              box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
              border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Hide captions completely for photo grid cards */
.photo-card figcaption {
  display: none !important;
}

/* Image zoom transition */
.photo-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s ease;
}

/* Light/Glow effect on hover */
.photo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 38, 38, 0.5); /* Red Accent */
  box-shadow: 0 0 25px rgba(220, 38, 38, 0.4), 
              0 12px 30px rgba(0, 0, 0, 0.5);
}

.photo-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.08) contrast(1.02);
}

/* Add a subtle inner light overlay on hover */
.photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.photo-card:hover::after {
  opacity: 1;
}


