/* ===== Kedvenc Könyvek – arculati színek ===== */
:root {
  --paper: #f4f7f8;        /* világos, hűvös háttér */
  --paper-dark: #e3ecee;
  --ink: #1e2a33;          /* sötét szövegszín */
  --ink-soft: #4c5a64;
  --primary: #1f6f78;      /* fő márkaszín: petróleumkék */
  --primary-dark: #17555c;
  --secondary: #2c3e66;    /* kiegészítő: mélykék */
  --accent: #f2a65a;       /* kiemelés: barack */
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(30, 42, 51, .35);
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .6em;
}

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 760px; }

/* ===== Gombok ===== */
.btn {
  display: inline-block;
  padding: 15px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(31, 111, 120, .6);
  transition: background .2s, transform .2s;
}

.btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn-small { padding: 9px 20px; font-size: .95rem; }
.btn-block { display: block; width: 100%; }

/* ===== Fejléc ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 247, 248, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--paper-dark);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  text-decoration: none;
}

.logo-icon { width: 32px; height: 32px; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Nyelvváltó ===== */
.lang-switch { position: relative; }

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 2px solid var(--paper-dark);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color .2s;
}
.lang-current::-webkit-details-marker { display: none; }
.lang-current:hover,
.lang-switch[open] .lang-current { border-color: var(--primary); }
.lang-current:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lang-globe,
.lang-chevron {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lang-globe { color: var(--primary); }
.lang-chevron { width: 14px; height: 14px; transition: transform .2s; }
.lang-switch[open] .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--paper-dark);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background .15s;
}
.lang-option:hover,
.lang-option:focus-visible { background: var(--paper); outline: none; }

.lang-option .lang-code {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  padding: 3px 0;
  border-radius: 6px;
  background: var(--paper-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.lang-option.is-active { font-weight: 700; color: var(--primary); }
.lang-option.is-active .lang-code { background: var(--primary); color: var(--white); }
.lang-option.is-active::after {
  content: "✓";
  margin-left: auto;
  color: var(--primary);
}

/* ===== Hero ===== */
.hero { padding: 72px 0 88px; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  color: var(--secondary);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  color: var(--ink);
}

.lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 1.8em;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-weight: 600;
}

.hero-points li::before {
  content: "✓";
  color: var(--secondary);
  margin-right: 6px;
  font-weight: 700;
}

/* Könyvespolc illusztráció (tisztán CSS) */
.hero-visual {
  display: flex;
  justify-content: center;
}

.shelf {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 0 24px;
  height: 300px;
  border-bottom: 14px solid #8a6a4f;
  border-radius: 0 0 6px 6px;
}

.spine {
  display: block;
  width: 44px;
  border-radius: 4px 4px 0 0;
  box-shadow: inset -6px 0 0 rgba(0, 0, 0, .12), inset 0 18px 0 rgba(255, 255, 255, .12);
  position: relative;
}

.spine::after {   /* díszcsík a gerincen */
  content: "";
  position: absolute;
  left: 8px; right: 14px;
  top: 30%;
  height: 4px;
  background: rgba(255, 255, 255, .45);
  border-radius: 2px;
}

.s1 { height: 230px; background: var(--primary); }
.s2 { height: 260px; background: var(--secondary); width: 52px; }
.s3 { height: 200px; background: var(--accent); }
.s4 { height: 280px; background: #5b8fb0; width: 38px; }
.s5 { height: 240px; background: #e07a5f; }
.s6 { height: 215px; background: var(--primary-dark); transform: rotate(8deg); transform-origin: bottom left; margin-left: 4px; }
.s7 { height: 190px; background: var(--secondary); opacity: .8; transform: rotate(8deg); transform-origin: bottom left; }

/* ===== Ajánlat + űrlap ===== */
.offer {
  padding: 80px 0;
  background: var(--paper-dark);
  scroll-margin-top: 68px;
}

.badge {
  width: fit-content;
  margin: 0 auto 32px;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: center;
}

.offer-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.offer-info {
  padding: 48px;
  background: var(--secondary);
  color: #e8edf6;
}

.offer-info em { color: var(--white); }

.offer-form { padding: 48px; }

.offer-form h2 {
  font-size: 1.75rem;
  color: var(--primary);
}

/* E-book borító */
.ebook-cover {
  display: flex;
  flex-direction: column;
  width: 220px;
  aspect-ratio: 3 / 4.2;
  margin: 0 auto 32px;
  padding: 22px 20px;
  border-radius: 4px 12px 12px 4px;
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: -10px 0 0 -4px rgba(0, 0, 0, .2) inset, 14px 18px 30px -10px rgba(0, 0, 0, .5);
  transform: rotate(-3deg);
}

.cover-tag {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.cover-number {
  font-family: var(--font-head);
  font-size: 4.2rem;
  font-weight: 800;
  line-height: 1;
  margin-top: 14px;
  color: var(--accent);
}

.cover-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 6px;
}

.cover-sub {
  font-size: .78rem;
  line-height: 1.35;
  margin-top: 8px;
  opacity: .85;
}

.cover-brand {
  margin-top: auto;
  font-family: var(--font-head);
  font-size: .8rem;
  border-top: 1px solid rgba(255, 255, 255, .3);
  padding-top: 8px;
}

/* Űrlap mezők */
form { margin-top: 24px; }

.field { margin-bottom: 14px; }

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #cfdbe0;
  border-radius: 10px;
  background: var(--paper);
  font: inherit;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}

input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(44, 62, 102, .15);
}

input.invalid { border-color: #c0392b; }

.error {
  min-height: 1.3em;
  margin: 4px 0 0;
  color: #c0392b;
  font-size: .9rem;
}

.privacy {
  margin: 18px 0 0;
  font-size: .88rem;
  color: var(--ink-soft);
}

/* Sikeres feliratkozás */
.success { text-align: center; padding-top: 12px; }
.success:focus { outline: none; }

.success-icon {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--white);
  font-size: 2rem;
  font-weight: 700;
}

.success h3 { font-size: 1.6rem; color: var(--primary); }

/* ===== Közösség ===== */
.community {
  padding: 88px 0;
  text-align: center;
}

.community h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--primary);
}

.community > .container > p {
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.cta-box {
  margin-top: 40px;
  padding: 36px 32px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--white);
}

.cta-box p { font-size: 1.1rem; }

/* ===== Lábléc ===== */
.site-footer {
  padding: 48px 0 32px;
  background: var(--ink);
  color: #dfe7ec;
  text-align: center;
}

.footer-thanks {
  font-family: var(--font-head);
  font-size: 1.25rem;
}

.footer-copy {
  margin: 24px 0 0;
  font-size: .85rem;
  opacity: .6;
}

/* ===== Reszponzív ===== */
@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-text { text-align: center; }
  .hero-points { justify-content: center; }
  .shelf { height: 220px; gap: 6px; }
  .spine { width: 32px; }
  .s1 { height: 170px; } .s2 { height: 195px; width: 38px; } .s3 { height: 150px; }
  .s4 { height: 210px; width: 28px; } .s5 { height: 180px; } .s6 { height: 160px; } .s7 { height: 140px; }

  .offer { padding: 56px 0; }
  .offer-card { grid-template-columns: 1fr; }
  .offer-info, .offer-form { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .logo { font-size: 1.15rem; }
  .logo-icon { width: 26px; height: 26px; }
  .btn-small { padding: 8px 12px; font-size: .85rem; white-space: nowrap; }
  .logo { gap: 8px; }
  .header-actions { gap: 8px; }
  .lang-current { padding: 6px 9px; gap: 4px; font-size: .85rem; }
  .lang-globe { display: none; }
  .badge { font-size: .85rem; padding: 8px 16px; }
  .cta-box { padding: 28px 18px; }
  .spine { width: 26px; }
  .s2 { width: 30px; } .s4 { width: 22px; }
}

/* Nagyon keskeny kijelzőn a fejléc-gomb helyett a hero CTA (rögtön alatta) visz az űrlaphoz,
   így a logó és a nyelvváltó minden nyelven kényelmesen elfér. */
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .logo { font-size: 1.05rem; }
  .btn-small { padding: 7px 10px; font-size: .8rem; }
}

@media (max-width: 359px) {
  .header-actions .btn-small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
