/* SwiftGrove - Main Stylesheet
   Domain: swiftgrove.top
   Colors: Forest Green #2E7D32, Light Wood #F5F5DC */

/* --- CSS Variables --- */
:root {
  --green-900: #1B5E20;
  --green-800: #2E7D32;
  --green-700: #388E3C;
  --green-600: #43A047;
  --green-500: #4CAF50;
  --green-400: #66BB6A;
  --green-300: #81C784;
  --green-200: #A5D6A7;
  --green-100: #C8E6C9;
  --green-50: #E8F5E9;
  --wood-100: #F5F5DC;
  --wood-200: #E8E8C8;
  --wood-300: #D4D4A0;
  --brown-700: #5D4037;
  --brown-600: #6D4C41;
  --brown-500: #795548;
  --gray-900: #212121;
  --gray-800: #333333;
  --gray-700: #424242;
  --gray-600: #555555;
  --gray-500: #757575;
  --gray-400: #9E9E9E;
  --gray-300: #BDBDBD;
  --gray-200: #E0E0E0;
  --gray-100: #F5F5F5;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --nav-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: var(--gray-800);
  background-color: var(--white);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--green-800);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--green-600);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--green-900);
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Scroll Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: make content visible even without JS after a short delay */
.fade-in:not(.visible) {
  animation: fadeInFallback 0.6s ease 1s forwards;
}

@keyframes fadeInFallback {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--green-800);
  white-space: nowrap;
}

.nav-brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-brand span {
  color: var(--brown-700);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green-800);
  background: var(--green-50);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Banner --- */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  overflow: hidden;
  margin-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(27, 94, 32, 0.7) 0%,
    rgba(46, 125, 50, 0.5) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 24px;
}

.hero-content h1 {
  color: var(--white);
  font-size: 3.2rem;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-content .tagline {
  font-size: 1.3rem;
  opacity: 0.95;
  margin-bottom: 28px;
  font-weight: 300;
  letter-spacing: 1px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 36px;
  background: var(--green-700);
  color: var(--white);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 2px solid rgba(255,255,255,0.3);
}

.hero-btn:hover {
  background: var(--green-600);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* --- Section Styles --- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--green-50);
}

.section-wood {
  background: var(--wood-100);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--green-700);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  gap: 24px;
}

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

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

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* --- Card --- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

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

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--gray-200);
}

.card-body {
  padding: 20px;
}

.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.card-body h3 a {
  color: var(--green-900);
}

.card-body h3 a:hover {
  color: var(--green-700);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  color: inherit;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-500);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.card-meta .tag {
  background: var(--green-100);
  color: var(--green-800);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.card-excerpt {
  color: var(--gray-600);
  font-size: 0.92rem;
  line-height: 1.6;
}

.card-excerpt p {
  margin-bottom: 0;
}

/* --- Quick Notes --- */
.note-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.note-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--green-600);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.note-item:hover {
  border-left-color: var(--green-400);
  transform: translateX(4px);
}

.note-date {
  color: var(--gray-400);
  font-size: 0.8rem;
  white-space: nowrap;
  min-width: 70px;
}

.note-text {
  color: var(--gray-700);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-thumb {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--gray-200);
}

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

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

.gallery-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(46, 125, 50, 0);
  transition: background var(--transition);
}

.gallery-thumb:hover::after {
  background: rgba(46, 125, 50, 0.15);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gray-300);
  font-size: 0.9rem;
}

/* --- Filter Tabs --- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  border: 2px solid var(--green-200);
  border-radius: 50px;
  background: var(--white);
  color: var(--green-800);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

.filter-btn.active {
  background: var(--green-800);
  color: var(--white);
  border-color: var(--green-800);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  width: 40px;
  height: 40px;
  border: 2px solid var(--green-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--green-800);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

.pagination button.active {
  background: var(--green-800);
  color: var(--white);
  border-color: var(--green-800);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Tag Chips --- */
.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag-chip {
  padding: 5px 14px;
  background: var(--green-100);
  color: var(--green-800);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.tag-chip:hover,
.tag-chip.active {
  background: var(--green-800);
  color: var(--white);
}

/* --- Notes (Obsidian-style) --- */
.obsidian-note {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
  margin-bottom: 12px;
}

.obsidian-note:hover {
  border-color: var(--green-300);
  box-shadow: var(--shadow-md);
}

.obsidian-note .note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.obsidian-note .note-tags span {
  font-size: 0.72rem;
  padding: 2px 10px;
  background: var(--green-50);
  color: var(--green-700);
  border-radius: 12px;
}

.obsidian-note .note-content {
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Gear Checklist --- */
.gear-category {
  margin-bottom: 36px;
}

.gear-category h3 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-100);
}

.gear-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.gear-item:hover {
  border-color: var(--green-300);
}

.gear-item.checked {
  background: var(--green-50);
  border-color: var(--green-300);
}

.gear-item.checked .gear-name {
  text-decoration: line-through;
  color: var(--gray-400);
}

.gear-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--green-400);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition);
  background: var(--white);
}

.gear-checkbox.checked {
  background: var(--green-700);
  border-color: var(--green-700);
}

.gear-checkbox.checked::after {
  content: '✓';
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
}

.gear-info {
  flex: 1;
}

.gear-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
  transition: all var(--transition);
}

.gear-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.gear-scene {
  font-size: 0.78rem;
  color: var(--green-700);
  margin-top: 4px;
  font-weight: 500;
}

/* --- About Page --- */
.about-section {
  max-width: 800px;
  margin: 0 auto;
}

.about-section h3 {
  margin-bottom: 16px;
  color: var(--green-800);
}

.about-section p {
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 16px;
}

.domain-explain {
  background: var(--green-50);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 24px 0;
}

.domain-explain .word {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  align-items: baseline;
}

.domain-explain .word strong {
  color: var(--green-800);
  font-size: 1.1rem;
  min-width: 80px;
}

.domain-explain .word span {
  color: var(--gray-600);
}

/* --- Page Header --- */
.page-header {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  padding: 100px 0 60px;
  margin-top: var(--nav-height);
  text-align: center;
  color: var(--white);
}

.page-header h1 {
  color: var(--white);
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.page-header p {
  opacity: 0.85;
  font-size: 1.05rem;
}

/* --- Guide Article --- */
.guide-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  margin-bottom: 24px;
  border-left: 4px solid var(--green-600);
}

.guide-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.guide-card h3 {
  margin-bottom: 12px;
}

.guide-card p {
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 10px;
}

.guide-card ul {
  padding-left: 20px;
  list-style: disc;
}

.guide-card ul li {
  color: var(--gray-600);
  margin-bottom: 6px;
  line-height: 1.6;
}

/* --- Gallery Season Tabs --- */
.season-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.season-tab {
  padding: 10px 28px;
  border-radius: 50px;
  border: 2px solid var(--green-200);
  background: var(--white);
  color: var(--green-800);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.95rem;
}

.season-tab:hover {
  border-color: var(--green-600);
  background: var(--green-50);
}

.season-tab.active {
  background: var(--green-800);
  color: var(--white);
  border-color: var(--green-800);
}

/* --- Footer --- */
.footer {
  background: var(--green-900);
  color: var(--green-100);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--green-300);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: var(--green-200);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  color: var(--green-300);
  font-size: 0.88rem;
  padding: 3px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--green-400);
}

.footer-bottom a {
  color: var(--green-300);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 768px) {
  html { font-size: 15px; }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    display: none;
    gap: 4px;
  }

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

  .nav-links a {
    padding: 12px 16px;
    width: 100%;
    text-align: left;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content .tagline {
    font-size: 1.05rem;
  }

  .section {
    padding: 56px 0;
  }

  .card-grid-2,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .page-header {
    padding: 80px 0 48px;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 400px;
    height: 70vh;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .season-tabs {
    flex-wrap: wrap;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.82rem;
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-green { color: var(--green-800); }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--green-700);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  z-index: 900;
}

.scroll-top.visible {
  display: flex;
}

.scroll-top:hover {
  background: var(--green-600);
  transform: translateY(-2px);
}

/* --- Lazy load placeholder --- */
.lazy-img {
  background: var(--gray-100);
  transition: opacity 0.4s ease;
}

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

/* --- Log detail row --- */
.log-detail {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.log-detail span {
  font-size: 0.82rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 4px;
}

.log-detail .difficulty {
  color: var(--green-700);
  font-weight: 600;
}

/* --- Gear Category Header Icon --- */
.gear-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.gear-cat-header .icon {
  width: 40px;
  height: 40px;
  background: var(--green-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* --- Contact section (pure static) --- */
.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
}

.contact-item .icon {
  font-size: 1.4rem;
}

.contact-item span {
  color: var(--gray-700);
  font-size: 0.9rem;
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --- Guide card hero image --- */
.guide-hero-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: 16px;
}

/* --- Detail Page --- */
.detail-hero {
  position: relative;
  height: 50vh;
  min-height: 350px;
  max-height: 500px;
  margin-top: var(--nav-height);
  overflow: hidden;
}

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

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.1) 100%);
  display: flex;
  align-items: flex-end;
  padding: 40px;
}

.detail-hero-content {
  max-width: 800px;
  color: var(--white);
}

.detail-hero-content h1 {
  color: var(--white);
  font-size: 2.2rem;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
}

.detail-meta .tag {
  background: rgba(255,255,255,0.2);
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.detail-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
}

.detail-body h2 {
  margin-top: 36px;
  margin-bottom: 16px;
  font-size: 1.5rem;
  color: var(--green-800);
}

.detail-body h3 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 1.2rem;
  color: var(--green-700);
}

.detail-body p {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 16px;
}

.detail-body ul, .detail-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.detail-body ul { list-style: disc; }
.detail-body ol { list-style: decimal; }

.detail-body li {
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 6px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--green-50);
  color: var(--green-800);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 32px;
  transition: all var(--transition);
}

.detail-back:hover {
  background: var(--green-100);
  color: var(--green-700);
}

/* --- Source References --- */
.source-references {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 2px solid var(--green-100);
}

.source-references h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: var(--green-800);
}

.source-list {
  list-style: none;
  padding: 0;
}

.source-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.88rem;
  line-height: 1.5;
}

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

.source-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: var(--green-100);
  color: var(--green-800);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.source-list a {
  color: var(--green-700);
  word-break: break-all;
}

.source-list a:hover {
  color: var(--green-500);
  text-decoration: underline;
}

.source-list .source-title {
  font-weight: 600;
  color: var(--gray-800);
}

.source-list .source-org {
  color: var(--gray-400);
  font-size: 0.78rem;
}

@media (max-width: 768px) {
  .detail-hero {
    height: 40vh;
    min-height: 280px;
  }

  .detail-hero-content h1 {
    font-size: 1.6rem;
  }

  .detail-hero-overlay {
    padding: 24px;
  }

  .detail-body {
    padding: 32px 16px;
  }
}
