/* ===========================
   Hekate Theme — Black & Bronze
   =========================== */

/* --- Tokens --- */

:root {
  --ink: #0a0a0a;
  /* near-black */
  --ink-2: #121212;
  --bone: #e9e6df;
  /* warm off-white */
  --ash: #b8b2a6;
  /* muted text */
  --bronze: #b8742a;
  /* primary bronze */
  --bronze-2: #915a1f;
  /* darker bronze */
  --shadow: rgba(0, 0, 0, 0.35);
  --ring: rgba(184, 116, 42, 0.55);
  --muted: #b8b4c7;
  --radius: 16px;
  --radius-sm: 10px;
  --gap: 1rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --maxw: 1100px;
}

/* --- Base --- */
* {
  box-sizing: border-box;
}

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

html,
body {
  height: 100%;
  overflow-x: hidden;
  width: 100%;
}

article[id] {
  scroll-margin-top: 80px;
}

/* tweak to your header height */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bone);
  background: radial-gradient(
      1200px 800px at 15% -10%,
      rgba(185, 133, 62, 0.06),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 120% 110%,
      rgba(185, 133, 62, 0.05),
      transparent 55%
    ),
    linear-gradient(180deg, var(--ink-2), var(--ink));
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.6;
  background-color: #111;
  color: #eee;
  letter-spacing: 0.15px;
}

/* Smooth but respectful of settings */
@media (prefers-reduced-motion: no-preference) {
  :root {
    scroll-behavior: smooth;
  }
}

/* --- Layout helpers --- */
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1rem clamp(0.75rem, 3vw, 2rem);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 400px) {
  .container {
    padding-inline: 0.5rem;
  }
}

section {
  margin-bottom: 1.5em;
}
.grid {
  display: grid;
  gap: var(--gap);
}

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

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

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* --- Header / Nav / Footer --- */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.35));
  border-bottom: 1px solid rgba(184, 116, 42, 0.25);
  backdrop-filter: saturate(120%) blur(6px);
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

h1,
h2,
.site-title {
  font-family: "Libre Bodoni", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--bronze);
}

.site-title {
  font-size: clamp(2rem, 4vw, 3rem);
  text-shadow: 0 0 10px rgba(184, 116, 42, 0.3);
}

h1,
h2,
h3 {
  margin: 0.2em 0 0.6em;
}

h1 span,
h2 span,
h3 span {
  color: var(--bone);
}

h1 {
  font-weight: var(--fw-bold);
  letter-spacing: 0.6px;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
}

h1::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 0.35rem 0 0;
  background: linear-gradient(90deg, transparent, var(--bronze), transparent);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.75rem 0.75rem;
  flex-wrap: wrap;
}

nav a {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--bone);
  font-weight: var(--fw-medium);
  /*border: 1px solid rgba(184, 116, 42, .25);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));*/
}

nav a:hover {
  border-color: rgba(184, 116, 42, 0.45);
  transform: translateY(-1px);
}

nav a[aria-current="page"],
nav a.active {
  color: #fff;
  background: linear-gradient(
    180deg,
    rgba(184, 116, 42, 0.22),
    rgba(184, 116, 42, 0.12)
  );
  border-color: var(--bronze);
  box-shadow: 0 0 0 1px rgba(184, 116, 42, 0.2) inset,
    0 4px 18px -8px var(--ring);
}

main {
  padding: clamp(1rem, 3vw, 2rem) 0;
  width: 100%;
  box-sizing: border-box;
}

footer {
  margin-top: 2rem;
  border-top: 1px solid rgba(184, 116, 42, 0.25);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.55));
  color: var(--ash);
  padding: 1.25rem 1.25em;
}

footer p {
  margin: 0.2rem 0;
}

.social-links {
  display: flex;
  gap: 1em;
  justify-content: center;
  margin: 1em 0;
}

.social-links img {
  width: 3.5em;
  height: auto;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.social-links img:hover {
  opacity: 1;
}

.social-peek {
  display: flex;
  gap: 1.5em;
  align-items: center;
  justify-content: center;
  margin: 0.25em 0 1.25em;
}

.social-peek a {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.social-peek a:hover {
  color: var(--bronze);
}

.social-peek img {
  width: 1em;
  height: auto;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.social-peek a:hover img {
  opacity: 1;
}

.social-peek-sep {
  color: var(--ash);
  font-size: 0.75rem;
}

/* --- Typography & Links --- */
p {
  margin: 0.75em 0;
}

.arcane-meta {
  font-size: 0.8rem;
  color: var(--ash);
  letter-spacing: 0.07em;
  margin-top: 0.15em;
  opacity: 0.8;
}

a {
  color: var(--bronze);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

small,
.muted {
  color: var(--ash);
}

/* --- Cards (for content blocks) --- */
.card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid rgba(184, 116, 42, 0.25);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.2vw, 1.25rem);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 10px 24px -18px var(--shadow);
}

.card h3 {
  margin-top: 0.2rem;
}

.card .meta {
  color: var(--ash);
  font-size: 0.9rem;
}

/* Centered card that respects text scaling */
.card-centered {
  max-width: 600px;
  width: 100%;
  margin-inline: auto;
}

/* Reduce card padding on very small screens */
@media (max-width: 400px) {
  .card {
    padding: 0.875rem;
  }

  .card ul {
    padding-left: 1.25rem;
    margin: 0;
  }

  .card li {
    line-height: 1.5;
    margin-bottom: 0.5rem;
  }
}

/* --- Buttons --- */
.btn {
  border: 1px solid var(--bronze, #caa969);
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: rgba(202, 169, 105, 0.12);
}

.btn.ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(184, 116, 42, 0.38);
}

.btn.ghost:hover {
  border-color: var(--bronze);
}

/* --- Forms --- */
input,
select,
textarea {
  width: 100%;
  background: #0f0f0f;
  color: var(--bone);
  border: 1px solid rgba(184, 116, 42, 0.3);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #8f887b;
}

label {
  display: block;
  margin: 0.5rem 0 0.35rem;
  color: var(--ash);
}

.form-row {
  display: grid;
  gap: 0.9rem;
}

@media (min-width: 720px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0)
  );
  border: 1px solid rgba(184, 116, 42, 0.25);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 0.7rem 0.8rem;
  text-align: left;
}

thead th {
  color: #fff;
  background: rgba(184, 116, 42, 0.12);
  border-bottom: 1px solid rgba(184, 116, 42, 0.3);
}

tbody tr + tr td {
  border-top: 1px solid rgba(184, 116, 42, 0.18);
}

tbody tr:hover {
  background: rgba(184, 116, 42, 0.06);
}

/* --- Dividers / Accents --- */
.hr {
  height: 1px;
  border: none;
  margin: 1.25rem 0;
  background: linear-gradient(90deg, transparent, var(--bronze), transparent);
}

/* Tri-line “strophalos” accent */
.accent-tri {
  position: relative;
  padding-top: 0.5rem;
  background: none;
}

.accent-tri::before,
.accent-tri::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 82px;
  background: linear-gradient(90deg, var(--bronze), transparent);
}

.accent-tri::after {
  top: 6px;
  width: 64px;
  opacity: 0.7;
}

/* --- Alerts --- */
.alert {
  border: 1px solid rgba(184, 116, 42, 0.35);
  background: rgba(184, 116, 42, 0.12);
  color: #fff;
  padding: 0.85rem 1rem;
  border-radius: 12px;
}

/* --- Code --- */
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
  background: #121212;
  color: #f2efe8;
  border: 1px solid rgba(184, 116, 42, 0.25);
  border-radius: 10px;
}

code {
  padding: 0.15rem 0.35rem;
}

pre {
  padding: 1rem;
  overflow: auto;
}

/* --- Accessibility --- */
:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(184, 116, 42, 0.25);
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Utility --- */
.center {
  text-align: center;
}

.text-muted {
  color: var(--ash);
}

/* Flex utilities */
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Section spacing */
.section-spacing {
  margin: 3rem 0;
}

@media (min-width: 768px) {
  .section-spacing {
    margin: 4rem 0;
  }
}

/* Content widths */
.content-narrow {
  max-width: 700px;
  margin-inline: auto;
}

.content-medium {
  max-width: 900px;
  margin-inline: auto;
}

/* Hero section */
.hero {
  text-align: center;
  margin: 2rem 0 3rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--ash);
  max-width: 100%;
  margin: 1rem 0 2rem;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

/* Button sizes */
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

/* List styling for cards */
.card ul {
  margin: 0;
  padding-left: 1.25rem;
}

.card li {
  line-height: 1.7;
  margin-bottom: 0.25rem;
}

/* CTA section */
.cta-section {
  text-align: center;
  padding: 2rem;
}

@media (min-width: 768px) {
  .cta-section {
    padding: 2.5rem;
  }
}

/* Card variants */
.card-dark {
  background: rgba(0, 0, 0, 0.3);
  text-align: left;
}

.card-dark h3 {
  margin-top: 0;
}

/* --- Demo tweaks to match your includes --- */
header h1 {
  margin: 0;
}

main {
  min-height: 52vh;
}

/* --- Photo Grid (homepage Instagram-style) --- */
.photo-grid-section {
  margin: 1rem 0 2rem;
  width: 100%;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: none;
  background: #111;
  cursor: pointer;
  display: block;
  width: 100%;
}

.grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.3s ease;
}

.grid-img.grid-img-loaded {
  opacity: 1;
}

.grid-item:hover .grid-img.grid-img-loaded {
  opacity: 0.78;
  transform: scale(1.04);
}

@media (max-width: 500px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
}

/* --- Slider --- */
.slider {
  margin: 1rem 0 2rem;
  width: 100%;
  overflow: hidden;
  padding: 0 clamp(0.5rem, 3vw, 2rem);
  box-sizing: border-box;
}

.slider-inner {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  box-sizing: border-box;
}

/* Desktop: side-by-side layout */
@media (min-width: 768px) {
  .slider-inner {
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
  }
}

/* Slider image container */
.slider-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(184, 116, 42, 0.25);
  width: 100%;
  background: #000;
}

/* Individual slides */
.slider-media .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.slider-media .slide.is-active {
  opacity: 1;
  transform: scale(1);
  position: relative;
}

/* Slider prev/next buttons */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(184, 116, 42, 0.5);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-size: 1.1rem;
}

.slider-nav:hover {
  background: rgba(184, 116, 42, 0.3);
  border-color: var(--bronze);
}

.slider-nav.prev {
  left: 0.75rem;
}

.slider-nav.next {
  right: 0.75rem;
}

/* Text panel */
.slider-text {
  padding: 0.5rem 0;
  width: 100%;
  box-sizing: border-box;
}

.slider-title {
  font-family: "Libre Bodoni", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  color: var(--bronze);
  margin: 0 0 0.35rem;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  overflow-wrap: break-word;
}

.slider-caption {
  color: var(--bone);
  opacity: 0.9;
  margin: 0.25rem 0 1rem;
  overflow-wrap: break-word;
}

/* Navigation dots */
.slider-dots {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.slider-dots .dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--bronze);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.slider-dots .dot:hover {
  transform: scale(1.2);
}

.slider-dots .dot.active {
  background: var(--bronze);
}

/* Mobile adjustments for slider */
@media (max-width: 767px) {
  .slider {
    padding: 0 0.5rem;
  }

  .slider-text {
    padding: 0.75rem 0.25rem 0;
    text-align: center;
  }

  .slider-dots {
    justify-content: center;
  }

  .slider-nav {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .slider-nav.prev {
    left: 0.5rem;
  }

  .slider-nav.next {
    right: 0.5rem;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Epithet widget, tuned to your bronze/black palette */
.epithet.card {
  border-radius: 18px;
  border: 1px solid rgba(202, 169, 105, 0.25);
  padding: 20px;
  margin: 16px auto;
}

.epithet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: none;
  border: none;
  padding-bottom: 1em;
}

.epithet .greek {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.1;
  letter-spacing: 0.3px;
  font-family: "Libre Bodoni", "Cormorant Garamond", "Palatino Linotype",
    Palatino, Georgia, serif;
}

.epithet .latin {
  color: var(--muted, #b8b4c7);
  margin-top: 2px;
}

.epithet .meaning {
  color: var(--accent, #caa969);
  font-size: clamp(18px, 2.6vw, 22px);
  margin: 10px 0 6px;
}

.epithet .row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 6px 0;
}

.epithet .label {
  color: var(--muted, #b8b4c7);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.epithet .badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted, #b8b4c7);
}

.epithet .btn {
  border: 1px solid #7b6a3e;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
}

/* ========== Header & Nav (mobile-first) ========== */

.site-header {
  border-bottom: 1px solid rgba(202, 169, 105, 0.18);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(6px);
  background: color-mix(in srgb, rgba(0, 0, 0, 0.55) 100%, transparent);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4rem;
  flex-wrap: wrap;
  padding-block: 0.5rem;
}

.brand {
  flex-shrink: 1;
  min-width: 0;
}

.brand a {
  font-family: "Libre Bodoni", "Cormorant Garamond", "Palatino Linotype",
    Palatino, Georgia, serif;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  letter-spacing: 0.3px;
  word-break: break-word;
}

.brand span {
  color: var(--bronze);
}

/* Toggle button */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.nav-toggle:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Site nav */
.site-nav {
  /* mobile panel */
  position: absolute;
  inset: 64px 0 auto 0;
  /* below header */
  background: rgba(15, 15, 15, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.site-nav[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: block;
}

.nav-list > li {
  margin: 0;
  display: block;
  width: 100%;
}

.nav-list a {
  display: block;
  padding: 12px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #f5f5f5;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
}

.nav-list a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-list li.active a {
  color: var(--bronze);
}

/* Prevent page from scrolling when nav is open (mobile) */
body.nav-open {
  overflow: hidden;
}

/* ========== Dropdown Navigation Menus ========== */

/* Mobile navigation layout improvements */
.nav-list > li {
  border-bottom: 1px solid rgba(184, 116, 42, 0.12);
}

.nav-list > li:last-child {
  border-bottom: none;
}

/* Dropdown container */
.nav-dropdown {
  position: relative;
}

/* Dropdown toggle button */
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 12px;
  border: none;
  background: transparent;
  color: #f5f5f5;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown.active .nav-dropdown-toggle {
  color: var(--bronze);
}

/* Dropdown icon (chevron) */
.dropdown-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-dropdown-toggle[aria-expanded="true"] .dropdown-icon {
  transform: rotate(180deg);
}

/* Dropdown menu - mobile */
.nav-dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  transition: max-height 0.3s ease;
}

.nav-dropdown-menu.open {
  max-height: 500px;
  padding: 0.25rem 0;
}

.nav-dropdown-menu li {
  margin: 0;
  border-bottom: 1px solid rgba(184, 116, 42, 0.08);
}

.nav-dropdown-menu li:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 12px 12px 12px 32px;
  font-size: 16px;
  color: var(--ash);
  text-decoration: none;
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
}

.nav-dropdown-menu a::before {
  content: "→";
  position: absolute;
  left: 16px;
  color: var(--bronze);
  opacity: 0.5;
  font-size: 14px;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--bone);
}

.nav-dropdown-menu li.active a {
  color: var(--bronze);
  background: rgba(184, 116, 42, 0.12);
}

.nav-dropdown-menu li.active a::before {
  opacity: 1;
}

/* Top-level nav links styling for consistency */
.nav-list > li:not(.nav-dropdown) > a {
  display: block;
  padding: 14px 12px;
  border-radius: 0;
}

/* ========== Desktop layout ========== */
@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    background: transparent;
    border: 0;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
  }

  /* Remove mobile borders on desktop */
  .nav-list > li {
    margin: 0;
    position: relative;
    border-bottom: none;
    display: inline-block;
    width: auto;
  }

  /* Restore rounded corners for desktop */
  .nav-list a,
  .nav-dropdown-toggle {
    padding: 10px 12px;
    font-size: 17px;
    border-radius: 10px;
  }

  .nav-list a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  /* Desktop dropdown styles */
  .nav-dropdown-toggle {
    width: auto;
  }

  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    margin-top: 0.5rem;
    background: rgba(15, 15, 15, 0.98);
    border: 1px solid rgba(184, 116, 42, 0.25);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 100;
  }

  .nav-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: none;
    padding: 0.5rem;
  }

  .nav-dropdown-menu li {
    margin: 0.25rem 0;
    border-bottom: none;
  }

  .nav-dropdown-menu a {
    padding: 8px 12px;
    padding-left: 12px;
    font-size: 16px;
    border-radius: 8px;
  }

  /* Remove arrow indicator on desktop */
  .nav-dropdown-menu a::before {
    display: none;
  }
}

/* ========== Nice focus ring for all links/buttons ========== */
a,
button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Container styling defined above in Layout helpers section */

/* prevent long words from overflowing */
.epithet .greek,
.epithet .latin,
.epithet .meaning {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.epithet-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.epithet-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.epithet-footer .epithet-controls {
  display: flex;
  gap: 0.5rem;
}

/* ========== Lightbox ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  border: 2px solid rgba(184, 116, 42, 0.4);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
}

.lightbox-caption {
  text-align: center;
  color: var(--bone);
  max-width: 600px;
}

.lightbox-title {
  font-family: "Libre Bodoni", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  color: var(--bronze);
  margin: 0 0 0.5rem;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

.lightbox-text {
  color: var(--ash);
  margin: 0;
  font-size: 1rem;
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(184, 116, 42, 0.5);
  border-radius: 50%;
  color: var(--bone);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(184, 116, 42, 0.25);
  border-color: var(--bronze);
}

.lightbox-nav-row {
  display: none;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(184, 116, 42, 0.5);
  border-radius: 50%;
  color: var(--bone);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(184, 116, 42, 0.25);
  border-color: var(--bronze);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

@media (max-width: 768px) {
  .lightbox {
    padding: 1rem;
    flex-direction: column;
  }

  .lightbox-content {
    max-height: none;
    width: 100%;
  }

  .lightbox-img {
    max-height: 60vh;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  /* Move navigation below image on mobile */
  .lightbox-nav-row {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
  }

  .lightbox-nav {
    position: static;
    transform: none;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }

  .lightbox-prev,
  .lightbox-next {
    left: auto;
    right: auto;
  }
}

/* ========== Gallery Grid ========== */
.gallery-intro {
  color: var(--ash);
  margin-bottom: 2rem;
  font-size: 1.15rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 599px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(184, 116, 42, 0.25);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 116, 42, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(184, 116, 42, 0.3) inset;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-title {
  color: var(--bone);
  font-family: "Libre Bodoni", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* Gallery lightbox (reuses existing lightbox styles but with custom class) */
.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.gallery-lightbox.active {
  display: flex;
}

/* ========== Accessibility: Large Text / Zoom Support ========== */
/* These styles help when users have increased their system font size or zoom level */

/* Ensure text doesn't overflow containers */
h1, h2, h3, h4, h5, h6, p, li, a, span, label {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Allow grids to collapse to single column earlier when text is large */
@media (max-width: 1100px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Ensure nav wraps properly with large text */
.nav-list a,
.nav-dropdown-toggle {
  white-space: normal;
  word-break: break-word;
}

/* Improve touch targets for accessibility */
@media (pointer: coarse) {
  .btn,
  .nav-list a,
  .nav-dropdown-toggle,
  .slider-nav,
  .lightbox-nav,
  .lightbox-close {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Cards should expand with content, not constrain it */
.card {
  min-width: 0;
  overflow-wrap: break-word;
}

/* Ensure inline max-widths don't cause issues - use clamp for flexibility */
[style*="max-width"] {
  box-sizing: border-box;
}

/* --- Badge --- */
.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ash);
  white-space: nowrap;
}

/* --- Tarot Compressed --- */
.grid-tc {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: var(--gap);
}

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

@media (max-width: 600px) {
  .grid-tc {
    grid-template-columns: 1fr;
  }
}

.tc-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tc-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.tc-card-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tc-name {
  font-family: "Libre Bodoni", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 600;
  color: var(--bone);
  letter-spacing: 0.4px;
  line-height: 1.25;
  text-shadow: 0 0 16px rgba(184, 116, 42, 0.3);
}

.tc-desc-name {
  font-style: italic;
  color: var(--bronze);
  font-size: 0.9rem;
  letter-spacing: 0.2px;
}

.tc-card-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  flex-shrink: 0;
}

.tc-full-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}


.tc-meanings {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tc-meaning {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.9rem;
}

.tc-meaning-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.tc-upright .tc-meaning-label { color: var(--bronze); }
.tc-reversed .tc-meaning-label { color: var(--ash); }

.tc-meaning-text {
  color: var(--bone);
  line-height: 1.45;
}

.tc-filters {
  margin-block: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tc-filter-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.tc-filter-row input[type="search"] {
  flex: 1;
  min-width: 200px;
}

.tc-filter-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ash);
}

.tc-filter-label span { white-space: nowrap; }
.tc-filter-label select { min-width: 150px; }

.tc-filter-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.tc-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .tc-card-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }
}

.tc-card-img {
  width: 100%;
  max-width: 140px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(184, 116, 42, 0.25);
  display: block;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .tc-card-img {
    margin: 0;
  }
}

.tc-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}
