/* =========================================================
   01. VARIABLES
   ========================================================= */

:root {

  /* ---------- Palette ---------- */

  --green-900: #17382f;
  --green-800: #244c40;
  --green-700: #31614f;
  --green-600: #3f6956;
  --green-500: #5d806b;
  --green-300: #9bb5a2;
  --green-100: #e7efe9;

  --blue-900: #17354a;
  --blue-800: #214c67;
  --blue-700: #2f637f;
  --blue-500: #5e8ba3;
  --blue-100: #e5eff4;

  --brown-900: #3b261d;
  --brown-800: #51352a;
  --brown-700: #694738;
  --brown-600: #805947;
  --brown-400: #b58b70;
  --brown-200: #dbc6b7;
  --brown-100: #f2e9e3;

  --cream: #faf7f2;
  --paper: #fffdf9;
  --white: #ffffff;

  --text: #26332e;
  --text-soft: #5c6762;
  --border: #d8ddd9;

  --danger: #9a4545;


  /* ---------- Typography ---------- */

  --font-main:
    "Atkinson Hyperlegible",
    Arial,
    sans-serif;


  /* ---------- Layout ---------- */

  --container:
    min(1400px, calc(100% - 64px));

  --section-space: 110px;

  --radius-small: 8px;
  --radius-medium: 14px;
  --radius-large: 24px;

  --shadow-small:
    0 3px 12px rgba(43, 51, 47, 0.08);

  --shadow-medium:
    0 10px 30px rgba(43, 51, 47, 0.12);

  --shadow-large:
    0 20px 60px rgba(43, 51, 47, 0.18);

}


/* =========================================================
   02. RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}


body {
  margin: 0;

  background:
    linear-gradient(
      180deg,
      var(--cream) 0%,
      #f7f4ee 100%
    );

  color: var(--text);

  font-family: var(--font-main);

  font-size: 18px;
  line-height: 1.6;

  overflow-x: hidden;
}


body.modal-open,
body.menu-open {
  overflow: hidden;
}


img {
  display: block;
  max-width: 100%;
}


button,
input,
select {
  font: inherit;
}


button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}


a {
  color: inherit;
  text-decoration: none;
}


button {
  cursor: pointer;
}


::selection {
  background: var(--green-300);
  color: var(--green-900);
}


/* =========================================================
   03. ACCESSIBILITY
   ========================================================= */

.sr-only {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}


:focus-visible {
  outline:
    3px solid var(--blue-700);

  outline-offset: 4px;
}


/* =========================================================
   04. LOADER
   ========================================================= */

.site-loader {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: grid;
  place-items: center;

  background: var(--cream);

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}


.site-loader[hidden] {
  display: none;
}


.loader-content {
  text-align: center;
  color: var(--green-800);
}


.loader-icon {
  display: block;

  margin-bottom: 12px;

  font-size: 3rem;

  animation:
    cozyPulse 1.5s ease-in-out infinite;
}


.loader-content p {
  margin: 0;

  font-weight: 700;
}


@keyframes cozyPulse {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }

}


/* =========================================================
   05. HEADER
   ========================================================= */

.site-header {
  position: sticky;

  top: 0;

  z-index: 1000;

  background:
    rgba(250, 247, 242, 0.96);

  border-bottom:
    1px solid var(--border);

  backdrop-filter:
    blur(12px);
}


.header-inner {
  width: var(--container);

  min-height: 78px;

  margin-inline: auto;

  display: flex;

  align-items: center;

  gap: 28px;
}


/* ---------- Logo ---------- */

.site-logo {
  display: inline-flex;

  align-items: center;

  gap: 11px;

  flex-shrink: 0;

  color: var(--green-900);
}


.site-logo-image {
  width: 42px;
  height: 42px;

  border-radius: 50%;

  object-fit: cover;

  border:
    2px solid var(--green-600);
}


.site-logo-name {
  font-size: 1.35rem;

  font-weight: 700;

  letter-spacing: -0.03em;
}


/* ---------- Navigation ---------- */

.main-nav {
  display: flex;

  align-items: center;

  gap: 6px;

  margin-left: auto;
}


.nav-link {
  position: relative;

  padding:
    9px 12px;

  color: var(--text-soft);

  font-weight: 700;

  font-size: 0.95rem;

  border-radius: var(--radius-small);

  transition:
    color 0.2s ease,
    background 0.2s ease;
}


.nav-link:hover {
  color: var(--green-800);

  background:
    var(--green-100);
}


.nav-link::after {
  content: "";

  position: absolute;

  left: 12px;
  right: 12px;
  bottom: 3px;

  height: 2px;

  background:
    var(--blue-700);

  transform:
    scaleX(0);

  transform-origin:
    center;

  transition:
    transform 0.2s ease;
}


.nav-link:hover::after {
  transform: scaleX(1);
}


/* ---------- Header actions ---------- */

.header-actions {
  display: flex;

  align-items: center;

  gap: 10px;

  margin-left: 12px;
}


/* ---------- Search ---------- */

.global-search {
  position: relative;
}


.global-search input {
  width: 210px;

  height: 42px;

  padding:
    8px 40px 8px 15px;

  border:
    1px solid var(--border);

  border-radius: 999px;

  background: var(--white);

  color: var(--text);

  font-size: 0.95rem;

  transition:
    width 0.25s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


.global-search input::placeholder {
  color: #77817c;
}


.global-search input:focus {
  width: 250px;

  border-color:
    var(--blue-500);

  box-shadow:
    0 0 0 4px
    rgba(94, 139, 163, 0.15);

  outline: none;
}


.search-icon {
  position: absolute;

  right: 14px;
  top: 50%;

  transform:
    translateY(-50%);

  pointer-events: none;

  font-size: 0.95rem;
}


/* ---------- Mobile menu ---------- */

.menu-toggle {
  display: none;

  width: 44px;
  height: 44px;

  padding: 8px;

  border: 0;

  border-radius:
    var(--radius-small);

  background:
    var(--green-100);
}


.menu-toggle span {
  display: block;

  width: 24px;
  height: 2px;

  margin: 5px auto;

  background:
    var(--green-800);

  transition:
    transform 0.2s ease;
}


/* =========================================================
   06. GLOBAL SEARCH PANEL
   ========================================================= */

.global-search-panel {
  position: absolute;

  top: 100%;

  left: 0;
  right: 0;

  max-height: 75vh;

  overflow-y: auto;

  padding:
    24px 0 30px;

  background:
    rgba(250, 247, 242, 0.98);

  border-bottom:
    1px solid var(--border);

  box-shadow:
    var(--shadow-medium);
}


.global-search-panel[hidden] {
  display: none;
}


.search-panel-inner {
  width: var(--container);

  margin-inline: auto;
}


.search-results-grid {
  display: grid;

  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  gap: 18px;
}


.search-empty {
  padding: 40px;

  text-align: center;

  color: var(--text-soft);
}


.search-empty span {
  display: block;

  margin-bottom: 8px;

  font-size: 2rem;
}


/* =========================================================
   07. NOTIFICATIONS
   ========================================================= */

.notification-button {
  position: relative;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 0;

  border-radius: 50%;

  background:
    var(--blue-100);

  color:
    var(--blue-900);

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}


.notification-button:hover {
  background:
    #d5e6ee;

  transform:
    translateY(-1px);
}


.notification-button[hidden] {
  display: none;
}


.notification-badge {
  position: absolute;

  top: -3px;
  right: -3px;

  min-width: 20px;
  height: 20px;

  display: grid;
  place-items: center;

  padding: 0 5px;

  border:
    2px solid var(--cream);

  border-radius: 999px;

  background:
    var(--brown-700);

  color: var(--white);

  font-size: 0.7rem;

  font-weight: 700;
}


.notification-panel {
  position: absolute;

  top: calc(100% + 10px);

  right: 30px;

  width: min(420px, calc(100vw - 30px));

  max-height: 70vh;

  overflow-y: auto;

  padding: 18px;

  background:
    var(--paper);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-medium);

  box-shadow:
    var(--shadow-large);
}


.notification-panel[hidden] {
  display: none;
}


.notification-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 14px;
}


.notification-header h2 {
  margin: 0;

  color:
    var(--green-900);

  font-size: 1.2rem;
}


.notification-header button {
  width: 34px;
  height: 34px;

  border: 0;

  border-radius: 50%;

  background:
    var(--brown-100);

  color:
    var(--brown-900);

  font-size: 1.4rem;
}


.notifications-list {
  display: grid;

  gap: 10px;
}


.notification-item {
  display: grid;

  grid-template-columns: 38px 1fr;

  gap: 12px;

  padding: 13px;

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-small);

  background:
    var(--cream);
}


.notification-icon {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background:
    var(--green-100);
}


.notification-content h3 {
  margin:
    3px 0 3px;

  color:
    var(--green-900);

  font-size: 1rem;
}


.notification-content p {
  margin:
    0 0 5px;

  color:
    var(--text-soft);

  font-size: 0.9rem;
}


.notification-content time {
  color:
    var(--text-soft);

  font-size: 0.78rem;
}


.notification-type {
  color:
    var(--blue-700);

  font-size: 0.75rem;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.05em;
}


.notification-content a {
  display: inline-block;

  margin-top: 7px;

  color:
    var(--brown-700);

  font-weight: 700;

  font-size: 0.85rem;
}


.notification-empty {
  padding: 25px;

  color: var(--text-soft);

  text-align: center;
}


/* =========================================================
   08. GENERAL SECTIONS
   ========================================================= */

.page-section {
  width: var(--container);

  margin-inline: auto;

  padding:
    var(--section-space) 0;
}


.home-section {
  padding-top: 60px;
}


.section-heading {
  display: flex;

  align-items: flex-end;

  justify-content: space-between;

  gap: 30px;

  margin-bottom: 32px;
}


.section-heading.centered {
  display: block;

  text-align: center;
}


.section-heading h1,
.section-heading h2 {
  margin:
    5px 0 8px;

  color:
    var(--green-900);

  line-height: 1.15;

  letter-spacing: -0.035em;
}


.section-heading h1 {
  font-size:
    clamp(2.3rem, 5vw, 4.3rem);
}


.section-heading h2 {
  font-size:
    clamp(1.7rem, 3vw, 2.6rem);
}


.section-heading p {
  max-width: 650px;

  margin: 0;

  color:
    var(--text-soft);
}


.eyebrow {
  display: inline-block;

  color:
    var(--blue-700);

  font-size: 0.78rem;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.12em;
}


.text-link {
  color:
    var(--brown-700);

  font-weight: 700;

  white-space: nowrap;
}


.text-link:hover {
  color:
    var(--blue-700);
}


/* =========================================================
   09. BUTTONS
   ========================================================= */

.button {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  min-height: 46px;

  padding:
    10px 20px;

  border-radius: 999px;

  font-weight: 700;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}


.button:hover {
  transform:
    translateY(-2px);

  box-shadow:
    var(--shadow-small);
}


.button-primary {
  background:
    var(--green-700);

  color:
    var(--white);
}


.button-primary:hover {
  background:
    var(--green-900);
}


.button-secondary {
  background:
    var(--blue-700);

  color:
    var(--white);
}


.button-secondary:hover {
  background:
    var(--blue-900);
}


/* =========================================================
   10. HERO
   ========================================================= */

.hero {
  position: relative;

  min-height:
    500px;

  display: flex;

  align-items: center;

  padding:
    70px clamp(35px, 6vw, 90px);

  overflow: hidden;

  border-radius:
    var(--radius-large);

  background:
    linear-gradient(
      120deg,
      var(--green-100),
      var(--blue-100)
    );

  border:
    1px solid var(--border);
}


.hero::before {
  content: "";

  position: absolute;

  width: 400px;
  height: 400px;

  right: -120px;
  top: -120px;

  border-radius: 50%;

  background:
    rgba(181, 139, 112, 0.18);
}


.hero::after {
  content: "";

  position: absolute;

  width: 260px;
  height: 260px;

  left: 40%;
  bottom: -180px;

  border-radius: 50%;

  background:
    rgba(47, 99, 127, 0.12);
}


.hero-content {
  position: relative;

  z-index: 2;

  max-width: 720px;
}


.hero h1 {
  max-width: 800px;

  margin:
    12px 0 20px;

  color:
    var(--green-900);

  font-size:
    clamp(3rem, 7vw, 6rem);

  line-height: 0.98;

  letter-spacing: -0.06em;
}


.hero h1 span {
  display: block;

  color:
    var(--blue-700);
}


.hero-description {
  max-width: 650px;

  margin:
    0 0 12px;

  color:
    var(--text-soft);

  font-size:
    clamp(1rem, 2vw, 1.25rem);
}


.hero .button {
  margin-top: 18px;
}


.hero-decoration {
  position: absolute;

  z-index: 2;

  right: 9%;

  display: grid;

  gap: 20px;

  transform:
    rotate(5deg);
}


.hero-decoration span {
  width: 100px;
  height: 100px;

  display: grid;
  place-items: center;

  border-radius:
    18px;

  background:
    rgba(255, 253, 249, 0.85);

  border:
    1px solid rgba(49, 97, 79, 0.15);

  box-shadow:
    var(--shadow-small);

  font-size: 3rem;
}


/* =========================================================
   11. HOME BLOCKS
   ========================================================= */

.home-block {
  margin-top: 100px;
}


.home-feature {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr);

  min-height: 350px;

  padding: 55px;

  align-items: center;

  border-radius:
    var(--radius-large);

  background:
    var(--paper);

  border:
    1px solid var(--border);

  box-shadow:
    var(--shadow-small);
}


.home-feature.reverse {
  background:
    var(--brown-100);
}


.feature-content {
  max-width: 650px;
}


.feature-content h2 {
  margin:
    8px 0 15px;

  color:
    var(--green-900);

  font-size:
    clamp(1.8rem, 4vw, 3rem);

  line-height: 1.1;
}


.feature-content p {
  color:
    var(--text-soft);
}


/* =========================================================
   12. BOOK GRID
   ========================================================= */

/*
   MAIN GRID
   Laptop  = 6
   Tablet  = 4
   Mobile  = 2
*/

.book-grid,
.search-results-grid {
  display: grid;

  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  gap: 22px;
}


/* ---------- Book card ---------- */

.book-card {
  position: relative;

  min-width: 0;

  cursor: pointer;

  border-radius:
    var(--radius-small);

  overflow: hidden;

  background:
    var(--white);

  border:
    1px solid var(--border);

  box-shadow:
    var(--shadow-small);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}


.book-card:hover {
  transform:
    translateY(-6px);

  box-shadow:
    var(--shadow-medium);
}


.book-cover-wrapper {
  width: 100%;

  /*
    Forces every cover to the
    exact same visual ratio.
  */

  aspect-ratio:
    2 / 3;

  overflow: hidden;

  background:
    var(--brown-100);
}


.book-cover {
  width: 100%;
  height: 100%;

  object-fit: cover;

  object-position: center;

  transition:
    transform 0.35s ease;
}


.book-card:hover .book-cover {
  transform:
    scale(1.035);
}


/* =========================================================
   13. LOAD MORE
   ========================================================= */

.load-more {
  display: block;

  margin:
    30px auto 0;

  min-height: 44px;

  padding:
    8px 24px;

  border:
    1px solid var(--green-600);

  border-radius: 999px;

  background:
    transparent;

  color:
    var(--green-800);

  font-weight: 700;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}


.load-more:hover {
  background:
    var(--green-700);

  color:
    var(--white);
}


/* =========================================================
   14. EMPTY / ERROR STATES
   ========================================================= */

.empty-state,
.api-error {
  grid-column:
    1 / -1;

  padding:
    55px 25px;

  text-align: center;

  border:
    1px dashed var(--border);

  border-radius:
    var(--radius-medium);

  color:
    var(--text-soft);
}


.empty-state span,
.api-error > span {
  display: block;

  margin-bottom: 10px;

  font-size: 2.5rem;
}


.api-error h3 {
  margin:
    0 0 8px;

  color:
    var(--green-900);
}


.api-error button {
  margin-top: 12px;

  padding:
    9px 18px;

  border: 0;

  border-radius: 999px;

  background:
    var(--green-700);

  color:
    var(--white);

  font-weight: 700;
}


/* =========================================================
   15. COMMUNITY
   ========================================================= */

.community-section {
  min-height:
    700px;
}


.club-description {
  max-width: 850px;

  margin:
    0 auto 80px;

  text-align: center;
}


.club-description p {
  margin:
    0 0 20px;

  color:
    var(--text-soft);

  font-size:
    1.12rem;
}


.community-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 30px;
}


/* ---------- Admin card ---------- */

.member-card {
  display: grid;

  grid-template-columns:
    140px minmax(0, 1fr);

  gap: 24px;

  padding: 26px;

  background:
    var(--paper);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-medium);

  box-shadow:
    var(--shadow-small);
}


/*
   ALL AVATARS SAME SIZE
*/

.member-avatar {
  width: 140px;
  height: 140px;

  aspect-ratio: 1 / 1;

  border-radius: 50%;

  object-fit: cover;

  object-position: center;

  border:
    4px solid var(--green-300);
}


.member-info {
  min-width: 0;
}


.member-role {
  color:
    var(--blue-700);

  font-size: 0.75rem;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}


.member-info h3 {
  margin:
    3px 0 4px;

  color:
    var(--green-900);

  font-size: 1.45rem;
}


.member-instagram {
  color:
    var(--brown-700);

  font-size: 0.9rem;

  font-weight: 700;
}


.member-favorites {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;

  margin-top: 17px;
}


.member-favorites figure {
  margin: 0;

  min-width: 0;
}


.member-favorites img {
  width: 100%;

  /*
    Both favourite covers
    always have identical size.
  */

  aspect-ratio:
    2 / 3;

  object-fit: cover;

  border-radius:
    6px;

  border:
    1px solid var(--border);
}


.member-favorites figcaption {
  margin-top: 5px;

  color:
    var(--text-soft);

  font-size: 0.78rem;

  line-height: 1.25;
}


/* =========================================================
   16. FILTERS
   ========================================================= */

.filter-bar,
.filters-panel {
  margin-bottom: 35px;

  padding: 24px;

  background:
    var(--paper);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-medium);

  box-shadow:
    var(--shadow-small);
}


.filter-bar {
  display: flex;

  flex-wrap: wrap;

  gap: 20px;
}


.filter-field {
  display: flex;

  flex-direction: column;

  gap: 6px;

  min-width: 160px;
}


.filter-field label {
  color:
    var(--green-900);

  font-size: 0.85rem;

  font-weight: 700;
}


.filter-field select,
.filter-field input {
  min-height: 43px;

  padding:
    7px 12px;

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-small);

  background:
    var(--white);

  color:
    var(--text);

  cursor: pointer;
}


.filter-field select:focus,
.filter-field input:focus {
  border-color:
    var(--blue-500);

  outline:
    3px solid
    rgba(94, 139, 163, 0.15);
}


/* ---------- Anti filter panel ---------- */

.filter-panel-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 25px;
}


.filter-panel-header h2 {
  margin:
    4px 0 0;

  color:
    var(--green-900);

  font-size: 1.5rem;
}


.clear-filters {
  min-height: 40px;

  padding:
    7px 15px;

  border:
    1px solid var(--brown-400);

  border-radius:
    999px;

  background:
    transparent;

  color:
    var(--brown-700);

  font-weight: 700;
}


.clear-filters:hover {
  background:
    var(--brown-100);
}


.filters-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 18px;
}


/* =========================================================
   17. BOOK MODAL
   ========================================================= */

.book-modal {
  position: fixed;

  inset: 0;

  z-index: 3000;

  display: grid;

  place-items: center;

  padding: 25px;

  background:
    rgba(23, 56, 47, 0.72);

  backdrop-filter:
    blur(5px);

  opacity: 0;

  transition:
    opacity 0.25s ease;
}


.book-modal[hidden] {
  display: none;
}


.book-modal.is-open {
  opacity: 1;
}


.book-modal-content {
  position: relative;

  width: min(1000px, 100%);

  max-height:
    min(850px, 90vh);

  overflow-y: auto;

  padding: 40px;

  background:
    var(--paper);

  border-radius:
    var(--radius-large);

  box-shadow:
    var(--shadow-large);

  transform:
    translateY(15px);

  transition:
    transform 0.25s ease;
}


.book-modal.is-open
.book-modal-content {
  transform:
    translateY(0);
}


.modal-close {
  position: absolute;

  top: 15px;
  right: 15px;

  z-index: 3;

  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  border: 0;

  border-radius: 50%;

  background:
    var(--brown-100);

  color:
    var(--brown-900);

  font-size: 1.5rem;

  line-height: 1;
}


.book-modal-layout {
  display: grid;

  grid-template-columns:
    minmax(240px, 320px)
    minmax(0, 1fr);

  gap: 45px;
}


.modal-cover-column {
  align-self: start;
}


.modal-book-cover {
  width: 100%;

  aspect-ratio:
    2 / 3;

  object-fit: cover;

  border-radius:
    var(--radius-small);

  box-shadow:
    var(--shadow-medium);
}


.modal-info-column h2 {
  margin:
    6px 0 8px;

  color:
    var(--green-900);

  font-size:
    clamp(2rem, 4vw, 3rem);

  line-height: 1.05;
}


.modal-rating {
  margin:
    10px 0 25px;

  color:
    var(--brown-700);

  font-size: 1.5rem;

  letter-spacing: 2px;
}


/* ---------- Details ---------- */

.book-details {
  margin: 0;
}


.book-detail {
  display: grid;

  grid-template-columns:
    minmax(130px, 170px)
    minmax(0, 1fr);

  gap: 15px;

  padding:
    10px 0;

  border-bottom:
    1px solid var(--border);
}


.book-detail dt {
  color:
    var(--green-800);

  font-weight: 700;
}


.book-detail dd {
  margin: 0;

  color:
    var(--text-soft);
}


.modal-tags-section {
  margin-top: 24px;
}


.modal-tags-section h3 {
  margin:
    0 0 10px;

  color:
    var(--green-900);

  font-size: 1rem;
}


.book-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 7px;
}


.book-tag {
  display: inline-block;

  padding:
    5px 10px;

  border-radius: 999px;

  background:
    var(--green-100);

  color:
    var(--green-900);

  font-size: 0.82rem;

  font-weight: 700;
}


.modal-book-link {
  margin-top: 25px;
}


/* =========================================================
   18. CALENDAR
   ========================================================= */

.calendar-wrapper {
  padding: 25px;

  background:
    var(--paper);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-medium);

  box-shadow:
    var(--shadow-small);

  overflow-x: auto;
}


.calendar-toolbar {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 12px;

  margin-bottom: 25px;
}


.calendar-month-title {
  min-width: 220px;

  margin: 0;

  color:
    var(--green-900);

  text-align: center;

  font-size: 1.5rem;
}


.calendar-nav,
.calendar-today {
  min-height: 40px;

  padding:
    6px 13px;

  border:
    1px solid var(--border);

  border-radius:
    999px;

  background:
    var(--white);

  color:
    var(--green-800);

  font-weight: 700;
}


.calendar-nav:hover,
.calendar-today:hover {
  background:
    var(--green-100);
}


.calendar-weekdays,
.calendar-grid {
  display: grid;

  grid-template-columns:
    repeat(7, minmax(120px, 1fr));

  min-width: 900px;
}


.calendar-weekdays {
  margin-bottom: 5px;
}


.calendar-weekdays span {
  padding: 10px;

  color:
    var(--blue-700);

  font-size: 0.8rem;

  font-weight: 700;

  text-align: center;

  text-transform: uppercase;
}


.calendar-day {
  min-height: 145px;

  padding: 9px;

  border:
    1px solid var(--border);

  background:
    var(--white);
}


.calendar-day.is-empty {
  background:
    #f4f1ec;
}


.calendar-day.is-today {
  background:
    var(--green-100);
}


.calendar-day-number {
  display: inline-grid;

  place-items: center;

  width: 28px;
  height: 28px;

  margin-bottom: 8px;

  border-radius: 50%;

  color:
    var(--green-900);

  font-weight: 700;
}


.calendar-day.is-today
.calendar-day-number {
  background:
    var(--green-700);

  color:
    var(--white);
}


.calendar-events {
  display: grid;

  gap: 5px;
}


.calendar-event {
  width: 100%;

  padding:
    5px 7px;

  border: 0;

  border-radius: 5px;

  background:
    var(--blue-100);

  color:
    var(--blue-900);

  text-align: left;

  font-size: 0.76rem;

  overflow: hidden;
}


.calendar-event:hover {
  background:
    #d2e4ed;
}


.calendar-event-time {
  display: block;

  font-size: 0.68rem;

  font-weight: 700;
}


.calendar-event-title {
  display: block;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}


.calendar-birthday {
  display: flex;

  align-items: center;

  gap: 5px;

  padding:
    5px 7px;

  border-radius: 5px;

  background:
    var(--brown-100);

  color:
    var(--brown-900);

  font-size: 0.76rem;

  font-weight: 700;

  overflow: hidden;
}


.calendar-birthday span:last-child {
  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}


.calendar-legend {
  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 20px;

  margin-top: 18px;

  color:
    var(--text-soft);

  font-size: 0.85rem;
}


/* =========================================================
   19. FAQ
   ========================================================= */

.faq-section {
  max-width: 1000px;

  min-height:
    700px;
}


.faq-list {
  display: grid;

  gap: 10px;
}


.faq-item {
  overflow: hidden;

  background:
    var(--paper);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-medium);
}


.faq-question {
  width: 100%;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  padding:
    20px 22px;

  border: 0;

  background:
    transparent;

  color:
    var(--green-900);

  text-align: left;

  font-weight: 700;

  font-size: 1.05rem;
}


.faq-toggle {
  flex-shrink: 0;

  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background:
    var(--green-100);

  color:
    var(--green-800);

  font-size: 1.2rem;

  transition:
    transform 0.25s ease;
}


.faq-item.is-open
.faq-toggle {
  transform:
    rotate(45deg);
}


.faq-answer {
  display: grid;

  grid-template-rows: 0fr;

  transition:
    grid-template-rows 0.3s ease;
}


.faq-answer p {
  min-height: 0;

  overflow: hidden;

  margin: 0;

  padding:
    0 22px;

  color:
    var(--text-soft);
}


.faq-item.is-open
.faq-answer {
  grid-template-rows: 1fr;
}


.faq-item.is-open
.faq-answer p {
  padding:
    0 22px 22px;
}


/* =========================================================
   20. FOOTER
   ========================================================= */

.site-footer {
  margin-top:
    var(--section-space);

  background:
    var(--green-900);

  color:
    #e9f0ec;
}


.footer-inner {
  width: var(--container);

  margin-inline: auto;

  padding:
    65px 0;

  display: grid;

  grid-template-columns:
    2fr 1fr 1fr;

  gap: 50px;
}


.footer-logo {
  display: inline-block;

  margin-bottom: 10px;

  color:
    var(--white);

  font-size: 1.7rem;

  font-weight: 700;
}


.footer-brand p {
  max-width: 330px;

  margin: 0;

  color:
    #b8c9c1;
}


.footer-navigation,
.footer-social {
  display: flex;

  flex-direction: column;

  align-items: flex-start;

  gap: 7px;
}


.footer-navigation h2,
.footer-social h2 {
  margin:
    0 0 8px;

  color:
    var(--white);

  font-size: 1rem;
}


.footer-navigation a,
.instagram-link {
  color:
    #b8c9c1;

  font-size: 0.9rem;

  transition:
    color 0.2s ease;
}


.footer-navigation a:hover,
.instagram-link:hover {
  color:
    var(--white);
}


.instagram-link {
  display: inline-flex;

  align-items: center;

  gap: 8px;
}


.instagram-icon {
  display: grid;

  place-items: center;

  width: 27px;
  height: 27px;

  border:
    1px solid #b8c9c1;

  border-radius: 7px;

  font-size: 1.2rem;
}


.footer-bottom {
  padding:
    18px 20px;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.12);

  text-align: center;
}


.footer-bottom p {
  margin: 0;

  color:
    #a8bcb3;

  font-size: 0.78rem;
}


/* =========================================================
   21. REVEAL ANIMATION
   ========================================================= */

.reveal {
  opacity: 0;

  transform:
    translateY(20px);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}


.reveal.is-visible {
  opacity: 1;

  transform:
    translateY(0);
}


/* =========================================================
   22. TABLET
   4 COLUMNS
   ========================================================= */

@media (max-width: 1100px) {

  :root {
    --container:
      min(100% - 40px, 1000px);

    --section-space: 85px;
  }


  .header-inner {
    gap: 15px;
  }


  .main-nav {
    gap: 2px;
  }


  .nav-link {
    padding:
      8px 8px;

    font-size: 0.88rem;
  }


  .global-search input {
    width: 170px;
  }


  .global-search input:focus {
    width: 200px;
  }


  /*
    TABLET GRID
    4 columns
  */

  .book-grid,
  .search-results-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }


  .hero-decoration {
    right: 5%;
  }


  .community-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


  .member-card {
    grid-template-columns:
      110px minmax(0, 1fr);
  }


  .member-avatar {
    width: 110px;
    height: 110px;
  }


  .filters-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


  .book-modal-layout {
    grid-template-columns:
      230px minmax(0, 1fr);

    gap: 30px;
  }

}


/* =========================================================
   23. SMALL TABLET
   ========================================================= */

@media (max-width: 850px) {

  .header-inner {
    position: relative;

    flex-wrap: wrap;
  }


  .menu-toggle {
    display: block;

    margin-left: auto;
  }


  .header-actions {
    margin-left: 0;
  }


  .main-nav {
    position: absolute;

    top: calc(100% - 1px);

    left: 0;
    right: 0;

    display: none;

    flex-direction: column;

    align-items: stretch;

    padding: 15px;

    background:
      var(--cream);

    border-bottom:
      1px solid var(--border);

    box-shadow:
      var(--shadow-medium);
  }


  .main-nav.is-open {
    display: flex;
  }


  .nav-link {
    padding:
      12px 14px;
  }


  .nav-link::after {
    display: none;
  }


  .hero {
    min-height: 450px;

    padding:
      55px 40px;
  }


  .hero-decoration {
    opacity: 0.65;

    transform:
      scale(0.8)
      rotate(5deg);
  }


  .home-feature {
    padding: 40px;
  }


  .footer-inner {
    grid-template-columns:
      1fr 1fr;
  }


  .footer-brand {
    grid-column:
      1 / -1;
  }

}


/* =========================================================
   24. MOBILE
   2 COLUMNS
   ========================================================= */

@media (max-width: 600px) {

  :root {
    --container:
      calc(100% - 28px);

    --section-space: 65px;
  }


  body {
    font-size: 17px;
  }


  .site-header {
    position: sticky;
  }


  .header-inner {
    min-height: 68px;

    gap: 8px;
  }


  .site-logo-name {
    font-size: 1.15rem;
  }


  .site-logo-image {
    width: 38px;
    height: 38px;
  }


  .header-actions {
    gap: 5px;
  }


  .global-search {
    display: none;
  }


  .menu-toggle {
    width: 40px;
    height: 40px;
  }


  .notification-button {
    width: 40px;
    height: 40px;
  }


  .notification-panel {
    right: 14px;
    left: 14px;

    width: auto;
  }


  .global-search-panel {
    display: none;
  }


  /*
    MOBILE GRID
    2 columns
  */

  .book-grid,
  .search-results-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 12px;
  }


  .page-section {
    padding:
      var(--section-space) 0;
  }


  .home-section {
    padding-top: 25px;
  }


  .section-heading {
    display: block;
  }


  .section-heading .text-link {
    display: inline-block;

    margin-top: 10px;
  }


  .section-heading h1 {
    font-size:
      clamp(2.1rem, 11vw, 3rem);
  }


  .section-heading h2 {
    font-size:
      clamp(1.6rem, 8vw, 2.2rem);
  }


  /* ---------- Hero ---------- */

  .hero {
    min-height: 570px;

    padding:
      40px 25px;

    align-items: flex-start;

    border-radius:
      var(--radius-medium);
  }


  .hero h1 {
    font-size:
      clamp(3rem, 16vw, 5rem);
  }


  .hero-decoration {
    right: 20px;
    bottom: 20px;

    transform:
      scale(0.65)
      rotate(5deg);

    transform-origin:
      bottom right;
  }


  .hero-decoration span {
    width: 85px;
    height: 85px;
  }


  /* ---------- Home ---------- */

  .home-block {
    margin-top: 65px;
  }


  .home-feature {
    grid-template-columns:
      1fr;

    padding:
      30px 24px;

    min-height: 0;
  }


  /* ---------- Community ---------- */

  .club-description {
    margin-bottom: 55px;
  }


  .community-grid {
    grid-template-columns:
      1fr;
  }


  .member-card {
    grid-template-columns:
      90px minmax(0, 1fr);

    gap: 15px;

    padding: 18px;
  }


  .member-avatar {
    width: 90px;
    height: 90px;
  }


  .member-info h3 {
    font-size: 1.2rem;
  }


  .member-favorites {
    gap: 7px;
  }


  /* ---------- Filters ---------- */

  .filter-bar,
  .filters-panel {
    padding: 18px;
  }


  .filter-field {
    width: 100%;
    min-width: 0;
  }


  .filter-bar {
    display: grid;

    grid-template-columns:
      1fr;
  }


  .filters-grid {
    grid-template-columns:
      1fr;
  }


  .filter-panel-header {
    display: block;
  }


  .clear-filters {
    margin-top: 15px;
  }


  /* ---------- Modal ---------- */

  .book-modal {
    padding: 12px;
  }


  .book-modal-content {
    max-height: 94vh;

    padding:
      28px 20px 25px;
  }


  .book-modal-layout {
    grid-template-columns:
      1fr;

    gap: 25px;
  }


  .modal-cover-column {
    width: min(230px, 70%);

    margin-inline: auto;
  }


  .modal-info-column h2 {
    font-size: 2rem;
  }


  .book-detail {
    grid-template-columns:
      1fr;

    gap: 2px;
  }


  .book-detail dt {
    font-size: 0.85rem;
  }


  /* ---------- Calendar ---------- */

  .calendar-wrapper {
    padding: 15px;

    margin-inline:
      -2px;
  }


  .calendar-toolbar {
    flex-wrap: wrap;
  }


  .calendar-month-title {
    min-width:
      150px;

    font-size: 1.2rem;
  }


  /* ---------- FAQ ---------- */

  .faq-question {
    padding:
      17px;

    font-size:
      0.98rem;
  }


  .faq-answer p {
    padding:
      0 17px;
  }


  .faq-item.is-open
  .faq-answer p {
    padding:
      0 17px 18px;
  }


  /* ---------- Footer ---------- */

  .footer-inner {
    grid-template-columns:
      1fr;

    gap: 35px;

    padding:
      50px 0;
  }


  .footer-brand {
    grid-column:
      auto;
  }

}


/* =========================================================
   25. VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

  .site-logo-name {
    display: none;
  }


  .book-grid,
  .search-results-grid {
    gap: 9px;
  }


  .hero {
    padding:
      35px 20px;
  }


  .hero h1 {
    font-size:
      2.9rem;
  }


  .member-card {
    grid-template-columns:
      70px minmax(0, 1fr);

    padding: 14px;
  }


  .member-avatar {
    width: 70px;
    height: 70px;
  }


  .member-favorites figcaption {
    font-size: 0.7rem;
  }

}


/* =========================================================
   26. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }


  *,
  *::before,
  *::after {
    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.01ms !important;

    scroll-behavior:
      auto !important;
  }

}