:root {
  --primary: #4da3ff;
  --accent-yellow: #ffd166;
  --accent-coral: #ff6b6b;
  --accent-mint: #2ec4b6;
  --accent-lavender: #b8b8ff;
  --text-dark: #0f172a;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  --radius: 16px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", Tahoma, sans-serif;
  color: var(--text-dark);
  background: radial-gradient(circle at 20% -10%, #dbeafe 0%, var(--bg) 35%) no-repeat;
  line-height: 1.6;
}

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

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.section-muted {
  background: linear-gradient(180deg, #f1f8ff 0%, #f8fafc 60%);
}

.section-head {
  margin-bottom: 1.8rem;
}

.kicker {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #1761a8;
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: "Nunito", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.2;
  margin: 0.4rem 0 0.9rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 800;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #d7e2ee;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  min-width: 0;
}

.brand span {
  white-space: nowrap;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  font-family: "Quicksand", "Nunito", "Segoe UI", Tahoma, sans-serif;
  letter-spacing: 0.01em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.primary-nav > a {
  font-weight: 600;
  padding: 0.3rem 0.5rem;
  border-radius: 10px;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.social-icon-link img {
  flex: 0 0 auto;
}

.primary-nav > a.is-active {
  background: #dbeafe;
  color: #0b4f8c;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  margin: 5px 0;
  transition: transform 0.2s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:focus-visible,
.inline-link:focus-visible,
.filter-btn:focus-visible,
.gallery-item:focus-visible,
.nav-toggle:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: #3495f8;
}

.btn-secondary {
  background: #fff;
  color: #0b4f8c;
  border: 1px solid #bfdbfe;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.hero-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 180px;
  object-fit: cover;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.program-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.inline-link {
  border: 0;
  background: transparent;
  color: #0b4f8c;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.detail-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  scroll-margin-top: 95px;
}

.detail-block img {
  border-radius: 14px;
  /* height: 220px; */
  width: 100%;
  object-fit: cover;
}

.gallery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.filter-btn {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
}

.filter-btn.is-active {
  background: var(--accent-yellow);
  border-color: #f4c84e;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.gallery-item {
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.gallery-item img {
  height: clamp(170px, 36vw, 230px);
  width: 100%;
  object-fit: cover;
}

.gallery-item.is-hidden,
.gallery-item.is-filtered {
  display: none;
}

.center {
  margin-top: 1.2rem;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  display: none;
  place-items: center;
  z-index: 200;
  padding: 1rem;
}

.modal.is-open {
  display: grid;
}

.modal img {
  max-height: 85vh;
  border-radius: 14px;
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: #fff;
  border: 0;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.trust-grid article {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.trust-grid article:nth-child(1) {
  border-top: 6px solid var(--accent-mint);
}

.trust-grid article:nth-child(2) {
  border-top: 6px solid var(--accent-coral);
}

.trust-grid article:nth-child(3) {
  border-top: 6px solid var(--accent-lavender);
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  align-items: start;
}

.about-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-cta {
  background: linear-gradient(180deg, #e6f2ff 0%, #f8fafc 55%);
}

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.5rem;
}

.form-status {
  min-height: 1.2rem;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: #0b4f8c;
}

.form-status.success {
  color: #0f766e;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.site-footer {
  border-top: 1px solid #dbe4ef;
  padding: 1rem 0;
  background: #fff;
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: space-between;
}

.social-links {
  display: flex;
  gap: 0.8rem;
}

.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;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: var(--accent-coral);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 479px) {
  .section {
    padding: 3.2rem 0;
  }

  .container {
    width: min(100% - 1.2rem, var(--container));
  }

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

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

  .program-card,
  .detail-block,
  .trust-grid article,
  .contact-form {
    border-radius: 14px;
  }
}

@media (max-width: 879px) {
  .nav-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    box-shadow: var(--shadow);
    display: none;
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
  }

  .primary-nav.open {
    display: flex;
  }

}

@media (min-width: 700px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-wrap {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .detail-block {
    grid-template-columns: 0.85fr 1.15fr;
    padding: 1.2rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
