/* All rules are scoped: the existing website header/footer and other sections are unaffected. */
.aph-genres {
    --ag-navy: #071d50;
    --ag-red: #c20415;
    --ag-gold: #a56b22;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 38px 24px 80px;
    color: var(--ag-navy);
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f4ef url("../img/genres/genre-background.jpg") center center /
    cover no-repeat;
}
.aph-genres *,
.aph-genres *::before,
.aph-genres *::after,
.aph-genre-dialog * {
  box-sizing: border-box;
}
.aph-genres::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, #ffffff08, #ffffff1a 50%, #ffffff08);
}
.aph-genres-content {
  max-width: 1030px;
  margin: 0 auto;
}
.aph-genres-heading {
  position: static;
  display: block;
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: center;
}
.aph-genres p,
.aph-genre-dialog p {
  color: #000;
  font-size: 15px;
  line-height: 1.6;
}
.aph-genres .aph-genres-brand,
.aph-genre-dialog .aph-genres-brand {
  margin: 0;
  color: #88551f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.39em;
}
.aph-genres-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin: 6px 0 10px;
  color: var(--ag-gold);
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0.1em;
}
.aph-genres-stars span {
  height: 1px;
  width: 100px;
  background: linear-gradient(90deg, transparent, var(--ag-gold));
}
.aph-genres-stars span:last-child {
  transform: rotate(180deg);
}
.aph-genres-heading h2 {
  margin: 0 0 12px;
  font:
    400 clamp(38px, 4.1vw, 65px)/1.08 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.045em;
  color: var(--ag-navy);
}
.aph-genres-heading h2 em {
  color: var(--ag-red);
  font-style: normal;
  font-weight: 400;
}
.aph-genres .aph-genres-tagline {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 0;
  color: #262d3d;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: 0.32em;
}
.aph-genres-tagline i {
  color: var(--ag-gold);
  font-style: normal;
}
/* The six genre cards follow the reference's three-column, two-row arrangement. */
.aph-genres-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 19px;
}
.aph-genre-card {
  --ag-accent: #153f78;
  --ag-tint: #e9eef5;
  position: relative;
  min-width: 0;
  border: 1px solid #e8e1d9;
  border-top: 2px solid var(--ag-accent);
  border-radius: 8px;
  padding: 14px 21px 22px;
  background: linear-gradient(135deg, #ffffffef, #fffdfae8);
  box-shadow: 0 5px 13px #38261212;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.aph-genre-red {
  --ag-accent: #ed1834;
  --ag-tint: #fff0f0;
}
.aph-genre-gold {
  --ag-accent: #b47920;
  --ag-tint: #faf0e1;
}
.aph-genre-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 13px 25px #071d5018;
}
.aph-genre-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 7px;
}
.aph-genre-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ag-tint);
  color: var(--ag-accent);
  flex-shrink: 0;
}
.aph-genre-icon svg {
  width: 29px;
  height: 29px;
}
.aph-genre-number {
  font-size: 14px;
  line-height: 1;
  color: var(--ag-accent);
}
.aph-genre-card h3 {
  color: var(--ag-navy);
  font:
    400 25px/1.15 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
}
.aph-genre-card p {
  margin: 0;
  padding-right: 21px;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.aph-genre-arrow {
  position: absolute;
  right: 13px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid var(--ag-accent);
  border-radius: 50%;
  padding: 7px;
  color: var(--ag-accent);
  background: #fffaf5;
  cursor: pointer;
  transition:
    color 0.25s,
    background 0.25s,
    transform 0.25s;
}
.aph-genre-arrow::before {
  content: "";
  position: absolute;
  inset: -5px;
}
.aph-genre-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
}
.aph-genre-arrow:hover {
  background: var(--ag-accent);
  color: #fff;
  transform: translateX(2px);
}
.aph-genre-arrow:focus-visible {
  outline: 3px solid var(--ag-accent);
  outline-offset: 4px;
}
/* Lower editorial statement and separate book-cover assets, not flattened screenshot text. */
.aph-genres-closing {
  text-align: center;
  margin: 24px auto 14px;
}
.aph-genres .aph-genres-kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 13px;
  font-size: 10px;
  letter-spacing: 0.25em;
  line-height: 1.5;
  margin: 0 0 6px;
  color: #88551f;
}
.aph-genres-kicker span {
  width: 65px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #b4854c);
}
.aph-genres-kicker span:last-child {
  transform: rotate(180deg);
}
.aph-genres-closing h3 {
  font:
    400 clamp(28px, 3.2vw, 43px)/1.02 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.025em;
  color: var(--ag-navy);
  margin: 0 0 8px;
}
.aph-genres-closing h3 em {
  font-weight: 400;
  color: var(--ag-red);
}
.aph-genres-closing > p:last-child {
  margin: 0 auto;
  max-width: 850px;
}
.aph-genres-shelf {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 4px 29px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #b4854c transparent;
}
.aph-genres-book {
  flex: 1 1 0;
  min-width: 0;
  max-width: 135px;
  margin: 0;
  position: relative;
  scroll-snap-align: center;
}
.aph-genres-book img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 123 / 175;
  object-fit: fill;
  border-radius: 3px;
  box-shadow: 2px 5px 7px #20150f23;
  transition: transform 0.3s;
  -webkit-box-reflect: below 2px linear-gradient(transparent 65%, #00000020);
}
.aph-genres-book:hover img {
  transform: translateY(-6px);
}
.aph-genres .aph-genres-cover-note {
  text-align: center;
  margin: 3px 0 0;
  font-size: 10px;
  color: #665e55;
}
.aph-genres-shelf:focus-visible {
  outline: 2px solid #153f78;
  outline-offset: 2px;
}
/* Functional fallback when the shared enquiry dialog has not been added to the host page. */
.aph-genre-dialog {
  box-sizing: border-box;
  position: fixed;
  width: min(560px, calc(100% - 30px));
  max-height: 90dvh;
  overflow: auto;
  padding: 38px;
  border: 1px solid #e0d6c7;
  border-radius: 12px;
  background: #fffdf9;
  color: #071d50;
  box-shadow: 0 25px 90px #001c4b33;
  font-family: Arial, Helvetica, sans-serif;
}
.aph-genre-dialog::backdrop {
  background: #071d50b8;
  backdrop-filter: blur(4px);
}
.aph-genre-dialog h2 {
  font:
    400 34px/1.1 Georgia,
    serif;
  color: #071d50;
  margin: 18px 0;
}
.aph-genre-dialog .aph-genres-brand {
  font-size: 9px;
  letter-spacing: 0.2em;
  padding-right: 15px;
}
.aph-genre-dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #edf1f7;
  color: #071d50;
  font-size: 25px;
  cursor: pointer;
}
.aph-genre-contact {
  display: inline-block;
  background: #9B2525;
  color: white;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 4px;
  font-size: 14px;
}
.aph-genre-phone {
  display: block;
  margin-top: 15px;
  color: #071d50;
  font-size: 14px;
}
/* Tablet and mobile keep text readable; the full book collection remains horizontally browsable. */
@media (max-width: 1100px) {
  .aph-genres {
    padding-inline: 25px;
  }
  .aph-genres-content {
    max-width: 950px;
  }
  .aph-genre-card {
    padding: 14px 18px 24px;
  }
  .aph-genres-shelf {
    justify-content: flex-start;
    gap: 12px;
    padding-top: 5px;
  }
  .aph-genres-book {
    flex: 0 0 120px;
    max-width: none;
  }
}
@media (max-width: 850px) {
  .aph-genres {
    background-position: center top;
    padding-top: 35px;
  }
  .aph-genres-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .aph-genres-heading h2 {
    font-size: 48px;
  }
  .aph-genres .aph-genres-brand {
    font-size: 10px;
  }
  .aph-genres-closing {
    margin-top: 28px;
  }
  .aph-genres .aph-genres-tagline {
    gap: 10px;
    letter-spacing: 0.2em;
    font-size: 9px;
  }
  .aph-genre-card p {
    padding-right: 23px;
  }
}
@media (max-width: 520px) {
  .aph-genres {
    padding: 30px 18px 22px;
    background-position: 46% top;
  }
  .aph-genres::before {
    background: #ffffff30;
  }
  .aph-genres-heading {
    margin-bottom: 24px;
  }
  .aph-genres .aph-genres-brand {
    font-size: 9px;
    letter-spacing: 0.24em;
  }
  .aph-genres-stars {
    font-size: 20px;
    margin-block: 8px 13px;
    gap: 11px;
  }
  .aph-genres-stars span {
    width: 55px;
  }
  .aph-genres-heading h2 {
    font-size: 39px;
    line-height: 1.05;
  }
  .aph-genres-heading h2 em {
    display: block;
    margin-top: 4px;
  }
  .aph-genres .aph-genres-tagline {
    display: block;
    font-size: 8px;
    letter-spacing: 0.14em;
  }
  .aph-genres-tagline i {
    margin: 0 7px;
  }
  .aph-genres-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .aph-genre-card {
    padding: 17px 21px 25px;
  }
  .aph-genre-top {
    margin-bottom: 8px;
  }
  .aph-genre-card p {
    padding-right: 27px;
  }
  .aph-genres-closing {
    margin-top: 28px;
  }
  .aph-genres .aph-genres-kicker {
    font-size: 8px;
    letter-spacing: 0.18em;
    gap: 7px;
  }
  .aph-genres-kicker span {
    width: 20px;
    flex-shrink: 0;
  }
  .aph-genres-closing h3 {
    font-size: 32px;
  }
  .aph-genres-closing > p:last-child {
    font-size: 15px;
    margin-top: 12px;
  }
  .aph-genres-shelf {
    margin-top: 19px;
  }
  .aph-genres-book {
    flex-basis: 117px;
  }
  .aph-genre-dialog {
    padding: 32px 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aph-genres *,
  .aph-genres *::before {
    transition: none !important;
    animation: none !important;
  }
}

/* Continuous book-cover row */
.aph-genres-shelf {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: none;
    scroll-behavior: auto;
    scrollbar-width: none;
}

.aph-genres-shelf::-webkit-scrollbar {
    display: none;
}

.aph-genres-shelf .aph-genres-book {
    flex: 0 0 125px;
    width: 125px;
    max-width: none;
}

@media (max-width: 600px) {
    .aph-genres-shelf .aph-genres-book {
        flex-basis: 110px;
        width: 110px;
    }
}