/* ==========================================================
   MatekStream – tankönyvválasztó oldal
   ========================================================== */

:root {
  --ms-blue: #2563eb;
  --ms-blue-dark: #173ea5;
  --ms-blue-soft: #eaf2ff;
  --ms-yellow: #facc15;
  --ms-yellow-soft: #fff8d7;
  --ms-ink: #172033;
  --ms-muted: #64748b;
  --ms-surface: #ffffff;
  --ms-bg: #f6f8fc;
  --ms-border: #dfe7f3;
  --ms-shadow: 0 18px 45px rgba(30, 64, 175, 0.10);
  --ms-shadow-hover: 0 25px 60px rgba(30, 64, 175, 0.18);
  --ms-radius-lg: 28px;
  --ms-radius-md: 20px;
  --ms-radius-sm: 14px;
}

/* Alapok */

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ms-ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.10), transparent 28rem),
    radial-gradient(circle at 95% 10%, rgba(250, 204, 21, 0.13), transparent 24rem),
    var(--ms-bg);
}

main.content {
  padding: 0;
  max-width: none;
}

.book-selector-page {
  overflow: hidden;
}

.book-selector-page > * {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Hero */

.selector-hero {
  position: relative;
  isolation: isolate;
  margin-top: 1.5rem;
  margin-bottom: 4.5rem;
  padding: clamp(2.5rem, 7vw, 5.5rem);
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239,245,255,0.96)),
    var(--ms-surface);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--ms-radius-lg);
  box-shadow: var(--ms-shadow);
}

.selector-hero::before,
.selector-hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 999px;
  filter: blur(2px);
}

.selector-hero::before {
  top: -9rem;
  right: -6rem;
  width: 24rem;
  height: 24rem;
  background: rgba(37, 99, 235, 0.11);
}

.selector-hero::after {
  bottom: -8rem;
  left: -5rem;
  width: 19rem;
  height: 19rem;
  background: rgba(250, 204, 21, 0.17);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.9rem;
  color: var(--ms-blue-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  background: var(--ms-blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 999px;
}

.selector-hero h1 {
  max-width: 850px;
  margin: 0 auto 1.25rem;
  color: var(--ms-ink);
  font-size: clamp(2.25rem, 6vw, 4.6rem);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.selector-hero > p {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  color: var(--ms-muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.hero-note {
  max-width: 720px;
  margin: 1.5rem auto 2rem;
  padding: 1rem 1.2rem;
  color: #41516a;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius-sm);
  backdrop-filter: blur(8px);
}

.selector-hero .btn-primary {
  padding: 0.85rem 1.4rem;
  font-weight: 800;
  background: var(--ms-blue);
  border-color: var(--ms-blue);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.selector-hero .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

/* Szekciócím */

#tankonyvek {
  margin-top: 0;
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.035em;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  color: var(--ms-muted);
  text-align: center;
  font-size: 1.08rem;
  line-height: 1.7;
}

/* Könyvkártyák */

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.book-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius-md);
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.07);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.book-card:hover {
  transform: translateY(-8px);
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: var(--ms-shadow-hover);
}

.book-card > p:first-child {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 310px;
  margin: 0;
  padding: 1.35rem 1.35rem 0.4rem;
  background:
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.book-card img {
  width: auto;
  max-width: 100%;
  max-height: 285px;
  object-fit: contain;
  filter: drop-shadow(0 13px 14px rgba(15, 23, 42, 0.15));
  transition: transform 220ms ease;
}

.book-card:hover img {
  transform: scale(1.035);
}

.book-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding: 1.15rem 1.25rem 1.4rem;
  text-align: center;
}

.book-card-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
}

.book-card-body p {
  margin-bottom: 0.8rem;
  color: var(--ms-blue-dark);
}

.book-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding: 0.7rem 1rem;
  color: var(--ms-blue-dark);
  font-weight: 800;
  text-decoration: none;
  background: var(--ms-blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.book-button:hover {
  color: #ffffff;
  text-decoration: none;
  background: var(--ms-blue);
  transform: translateY(-1px);
}

/* Mautic űrlap szekció */

.selection-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  margin-bottom: 3rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background:
    linear-gradient(145deg, #102a6c, #2563eb);
  border-radius: var(--ms-radius-lg);
  box-shadow: 0 25px 70px rgba(23, 62, 165, 0.25);
}

.selection-copy {
  color: #ffffff;
}

.selection-copy h2 {
  margin-top: 0;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.selection-copy > p {
  color: rgba(255,255,255,0.82);
  font-size: 1.08rem;
  line-height: 1.7;
}

.selection-tip {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  color: #172033;
  background: var(--ms-yellow-soft);
  border-left: 5px solid var(--ms-yellow);
  border-radius: 12px;
}

.selection-tip p {
  margin: 0;
}

.mautic-form-wrapper {
  padding: clamp(1.2rem, 3vw, 2rem);
  background: #ffffff;
  border-radius: var(--ms-radius-md);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

/* Mautic általános formázás */

.mauticform_wrapper {
  max-width: none !important;
  margin: 0 !important;
}

.mauticform-row {
  margin-bottom: 1rem !important;
}

.mauticform-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ms-ink);
  font-size: 0.94rem;
  font-weight: 750;
}

.mauticform-input,
.mauticform-selectbox,
.mauticform-textarea {
  width: 100% !important;
  min-height: 48px;
  padding: 0.75rem 0.9rem !important;
  color: var(--ms-ink);
  background: #ffffff;
  border: 1px solid #cfd9e8 !important;
  border-radius: 11px !important;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.mauticform-input:focus,
.mauticform-selectbox:focus,
.mauticform-textarea:focus {
  border-color: var(--ms-blue) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

.mauticform-button,
.mauticform-button-wrapper .mauticform-button {
  width: 100%;
  min-height: 50px;
  color: #ffffff !important;
  font-weight: 800 !important;
  background: var(--ms-blue) !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.mauticform-button:hover {
  background: var(--ms-blue-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.27);
}

.mauticform-errormsg {
  color: #b42318;
  font-size: 0.88rem;
}

.mauticform-message {
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}

/* Bizalmi sáv */

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 4rem;
}

.trust-item {
  padding: 1.4rem;
  text-align: center;
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius-sm);
}

.trust-item p {
  margin: 0;
  color: var(--ms-muted);
}

.trust-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ms-blue-dark);
  font-size: 1.05rem;
}

/* Reszponzivitás */

@media (max-width: 1050px) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .selection-section {
    grid-template-columns: 1fr;
  }

  .trust-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .book-selector-page > * {
    width: min(100% - 1rem, 1180px);
  }

  .selector-hero {
    margin-top: 0.5rem;
    margin-bottom: 3rem;
    padding: 2.25rem 1.2rem;
    border-radius: 22px;
  }

  .selector-hero h1 {
    font-size: 2.35rem;
  }

  .book-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .book-card {
    display: grid;
    grid-template-columns: 42% 58%;
  }

  .book-card > p:first-child {
    min-height: 225px;
    padding: 1rem 0.45rem 1rem 0.8rem;
  }

  .book-card img {
    max-height: 205px;
  }

  .book-card-body {
    align-items: stretch;
    justify-content: center;
    padding: 1rem 0.9rem;
    text-align: left;
  }

  .book-card-body h3 {
    font-size: 1rem;
  }

  .book-button {
    text-align: center;
  }

  .selection-section {
    padding: 1rem;
    border-radius: 20px;
  }

  .selection-copy {
    padding: 1rem 0.5rem 0;
  }
}

/* Csökkentett animáció igénye */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
