/* =====================================================
   ПОРТФОЛИО НА УЧИТЕЛ — ОСНОВНИ СТИЛОВЕ
   Всички цветове/шрифтове са дефинирани като променливи
   по-долу — можеш лесно да ги смениш на едно място.
   ===================================================== */

:root {
  /* Топла, приятелска цветова палитра, подходяща за начален учител */
  --color-primary: #ff8a65;      /* корал/оранжево */
  --color-primary-dark: #f4511e;
  --color-secondary: #4fc3a1;    /* мента/зелено */
  --color-accent: #ffd166;       /* топло жълто */
  --color-bg: #fffaf5;           /* топъл бял фон */
  --color-bg-alt: #fff1e6;       /* лек крем фон за редуващи се секции */
  --color-text: #4a3f35;
  --color-text-light: #7a6f65;
  --color-white: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(74, 63, 53, 0.08);
  --shadow-hover: 0 16px 40px rgba(74, 63, 53, 0.14);
  --font-heading: 'Quicksand', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --max-width: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

/* Fade-in applied to the direct sections (not body) so it never leaves a
   lingering transform on body — that would turn body into a containing
   block for position:fixed elements (like the lightbox) and break their
   viewport-relative centering. */
.site-header, main, footer.site-footer {
  animation: pageFadeIn 0.5s ease both;
}

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 0 0.5em;
  color: var(--color-text);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== HEADER ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 245, 0.65);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 24px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-primary-dark);
  flex-shrink: 0;
  white-space: nowrap;
  position: relative;
  transition: color 0.25s;
}

.logo::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.logo:hover { color: var(--color-primary); }
.logo:hover::after { width: 100%; }

.main-nav {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav a {
  font-weight: 600;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
}

/* ===== Падащи менюта "Випуски" / "Проекти" в главното меню ===== */
.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--color-text-light);
  padding: 8px 4px 8px 0;
  transition: transform 0.25s ease, color 0.2s;
}

.dropdown-toggle:hover { color: var(--color-primary-dark); }

.nav-item.open .dropdown-toggle { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  max-height: 340px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 8px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: none;
}

.dropdown-menu a:hover {
  background: rgba(255, 138, 101, 0.14);
  color: var(--color-primary-dark);
}

.dropdown-menu .dropdown-all {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.85rem;
  color: var(--color-primary-dark);
}

.dropdown-menu .dropdown-empty {
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--color-text-light);
  font-weight: 400;
}

@media (hover: hover) and (min-width: 961px) {
  .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

.nav-item.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--color-text);
  border-radius: 2px;
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, #ffe8d6 0%, #fff1e6 60%, #eaf7f1 100%);
  padding: 70px 0 140px;
  overflow: hidden;
}

/* Леки, размазани "петна" на заден фон за динамично, но ненатрапчиво усещане */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.hero::before {
  width: 320px;
  height: 320px;
  top: -80px;
  right: 8%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 70%);
  animation: floatBlob1 16s ease-in-out infinite;
}

.hero::after {
  width: 260px;
  height: 260px;
  bottom: -60px;
  left: 4%;
  background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
  animation: floatBlob2 18s ease-in-out infinite;
}

.hero-wrap, .hero-wave { position: relative; z-index: 1; }

@keyframes floatBlob1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 26px) scale(1.08); }
}

@keyframes floatBlob2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.06); }
}

/* Малки летящи кръгчета зад снимката/фона на hero-то — усещане за
   плавно, живо движение, без да пречат на текста/снимката (z-index под 1). */
.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-blobs .circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
}

.hero-blobs .circle:nth-child(1) {
  width: 90px;
  height: 90px;
  top: 8%;
  left: 16%;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 72%);
  animation: floatCircleA 9s ease-in-out infinite;
}

.hero-blobs .circle:nth-child(2) {
  width: 42px;
  height: 42px;
  top: 60%;
  left: 8%;
  background: radial-gradient(circle, var(--color-secondary) 0%, transparent 72%);
  animation: floatCircleB 11s ease-in-out infinite 1s;
}

.hero-blobs .circle:nth-child(3) {
  width: 58px;
  height: 58px;
  top: 4%;
  left: 42%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 72%);
  animation: floatCircleC 13s ease-in-out infinite 2s;
}

.hero-blobs .circle:nth-child(4) {
  width: 28px;
  height: 28px;
  top: 78%;
  left: 32%;
  background: radial-gradient(circle, var(--color-primary-dark) 0%, transparent 72%);
  animation: floatCircleA 10s ease-in-out infinite 3s;
}

.hero-blobs .circle:nth-child(5) {
  width: 70px;
  height: 70px;
  top: 26%;
  right: 12%;
  background: radial-gradient(circle, var(--color-secondary) 0%, transparent 72%);
  animation: floatCircleB 14s ease-in-out infinite 0.5s;
}

.hero-blobs .circle:nth-child(6) {
  width: 22px;
  height: 22px;
  top: 68%;
  right: 24%;
  background: radial-gradient(circle, var(--color-accent) 0%, transparent 72%);
  animation: floatCircleC 8s ease-in-out infinite 1.5s;
}

@keyframes floatCircleA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(14px, -18px) scale(1.08); }
  66% { transform: translate(-10px, 10px) scale(0.94); }
}

@keyframes floatCircleB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-18px, -16px) scale(1.12); }
}

@keyframes floatCircleC {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(16px, 12px) rotate(8deg) scale(1.06); }
}

/* Заб.: съзнателно НЕ спираме анимацията на декоративните кръгчета/петна
   тук дори при "reduce motion" — по изрично желание те винаги да се движат
   (те са само фон, с ниска непрозрачност, не пречат на съдържанието). */
@media (prefers-reduced-motion: reduce) {
  .site-header, main, footer.site-footer { animation: none; }
}

.hero-wrap {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-photo {
  flex: 0 0 260px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  border: 8px solid var(--color-white);
  box-shadow: var(--shadow-hover);
  background: var(--color-white);
  animation: floatY 5s ease-in-out infinite;
}

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

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Измества видимата част на снимката нагоре, така че лицето да излиза
     в горната част на кръга, а не по средата/по-надолу. Ако сложиш друга
     снимка и лицето пак не излиза добре, пробвай да промениш процента
     (по-малко число = още по-нагоре). */
  object-position: center top;
}

.hero-text { flex: 1 1 400px; }

.hero-eyebrow {
  display: inline-block;
  background: var(--color-white);
  color: var(--color-primary-dark);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.hero-text h1 {
  font-size: 2.6rem;
  margin-bottom: 4px;
}

.hero-text h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 18px;
}

.hero-desc {
  max-width: 560px;
  color: var(--color-text-light);
  margin-bottom: 26px;
}

.hero-quote {
  max-width: 560px;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  border-left: 3px solid var(--color-accent);
  padding-left: 16px;
  margin-bottom: 26px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 8px 20px rgba(255, 138, 101, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary);
}

.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-wave svg { width: 100%; height: 90px; }
.hero-wave path { fill: var(--color-bg); }

/* ===================== SECTIONS ===================== */
.section { padding: 80px 0; scroll-margin-top: 90px; }
.hero,
.site-footer { scroll-margin-top: 90px; }
.section.alt { background: var(--color-bg-alt); }

.section-title {
  font-size: 2rem;
  text-align: center;
}

.section-sub {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 48px;
}

/* ===================== ABOUT ===================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fact-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  padding: 22px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.fact-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.fact-label {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.responsibility-list {
  margin-top: 56px;
}

.responsibility-list h3 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 28px;
}

.responsibility-list ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.responsibility-list li {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.responsibility-list li strong {
  display: block;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
  margin-bottom: 8px;
}

.responsibility-list li p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin: 0;
}

/* ===================== TIMELINE ===================== */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 32px;
  border-left: 3px solid var(--color-secondary);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child { margin-bottom: 0; }

/* "Виж още" — скрива елементите след първите 3, докато не се разгърне */
.timeline-item.timeline-more { display: none; }
.timeline.expanded .timeline-item.timeline-more { display: block; }

.doc-item.doc-more { display: none; }
.docs-list.expanded .doc-item.doc-more { display: flex; }

.timeline-toggle-wrap {
  max-width: 760px;
  margin: 20px auto 0;
  text-align: center;
}


.timeline-dot {
  position: absolute;
  left: -42px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--color-white);
  box-shadow: 0 0 0 3px var(--color-secondary);
}

.timeline-date {
  display: inline-block;
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 18px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.timeline-content h3 { margin-bottom: 6px; font-size: 1.1rem; }
.timeline-content p { margin: 0; color: var(--color-text-light); }

/* ===================== CARDS ===================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-icon { font-size: 2.2rem; margin-bottom: 10px; }

.card h3 { font-size: 1.05rem; }
.card p { color: var(--color-text-light); margin: 0; }

/* ===================== VIPUSKI (КЛАСОВЕ/ГОДИНИ) КАРТИ ===================== */
.vipusk-card {
  display: block;
  padding: 0 0 20px;
  overflow: hidden;
  text-decoration: none;
}

.vipusk-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  margin-bottom: 14px;
}

.vipusk-card h3,
.vipusk-card p { padding: 0 20px; }

.vipusk-card h3 { color: var(--color-text); }
.vipusk-card p { color: var(--color-text-light); margin: 0; }

/* ===================== СТРАНИЦИ "ВИПУСКИ" / "ГАЛЕРИЯ" ===================== */
.page-hero {
  padding: 50px 0 30px;
  text-align: center;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.back-link:hover { text-decoration: underline; }

.project-description {
  max-width: 640px;
  margin: 18px auto 0;
  text-align: left;
  color: var(--color-text-light);
}

.project-description p { margin: 0 0 12px; }
.project-description p:last-child { margin-bottom: 0; }


.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

/* ===================== GALLERY ===================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-grid img:hover { transform: scale(1.03); }

.gallery-album-title {
  grid-column: 1 / -1;
  margin: 28px 0 -4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-accent);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-text);
}

.gallery-album-title:first-child { margin-top: 0; }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: var(--color-white);
  font-size: 2.4rem;
  cursor: pointer;
}

.lightbox-close,
.lightbox-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-50%) scale(1.06);
}

.lightbox-close:hover { transform: scale(1.06); }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-white);
  font-size: 1.6rem;
  cursor: pointer;
  user-select: none;
}

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

@media (max-width: 600px) {
  .lightbox-arrow { width: 40px; height: 40px; font-size: 1.3rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ===================== DOCUMENTS ===================== */
.docs-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 16px 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.doc-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-hover);
}

.doc-icon { font-size: 1.5rem; }
.doc-name { flex: 1; font-weight: 600; }
.doc-action { color: var(--color-primary-dark); font-weight: 700; font-size: 0.9rem; }

/* ===================== FOOTER ===================== */
.site-footer {
  background: #3d3229;
  color: #f2e9df;
  padding: 56px 0 0;
}

.footer-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding-bottom: 40px;
}

.footer-col h3 {
  color: var(--color-accent);
  font-size: 1.1rem;
}

.footer-col p { margin: 6px 0; color: #d9cdc0; }
.footer-col p a { color: #d9cdc0; text-decoration: none; }
.footer-col p a:hover { color: var(--color-accent); text-decoration: underline; }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-links a {
  color: #d9cdc0;
  font-weight: 600;
}

.social-links a:hover { color: var(--color-accent); }

.footer-bottom {
  text-align: center;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #b7a999;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.footer-bottom p { margin: 0; }

.footer-bottom a {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-bottom a:hover { color: var(--color-accent); }

.footer-credit {
  font-size: 0.78rem;
  opacity: 0.8;
}

/* ===================== SCROLL REVEAL ANIMATIONS ===================== */
/* Добавя се автоматично от script.js — не изисква нищо от теб */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* По-широк праг само за менюто — с 9 линка не се събира на среден екран
   (таблет/малък лаптоп), затова превключва към "бургер" по-рано. */
@media (max-width: 960px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    display: none;
    box-shadow: var(--shadow);
  }

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

  /* На мобилно менюто е вертикално — падащото меню става "акордеон",
     разгъващ се на място, вместо плаващо каре над съдържанието. */
  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-item > a { flex: 1; }

  .dropdown-toggle {
    position: absolute;
    right: 0;
    top: 0;
    padding: 10px 12px;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
    padding: 0 0 0 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-item.open .dropdown-menu { max-height: 400px; }
}

@media (max-width: 700px) {
  .hero-wrap { flex-direction: column; text-align: center; }
  .hero-desc { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
}

/* ===================== UTILITIES ===================== */
.hidden { display: none !important; }

.empty-msg {
  text-align: center;
  color: var(--color-text-light);
  padding: 10px 0 30px;
}

.hero-buttons.center { justify-content: center; }

.gallery-teaser {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.gallery-teaser .section-sub { margin-bottom: 28px; }

.gallery-teaser .featured-grid {
  text-align: left;
  margin: 4px 0 32px;
}

.gallery-teaser .featured-grid:empty { display: none; }

/* ===================== ДОСТЪПНОСТ (ACCESSIBILITY) ===================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Уважава настройката на потребителя за намалени анимации */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-photo { animation: none; }

  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ===================== БУТОН "ОБРАТНО В НАЧАЛОТО" ===================== */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, background 0.2s, visibility 0.25s;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--color-primary-dark); }

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 0.25s, visibility 0.25s; }
}
