/* Publikus oldal stílusai — mobile-first, „aurora" arculat */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: #faf8f7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--color-dark);
  color: var(--color-text-on-dark);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------- Felső sáv + fejléc (sötét „tinta" blokk) ---------- */

.site-topbar {
  background: #17090b;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
}
.site-topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}
.site-topbar a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.15s;
}
.site-topbar a:hover { color: #fff; }

.site-header {
  background:
    radial-gradient(90rem 20rem at 110% -40%, rgba(221, 51, 51, 0.35), transparent 60%),
    radial-gradient(60rem 18rem at -20% 140%, rgba(240, 180, 41, 0.16), transparent 60%),
    linear-gradient(150deg, #241214, #17090b);
  color: #fff;
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: #fff;
  flex: 1;
  min-width: 0;
}
.site-logo,
.site-logo-fallback {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* sima fehér kör, a logó rajta; a képet nem vágjuk körbe, hogy a címer sarkai megmaradjanak */
.site-logo {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-logo img { width: 40px; height: 42px; object-fit: contain; }
.site-logo-fallback {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-text-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 0 26px rgba(221, 51, 51, 0.45);
}
.site-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
}
.site-branding:hover { color: #fff; }

.header-buttons { display: flex; gap: 0.5rem; }

/* telefonon a hosszú iskolanév mellé nem fér a két gomb: a név saját sort kap, a gombok alatta */
@media (max-width: 639px) {
  .site-branding { flex-basis: 100%; }
  .header-buttons { width: 100%; }
  .header-buttons .btn { flex: 1; text-align: center; }
}

/* ---------- Gombok ---------- */

.btn {
  display: inline-block;
  padding: 0.6rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border: 2px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s, border-color 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-text-on-primary);
  box-shadow: 0 6px 18px rgba(221, 51, 51, 0.35);
}
.btn-primary:hover { color: var(--color-text-on-primary); box-shadow: 0 10px 26px rgba(221, 51, 51, 0.45); }
.btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: #fff; }
.btn-light {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.btn-light:hover { color: var(--color-primary); }
.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* A tartalomban álló gombok (pl. 404, PDF-oldal) világos háttéren */
.site-main .btn-outline {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: transparent;
}
.site-main .btn-outline:hover { background: var(--color-primary); color: #fff; }

/* ---------- Navigáció ---------- */

.site-nav {
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 18px rgba(23, 9, 11, 0.35);
}
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: none;
  border: 0;
  color: var(--color-text-on-primary);
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 0.2rem;
  cursor: pointer;
}
.nav-toggle .bars {
  display: inline-block;
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.15s;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

.nav-menu { list-style: none; display: none; padding-bottom: 0.5rem; }
.nav-menu.open { display: block; }
.nav-menu a {
  display: block;
  color: var(--color-text-on-primary);
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  border-radius: var(--radius);
}
.nav-menu a:hover, .nav-menu a:focus-visible {
  background: rgba(0, 0, 0, 0.18);
  color: var(--color-text-on-primary);
}

/* cél nélküli főmenüpont: csak az almenüjét nyitja, maga nem visz sehova */
.nav-parent {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius);
  color: var(--color-text-on-primary);
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 0.75rem;
  cursor: default;
}
.nav-parent::after { content: " ▾"; font-size: 0.8em; opacity: 0.85; }

.nav-submenu { list-style: none; }
.nav-submenu a { padding-left: 2rem; font-weight: 400; opacity: 0.92; }

/* ---------- Hero (kezdőlap) ---------- */

.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: -2rem; /* a site-main felső paddingjének kioltása */
  margin-bottom: 2.25rem;
  background:
    radial-gradient(70rem 30rem at 80% -30%, rgba(221, 51, 51, 0.5), transparent 62%),
    radial-gradient(50rem 26rem at 10% 130%, rgba(240, 180, 41, 0.2), transparent 62%),
    linear-gradient(160deg, #241214 10%, #17090b);
  color: #fff;
  overflow: hidden;
  text-align: center;
  padding: clamp(3rem, 8vw, 5.5rem) 1.25rem clamp(4.5rem, 10vw, 7rem);
}
/* fotó: enyhén elmosva, hogy a felirat ne keveredjen a részletekkel; a nagyítás eltakarja az elmosott szélt */
.hero-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  transform: scale(1.06);
}
/* sötétítés csak annyi, hogy a fehér név olvasható legyen, de az épület látszódjon */
.hero.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(23, 9, 11, 0.5), rgba(23, 9, 11, 0.62));
}
.hero.has-photo .hero-inner { z-index: 2; }
.hero.has-photo .hero-wave { z-index: 2; }
.hero-blobs { position: absolute; inset: 0; pointer-events: none; }
.hero-blobs .hb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(70px);
  will-change: transform;
}
.hb1 {
  width: 34rem; height: 34rem; left: -10rem; top: -14rem;
  background: radial-gradient(circle, rgba(224, 74, 58, 0.55), transparent 70%);
  animation: hero-uszik 22s ease-in-out infinite alternate;
}
.hb2 {
  width: 26rem; height: 26rem; right: -8rem; bottom: -12rem;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.32), transparent 70%);
  animation: hero-uszik 28s ease-in-out infinite alternate-reverse;
}
.hb3 {
  width: 20rem; height: 20rem; left: 55%; top: 45%;
  background: radial-gradient(circle, rgba(255, 122, 107, 0.3), transparent 70%);
  animation: hero-uszik 18s ease-in-out infinite alternate;
}
@keyframes hero-uszik { to { transform: translate(3rem, 2.2rem) scale(1.12); } }

.hero-inner { position: relative; max-width: 46rem; margin: 0 auto; }
.hero-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08), 0 0 40px rgba(221, 51, 51, 0.5);
}
.hero h1 {
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  background: linear-gradient(180deg, #fff 55%, rgba(255, 255, 255, 0.65));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 40rem;
  margin: 0 auto 1.75rem;
  font-size: clamp(0.95rem, 2.4vw, 1.08rem);
}
.hero-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(28px, 5vw, 70px);
  color: #faf8f7;
  display: block;
}

/* ---------- Tartalom ---------- */

.site-main { padding: 2rem 0 3.5rem; min-height: 55vh; }

.page-title {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.65rem;
}
.page-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-warning));
}

h2 { letter-spacing: -0.01em; }
article > h2, .site-main h2:not(.page-title):not(.post-card-title) { margin: 1.8rem 0 0.9rem; }

/* ---------- Hírkártyák ---------- */

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

.post-card {
  background: var(--color-bg);
  border: 1px solid rgba(38, 35, 35, 0.07);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(38, 35, 35, 0.05), 0 10px 30px rgba(38, 35, 35, 0.07);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}
.post-card:hover {
  box-shadow: 0 6px 14px rgba(38, 35, 35, 0.09), 0 22px 48px rgba(38, 35, 35, 0.16);
  transform: translateY(-4px);
}
.post-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-alt);
}
.post-card-media.placeholder {
  background:
    radial-gradient(18rem 12rem at 80% -20%, rgba(221, 51, 51, 0.5), transparent 65%),
    radial-gradient(14rem 10rem at 10% 120%, rgba(240, 180, 41, 0.28), transparent 65%),
    linear-gradient(150deg, #2c1517, #17090b);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-crest {
  width: 64px;
  height: 68px;
  opacity: 0.9;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.4));
}
.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-image { transform: scale(1.05); }
.post-card-date {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  background: rgba(23, 9, 11, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.post-card-body {
  padding: 1.15rem 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.post-card-title { font-size: 1.13rem; line-height: 1.35; font-weight: 800; letter-spacing: -0.01em; }
.post-card-title a { color: var(--color-text); text-decoration: none; transition: color 0.15s; }
.post-card-title a:hover { color: var(--color-primary); }
.post-card-excerpt { font-size: 0.92rem; color: var(--color-text-light); flex: 1; }
.post-card-more {
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}
.post-card-more span { display: inline-block; transition: transform 0.2s; }
.post-card-more:hover span { transform: translateX(4px); }

/* ---------- Lapozó ---------- */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-block;
  min-width: 2.6rem;
  text-align: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  background: #fff;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.pagination .current {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-color: transparent;
  color: var(--color-text-on-primary);
  box-shadow: 0 6px 16px rgba(221, 51, 51, 0.35);
}
.pagination a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ---------- Poszt / oldal tartalom ---------- */

.entry-meta { color: var(--color-text-light); font-size: 0.9rem; margin-bottom: 1.25rem; }
/* álló plakát se legyen képernyőnyi: a magasság korlátos, az arány marad (nem vágunk bele) */
.entry-featured {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(28rem, 70vh);
  border-radius: 20px;
  margin-bottom: 1.5rem;
  box-shadow: 0 14px 40px rgba(38, 35, 35, 0.16);
}
.entry-content { max-width: 46rem; font-size: 1.02rem; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 { margin: 1.5em 0 0.5em; line-height: 1.3; letter-spacing: -0.01em; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content blockquote, .entry-content table { margin-bottom: 1.05em; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; }
.entry-content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 0.75rem 1.1rem;
  background: var(--color-primary-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content img { border-radius: var(--radius); }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid var(--color-border); padding: 0.55rem 0.7rem; text-align: left; }
.entry-content th { background: var(--color-bg-alt); }
.entry-content iframe { max-width: 100%; border: 0; border-radius: var(--radius); }

/* Beágyazott Facebook-bejegyzések */
.fb-beagyazas { margin: 0 0 1.05em; }
.fb-beagyazas iframe { max-width: 100%; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.fb-beagyazas .fb-link { font-size: 0.85rem; margin-top: 0.3rem; }
.fb-beagyazas .fb-link a { font-weight: 600; }

/* A szerkesztőben közvetlenül beágyazott FB-poszt (Quill „video" embed) —
   ugyanaz a kártyás megjelenés, mint a linkből utólag generált beágyazásnál. */
.entry-content iframe.ql-video { margin: 0 0 1.05em; background: #fff; box-shadow: var(--shadow); }

/* Sok kép a szövegben: kompakt rács (JS rendezi át, ha 5-nél több kép van) */
.content-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 1.3rem;
}
.content-gallery-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
  aspect-ratio: 1;
}
.content-gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
  transition: transform 0.3s;
}
.content-gallery-tile:hover img { transform: scale(1.07); }
.content-gallery-tile::after {
  content: "🔍";
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(23, 9, 11, 0.6);
  color: #fff;
  border-radius: 50%;
  pointer-events: none;
}

/* Galéria a poszt alján */
.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}
.post-gallery a {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.post-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.3s;
}
.post-gallery a:hover img { transform: scale(1.07); }

/* ---------- Osztályok ---------- */

.class-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.class-card {
  position: relative;
  border: 1px solid rgba(38, 35, 35, 0.07);
  border-radius: 20px;
  padding: 1.4rem 1.4rem 1.3rem;
  text-decoration: none;
  color: var(--color-text);
  background: #fff;
  box-shadow: 0 2px 6px rgba(38, 35, 35, 0.05), 0 10px 30px rgba(38, 35, 35, 0.07);
  transition: box-shadow 0.25s, transform 0.25s;
  display: block;
  overflow: hidden;
}
.class-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-warning));
  opacity: 0;
  transition: opacity 0.25s;
}
.class-card:hover {
  box-shadow: 0 6px 14px rgba(38, 35, 35, 0.09), 0 22px 48px rgba(38, 35, 35, 0.16);
  transform: translateY(-4px);
  color: var(--color-text);
}
.class-card:hover::before { opacity: 1; }
.class-card h2 { color: var(--color-primary); margin: 0 0 0.3rem; font-size: 1.4rem; font-weight: 800; }
.class-card p { font-size: 0.9rem; color: var(--color-text-light); }

.student-list {
  columns: 2;
  column-gap: 2rem;
  list-style-position: inside;
  margin: 1rem 0;
}
.student-list li { padding: 0.25rem 0; break-inside: avoid; }

/* ---------- Órarend ---------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(38, 35, 35, 0.05), 0 10px 30px rgba(38, 35, 35, 0.08);
  border: 1px solid rgba(38, 35, 35, 0.07);
}
.timetable { border-collapse: collapse; width: 100%; min-width: 560px; background: #fff; font-size: 0.92rem; }
.timetable th {
  background: linear-gradient(150deg, #2c1517, #17090b);
  color: #fff;
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
}
.timetable td { padding: 0.55rem 0.85rem; border-top: 1px solid var(--color-border); }
.timetable tbody tr:nth-child(even) { background: #faf7f6; }
.timetable td:first-child { font-weight: 700; white-space: nowrap; color: var(--color-primary); }
.timetable-section { margin-bottom: 2.25rem; }
.timetable-section h2 a { color: var(--color-text); text-decoration: none; }
.timetable-section h2 a:hover { color: var(--color-primary); }

/* Órarendek oldal: osztályválasztó + egy órarend. Szkript nélkül minden órarend látszik. */
/* két lépés: évfolyam, aztán betű; a választó szkript nélkül nem működik, ezért akkor rejtve */
.tt-picker { display: none; gap: 0.6rem; margin-bottom: 1.5rem; }
.tt-js .tt-picker { display: grid; }
.tt-row { display: flex; align-items: center; gap: 0.75rem; }
.tt-row-label { width: 4.75rem; flex-shrink: 0; font-size: 0.85rem; font-weight: 600; color: var(--color-text-light); }
.tt-letters:not(.active) { display: none; }
.tt-grade { font: inherit; font-weight: 600; font-size: 0.9rem; min-width: 2.6rem; cursor: pointer; }
.tt-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tt-chip {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tt-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.tt-chip.active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-text-on-primary); }
.tt-chip:focus-visible, .tt-day:focus-visible { outline: 2px solid var(--color-primary-dark); outline-offset: 2px; }

/* #5-b linkről nyitva a ragadós menü ne takarja a címet */
.tt-class { margin-bottom: 2.25rem; scroll-margin-top: 7rem; }
.site-main .tt-class h2:not(.page-title) { margin: 0 0 0.75rem; }
.tt-js .tt-class { display: none; }
.tt-js .tt-class.active { display: block; animation: tt-be 0.25s ease-out; }
@keyframes tt-be { from { opacity: 0; transform: translateY(6px); } }

.tt-table td { vertical-align: top; min-width: 8.5rem; }
.tt-table tbody th { color: var(--color-primary); background: none; vertical-align: top; }
.tt-lesson { display: flex; flex-direction: column; line-height: 1.35; }
.tt-lesson + .tt-lesson { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px dashed var(--color-border); }
.tt-lesson strong { font-weight: 600; }
.tt-lesson span { font-size: 0.82rem; color: var(--color-text-light); }
.tt-split { font-style: normal; font-size: 0.78rem; font-weight: 600; color: var(--color-primary-dark); }
.tt-table .today { background: var(--color-primary-soft); }
.tt-table th.today { background: var(--color-primary-dark); }

/* napváltó csak telefonon, ott a táblázatból egyszerre egy nap látszik */
.tt-days { display: none; }
@media (max-width: 639px) {
  .tt-js .tt-days { display: flex; gap: 0.35rem; margin-bottom: 0.9rem; }
  .tt-day {
    flex: 1;
    padding: 0.5rem 0;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }
  .tt-day.active { background: var(--color-dark); border-color: var(--color-dark); color: #fff; }
  .tt-js .tt-table { min-width: 0; }
  .tt-js .tt-table .d1, .tt-js .tt-table .d2, .tt-js .tt-table .d3, .tt-js .tt-table .d4, .tt-js .tt-table .d5 { display: none; }
  .tt-js[data-day="1"] .tt-table .d1, .tt-js[data-day="2"] .tt-table .d2, .tt-js[data-day="3"] .tt-table .d3,
  .tt-js[data-day="4"] .tt-table .d4, .tt-js[data-day="5"] .tt-table .d5 { display: table-cell; }
  .tt-table td { width: 100%; }
  .tt-table .today { background: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tt-js .tt-class.active { animation: none; }
}

/* ---------- Csengetési rend ---------- */

.bells { max-width: 40rem; }
.bells-table { min-width: 0; }
.bells-table td, .bells-table tbody th { font-variant-numeric: tabular-nums; }
.bells-table tbody th { color: var(--color-primary); background: none; }
.bells-table strong { font-weight: 700; font-size: 1.02rem; }
.bells-signal { color: var(--color-text-light); }
/* a szünet csak egy keskeny, halvány sor a két óra között */
/* az órarend-táblázat csíkozása és piros első oszlopa itt nem kell: a szünetsorok tagolnak */
.bells-table tbody tr:nth-child(n) { background: #fff; }
.bells-table tbody tr.bells-break:nth-child(n) { background: var(--color-bg-alt); }
.bells-table .bells-break td:first-child {
  padding: 0.2rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-text-light);
  text-align: center;
}
.bells-table .bells-morning th, .bells-table .bells-morning td { color: var(--color-text-light); font-weight: 600; }
/* hétköznap a szkript jelöli az éppen tartó órát / szünetet */
.bells-table tbody tr.now:nth-child(n) { background: var(--color-primary-soft); }
.bells-table tr.now th::after { content: " most"; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.bells-table .bells-break.now td:first-child { color: var(--color-primary-dark); font-weight: 600; }

/* ---------- A tanév rendje ---------- */

.sy-lead { color: var(--color-text-light); margin-top: -0.75rem; }
.sy { max-width: 46rem; }
.site-main .sy-month h2:not(.page-title) { margin: 1.75rem 0 0.6rem; font-size: 1.05rem; color: var(--color-text-light); }
.sy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sy-item {
  display: grid;
  grid-template-columns: 9rem 1fr auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding: 0.8rem 1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.sy-date { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sy-body { display: flex; flex-direction: column; gap: 0.1rem; }
.sy-body strong { font-weight: 600; }
.sy-body span { font-size: 0.85rem; color: var(--color-text-light); }
.sy-kind { font-size: 0.75rem; font-weight: 600; color: var(--color-text-light); white-space: nowrap; }
/* szünet és tanítás nélküli nap: a családoknak ezek a legfontosabbak, ezért háttérrel kiemelve */
.sy-szunet, .sy-nincs-tanitas { background: var(--color-primary-soft); border-color: var(--color-welcome-border); }
.sy-szunet .sy-kind, .sy-nincs-tanitas .sy-kind { color: var(--color-primary-dark); }
.sy-item.is-past { opacity: 0.55; }
.sy-item.is-next { border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.sy-item.is-next .sy-kind { color: var(--color-primary); }
@media (max-width: 639px) {
  .sy-item { grid-template-columns: 1fr auto; }
  .sy-date { grid-column: 1; }
  .sy-kind { grid-column: 2; grid-row: 1; }
  .sy-body { grid-column: 1 / -1; }
}

/* ---------- Dokumentumok ---------- */

.doc-category { margin-bottom: 2.25rem; }
.doc-category h2 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
}
.doc-category h2::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-warning));
  flex-shrink: 0;
}
.doc-list { list-style: none; }
.doc-list li {
  border: 1px solid rgba(38, 35, 35, 0.08);
  border-radius: 14px;
  margin-bottom: 0.55rem;
  background: #fff;
  transition: box-shadow 0.2s, transform 0.2s;
}
.doc-list li:hover { box-shadow: var(--shadow-hover); transform: translateX(4px); }
.doc-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}
.doc-actions { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.doc-view-label {
  font-size: 0.78rem;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-weight: 700;
}
.doc-size { color: var(--color-text-light); font-size: 0.85rem; white-space: nowrap; font-weight: 400; }

/* PDF-megtekintő */
.pdf-viewer { margin-top: 1.25rem; }
.pdf-viewer object {
  width: 100%;
  height: 78vh;
  min-height: 420px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.pdf-fallback { padding: 2rem 1rem; text-align: center; }

/* ---------- Elérhetőségek ---------- */

.site-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-bottom: 1.5rem;
}
.site-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(38, 35, 35, 0.07);
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(38, 35, 35, 0.05), 0 10px 30px rgba(38, 35, 35, 0.07);
  padding: 1.4rem 1.5rem;
}
.site-main .site-card h2:not(.page-title) { margin: 0 0 0.5rem; font-size: 1.15rem; }
.site-card p { margin: 0 0 0.5rem; }
.site-card p:last-child { margin-bottom: 0; }

.map-embed {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(38, 35, 35, 0.05), 0 10px 30px rgba(38, 35, 35, 0.07);
}
.map-embed iframe { width: 100%; height: 380px; border: 0; display: block; }

/* Kezdőlap oldalsáv (Facebook Page Plugin) */
.home-layout { display: grid; gap: 1.75rem; }
.home-sidebar { min-width: 0; }

/* ---------- Lábléc ---------- */

.site-footer {
  background:
    radial-gradient(60rem 20rem at 90% -30%, rgba(221, 51, 51, 0.25), transparent 60%),
    linear-gradient(160deg, #241214 10%, #17090b);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.75rem 0 0;
  font-size: 0.92rem;
  margin-top: 2.5rem;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: 1.75rem;
  padding-bottom: 2rem;
}
.footer-col h2 {
  color: #fff;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.85rem;
  position: relative;
  padding-bottom: 0.55rem;
}
.footer-col h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-warning));
}
.footer-col p { margin-bottom: 0.45rem; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 0.18rem 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 0;
  font-size: 0.85rem;
}
.footer-bottom .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* ---------- Nagyobb képernyők ---------- */

@media (min-width: 640px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .site-title { font-size: 1.18rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }

  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important;
    flex-wrap: wrap;
    padding-bottom: 0;
  }
  .nav-menu > li { position: relative; }
  .nav-menu a, .nav-parent { border-radius: 0; padding: 0.85rem 1.05rem; }
  .nav-parent { width: auto; }
  .nav-menu > li:hover > .nav-parent, .nav-parent:focus-visible { background: rgba(0, 0, 0, 0.14); }
  .nav-menu > li > a { position: relative; }
  .nav-menu > li > a::after {
    content: "";
    position: absolute;
    left: 1.05rem;
    right: 1.05rem;
    bottom: 0.5rem;
    height: 2px;
    border-radius: 1px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s;
  }
  .nav-menu > li > a:hover::after, .nav-menu > li > a:focus-visible::after { transform: scaleX(1); }
  .nav-menu a:hover, .nav-menu a:focus-visible { background: rgba(0, 0, 0, 0.14); }

  .nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    z-index: 20;
    background: #1f0e10;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    padding: 0.3rem 0;
  }
  .nav-menu > li:hover > .nav-submenu,
  .nav-menu > li:focus-within > .nav-submenu { display: block; }
  .nav-submenu a { padding: 0.55rem 1.05rem; }

  .home-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .student-list { columns: 3; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Lightbox képnézegető ---------- */

.lb-clickable { cursor: zoom-in; }

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(23, 9, 11, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lb-fade 0.2s ease;
}
@keyframes lb-fade { from { opacity: 0; } }

.lb-stage {
  max-width: calc(100vw - 2rem);
  max-height: calc(100svh - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.lb-img {
  max-width: calc(100vw - 2rem);
  max-height: calc(100svh - 5.5rem);
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.lb-img.lb-betolt { animation: lb-kep 0.25s ease; }
@keyframes lb-kep { from { opacity: 0; transform: scale(0.97); } }

.lb-btn {
  position: absolute;
  z-index: 201;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
}
.lb-btn:hover { background: rgba(221, 51, 51, 0.55); transform: scale(1.08); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.08); }
.lb-next:hover { transform: translateY(-50%) scale(1.08); }

.lb-count {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
}

@media (max-width: 600px) {
  .lb-prev, .lb-next { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Közlemény felugró ablak ---------- */
.announce-modal[hidden] { display: none; }

.announce-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(23, 9, 11, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: lb-fade 0.2s ease;
}

.announce-box {
  position: relative;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
  max-width: 480px;
  width: 100%;
  max-height: calc(100svh - 2rem);
  overflow-y: auto;
  padding: 1.75rem;
  text-align: center;
  animation: lb-kep 0.25s ease;
}

.announce-image {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.announce-title {
  margin: 0 0 0.6rem;
  color: var(--color-dark);
}

.announce-text {
  color: var(--color-text);
  margin: 0 0 1.25rem;
}

.announce-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.announce-close:hover { background: var(--color-primary-soft); }

/* ---------- Facebook-gomb a menüsor jobb szélén ---------- */

/* Mobilon: menü gomb + Facebook egy sorban, a lenyíló menü alattuk teljes szélességben */
.site-nav .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
}
.site-nav .nav-toggle { flex: 1 1 auto; width: auto; }
.site-nav .nav-menu { flex-basis: 100%; order: 3; }

/* A kék a piros menüsorból kiemeli: ez a fő út az iskola mindennapi híreihez */
.nav-fb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--color-facebook);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  white-space: nowrap;
}
.nav-fb:hover, .nav-fb:focus-visible { background: var(--color-facebook-dark); color: #fff; }
.nav-fb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (min-width: 900px) {
  /* 0 alapszélesség: a menüpontok a saját sávjukban törnek, a Facebook-gomb jobbra marad */
  .site-nav .nav-menu { flex: 1 1 0; min-width: 0; order: 0; }
}

/* ---------- Archívum ---------- */

.archive-lead { color: var(--color-text-light); margin-top: -0.5rem; }
.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--color-border);
}
.archive-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--color-border);
}
.archive-list a { font-weight: 600; text-decoration: none; }
.archive-list a:hover { text-decoration: underline; }
.archive-list time { color: var(--color-text-light); font-size: 0.9rem; white-space: nowrap; }

/* ---------- Köszöntő a kezdőlapon ---------- */

.welcome { margin: 0 0 3rem; }
/* Az árnyék a köszöntőt a hírek fölé emeli: ez az oldal nyitó gondolata */
/* a halvány vöröses háttér választja el a fehér hírkártyáktól */
.welcome-quote {
  position: relative;
  margin: 0;
  background: var(--color-welcome-bg);
  border: 1px solid var(--color-welcome-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2.9rem clamp(1.1rem, 4vw, 2.25rem) clamp(1.1rem, 3vw, 1.6rem);
}
.welcome-quote blockquote { margin: 0; }
/* idézet: az igazgató saját szavai, ezért a nyitó magyar idézőjel */
.welcome-quote blockquote::before {
  content: "„";
  /* a „ az alapvonalon ül: a kártya felső paddingjébe tesszük, hogy ne érjen a szövegbe */
  position: absolute;
  top: -1.3rem;
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
}
.welcome-quote p {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.65;
  /* sorkizárt; az elválasztás (a html lang="hu" alapján) nem hagy nagy lyukakat a szavak között */
  text-align: justify;
  hyphens: auto;
}
.welcome-quote p:last-child { margin-bottom: 0; }
/* aláírás balra, a gomb a kártya jobb alsó sarkában */
.welcome-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: 1.1rem;
}
.welcome-foot figcaption { display: flex; flex-direction: column; line-height: 1.4; }
.welcome-foot figcaption strong { font-weight: 500; font-size: 1rem; }
.welcome-foot figcaption span { color: var(--color-text-light); font-size: 0.9rem; }
.welcome-more {
  margin-left: auto;
  display: inline-block;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  background: var(--color-primary-dark);
  color: var(--color-text-on-primary);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.18s;
}
.welcome-more:hover, .welcome-more:focus-visible { background: var(--color-primary); color: var(--color-text-on-primary); }
.welcome-more:focus-visible { outline: 2px solid var(--color-primary-dark); outline-offset: 2px; }
