:root {
  --magenta: #e91e9c;
  --magenta-dark: #b31273;
  --champagne: #f4dca6;
  --beige: #f8ecd0;
  --gold: #c9a15a;
  --gold-light: #f6e4a8;
  --text: #2e1f18;
  --text-light: #5c4638;
  --white: #ffffff;
  --shadow: 0 15px 40px rgba(0,0,0,0.08);
  --radius: 20px;
  --radius-lg: 32px;
  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  position: relative;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fffdf8 0%, var(--beige) 100%);
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
}

.scroll-sentinel {
  position: absolute;
  top: 400px;
  left: 0;
  width: 1px;
  height: 1px;
  visibility: hidden;
  pointer-events: none;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  line-height: 1.1;
  color: var(--magenta-dark);
}

h1 { font-size: clamp(3rem, 7vw, 6rem); color: white; }
h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 20px; }
h3 { font-size: 2.1rem; margin-bottom: 15px; }

p { color: var(--text-light); margin-bottom: 15px; }

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius);
}

a { text-decoration: none; }

section {
  padding: 100px 0;
  width: 100%;
  max-width: 100%;
}

.btn {
  display: inline-block;
  padding: 16px 34px;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--magenta));
  color: white;
  box-shadow: 0 10px 25px rgba(178,18,115,0.25);
}

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

.btn-outline {
  border: 2px solid rgba(255,255,255,0.7);
  color: white;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.logo img {
  height: 52px;
  width: auto;
  max-width: min(280px, 55vw);
  border-radius: 0;
  margin: 0;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  z-index: 1101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--magenta-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(46, 31, 24, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
}

.nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

body.nav-open header {
  z-index: 1001;
}

.hero {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
  background-color: #5c1848;
  background-image:
    linear-gradient(rgba(179,18,115,0.45), rgba(70,20,40,0.65)),
    url('../img/hero-mobile.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: white;
}

@media (min-width: 768px) {
  .hero {
    background-image:
      linear-gradient(rgba(179,18,115,0.45), rgba(70,20,40,0.65)),
      url('../img/hero-desktop.webp');
  }
}

.hero-content {
  max-width: 760px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.92);
  margin: 25px 0 35px;
}

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

.section-intro {
  max-width: 760px;
  margin-bottom: 50px;
}

.grid {
  display: grid;
  gap: 30px;
  width: 100%;
  max-width: 100%;
}

.grid > * {
  min-width: 0;
  max-width: 100%;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

#rolam .grid-2 {
  align-items: stretch;
}

.about-image {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  min-height: 100%;
}

.about-image img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  margin: 0;
}

@media (min-width: 769px) {
  #rolam .about-image {
    align-self: stretch;
    height: 100%;
  }

  #rolam .about-image img {
    flex: 1;
    aspect-ratio: auto;
  }
}

@media (max-width: 768px) {
  .about-image {
    min-height: auto;
  }

  .about-image img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

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

.card {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(201,161,90,0.15);
  border-radius: var(--radius);
  padding: 35px;
  box-shadow: var(--shadow);
}

.class-types {
  align-items: stretch;
}

.class-type-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.class-type-card h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin-bottom: 18px;
  line-height: 1.25;
}

.class-type-card p {
  margin-bottom: 14px;
}

.class-type-card > p:last-of-type {
  margin-bottom: 1.25rem;
}

.class-type-book {
  margin-top: auto;
  width: 100%;
  text-align: center;
  padding-top: 16px;
}

.class-type-meta {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85em;
  font-weight: 500;
  color: var(--text-light);
}

.class-type-cta {
  font-weight: 600;
  color: var(--magenta-dark);
  margin-bottom: 1.25rem;
}

.feature-list {
  list-style: none;
  display: grid;
  gap: 12px;
}

#rolam h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.75rem;
}

.about-credentials {
  margin-top: 0;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.price-table td {
  padding: 12px 0;
  border-bottom: 1px solid rgba(201,161,90,0.25);
}

.price-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--magenta-dark);
}

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

section[id] {
  scroll-margin-top: 90px;
}

.schedule-wrap {
  overflow-x: auto;
  max-width: 100%;
  padding: 8px 4px 4px;
  -webkit-overflow-scrolling: touch;
}

.schedule-table {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 10px;
}

.schedule-table th,
.schedule-table td {
  text-transform: uppercase;
}

.schedule-table th {
  background: linear-gradient(135deg, var(--magenta-dark), var(--magenta));
  color: white;
  padding: 16px 14px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.schedule-table td {
  padding: 14px 12px;
  border-radius: 14px;
  font-size: clamp(0.68rem, 1.4vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  vertical-align: middle;
  color: white;
  line-height: 1.35;
}

.schedule-day,
.schedule-time {
  background: linear-gradient(180deg, #5c1848 0%, var(--magenta-dark) 45%, var(--magenta) 100%);
  white-space: nowrap;
}

.schedule-day {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.schedule-class--tabata {
  background: linear-gradient(135deg, #4a4a4a, #6a6a6a);
}

.schedule-class--alak {
  background: linear-gradient(135deg, #ff8fc4, var(--magenta));
}

.schedule-class--bosu {
  background: linear-gradient(135deg, #d4b8e8, #a67bc4);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
}

.gallery-item:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 0;
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 70px;
  background: rgba(30, 15, 25, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
}

.gallery-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-modal__content {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
}

.gallery-modal__hint {
  display: none;
}

.gallery-modal__image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(1100px, calc(100vw - 140px));
  max-height: calc(100vh - 120px);
  aspect-ratio: 4 / 3;
  min-height: 200px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: var(--radius);
  -webkit-user-drag: none;
  user-select: none;
  -moz-user-select: none;
}

.gallery-modal__close,
.gallery-modal__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  color: white;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  transition: background 0.2s;
}

.gallery-modal__close:hover,
.gallery-modal__nav:hover {
  background: rgba(255,255,255,0.22);
}

.gallery-modal__close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}

.gallery-modal__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
}

.gallery-modal__nav--prev { left: 16px; }
.gallery-modal__nav--next { right: 16px; }

.gallery-modal__counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
}

body.gallery-modal-open {
  overflow: hidden;
}

.scroll-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1500;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--magenta));
  color: white;
  font-size: 1.5rem;
  line-height: 1;
  box-shadow: 0 10px 25px rgba(178, 18, 115, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

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

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(178, 18, 115, 0.4);
}

.scroll-top.is-visible:hover {
  transform: translateY(-3px);
}

.cta {
  background: linear-gradient(135deg, var(--magenta-dark), var(--magenta));
  color: white;
  border-radius: var(--radius-lg);
  padding: 70px 50px;
  text-align: center;
  box-shadow: var(--shadow);
}

.cta h2 { color: white; }
.cta p { color: rgba(255,255,255,0.9); }

.contact-map {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-map iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 450px;
  border: 0;
  border-radius: var(--radius);
}

#kapcsolat .card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contact-logo {
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid rgba(201, 161, 90, 0.25);
  text-align: center;
  line-height: 0;
}

.contact-logo img {
  width: min(200px, 70%);
  height: auto;
  margin: 0 auto;
  border-radius: 0;
}

footer {
  background: #1a1215;
  color: #ffffff;
  text-align: center;
  padding: 40px 20px;
}

footer p {
  margin: 0;
  color: #ffffff;
}

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

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    margin-left: auto;
    position: relative;
    z-index: 1102;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    width: min(300px, 100vw);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 88px 24px 32px;
    gap: 0;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transform: translate3d(100%, 0, 0);
    transition: transform 0.3s ease, visibility 0.3s;
    overflow-y: auto;
    pointer-events: none;
    visibility: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.is-open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    visibility: visible;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(201, 161, 90, 0.2);
  }

  .nav-links a {
    display: block;
    padding: 16px 4px;
    font-size: 1.05rem;
  }

  .container {
    width: calc(100% - 32px);
  }

  .grid-2,
  .grid-3,
  .class-types {
    grid-template-columns: 1fr;
  }

  h1 { font-size: clamp(2rem, 10vw, 3rem); }
  h2 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  h3 { font-size: clamp(1.35rem, 5vw, 1.75rem); }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

  .card {
    padding: 24px;
  }

  #kapcsolat .grid-2 {
    gap: 24px;
  }

  .contact-map iframe {
    height: clamp(240px, 62vw, 320px);
  }

  section { padding: 70px 0; }
  .cta { padding: 40px 24px; }
  .gallery-modal {
    padding: 50px 16px;
    touch-action: none;
  }

  .gallery-modal__content {
    touch-action: none;
  }

  .gallery-modal__image {
    pointer-events: none;
  }

  .gallery-modal__nav {
    display: none;
  }

  .gallery-modal__counter {
    position: static;
    transform: none;
    margin-top: 12px;
    text-align: center;
  }

  .gallery-modal__hint {
    display: block;
    margin: 8px auto 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .gallery-modal__image {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 24px);
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-item img { height: 220px; }
  .scroll-top { right: 12px; bottom: 12px; width: 44px; height: 44px; }
  section { padding: 56px 0; }
  .cta { padding: 32px 18px; }
  .btn { padding: 14px 24px; }
  .logo img { height: 44px; }

  .contact-map iframe {
    height: 240px;
  }
}