:root {
  --primary: #173b68;
  --primary-2: #255c9f;
  --accent: #e87c2f;
  --ink: #172033;
  --muted: #667085;
  --line: #dce4ef;
  --light: #f6f8fb;
  --white: #ffffff;
  --success: #198754;
  --radius: 10px;
  --shadow: 0 16px 40px rgba(23, 59, 104, .12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

body.admin-bar .site-header {
  top: 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 59, 104, .16);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-outline {
  color: var(--primary);
  border-color: var(--primary);
  background: transparent;
}

.btn-white {
  color: var(--primary);
  background: var(--white);
}

.btn-success {
  color: var(--white);
  background: #18a765;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(220, 228, 239, .8);
  backdrop-filter: blur(14px);
}

.nav-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.nav-logo-box {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  font-weight: 900;
  font-size: 21px;
}

.custom-logo-wrap img {
  width: auto;
  max-height: 46px;
}

.nav-brand-text {
  display: block;
  color: var(--primary);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 900;
  white-space: nowrap;
}

.brand-title {
  display: block;
}

.nav-brand-text .brand-accent {
  color: var(--accent);
}

.nav-brand-text small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a:hover,
.nav-links .current-menu-item > a {
  background: var(--primary);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--light);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: var(--primary);
}

.hero-section {
  position: relative;
  min-height: 86vh;
  padding: 150px 0 86px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--primary);
}

.hero-cover-wall {
  position: absolute;
  inset: -8% -5%;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  transform: rotate(-6deg) scale(1.08);
  opacity: .55;
}

.hero-cover-wall img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.hero-cover-wall img:nth-child(odd) {
  transform: translateY(44px);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 59, 104, .96) 0%, rgba(23, 59, 104, .82) 48%, rgba(23, 59, 104, .58) 100%),
    linear-gradient(0deg, rgba(23, 59, 104, .8), rgba(23, 59, 104, .2));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-left: max(20px, calc((100vw - 1160px) / 2));
  margin-right: auto;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 0 18px;
  color: var(--white);
  font-size: 54px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-content p {
  max-width: 640px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-logo {
  width: 132px;
  height: 52px;
  object-fit: contain;
}

#hero {
  padding-top: 70px;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: calc(100vh - 70px);
  min-height: 560px;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity .8s ease;
  padding: 60px 0;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.slide-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(26, 60, 110, .82) 45%, rgba(26, 60, 110, .4) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
}

.slide-tag {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  animation: fadeUp .6s ease both;
}

.slide-title {
  margin: 0 0 18px;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.15;
  font-weight: 900;
  animation: fadeUp .7s .1s ease both;
}

.slide-title em {
  color: #ffc97a;
  font-style: normal;
}

.slide-desc {
  max-width: 620px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, .88);
  font-size: 1.05rem;
  animation: fadeUp .7s .2s ease both;
}

.slide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: fadeUp .7s .3s ease both;
}

.btn-outline-white {
  border-color: var(--white);
  color: var(--white);
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  z-index: 3;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .42);
  cursor: pointer;
  transition: .3s;
}

.dot.active {
  width: 28px;
  border-radius: 5px;
  background: var(--accent);
}

.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  animation: float 8s ease-in-out infinite;
}

.shape-1 {
  width: 320px;
  height: 320px;
  right: -60px;
  top: -80px;
}

.shape-2 {
  width: 180px;
  height: 180px;
  right: 180px;
  bottom: 60px;
  animation-delay: 2s;
}

.shape-3 {
  width: 90px;
  height: 90px;
  right: 100px;
  top: 200px;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.stats-bar {
  background: var(--primary);
  color: var(--white);
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 28px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  padding: 0;
  text-align: center;
}

.stats-grid div {
  min-width: 0;
}

.stats-grid strong {
  display: block;
  color: #ffc97a;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.stat-num {
  color: var(--accent);
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 900;
}

.stat-label {
  margin-top: 2px;
  color: rgba(255, 255, 255, .75);
  font-size: .85rem;
}

.stats-grid span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.section {
  padding: 82px 0;
}

.section-header {
  max-width: 680px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-title {
  margin: 0;
  color: var(--primary);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.section-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px;
}

.book-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 59, 104, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.book-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: var(--white);
  font-size: 42px;
  font-weight: 900;
  overflow: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-info {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
}

.book-cat {
  width: fit-content;
  margin-bottom: 9px;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: #edf4fb;
  font-size: 12px;
  font-weight: 800;
}

.book-title {
  margin: 0 0 7px;
  color: var(--primary);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
}

.book-title a:hover {
  color: var(--accent);
}

.book-author {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.book-synopsis {
  display: -webkit-box;
  min-height: 66px;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.book-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--primary);
  font-size: 13px;
}

.book-meta strong {
  color: var(--accent);
}

.book-meta a {
  font-weight: 800;
}

.book-card-home .book-synopsis {
  display: none;
}

.center-action {
  margin-top: 34px;
  text-align: center;
}

.packages-section,
.katalog-section,
.contact-section {
  background: var(--light);
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.package-card,
.why-card,
.contact-form,
.contact-info,
.book-detail-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 59, 104, .08);
}

.package-card {
  position: relative;
  padding: 30px;
}

.package-card.featured {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.package-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--primary);
  background: #edf4fb;
  font-weight: 900;
}

.featured .package-icon {
  color: var(--primary);
  background: var(--white);
}

.package-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.package-card h3 {
  margin: 16px 0 4px;
  font-size: 22px;
  line-height: 1.2;
}

.package-price {
  margin: 0 0 18px;
  color: var(--accent);
  font-weight: 900;
}

.featured .package-price {
  color: #ffc97a;
}

.package-card ul {
  min-height: 180px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
}

.package-card li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(102, 112, 133, .16);
}

.pkg-card {
  position: relative;
  overflow: hidden;
  padding: 36px 28px;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.pkg-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 42px rgba(26, 60, 110, .14);
}

.pkg-card.featured {
  background: var(--primary);
  color: var(--white);
}

.pkg-badge {
  position: absolute;
  top: 16px;
  right: -28px;
  padding: 4px 40px;
  background: var(--accent);
  color: var(--white);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  transform: rotate(45deg);
}

.pkg-icon {
  margin-bottom: 14px;
  font-size: 2.6rem;
  line-height: 1;
}

.pkg-name {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 900;
}

.pkg-card.featured .pkg-name {
  color: var(--white);
}

.pkg-desc {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .85rem;
}

.pkg-card.featured .pkg-desc {
  color: rgba(255, 255, 255, .72);
}

.pkg-price {
  margin: 12px 0;
  color: var(--accent);
  font-size: 1.7rem;
  line-height: 1.2;
  font-weight: 900;
}

.pkg-card.featured .pkg-price {
  color: #ffc97a;
}

.pkg-features {
  min-height: 230px;
  margin: 20px 0 28px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.pkg-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  color: var(--ink);
  font-size: .88rem;
}

.pkg-features li::before {
  content: "✓";
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 900;
}

.pkg-card.featured .pkg-features li {
  color: rgba(255, 255, 255, .88);
  border-color: rgba(255, 255, 255, .12);
}

.pkg-card.featured .pkg-features li::before {
  color: #ffc97a;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.why-card {
  padding: 28px 20px;
  text-align: center;
  transition: transform .2s ease;
}

.why-card:hover {
  transform: translateY(-4px);
}

.why-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: rgba(26, 60, 110, .08);
  font-size: 1.7rem;
}

.why-card strong,
.why-title {
  display: block;
  color: var(--primary);
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 800;
}

.why-card p,
.why-desc {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.cta-banner {
  padding: 78px 0;
  text-align: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.cta-banner h2 {
  margin: 0 0 12px;
  font-size: 38px;
  line-height: 1.16;
}

.cta-banner p {
  max-width: 620px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, .82);
}

.page-hero {
  padding: 142px 0 66px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.page-hero.compact {
  padding-bottom: 48px;
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 12px;
  color: var(--white);
  font-size: 42px;
  line-height: 1.14;
}

.page-hero p:not(.eyebrow) {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, .84);
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 22px;
}

.catalog-tools input,
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 11px 14px;
  color: var(--ink);
  font: inherit;
  outline: none;
}

.catalog-tools input:focus,
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 92, 159, .12);
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 34px;
}

.catalog-filters a {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.catalog-filters a.active,
.catalog-filters a:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.pagination-wrap {
  margin-top: 38px;
}

.pagination-wrap ul,
.nav-links .sub-menu {
  list-style: none;
}

.pagination-wrap ul {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.pagination-wrap a,
.pagination-wrap span {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--primary);
  font-weight: 800;
}

.pagination-wrap .current {
  background: var(--primary);
  color: var(--white);
}

.contact-layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 34px;
  align-items: start;
}

.contact-info,
.contact-form {
  padding: 30px;
}

.contact-info h2,
.contact-form h2,
.book-detail-box h2 {
  margin: 0 0 22px;
  color: var(--primary);
  font-size: 24px;
}

.contact-item {
  display: grid;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.contact-item span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.contact-item strong {
  color: var(--ink);
}

.map-box {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding: 22px;
  border: 1px dashed #aebbd0;
  border-radius: 8px;
  background: var(--light);
  color: var(--muted);
}

.map-box strong {
  color: var(--primary);
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.book-hero {
  position: relative;
  padding: 138px 0 76px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  overflow: hidden;
}

.book-hero-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.single-cover {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 24px 54px rgba(0, 0, 0, .25);
}

.single-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.single-summary h1 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 44px;
  line-height: 1.12;
}

.single-author {
  max-width: 760px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, .84);
}

.single-price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.single-price strong {
  color: #ffc97a;
  font-size: 28px;
}

.single-price span {
  color: rgba(255, 255, 255, .72);
  text-decoration: line-through;
}

.single-price em {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-style: normal;
  font-weight: 900;
}

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.prose {
  color: var(--ink);
}

.prose h2 {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 28px;
  line-height: 1.2;
}

.prose p {
  margin: 0 0 16px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature-list div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--light);
}

.feature-list strong {
  color: var(--primary);
}

.feature-list p {
  margin: 6px 0 0;
  color: var(--muted);
}

.book-detail-box {
  position: sticky;
  top: 94px;
  padding: 24px;
}

.book-detail-box dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.book-detail-box dt {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.book-detail-box dd {
  margin: -10px 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.source-book-render {
  display: grid;
  gap: 24px;
}

.source-book-render .book-post-content {
  display: grid;
  gap: 24px;
}

.source-book-section {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 59, 104, .06);
}

.source-book-section h2 {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
}

.source-book-section h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 18px;
  line-height: 1.25;
}

.source-book-section p:last-child {
  margin-bottom: 0;
}

.source-info table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.source-info th,
.source-info td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.source-info th {
  width: 190px;
  color: var(--primary);
  background: #edf4fb;
  font-weight: 900;
}

.source-info tr:last-child th,
.source-info tr:last-child td {
  border-bottom: 0;
}

.original-price {
  display: inline-block;
  margin-right: 10px;
  color: var(--muted);
  text-decoration: line-through;
}

.current-price {
  display: inline-block;
  margin-right: 10px;
  color: var(--accent);
  font-weight: 900;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.source-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.source-feature-grid article {
  padding: 18px;
  border-radius: 8px;
  background: var(--light);
  border: 1px solid var(--line);
}

.source-feature-grid p {
  margin: 0;
  color: var(--muted);
}

.source-action {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
}

.source-action h2 {
  color: var(--white);
}

.source-action p {
  color: rgba(255, 255, 255, .82);
}

.source-book-render .book-post {
  display: grid;
  gap: 24px;
}

.source-book-render .synopsis-section,
.source-book-render .book-info-section,
.source-book-render .features-section,
.source-book-render .action-section {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 28px rgba(23, 59, 104, .06);
}

.source-book-render .synopsis-section {
  background: linear-gradient(135deg, #e8f0fe 0%, #d4e4fc 100%);
  border-color: #c5d5ea;
}

.source-book-render .synopsis-content {
  max-width: 900px;
  margin: 0 auto;
}

.source-book-render .synopsis-text {
  padding: 22px;
  border-left: 5px solid #3b82f6;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .05);
}

.source-book-render .synopsis-text p:last-child {
  margin-bottom: 0;
}

.source-book-render .synopsis-title,
.source-book-render .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
}

.source-book-render .section-title-center {
  justify-content: center;
  text-align: center;
}

.source-book-render .synopsis-title i,
.source-book-render .section-title i,
.source-book-render .details-table i {
  color: #3b82f6;
}

.source-book-render .details-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.source-book-render .details-table tr {
  background: #f8fafc;
  transition: background .2s ease, transform .2s ease;
}

.source-book-render .details-table tr:hover {
  background: #eef2ff;
  transform: translateX(4px);
}

.source-book-render .details-table td {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.source-book-render .details-table td:first-child {
  width: 190px;
  color: var(--primary);
  font-weight: 900;
  border-right: 1px solid var(--line);
}

.source-book-render .details-table tr:last-child td {
  border-bottom: 0;
}

.source-book-render .details-table .price-row {
  background: #fff8e1;
}

.source-book-render .original-price {
  color: #94a3b8;
  font-size: 14px;
  text-decoration: line-through;
}

.source-book-render .current-price {
  color: #d97706;
  font-size: 22px;
  font-weight: 900;
}

.source-book-render .discount-badge {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 4px;
  color: var(--white);
  background: #d97706;
  font-size: 12px;
  font-weight: 900;
}

.source-book-render .features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.source-book-render .feature-card {
  padding: 26px 20px;
  border: 1px solid var(--line);
  border-top: 4px solid #3b82f6;
  border-radius: 8px;
  background: var(--white);
  box-shadow: none;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}

.source-book-render .feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, .08);
}

.source-book-render .feature-card i {
  margin-bottom: 14px;
  color: #3b82f6;
  font-size: 34px;
}

.source-book-render .feature-card h3 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 18px;
}

.source-book-render .feature-card p {
  margin: 0;
  color: var(--muted);
}

.source-book-render .action-section {
  text-align: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent;
}

.source-book-render .action-section .section-title,
.source-book-render .action-section p {
  color: var(--white);
}

.source-book-render .action-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.source-book-render .action-buttons .btn {
  color: var(--white);
}

.site-footer {
  color: rgba(255, 255, 255, .82);
  background: #102946;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, .75fr));
  gap: 30px;
  padding: 56px 0 36px;
}

.footer-brand h2,
.footer-col h3 {
  margin: 0 0 14px;
  color: var(--white);
}

.footer-brand p {
  margin: 0;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 8px;
}

.footer-col a:hover {
  color: #ffc97a;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px;
}

.footer-bottom p {
  margin: 0;
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
}

.chat-bubble {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--success);
  box-shadow: 0 12px 28px rgba(25, 135, 84, .34);
  font-weight: 900;
  cursor: pointer;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(310px, calc(100vw - 42px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.chat-panel.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.chat-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.chat-panel h3 {
  margin: 0 0 6px;
  color: var(--primary);
}

.chat-panel p {
  margin: 0 0 14px;
  color: var(--muted);
}

.chat-panel a {
  display: block;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--primary);
  background: var(--light);
  font-weight: 800;
}

#chat-popup {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 9999;
}

#chat-popup .chat-bubble {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(232, 124, 47, .4);
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

#chat-popup .chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(232, 124, 47, .5);
}

#chat-popup .chat-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: .5;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: .5; }
  50% { transform: scale(1.35); opacity: 0; }
}

#chat-popup .chat-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: 300px;
  max-width: calc(100vw - 42px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .18);
  transform: scale(.9) translateY(12px);
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all .25s cubic-bezier(.34, 1.56, .64, 1);
}

#chat-popup .chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

#chat-popup .chat-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: var(--primary);
}

#chat-popup .chat-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  font-size: 1.1rem;
}

#chat-popup .chat-header-info h4 {
  margin: 0;
  color: var(--white);
  font-size: .95rem;
  font-weight: 800;
}

#chat-popup .chat-status {
  color: rgba(255, 255, 255, .7);
  font-size: .75rem;
}

#chat-popup .chat-status::before {
  content: "●";
  margin-right: 4px;
  color: #4ade80;
  font-size: .6rem;
}

#chat-popup .chat-body {
  padding: 20px;
}

#chat-popup .chat-greeting {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.6;
}

#chat-popup .chat-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#chat-popup .chat-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--light);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  transition: all .2s ease;
}

#chat-popup .chat-action-btn:hover {
  border-color: var(--primary);
  background: rgba(26, 60, 110, .05);
}

#chat-popup .chat-action-btn span {
  flex-shrink: 0;
  font-size: 1.1rem;
}

#chat-popup .chat-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 2;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .62);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

#chat-popup .chat-close:hover {
  color: var(--white);
}

#chat-popup .chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ef4444;
  color: var(--white);
  font-size: .68rem;
  font-weight: 800;
  animation: bounce 1s ease-in-out infinite;
}

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

.scroll-top {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity .2s ease, visibility .2s ease;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.reveal {
  transform: translateY(18px);
  opacity: 0;
  transition: opacity .5s ease, transform .5s ease;
}

.reveal.visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 980px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .nav-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
  }

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

  .nav-links {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-cta {
    width: 100%;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .stats-grid,
  .packages-grid,
  .why-grid,
  .contact-layout,
  .single-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-hero-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body.admin-bar .site-header {
    top: 0;
  }

  .container {
    width: min(100% - 28px, 1160px);
  }

  .nav-brand {
    min-width: 0;
  }

  .nav-brand-text {
    font-size: 16px;
  }

  .nav-brand-text small {
    display: none;
  }

  .hero-section {
    min-height: 84vh;
    padding: 128px 0 64px;
  }

  .hero-cover-wall {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    opacity: .42;
  }

  .hero-content {
    margin-left: 14px;
    margin-right: 14px;
  }

  .hero-content h1,
  .single-summary h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .section {
    padding: 60px 0;
  }

  .section-title,
  .cta-banner h2 {
    font-size: 30px;
  }

  .stats-grid,
  .packages-grid,
  .why-grid,
  .contact-layout,
  .form-row,
  .book-hero-grid,
  .single-layout,
  .feature-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .book-hero {
    padding-top: 126px;
  }

  .single-cover {
    width: min(260px, 100%);
  }

  .source-feature-grid {
    grid-template-columns: 1fr;
  }

  .source-info th,
  .source-info td,
  .source-book-render .details-table td {
    display: block;
    width: 100%;
  }

  .source-info th,
  .source-book-render .details-table td:first-child {
    border-bottom: 0;
  }

  .source-book-render .features-grid {
    grid-template-columns: 1fr;
  }

  .book-detail-box {
    position: static;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .chat-widget {
    right: 16px;
    bottom: 16px;
  }

  .scroll-top {
    left: 16px;
    bottom: 16px;
  }
}

@media (max-width: 980px) {
  .brand-logo {
    width: 116px;
    height: 46px;
  }

  #hero {
    padding-top: 70px;
  }

  .hero-slider {
    min-height: 560px;
  }
}

@media (max-width: 700px) {
  .brand-logo {
    width: 98px;
    height: 42px;
  }

  .nav-logo-box {
    display: none;
  }

  #hero {
    min-height: 84vh;
    padding-top: 70px;
  }

  .hero-slider {
    height: calc(84vh - 70px);
    min-height: 560px;
  }

  .slide {
    padding: 44px 0;
  }

  .slide-title {
    font-size: 2rem;
  }

  .slide-desc {
    font-size: 1rem;
  }

  .shape-1 {
    width: 220px;
    height: 220px;
  }

  .shape-2 {
    right: 40px;
    width: 140px;
    height: 140px;
  }

  #chat-popup {
    right: 16px;
    bottom: 16px;
  }
}
