﻿/* ============================================
   HUMAN DAVID CMS — Premium Stylesheet
   Cinematic animations & stunning visuals
   ============================================ */

/* === SCROLL PROGRESS BAR === */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #c9a55c, #e8d5a3, #c9a55c);
  z-index: 10001;
  transition: width 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* === KEYFRAME ANIMATIONS — Cinematic & Smooth === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 50px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-50px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translate3d(50px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale3d(0.94, 0.94, 1); }
  to { opacity: 1; transform: scale3d(1, 1, 1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translate3d(0, -20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes imgShimmer {
  0% { background-position: -300% 0; }
  100% { background-position: 300% 0; }
}

/* === IMAGE LOADING SHIMMER === */
.img-loading {
  position: relative;
  overflow: hidden;
}

.img-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 37%, #1a1a2e 63%);
  background-size: 300% 100%;
  animation: imgShimmer 1.8s ease infinite;
  transition: opacity 0.5s ease;
}

.img-loading.img-loaded::before {
  opacity: 0;
  pointer-events: none;
}

.img-loading img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img-loading.img-loaded img {
  opacity: 1;
}

/* Hero background image loading */
.section-hero {
  transition: background-image 0.3s ease;
}

.hero-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 37%, #1a1a2e 63%);
  background-size: 300% 100%;
  animation: imgShimmer 1.8s ease infinite;
  transition: opacity 0.5s ease;
}

.hero-loading.img-loaded::before {
  opacity: 0;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@keyframes drawLine {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes filmDevelop {
  0% { filter: grayscale(1) contrast(0.5) brightness(1.5); opacity: 0.4; }
  50% { filter: grayscale(0.5) contrast(0.8) brightness(1.1); opacity: 0.7; }
  100% { filter: grayscale(0) contrast(1) brightness(1); opacity: 1; }
}

/* === SMOOTH SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Staggered gallery reveals */
.gallery-item.reveal { transition-delay: 0s; }
.gallery-item.reveal:nth-child(1) { transition-delay: 0.05s; }
.gallery-item.reveal:nth-child(2) { transition-delay: 0.1s; }
.gallery-item.reveal:nth-child(3) { transition-delay: 0.15s; }
.gallery-item.reveal:nth-child(4) { transition-delay: 0.2s; }
.gallery-item.reveal:nth-child(5) { transition-delay: 0.25s; }
.gallery-item.reveal:nth-child(6) { transition-delay: 0.3s; }

/* Card staggered reveals */
.card.reveal:nth-child(1) { transition-delay: 0.1s; }
.card.reveal:nth-child(2) { transition-delay: 0.2s; }

/* Film develop reveal for images */
.film-develop.revealed img {
  animation: filmDevelop 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Section divider line animation */
.section-line,
.decorative-divider {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-line.line-drawn,
.decorative-divider.line-drawn {
  transform: scaleX(1);
}

/* Lazy image fade in */
.img-lazy {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-lazy.img-loaded {
  opacity: 1;
}

/* Text reveal animation */
.text-reveal-anim {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* === GALLERY HOVER (HANDLED IN MAIN GALLERY CSS) === */

/* === SECTION VIDEO ELEGANT FRAME === */
.section-video {
  position: relative;
}

.section-video::before,
.section-video::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, calc(100% - 48px));
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,165,92,0.5), transparent);
  z-index: 2;
  pointer-events: none;
}

.section-video::before { top: 16px; }
.section-video::after { bottom: 16px; }

/* === FOOTER NAV === */
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin: 32px 0 24px;
}

.footer-nav-link {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  transition: color 0.3s;
}

.footer-nav-link:hover {
  color: #fff;
}

.footer-copyright {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-bottom: 16px;
}

/* === SCROLL REVEAL CLASSES === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal:nth-child(2n) {
  transition-delay: 0.1s;
}

.reveal:nth-child(3n) {
  transition-delay: 0.2s;
}

/* Staggered gallery reveals */
.gallery-item.reveal { transition-delay: 0s; }
.gallery-item.reveal:nth-child(1) { transition-delay: 0.05s; }
.gallery-item.reveal:nth-child(2) { transition-delay: 0.1s; }
.gallery-item.reveal:nth-child(3) { transition-delay: 0.15s; }
.gallery-item.reveal:nth-child(4) { transition-delay: 0.2s; }
.gallery-item.reveal:nth-child(5) { transition-delay: 0.25s; }
.gallery-item.reveal:nth-child(6) { transition-delay: 0.3s; }

/* Card staggered reveals */
.card.reveal:nth-child(1) { transition-delay: 0.1s; }
.card.reveal:nth-child(2) { transition-delay: 0.25s; }

/* === STATS / COUNTER SECTION === */
.stats-section {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  padding: 48px 24px;
  background: #0a0a0a;
  position: relative;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c9a55c, transparent);
}

.stat-item {
  text-align: center;
  min-width: 140px;
}

.stat-number {
  font-size: 56px;
  font-weight: 200;
  color: #c9a55c;
  line-height: 1;
  margin-bottom: 8px;
  font-family: var(--font-family, 'EB Garamond', Georgia, serif);
}

.stat-number::after {
  content: '+';
  font-size: 32px;
  vertical-align: super;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* === DECORATIVE SECTION DIVIDERS === */
.section-text::before,
.section-text-image::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: #c9a55c;
  margin: 0 auto 40px;
}

/* Hide dividers when there's a custom inner layout */
.section-text:has(.stats-section)::before,
.section-text:has(.home-intro)::before,
.section-text:has(.home-quote)::before,
.section-text:has(.home-cta-block)::before,
.section-text:has(.home-section-heading)::before {
  display: none;
}

/* === CINEMATIC HERO SECTION === */
.section-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  pointer-events: none;
}

.hero-content {
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-title {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-subtitle {
  animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

/* Hero scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  animation: float 2s ease-in-out infinite;
}

.hero-scroll-indicator span {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-scroll-indicator i {
  font-size: 18px;
}

/* === HOME PAGE SPECIFIC === */

/* Full-height hero on home page */
.page-home .section-hero {
  height: 100vh;
  min-height: 600px;
}

/* Intro section */
.home-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 0;
}

.home-intro-heading {
  font-size: 14px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #c9a55c;
  margin-bottom: 24px;
  font-weight: 400;
}

.home-intro-text {
  font-size: 22px;
  font-weight: 300;
  line-height: 1.7;
  color: #333;
  margin-bottom: 32px;
  font-family: var(--font-family, 'EB Garamond', Georgia, serif);
}

.home-intro .btn-primary {
  margin-top: 8px;
}

/* Section headings for home */
.home-section-heading {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.home-section-subheading {
  text-align: center;
  font-size: 16px;
  color: #777;
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto;
}

/* Quote block for home */
.home-quote {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
  position: relative;
}

.home-quote::before {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: #c9a55c;
  margin: 0 auto 40px;
}

.home-quote blockquote {
  border: none;
  padding: 0;
  margin: 0;
}

.home-quote blockquote p {
  font-size: 28px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: #222;
  font-family: var(--font-family, 'EB Garamond', Georgia, serif);
}

.home-quote blockquote footer {
  font-style: normal;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #999;
  margin-top: 24px;
}

/* CTA block */
.home-cta-block {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 0;
}

.home-cta-block h2 {
  font-size: 14px;
  letter-spacing: 6px;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 16px;
}

.home-cta-block p {
  font-size: 16px;
  color: #666;
  line-height: 1.7;
  margin-bottom: 32px;
}

.home-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Better video spacing on home page */
.page-home .section-video {
  padding: 32px 24px;
}

.page-home .section-video + .cms-section[data-section-type="video"] {
  padding-top: 0;
}

/* Better gallery spacing */
.page-home .section-gallery {
  padding-bottom: 80px;
}

/* Tighter stat section */
.page-home .stats-section {
  padding: 64px 24px;
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
}

/* Better text-image section on home */
.page-home .section-text-image {
  padding: 80px 24px;
}

@media (max-width: 768px) {
  .home-intro-text {
    font-size: 18px;
  }
  .home-quote blockquote p {
    font-size: 22px;
  }
  .page-home .section-hero {
    height: 85vh;
  }
}

/* === DECORATIVE ACCENT === */
.compass-decoration {
  position: relative;
  text-align: center;
  padding: 40px 0;
}

.compass-decoration::before {
  content: '✦';
  display: block;
  font-size: 24px;
  color: #c9a55c;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

.compass-decoration::after {
  content: '';
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c9a55c, transparent);
  margin: 16px auto 0;
}

/* === SECTION DECORATIVE BORDERS === */
.section-text-image {
  position: relative;
}

.text-image-img::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: -12px;
  bottom: -12px;
  border: 1px solid rgba(201, 165, 92, 0.2);
  z-index: -1;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-image-img:hover::after {
  top: 8px;
  left: 8px;
  right: -8px;
  bottom: -8px;
  border-color: rgba(201, 165, 92, 0.5);
}

/* === ENHANCED GALLERY (HANDLED IN MAIN GALLERY CSS) === */

/* === ENHANCED CARDS === */
.card {
  position: relative;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #c9a55c, #e8d5a3);
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover::after {
  transform: scaleX(1);
}

/* === ENHANCED BOOK ITEMS === */
.book-image {
  transition: transform 0.5s ease;
}

.book-item:hover .book-image {
  transform: translateY(-4px);
}

.book-image::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 10%;
  right: 10%;
  height: 8px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.2), transparent);
}

/* === ENHANCED BUTTONS === */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

/* === BLOCKQUOTE ENHANCEMENTS === */
.text-content blockquote {
  position: relative;
  border-left: none;
  padding: 24px 32px;
}

.text-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 0;
  font-size: 72px;
  color: rgba(201, 165, 92, 0.3);
  font-family: var(--font-family, 'EB Garamond', Georgia, serif);
  line-height: 1;
}

/* === NEWSLETTER ENHANCEMENTS === */
.section-newsletter {
  position: relative;
  background: linear-gradient(135deg, #f5f5f0, #eee8dd);
}

.section-newsletter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #c9a55c, transparent);
}

/* === FOOTER ENHANCEMENTS === */
.site-footer {
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: #c9a55c;
}

.back-to-top {
  position: relative;
}

.back-to-top::before {
  content: 'â†‘';
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
  transition: transform 0.3s;
}

.back-to-top:hover::before {
  transform: translateY(-4px);
}

/* === JOURNEY TIMELINE DECORATION === */
.journey-marker {
  position: relative;
  padding-left: 32px;
}

.journey-marker::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #c9a55c, transparent);
}

.journey-marker::after {
  content: 'â—†';
  position: absolute;
  left: -5px;
  top: 0;
  color: #c9a55c;
  font-size: 12px;
}

/* === HOVER EFFECTS FOR LINKS === */
.card-link {
  position: relative;
  border-bottom: none;
  padding-bottom: 4px;
}

.card-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #c9a55c;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.card-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* === TEXT HIGHLIGHT / GOLD ACCENTS === */
.gold-accent { color: #c9a55c; }

.section-text h1,
.section-text h2  {
  position: relative;
  display: inline-block;
}

/* === VIDEO SECTION ELEGANT FRAME === */
.video-wrapper {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(201,165,92,0.15),
    0 20px 60px -10px rgba(0, 0, 0, 0.5),
    0 0 80px -20px rgba(201,165,92,0.08);
  transition: box-shadow 0.5s ease, transform 0.5s ease;
}

.video-wrapper:hover {
  box-shadow:
    0 0 0 1px rgba(201,165,92,0.3),
    0 30px 80px -10px rgba(0, 0, 0, 0.6),
    0 0 100px -20px rgba(201,165,92,0.15);
  transform: translateY(-2px);
}

.video-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(201,165,92,0.25), transparent 40%, transparent 60%, rgba(201,165,92,0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

.video-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(201,165,92,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.video-wrapper:hover::after {
  opacity: 1;
}

/* === EVENT CARD ENHANCEMENTS === */
.event-card-image::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: -8px;
  bottom: -8px;
  border: 1px solid rgba(201, 165, 92, 0.2);
  z-index: -1;
}

.event-title {
  position: relative;
}

.event-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #c9a55c;
  margin-top: 12px;
}

/* === SMOOTH SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #c9a55c;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e8d5a3;
}

/* === SELECTION HIGHLIGHT === */
::selection {
  background: rgba(201, 165, 92, 0.3);
  color: #1a1a1a;
}

/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family, 'EB Garamond', Georgia, serif);
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s, background 0.3s;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-title-wrapper .site-title {
  font-family: var(--logo-font, var(--font-family));
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

.site-title a {
  color: #fff;
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-link {
  font-family: var(--menu-font, var(--font-family));
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  border-bottom-color: #fff;
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s;
}

/* Mobile nav overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.mobile-nav-overlay.open {
  display: flex;
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.mobile-nav-link {
  font-family: var(--menu-font, var(--font-family));
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #333;
  transition: color 0.2s;
}

.mobile-nav-link.active {
  color: #1a1a1a;
  font-weight: 600;
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-nav-toggle { display: flex; }
}

/* === HERO SECTION === */
.section-hero {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  margin-top: 72px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  color: #fff;
  padding: 24px;
}

.hero-title {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 8px;
  text-transform: uppercase;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .section-hero { height: 60vh; min-height: 350px; }
  .hero-title { font-size: 28px; letter-spacing: 4px; }
  .hero-subtitle { font-size: 13px; }
}

/* === TEXT SECTION === */
.section-text {
  padding: 64px 24px;
}

.text-content {
  max-width: 800px;
  margin: 0 auto;
}

.text-content h2 {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.text-content h3 {
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 16px;
}

.text-content p {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 16px;
}

.text-content blockquote {
  border-left: 3px solid #1a1a1a;
  padding: 16px 24px;
  margin: 24px 0;
  font-style: italic;
  color: #555;
}

.text-content blockquote footer {
  font-style: normal;
  font-size: 14px;
  color: #888;
  margin-top: 8px;
}

.text-content ul, .text-content ol {
  margin-left: 24px;
  margin-bottom: 16px;
  color: #444;
}

.text-content li {
  margin-bottom: 8px;
}

.text-content a {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-content a.btn-primary {
  color: #fff;
  text-decoration: none;
}

.text-content a:hover {
  opacity: 0.7;
}

/* === TEXT WITH IMAGE === */
.section-text-image {
  padding: 64px 24px;
}

.text-image-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.text-image-wrapper.image-left .text-image-img {
  order: -1;
}

.text-image-text h2 {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.text-image-text h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.text-image-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 12px;
}

.text-image-img {
  position: relative;
}

.text-image-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

@media (max-width: 768px) {
  .text-image-wrapper { grid-template-columns: 1fr; gap: 32px; }
  .text-image-wrapper.image-left .text-image-img { order: 0; }
}

/* === TWO COLUMN CARDS === */
.section-cards {
  padding: 64px 24px;
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  overflow: hidden;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-4px);
}

.card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-image-wrapper img {
  transform: scale(1.04);
}

.card-content {
  padding: 24px 0;
}

.card-title {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.card-subtitle {
  font-size: 14px;
  color: #777;
  margin-bottom: 16px;
}

.card-link {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-bottom: 1px solid #1a1a1a;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.card-link:hover { opacity: 0.6; }

@media (max-width: 768px) {
  .cards-grid { grid-template-columns: 1fr; }
}

/* === VIDEO SECTION === */
.section-video {
  padding: 64px 24px;
}

.video-caption {
  text-align: center;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 32px;
  color: #ccc;
  position: relative;
  display: inline-block;
  width: 100%;
}

.video-caption::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,165,92,0.6), transparent);
}

.video-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: #0a0a0a;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #666;
  font-size: 48px;
  gap: 16px;
}

.video-placeholder p {
  font-size: 16px;
}

/* === GALLERY === */
.section-gallery {
  padding: 64px 24px;
}

.gallery-grid {
  display: grid;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/2;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery-item.gallery-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  filter: brightness(0.95);
}

.gallery-item:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* Zoom icon on hover */
.gallery-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%) scale(0.5);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a55c' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 3;
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 18px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 2;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .gallery-grid { gap: 10px; }
  .gallery-grid.columns-3,
  .gallery-grid.columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid.columns-2,
  .gallery-grid.columns-3,
  .gallery-grid.columns-4 { grid-template-columns: 1fr; }
}

/* === LIGHTBOX === */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 100px -20px rgba(0, 0, 0, 0.8);
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.gallery-lightbox.active .lightbox-content img {
  transform: scale(1);
  opacity: 1;
}

.lightbox-caption {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  text-align: center;
  color: #999;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.gallery-lightbox.active .lightbox-caption {
  opacity: 1;
  transform: translateY(0);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.lightbox-close:hover {
  border-color: rgba(201,165,92,0.5);
  background: rgba(201,165,92,0.1);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.lightbox-nav:hover {
  border-color: rgba(201,165,92,0.5);
  background: rgba(201,165,92,0.1);
}

.lightbox-prev { left: 24px; }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next { right: 24px; }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

.lightbox-counter {
  position: absolute;
  top: 30px;
  left: 28px;
  z-index: 3;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  letter-spacing: 2px;
}

@media (max-width: 768px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 16px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-close { top: 16px; right: 16px; width: 38px; height: 38px; }
  .lightbox-counter { top: 22px; left: 16px; }
}

/* === EVENT CARD === */
.section-event-card {
  padding: 64px 24px;
}

.event-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
  align-items: center;
}

.event-card-image {
  position: relative;
}

.event-card-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.event-card-info {}

.event-title {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.event-date {
  font-size: 16px;
  color: #888;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.event-description {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 24px;
}

.event-cta {
  display: inline-block;
}

@media (max-width: 768px) {
  .event-card { grid-template-columns: 1fr; gap: 24px; }
}

/* === BOOK LIST === */
.section-books {
  padding: 48px 24px;
}

.book-item {
  max-width: 900px;
  margin: 0 auto 64px auto;
  padding-bottom: 64px;
  border-bottom: 1px solid #eee;
}

.book-item:last-child {
  border-bottom: none;
}

.book-image {
  position: relative;
  float: right;
  width: 200px;
  margin: 0 0 16px 32px;
}

.book-item:nth-child(even) .book-image {
  float: left;
  margin: 0 32px 16px 0;
}

.book-image img {
  width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.book-info {
  overflow: hidden;
}

.book-title {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.book-subtitle {
  font-size: 14px;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.book-description {
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

.book-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.book-buy-link {
  display: inline-block;
}

.book-buy-link.btn-secondary {
  background: transparent;
  color: #1a1a1a;
}

@media (max-width: 768px) {
  .book-image { float: none; width: 160px; margin: 0 auto 24px; }
  .book-item:nth-child(even) .book-image { float: none; margin: 0 auto 24px; }
}

/* === NEWSLETTER === */
.section-newsletter {
  padding: 64px 24px;
  background: #f5f5f5;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-title {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.newsletter-subtitle {
  font-size: 15px;
  color: #666;
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid #ccc;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}

.newsletter-form input:focus {
  outline: none;
  border-color: #1a1a1a;
}

.newsletter-form button {
  padding: 14px 28px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.newsletter-form button:hover {
  background: #333;
}

@media (max-width: 480px) {
  .newsletter-form { flex-direction: column; }
}

/* === BUTTONS === */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: #1a1a1a;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  display: inline-block;
  padding: 12px 24px;
  background: transparent;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid #1a1a1a;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-secondary:hover {
  background: #1a1a1a;
  color: #fff;
}

/* === FOOTER === */
.site-footer {
  background: #1a1a1a;
  color: #fff;
  padding: 64px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-cta {
  padding: 0 0 48px;
}

.footer-cta h2 {
  font-size: 18px;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 300;
}

.footer-cta p {
  font-size: 14px;
  color: #aaa;
  max-width: 500px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.btn-blackmane {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid #fff;
  color: #fff;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 0.3s;
}

.btn-blackmane:hover {
  background: #fff;
  color: #1a1a1a;
}

.back-to-top {
  display: block;
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #888;
  padding: 24px 0 0;
  transition: color 0.2s;
}

.back-to-top:hover { color: #fff; }

@media (max-width: 768px) {
  .footer-nav {
    gap: 16px;
  }
}

/* ============================================
   ADMIN STYLES
   ============================================ */

/* Admin toolbar */
.admin-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e1e2e;
  z-index: 10000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.admin-toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.admin-toolbar-left,
.admin-toolbar-center,
.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-badge {
  background: #5b5fc7;
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.admin-user {
  color: #aaa;
  font-size: 13px;
}

.admin-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #2d2d3f;
  color: #ddd;
  border: 1px solid #3d3d4f;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: inherit;
}

.admin-tb-btn:hover {
  background: #3d3d5f;
  color: #fff;
}

.admin-tb-logout {
  background: #4a2020;
  border-color: #5a3030;
}

.admin-tb-logout:hover {
  background: #6a3030;
}

/* Section admin toolbar */
.section-admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2d2d3f;
  padding: 6px 16px;
  border-radius: 4px 4px 0 0;
  gap: 12px;
}

.section-type-label {
  color: #aaa;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.section-admin-actions {
  display: flex;
  gap: 6px;
}

.btn-section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #3d3d4f;
  color: #ccc;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-section-action:hover {
  background: #5b5fc7;
  color: #fff;
}

.btn-section-action.btn-danger:hover {
  background: #c75b5b;
}

/* Section hidden state */
.section-hidden {
  opacity: 0.4;
  border: 2px dashed #666;
}

/* Image change button overlay */
.btn-change-image {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  z-index: 10;
  font-family: inherit;
}

.btn-change-image:hover {
  background: rgba(0, 0, 0, 0.9);
}

.btn-change-image-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}

.btn-change-image-small:hover {
  background: rgba(91, 95, 199, 0.9);
}

.btn-change-image-small.btn-danger:hover {
  background: rgba(199, 91, 91, 0.9);
}

.gallery-item-admin {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  z-index: 10;
  transition: opacity 0.2s;
}

.gallery-item:hover .gallery-item-admin {
  opacity: 1;
}

.gallery-admin-controls,
.book-admin-controls,
.video-admin-controls {
  text-align: center;
  margin-top: 24px;
}

.btn-admin-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #5b5fc7;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
  font-family: inherit;
}

.btn-admin-small:hover {
  background: #4a4fb0;
}

/* Contenteditable styling for admin */
[contenteditable="true"] {
  outline: 2px dashed transparent;
  transition: outline-color 0.2s, background 0.2s;
  cursor: text;
  min-width: 20px;
  min-height: 1em;
}

[contenteditable="true"]:hover {
  outline-color: rgba(91, 95, 199, 0.5);
}

[contenteditable="true"]:focus {
  outline-color: #5b5fc7;
  background: rgba(91, 95, 199, 0.05);
}

/* Editable link indicator */
[data-editable-link] {
  position: relative;
}

[data-editable-link]:hover::after {
  content: 'âœŽ Click to edit link';
  position: absolute;
  bottom: -24px;
  left: 0;
  font-size: 11px;
  color: #5b5fc7;
  white-space: nowrap;
}

/* Nav editable */
.nav-link-wrap {
  position: relative;
  display: inline-block;
}
.nav-edit-btn {
  position: absolute;
  top: -8px;
  right: -12px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(91, 95, 199, 0.5);
  border-radius: 50%;
  background: rgba(91, 95, 199, 0.85);
  color: #fff;
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.nav-link-wrap:hover .nav-edit-btn {
  opacity: 1;
}
.nav-edit-btn:hover {
  background: rgba(91, 95, 199, 1);
  transform: scale(1.15);
}

/* === MODALS === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-content {
  background: #1e1e2e;
  border-radius: 8px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  color: #ddd;
}

.modal-content.modal-large {
  max-width: 800px;
}

.modal-content.modal-medium {
  max-width: 560px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #333;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 500;
}

.modal-close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover { color: #fff; }

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding-top: 16px;
  text-align: right;
}

/* Modal tabs */
.modal-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
}

.modal-tab {
  padding: 10px 20px;
  background: transparent;
  color: #888;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.modal-tab.active {
  color: #fff;
  border-bottom-color: #5b5fc7;
}

.modal-tab:hover { color: #ccc; }

/* Image grid in picker */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.image-grid-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.image-grid-item:hover {
  border-color: #5b5fc7;
  transform: scale(1.02);
}

.image-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-search {
  margin-bottom: 16px;
}

.image-search input {
  width: 100%;
  padding: 10px 14px;
  background: #2d2d3f;
  border: 1px solid #3d3d4f;
  border-radius: 4px;
  color: #ddd;
  font-size: 14px;
  font-family: inherit;
}

.image-search input:focus {
  outline: none;
  border-color: #5b5fc7;
}

/* Upload area */
.upload-area {
  border: 2px dashed #3d3d4f;
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  color: #888;
  transition: border-color 0.2s;
}

.upload-area:hover {
  border-color: #5b5fc7;
}

.upload-area i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #555;
}

.upload-area p {
  margin-bottom: 16px;
}

/* Progress bar */
.upload-progress-container {
  margin-top: 20px;
  padding: 16px;
  background: #1e1e2e;
  border-radius: 8px;
}

.progress-bar {
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 0 8px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5b5fc7, #7b7fef);
  transition: width 0.2s ease;
  width: 0%;
  border-radius: 4px;
}

.progress-percent {
  position: absolute;
  right: 0;
  top: -22px;
  font-size: 13px;
  font-weight: 600;
  color: #7b7fef;
  font-family: var(--font-family, 'EB Garamond', Georgia, serif);
}

.upload-status-text {
  font-size: 12px;
  color: #999;
  margin: 4px 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Form elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: #2d2d3f;
  border: 1px solid #3d3d4f;
  border-radius: 4px;
  color: #ddd;
  font-size: 14px;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: #5b5fc7;
}

.form-textarea {
  resize: vertical;
}

.form-help {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

/* Font settings sections */
.settings-font-section {
  border: 1px solid #3d3d4f;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 20px;
  background: #1e1e2e;
}

.settings-font-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 14px;
}

.settings-font-label i {
  color: #5b5fc7;
  font-size: 16px;
}

.font-preview {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed #3d3d4f;
  border-radius: 6px;
  background: #16162a;
  color: #ccc;
  text-align: center;
}

/* Section type grid */
.section-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.section-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: #2d2d3f;
  border: 1px solid #3d3d4f;
  border-radius: 8px;
  color: #ccc;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.section-type-btn:hover {
  background: #3d3d5f;
  border-color: #5b5fc7;
  color: #fff;
}

.section-type-btn i {
  font-size: 24px;
}

.section-type-btn span {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Loading text */
.loading-text {
  text-align: center;
  color: #666;
  padding: 32px;
}

/* Toast notification */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  z-index: 30000;
  animation: toastIn 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast-success { background: #2e7d32; }
.toast-error { background: #c62828; }
.toast-info { background: #1565c0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Admin body padding for toolbar */
body.page-home,
body.page-about,
body.page-prints,
body.page-events,
body.page-books,
body.page-tours,
body.page-projects,
body.page-contact {
  padding-bottom: 0;
}

/* Add extra bottom padding when admin toolbar is present */
.admin-toolbar ~ .site-footer {
  padding-bottom: 80px;
}

/* CMS Section wrapper */
.cms-section {
  position: relative;
}

/* First section removes top margin since header is fixed */
.cms-section:first-child .section-text,
.cms-section:first-child .section-text-image,
.cms-section:first-child .section-cards,
.cms-section:first-child .section-video,
.cms-section:first-child .section-gallery,
.cms-section:first-child .section-event-card,
.cms-section:first-child .section-books,
.cms-section:first-child .section-newsletter {
  margin-top: 72px;
}

/* Non-hero first sections need margin */
.cms-section:first-child:not([data-section-type="hero"]) .section-text,
.cms-section:first-child:not([data-section-type="hero"]) .section-text-image {
  padding-top: 96px;
}

@media (max-width: 768px) {
  .admin-toolbar-inner {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }
  .admin-toolbar-center {
    flex-wrap: wrap;
  }
  .section-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
