:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.13);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --accent: #8b5cf6;
  --success: #22c55e;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

body.light-theme {
  --bg: #f8fafc;
  --bg-soft: #eaf1fb;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.22), transparent 30%),
    radial-gradient(circle at 88% 6%, rgba(139, 92, 246, 0.24), transparent 28%),
    linear-gradient(145deg, var(--bg) 0%, #111827 48%, #020617 100%);
}

body.light-theme {
  background:
    radial-gradient(circle at 12% 10%, rgba(59, 130, 246, 0.16), transparent 30%),
    radial-gradient(circle at 88% 6%, rgba(139, 92, 246, 0.14), transparent 28%),
    linear-gradient(145deg, #f8fafc 0%, #eef5ff 52%, #e2e8f0 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
}

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

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

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

:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.72);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 12px 14px 0;
}

.navbar {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 14px 40px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(22px) saturate(150%);
}

body.light-theme .navbar {
  background: rgba(248, 250, 252, 0.72);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  border: 1px solid var(--border);
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.24);
}

.brand p {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-1px);
}

body.light-theme .nav-links a:hover,
body.light-theme .nav-links a.active {
  background: rgba(59, 130, 246, 0.1);
}

.theme-toggle,
.menu-toggle,
.modal-close,
.modal-nav {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
  backdrop-filter: blur(14px);
}

.theme-toggle,
.menu-toggle {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.theme-toggle:hover,
.menu-toggle:hover,
.modal-close:hover,
.modal-nav:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.16);
}

.menu-toggle {
  display: none;
}

main {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 26px;
}

.page-section {
  margin-bottom: 56px;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.page-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #bfdbfe;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

body.light-theme .section-title {
  color: #1d4ed8;
}

.page-title {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.5rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: 0;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
}

.lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.13rem);
  line-height: 1.85;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.8fr);
  gap: 26px;
  align-items: stretch;
}

.hero-card,
.card,
.gallery-card,
.contact-card,
.schedule-card,
.photo-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(140%);
}

.hero-card,
.card,
.contact-card,
.schedule-card {
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 34px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 440px;
}

.hero-card::after,
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.13), transparent 38%, rgba(139, 92, 246, 0.11));
  opacity: 0.85;
}

.hero-card > *,
.card > * {
  position: relative;
  z-index: 1;
}

.hero-card h2,
.card h3,
.section-heading {
  margin: 0 0 14px;
  color: var(--text);
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.25;
  font-weight: 800;
}

.hero-card p,
.card p,
.card li,
.contact-card p,
.schedule-card p,
.card small,
.photo-meta p,
.video-card p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-card p {
  margin: 0 0 22px;
}

.hero-card ul,
.card ul,
.card ol {
  margin: 0 0 22px;
  padding-left: 1.2rem;
}

.hero-card li,
.card li {
  margin: 0 0 0.65rem;
}

.hero-image {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.hero-image::after {
  content: '';
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 34%;
  border-radius: 20px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.74), transparent);
  pointer-events: none;
}

.hero-buttons,
.form-actions,
.video-controls,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 18px 36px rgba(59, 130, 246, 0.22);
}

.btn-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(139, 92, 246, 0.24);
}

.feature-grid,
.card-grid,
.gallery-grid,
.media-grid {
  display: grid;
  gap: 22px;
}

.feature-grid,
.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
}

.media-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 22px;
}

.card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.photo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.38);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-icons a {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  transition: transform 0.22s ease, background 0.22s ease;
}

.social-icons a:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-card strong,
.contact-card span,
.card strong {
  color: var(--text);
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.form-row label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  min-height: 50px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

body.light-theme .form-row input,
body.light-theme .form-row textarea,
body.light-theme .form-row select {
  background: rgba(255, 255, 255, 0.72);
}

.form-row textarea {
  min-height: 150px;
  resize: vertical;
}

.form-actions {
  justify-content: flex-end;
}

.table-wrapper {
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.schedule-table th,
.schedule-table td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.schedule-table th {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(139, 92, 246, 0.2));
  color: var(--text);
  text-align: left;
  font-weight: 800;
}

.schedule-table tr:last-child td {
  border-bottom: 0;
}

.schedule-table tbody tr {
  transition: background 0.2s ease;
}

.schedule-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

audio {
  width: 100%;
  margin-top: 12px;
  filter: drop-shadow(0 10px 20px rgba(2, 6, 23, 0.22));
}

.video-controls,
.gallery-controls {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.video-filter-btn,
.filter-btn {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.08);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-filter-btn.active,
.video-filter-btn:hover,
.filter-btn.active,
.filter-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 34px rgba(59, 130, 246, 0.22);
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-card[hidden],
.photo-card[hidden] {
  display: none;
}

.video-card.is-hidden,
.photo-card.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
}

.video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #020617;
}

.video-frame video,
.video-card video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.photo-counter {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.gallery-note {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.photo-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  isolation: isolate;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.28s ease, transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.photo-card:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.72);
  outline-offset: 4px;
}

.photo-card:hover {
  box-shadow: 0 26px 64px rgba(2, 6, 23, 0.32);
}

.photo-card.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.97);
}

.photo-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s ease;
}

.photo-card:hover .photo-thumb img {
  transform: scale(1.07);
}

.photo-meta {
  flex: 1;
  padding: 16px;
}

.photo-meta h4 {
  margin: 0;
  font-size: 1.02rem;
}

.photo-labels,
.modal-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.photo-label,
.modal-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(59, 130, 246, 0.26);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
}

.photo-meta p {
  margin: 6px 0 0;
  font-size: 0.92rem;
}

.photo-empty {
  grid-column: 1 / -1;
  padding: clamp(24px, 5vw, 42px);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.photo-thumb.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

.overlay-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 22px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
}

.overlay-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow);
}

body.light-theme .modal-content {
  background: rgba(248, 250, 252, 0.96);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.modal-header h4 {
  margin: 0;
}

.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 18px 22px;
}

.modal-body img,
.modal-body video,
.modal-body audio {
  width: auto;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 18px;
  object-fit: contain;
  background: #020617;
}

.modal-copy {
  width: 100%;
  padding: 0 6px 16px;
  text-align: left;
}

.modal-copy h4 {
  margin: 0 0 6px;
}

.modal-copy p {
  margin: 0;
  color: var(--muted);
}

.modal-copy .modal-description {
  margin-top: 8px;
  line-height: 1.7;
}

.modal-nav {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  transform: translateY(-50%);
}

.modal-prev {
  left: 14px;
}

.modal-next {
  right: 14px;
}

footer {
  width: min(1220px, calc(100% - 32px));
  margin: 26px auto 34px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(20px);
}

.footer-brand h3 {
  margin: 0 0 8px;
}

.footer-brand p,
.footer-meta p,
.footer-links a {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  transition: color 0.2s ease, background 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
  background: rgba(59, 130, 246, 0.16);
}

.footer-meta p {
  margin: 0;
}

mark {
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.18);
  color: var(--text);
}

.signature-img {
  border-radius: 20px;
}

.signature-line {
  margin-top: 12px;
}

@media (max-width: 1080px) {
  .navbar {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-top: 4px;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

  body.light-theme .nav-links {
    background: rgba(248, 250, 252, 0.96);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    justify-content: flex-start;
  }

  .hero-grid,
  .contact-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .hero-image {
    min-height: auto;
  }

  .hero-image {
    aspect-ratio: 4 / 3;
  }

}

@media (max-width: 560px) {
  .site-header {
    padding-inline: 8px;
  }

  .navbar {
    padding: 10px;
    border-radius: 0 0 20px 20px;
  }

  .brand strong {
    display: none;
  }

  main,
  footer {
    width: min(100% - 22px, 1220px);
  }

  main {
    padding-top: 44px;
  }

  .page-section {
    margin-bottom: 36px;
  }

  .page-title {
    font-size: clamp(2.15rem, 14vw, 3.1rem);
  }

  .hero-buttons .btn,
  .form-actions .btn {
    width: 100%;
  }

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

  .gallery-controls,
  .video-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .filters,
  .video-controls {
    width: 100%;
  }

  .filter-btn,
  .video-filter-btn {
    flex: 1 1 calc(50% - 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
