:root {
  color-scheme: light;
  --ink: #1a2a28;
  --ink-soft: #3d524e;
  --paper: #f3f0e8;
  --paper-deep: #e7e1d4;
  --bg-top: #f7f4ed;
  --bg-bottom: #ebe6da;
  --header-bg: rgba(243, 240, 232, 0.88);
  --nav-panel-bg: rgba(243, 240, 232, 0.98);
  --surface: rgba(255, 255, 255, 0.45);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.4);
  --footer-bg: rgba(26, 42, 40, 0.04);
  --table-head: rgba(31, 107, 99, 0.08);
  --row-hover: rgba(31, 107, 99, 0.04);
  --success-bg: rgba(31, 107, 99, 0.12);
  --teal: #1f6b63;
  --teal-deep: #134e48;
  --amber: #c47a2c;
  --amber-soft: #e8b86a;
  --line: rgba(26, 42, 40, 0.12);
  --shadow: 0 18px 50px rgba(19, 40, 36, 0.12);
  --glow-teal: rgba(31, 107, 99, 0.18);
  --glow-amber: rgba(196, 122, 44, 0.14);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --header-h: 4.25rem;
  --header-offset: 4.75rem;
  --max: 1100px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f0ebe3;
  --ink-soft: #c9c2b4;
  --paper: #2c3835;
  --paper-deep: #354340;
  --bg-top: #323f3c;
  --bg-bottom: #283330;
  --header-bg: rgba(58, 70, 66, 0.94);
  --nav-panel-bg: rgba(52, 64, 60, 0.98);
  --surface: rgba(255, 255, 255, 0.1);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --surface-soft: rgba(255, 255, 255, 0.08);
  --footer-bg: rgba(0, 0, 0, 0.18);
  --table-head: rgba(31, 107, 99, 0.28);
  --row-hover: rgba(31, 107, 99, 0.16);
  --success-bg: rgba(31, 107, 99, 0.28);
  --teal: #4db3a8;
  --teal-deep: #8ed9cf;
  --amber: #e8b05a;
  --amber-soft: #f3c97e;
  --line: rgba(240, 235, 227, 0.18);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --glow-teal: rgba(77, 179, 168, 0.18);
  --glow-amber: rgba(232, 176, 90, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--header-offset);
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--glow-teal), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--glow-amber), transparent 50%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--paper) 40%, var(--bg-bottom) 100%);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

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

a {
  color: var(--teal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--amber);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.9rem;
  z-index: 1000;
  border-radius: 8px;
}

.skip-link:focus {
  left: 0.75rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.header-inner {
  max-width: calc(var(--max) + 4rem);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

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

.nav-flags {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.15rem;
}

.nav-flags img {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--amber);
  color: var(--teal-deep);
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.theme-toggle .icon-moon {
  fill: currentColor;
  stroke: none;
}

.theme-toggle .icon-sun {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.brand:hover {
  color: var(--teal-deep);
}

.brand-logo {
  display: block;
  height: 2.6rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
}

.brand-logo-hero {
  display: block;
  box-sizing: content-box;
  width: min(100%, 22rem);
  height: auto;
  margin: 0 0 1.1rem;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.footer-logo {
  display: block;
  height: 2.4rem;
  width: auto;
  margin-bottom: 0.65rem;
  object-fit: contain;
}

/* Светла подложка зад логото в тъмна тема — без да смалява изображението */
[data-theme="dark"] .brand-logo,
[data-theme="dark"] .footer-logo,
[data-theme="dark"] .map-logo,
[data-theme="dark"] .panel-logo {
  box-sizing: content-box;
  background: rgba(247, 244, 237, 0.94);
  border-radius: 10px;
  padding: 0.3rem 0.55rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50% 40% 55% 45%;
  background:
    radial-gradient(circle at 30% 30%, var(--amber-soft), transparent 45%),
    linear-gradient(135deg, var(--teal), var(--teal-deep));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  padding: 0.55rem;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--teal-deep);
  border-bottom-color: var(--amber);
}

/* Main */
.site-main {
  min-height: calc(100vh - 12rem);
}

.page {
  animation: fadeIn 0.35s ease;
}

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

.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f8f5ee;
  background:
    linear-gradient(105deg, rgba(15, 42, 40, 0.88) 0%, rgba(15, 42, 40, 0.55) 48%, rgba(15, 42, 40, 0.25) 100%),
    url("../assets/hero.svg") center / cover no-repeat,
    linear-gradient(135deg, #134e48, #2a6f66 40%, #8b5a2b);
}

.hero-content {
  max-width: calc(var(--max) + 4rem);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.5rem;
  width: 100%;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  max-width: 18ch;
}

.hero p {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: 1.05rem;
  color: rgba(248, 245, 238, 0.88);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--amber);
  color: #1a140c;
}

.btn-primary:hover {
  background: var(--amber-soft);
  color: #1a140c;
}

.btn-ghost {
  background: transparent;
  color: #f8f5ee;
  border-color: rgba(248, 245, 238, 0.45);
}

.btn-ghost:hover {
  background: rgba(248, 245, 238, 0.1);
  color: #fff;
}

.btn-solid {
  background: var(--teal);
  color: #f7f4ed;
}

.btn-solid:hover {
  background: var(--teal-deep);
  color: #fff;
}

.section {
  max-width: calc(var(--max) + 4rem);
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.section-head {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.section-head h1,
.section-head h2,
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

.section-head p,
.lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.page-hero {
  padding: 2.75rem 1.25rem 0;
  max-width: calc(var(--max) + 4rem);
  margin: 0 auto;
}

.page-hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.visual-panel {
  min-height: 280px;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(31, 107, 99, 0.9), rgba(19, 78, 72, 0.75)),
    url("../assets/classroom.svg") center / cover no-repeat;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.visual-panel.alt {
  background:
    linear-gradient(160deg, rgba(139, 90, 43, 0.85), rgba(31, 107, 99, 0.7)),
    url("../assets/books.svg") center / cover no-repeat;
}

.visual-panel.logo-panel {
  background:
    radial-gradient(circle at 50% 40%, rgba(232, 184, 106, 0.35), transparent 55%),
    linear-gradient(145deg, #1f6b63, #134e48);
  display: grid;
  place-items: center;
}

.logo-big {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: #f7f4ed;
  letter-spacing: -0.03em;
}

.panel-logo {
  width: min(70%, 14rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
}

.about-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.about-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--ink-soft);
}

.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--amber);
}

.team-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.team-member {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.team-member:first-child {
  border-top: none;
  padding-top: 0;
}

.team-member h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.team-role {
  margin: 0 0 0.65rem;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.95rem;
}

.team-member p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-deep);
  background: var(--table-head);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--row-hover);
}

/* Forms */
.form {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

.form-row {
  display: grid;
  gap: 0.4rem;
}

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

label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-strong);
  font: inherit;
  color: var(--ink);
  color-scheme: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 107, 99, 0.35);
  border-color: var(--teal);
}

option {
  background-color: var(--bg-top);
  color: var(--ink);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: #3a4743;
  color: #f0ebe3;
  border-color: rgba(240, 235, 227, 0.22);
}

[data-theme="dark"] option {
  background-color: #3a4743;
  color: #f0ebe3;
}

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

.form-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.form-success {
  display: none;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: var(--success-bg);
  color: var(--teal-deep);
  font-weight: 500;
}

.form-success.is-visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.form-error {
  display: none;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: rgba(180, 60, 50, 0.12);
  color: #a33a32;
  font-weight: 500;
}

[data-theme="dark"] .form-error {
  background: rgba(232, 120, 110, 0.16);
  color: #f0a8a0;
}

.form-error.is-visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #c45c52;
  outline: 2px solid rgba(196, 92, 82, 0.25);
}

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: wait;
}

.btn-table {
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.btn-table.is-disabled {
  background: rgba(26, 42, 40, 0.12);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  pointer-events: none;
  cursor: not-allowed;
}

.seat-status {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.seat-status.is-open {
  background: rgba(31, 107, 99, 0.14);
  color: var(--teal-deep);
}

.seat-status.is-limited {
  background: rgba(196, 122, 44, 0.16);
  color: #8a5418;
}

.seat-status.is-full {
  background: rgba(180, 60, 50, 0.12);
  color: #a33a32;
}

[data-theme="dark"] .seat-status.is-limited {
  color: var(--amber-soft);
}

[data-theme="dark"] .seat-status.is-full {
  color: #f0a8a0;
}

.schedule-table th:last-child,
.schedule-table td:last-child {
  text-align: center;
}

/* Course / info blocks */
.stack {
  display: grid;
  gap: 1.25rem;
}

.info-block {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.info-block:first-child {
  border-top: none;
  padding-top: 0;
}

.info-block h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.45rem;
}

.info-block p {
  margin: 0;
  color: var(--ink-soft);
}

.price-list {
  display: grid;
  gap: 0;
}

.price-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.price-item:last-child {
  border-bottom: none;
}

.price-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.price-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.price-value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--teal-deep);
  white-space: nowrap;
}

.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.cert-field {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.cert-field h3 {
  font-family: var(--font-display);
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
}

.cert-field p {
  margin: 0;
  color: var(--ink-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-details {
  display: grid;
  gap: 1rem;
}

.contact-details dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
  font-weight: 700;
}

.contact-details dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.map-placeholder {
  min-height: 240px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(31, 107, 99, 0.15), rgba(196, 122, 44, 0.12)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 12px,
      rgba(26, 42, 40, 0.03) 12px,
      rgba(26, 42, 40, 0.03) 13px
    );
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  text-align: center;
  padding: 1.5rem;
}

.map-logo {
  display: inline-block;
  height: 3rem;
  width: auto;
  margin-bottom: 0.85rem;
  object-fit: contain;
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}

.footer-inner {
  max-width: calc(var(--max) + 4rem);
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
  display: grid;
  gap: 1.25rem;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.footer-brand p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  max-width: 34ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
  font-weight: 500;
}

.footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Responsive */
@media (max-width: 900px) {
  .split,
  .cert-grid,
  .contact-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-width: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: var(--nav-panel-bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a.is-active {
    border-bottom-color: var(--amber);
  }

  .header-inner {
    position: relative;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page,
  .form-success.is-visible,
  .btn {
    animation: none;
    transition: none;
  }
}
