/**
 * G6P Utilities CSS
 *
 * Custom utility classes for the G6P theme.
 * These effects cannot be achieved through theme.json alone.
 */

/* ==========================================================================
   CSS Custom Properties (fallbacks for non-theme.json usage)
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Core colors - matches theme.json */
  --g6p-background: hsl(222 16% 6%);
  --g6p-foreground: hsl(0 0% 98%);
  --g6p-card: hsl(222 16% 8%);
  --g6p-primary: hsl(74 67% 52%);
  --g6p-primary-foreground: hsl(222 16% 6%);
  --g6p-secondary: hsl(0 0% 100% / 0.06);
  --g6p-secondary-foreground: hsl(0 0% 96%);
  --g6p-muted-foreground: hsl(0 0% 72%);
  --g6p-border: hsl(0 0% 100% / 0.12);
  --g6p-ring: hsl(74 67% 52%);

  /* Semantic colors */
  --g6p-destructive: hsl(0 78% 55%);
  --g6p-wc-image-bg: hsl(222 16% 10%);
  --g6p-placeholder: hsl(0 0% 50%);

  /* Semantic opacity tokens */
  --g6p-border-subtle: hsl(0 0% 100% / 0.07);
  --g6p-bg-overlay: hsl(0 0% 0% / 0.88);


  /* Elevation overlays */
  --g6p-elevate-1: hsl(0 0% 100% / 0.05);
  --g6p-elevate-2: hsl(0 0% 100% / 0.1);

  /* Dynamic Gradient colors for Hero/Image overlays */
  --g6p-hero-gradient-start: hsl(0 0% 0% / 0.88);
  --g6p-hero-gradient-mid: hsl(0 0% 0% / 0.35);
  --g6p-hero-gradient-end: hsl(0 0% 0% / 0.88);

}

/* ==========================================================================
   Light Mode Theme
   ========================================================================== */

[data-theme="light"] {
  color-scheme: light;

  /* Backgrounds & Text */
  --g6p-background: hsl(0 0% 100%);
  --g6p-foreground: hsl(222 16% 10%);
  --g6p-card: hsl(0 0% 98%);
  --g6p-border: hsl(220 13% 91%);

  /* COLOR SHIFT: Olive -> Red */
  --g6p-primary: hsl(346 84% 49%);
  --g6p-primary-foreground: hsl(0 0% 100%); /* White text on red buttons */
  --g6p-ring: hsl(346 84% 49%);

  /* Secondary/muted adjustments */
  --g6p-secondary: hsl(220 13% 91% / 0.5);
  --g6p-secondary-foreground: hsl(222 16% 20%);
  --g6p-muted-foreground: hsl(220 8% 46%); /* Medium gray - matches React source */

  /* Semantic colors - light mode variants */
  --g6p-destructive: hsl(0 72% 50%);
  --g6p-wc-image-bg: hsl(0 0% 94%);
  --g6p-placeholder: hsl(0 0% 45%);

  /* Semantic opacity tokens - light mode overrides */
  --g6p-border-subtle: hsl(0 0% 0% / 0.1);
  --g6p-bg-overlay: hsl(0 0% 100% / 0.88);


  /* Elevation overlays - inverted for light */
  --g6p-elevate-1: hsl(0 0% 0% / 0.03);
  --g6p-elevate-2: hsl(0 0% 0% / 0.06);

  /* Gradient Overrides (Fade to White) */
  --g6p-hero-gradient-start: hsl(0 0% 100% / 0.98);
  --g6p-hero-gradient-mid: hsl(0 0% 100% / 0.65);
  --g6p-hero-gradient-end: hsl(0 0% 100% / 0.98);

  /* Shadow Overrides - dark rings instead of white */
  --wp--custom--shadow--2xs: 0px 0px 0px 1px hsl(0 0% 0% / 0.04);
  --wp--custom--shadow--xs: 0px 0px 0px 1px hsl(0 0% 0% / 0.06);
  --wp--custom--shadow--sm: 0px 0px 0px 1px hsl(0 0% 0% / 0.08), 0px 2px 6px hsl(0 0% 0% / 0.04);
  --wp--custom--shadow--default: 0px 0px 0px 1px hsl(0 0% 0% / 0.08), 0px 4px 12px hsl(0 0% 0% / 0.06);
  --wp--custom--shadow--md: 0px 0px 0px 1px hsl(0 0% 0% / 0.10), 0px 8px 24px hsl(0 0% 0% / 0.08);
  --wp--custom--shadow--lg: 0px 0px 0px 1px hsl(0 0% 0% / 0.12), 0px 16px 40px hsl(0 0% 0% / 0.10);

  /* ==========================================================================
     WordPress Preset Variable Overrides
     These override the theme.json palette colors for light mode
     ========================================================================== */
  --wp--preset--color--background: hsl(0 0% 100%);
  --wp--preset--color--foreground: hsl(222 16% 10%);
  --wp--preset--color--card: hsl(0 0% 98%);
  --wp--preset--color--card-foreground: hsl(222 16% 10%);
  --wp--preset--color--primary: hsl(346 84% 49%);
  --wp--preset--color--primary-foreground: hsl(0 0% 100%);
  --wp--preset--color--secondary: hsl(220 13% 91% / 0.5);
  --wp--preset--color--secondary-foreground: hsl(222 16% 20%);
  --wp--preset--color--muted: hsl(220 13% 91% / 0.3);
  --wp--preset--color--muted-foreground: hsl(220 9% 46%);
  --wp--preset--color--accent: hsl(346 84% 49%);
  --wp--preset--color--accent-foreground: hsl(0 0% 100%);
  --wp--preset--color--border: hsl(220 13% 91%);
  --wp--preset--color--input: hsl(220 13% 91%);
  --wp--preset--color--ring: hsl(346 84% 49%);
}

/* Smooth theme transition */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   Skip Navigation Link
   ========================================================================== */

.g6p-skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--g6p-primary);
  color: var(--g6p-primary-foreground);
  padding: 8px 16px;
  z-index: 9999;
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s;
}

.g6p-skip-link:focus {
  top: 0;
  outline: 2px solid var(--g6p-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Light Mode Component Overrides
   ========================================================================== */

/* Hero badges - light background */
[data-theme="light"] .g6p-hero-badge {
  background-color: hsl(0 0% 100% / 0.8);
  border-color: hsl(220 13% 91%);
}

/* Footer badges - light background */
[data-theme="light"] .g6p-footer-badge {
  background-color: hsl(220 13% 91% / 0.5);
  border-color: hsl(220 13% 91%);
}

/* Footer border */
[data-theme="light"] .g6p-footer {
  border-top-color: hsl(220 13% 91%);
}

/* Hero video card */
[data-theme="light"] .g6p-hero-video-card {
  background-color: hsl(0 0% 100% / 0.9);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-hero-video-header {
  border-bottom-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-hero-video-placeholder {
  background: linear-gradient(
    to bottom right,
    var(--g6p-hero-gradient-start),
    var(--g6p-hero-gradient-mid)
  );
}

/* Hero points */
[data-theme="light"] .g6p-hero-points {
  border-top-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-hero-point-icon {
  background-color: hsl(0 0% 96%);
  border-color: hsl(220 13% 91%);
}

/* Course selector - frame cards */
[data-theme="light"] .g6p-course-selector__left,
[data-theme="light"] .g6p-course-selector__right {
  background-color: hsl(0 0% 100%);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-course-selector__header {
  border-bottom-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-course-selector__header-icon {
  background-color: hsl(0 0% 96%);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-course-selector__badge {
  background-color: hsl(0 0% 96% / 0.6);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-course-selector__item {
  background-color: hsl(0 0% 96% / 0.4);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-course-selector__item:hover {
  background-color: hsl(0 0% 96% / 0.7);
}

/* Course selector active state - use primary (red in light mode) */
[data-theme="light"] .g6p-course-selector__item.is-active {
  background-color: hsl(346 84% 49% / 0.1);
  border-color: hsl(346 84% 49% / 0.4);
}

[data-theme="light"] .g6p-course-selector__metric {
  background-color: hsl(0 0% 96% / 0.4);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-course-selector__note {
  background-color: hsl(0 0% 96% / 0.4);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-course-selector__separator {
  background-color: hsl(220 13% 91%);
}

/* Frame cards */
[data-theme="light"] .g6p-frame-card {
  background-color: hsl(0 0% 100%);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-frame-card-header,
[data-theme="light"] .g6p-merch-featured-header,
[data-theme="light"] .g6p-merch-products-header,
[data-theme="light"] .g6p-services-calendar-header,
[data-theme="light"] .g6p-services-benefits-header {
  border-bottom-color: hsl(220 13% 91%);
}

/* In-person cards */
[data-theme="light"] .g6p-inperson-card {
  background-color: hsl(0 0% 100%);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-inperson-header {
  border-bottom-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-inperson-icon {
  background-color: hsl(0 0% 96%);
  border-color: hsl(220 13% 91%);
}

/* Merch section product rows */
[data-theme="light"] .g6p-product-row {
  background-color: hsl(0 0% 96% / 0.5);
  border-color: hsl(220 13% 91%);
}

[data-theme="light"] .g6p-product-row:hover {
  background-color: hsl(0 0% 96%);
  border-color: var(--g6p-primary);
}

/* Services benefits items */
[data-theme="light"] .g6p-benefit-row {
  background-color: hsl(0 0% 96% / 0.5);
  border-color: hsl(220 13% 91%);
}

/* Mobile menu */
[data-theme="light"] .g6p-mobile-menu-container {
  background-color: hsl(0 0% 100% / 0.95);
}

[data-theme="light"] .g6p-mobile-nav-link {
  border-bottom-color: hsl(220 13% 91%);
}

/* Primary button - white text on red background */
[data-theme="light"] .g6p-button {
  color: hsl(0 0% 100%);
}

[data-theme="light"] .g6p-button:hover {
  background-color: hsl(346 84% 42%);
}

/* Secondary button */
[data-theme="light"] .g6p-button-secondary {
  background-color: hsl(0 0% 100%);
  border-color: hsl(220 13% 91%);
  color: hsl(222 16% 10%);
}

[data-theme="light"] .g6p-button-secondary:hover {
  background-color: hsl(0 0% 96%);
}

/* ==========================================================================
   Light Mode Contrast Fixes (WCAG 2.1 AA Compliance)
   Using !important to ensure overrides take effect over component styles
   ========================================================================== */

/* All muted text - near-black for readability */
[data-theme="light"] .g6p-text-stencil,
[data-theme="light"] .g6p-hero-video-title,
[data-theme="light"] .g6p-hero-video-header span,
[data-theme="light"] .g6p-shop-subtitle,
[data-theme="light"] .g6p-hero-video-note,
[data-theme="light"] .g6p-hero-badge span,
[data-theme="light"] .g6p-hero-point-desc,
[data-theme="light"] .g6p-footer-badge span,
[data-theme="light"] .g6p-footer-copyright,
[data-theme="light"] .g6p-footer-desc,
[data-theme="light"] .g6p-card-subtitle,
[data-theme="light"] .g6p-section-note,
[data-theme="light"] .g6p-section-subtitle,
[data-theme="light"] .g6p-inperson-card-desc,
[data-theme="light"] .g6p-inperson-card-meta,
[data-theme="light"] .g6p-product-tag,
[data-theme="light"] .g6p-shipping-note,
[data-theme="light"] .g6p-benefit-desc {
  color: hsl(220 8% 46%);
}

/* Interactive element borders - 3:1 minimum for UI components */
[data-theme="light"] .g6p-button-secondary,
[data-theme="light"] .mobile-nav-toggle {
  border-color: hsl(220 13% 75%) !important;
}

/* Hero video overlay bar - medium-light for light mode */
[data-theme="light"] .g6p-hero-video-overlay-bar {
  background-color: hsl(220 13% 91% / 0.9);
  border-top-color: hsl(220 13% 85%);
}

/* Hero points - lighter than overlay bar */
[data-theme="light"] .g6p-hero-point {
  background-color: hsl(0 0% 96% / 0.7);
  border-color: hsl(220 13% 91%);
}

/* ==========================================================================
   Course Selector Light Mode Styles
   The course selector block SCSS properly uses var(--g6p-*) custom properties,
   which automatically adapt to light mode via [data-theme="light"] token overrides.
   No additional overrides needed - removed 27 unnecessary !important declarations.
   ========================================================================== */

/* ==========================================================================
   Accessibility Utilities
   ========================================================================== */

/* Screen reader only text - visually hidden but accessible to assistive tech */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==========================================================================
   Angular Corner Cuts
   ========================================================================== */

/* Bottom-right corner cut (18px) */
.g6p-cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
}

/* Bottom-left corner cut (18px) */
.g6p-clip-left {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

/* ==========================================================================
   Texture Overlays
   ========================================================================== */

/* Scanline effect */
.g6p-scanlines {
  position: relative;
}

.g6p-scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--g6p-border),
    var(--g6p-border) 1px,
    transparent 1px,
    transparent 5px
  );
  z-index: 2;
}

/* Grid pattern (64px squares) */
.g6p-grid {
  background-image:
    linear-gradient(to right, var(--g6p-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--g6p-border) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

/* Stencil text style (labels, kickers) */
.g6p-text-stencil {
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--g6p-muted-foreground);
}

/* Heading tracking (tight) */
.g6p-tracking-tight {
  letter-spacing: -0.025em;
}

/* ==========================================================================
   Button Components
   ========================================================================== */

/* Primary button (lime background) */
.g6p-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  min-height: 2.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  background-color: var(--g6p-primary);
  color: var(--g6p-primary-foreground);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
}

.g6p-button:hover {
  background-color: color-mix(in srgb, var(--g6p-primary) 85%, black)
}

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

.g6p-button:active {
  transform: translateY(1px);
}

/* Secondary button (transparent with border) */
.g6p-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  min-height: 2.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  background-color: var(--g6p-secondary);
  color: var(--g6p-secondary-foreground);
  border: 1px solid var(--g6p-border);
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-decoration: none;
}

.g6p-button-secondary:hover {
  background-color: color-mix(in srgb, var(--g6p-foreground) 10%, transparent);
}

.g6p-button-secondary:focus-visible {
  outline: 2px solid var(--g6p-ring);
  outline-offset: 2px;
}

/* Button with cut corner - combine with g6p-cut */
.g6p-button.g6p-cut,
.g6p-button-secondary.g6p-cut {
  /* clip-path inherited from .g6p-cut */
}

/* ==========================================================================
   Separator Component
   ========================================================================== */

/* Horizontal separator */
.g6p-separator {
  height: 1px;
  width: 100%;
  background-color: var(--g6p-border);
  border: none;
  margin: 0;
}

/* Vertical separator */
.g6p-separator-vertical {
  width: 1px;
  height: 100%;
  background-color: var(--g6p-border);
}

/* ==========================================================================
   Interactive States (Hover Elevate)
   ========================================================================== */

.g6p-hover-elevate {
  position: relative;
  transition: transform 0.15s ease;
}

.g6p-hover-elevate:hover {
  transform: translateY(-2px);
}

.g6p-hover-elevate::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--g6p-elevate-1);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.g6p-hover-elevate:hover::after {
  opacity: 1;
}

/* ==========================================================================
   Icon Sizing
   ========================================================================== */

.g6p-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.g6p-icon-sm {
  width: 0.875rem;
  height: 0.875rem;
}

.g6p-icon-lg {
  width: 1.25rem;
  height: 1.25rem;
}

.g6p-icon-xl {
  width: 1.5rem;
  height: 1.5rem;
}

/* ==========================================================================
   Animation Utilities (Phase 2 will add JS trigger)
   ========================================================================== */

/* Keyframe for fade-up animation */
@keyframes g6p-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation class - initially hidden */
.g6p-animate-fade-up {
  opacity: 0;
  transform: translateY(18px);
}

/* When visible (added by Intersection Observer in Phase 2) */
.g6p-animate-fade-up.is-visible {
  animation: g6p-fade-up 0.55s ease-out forwards;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }

  .g6p-animate-fade-up {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .g6p-hover-elevate {
    transition: none;
  }

  .g6p-button,
  .g6p-button-secondary {
    transition: none;
  }
}

/* ==========================================================================
   Hero Background Layers
   ========================================================================== */

/* Grid overlay for hero (reduced opacity) */
.g6p-hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(to right, var(--g6p-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--g6p-border) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

/* Hero image background with gradient */
.g6p-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

/* Apply filter for hero images */
.g6p-hero-filter {
  filter: contrast(1.2) saturate(0.9);
}

/* Light mode: reduce contrast for hero images */
[data-theme="light"] .g6p-hero-filter {
  filter: contrast(1.1) saturate(0.8);
}

/* Light mode: subtle edge fade (React source has no mask — keep very light) */
[data-theme="light"] .g6p-hero-bg,
[data-theme="light"] .g6p-hero-overlay {
  -webkit-mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    black 0%,
    black 90%,
    transparent 100%
  );
}

/* Hero overlay (scanlines) */
.g6p-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.g6p-hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--g6p-border),
    var(--g6p-border) 1px,
    transparent 1px,
    transparent 5px
  );
}

/* ==========================================================================
   Hero Section Layout
   ========================================================================== */

.g6p-hero-section {
  position: relative;
  overflow: hidden;
  margin-block-start: 0 !important;
}

.g6p-hero-content {
  position: relative;
  z-index: 10;
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1rem 3.5rem;
}

@media (min-width: 768px) {
  .g6p-hero-content {
    padding: 5.5rem 1rem 4.5rem;
  }
}

.g6p-hero-grid-layout {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .g6p-hero-grid-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* Hero left column */
.g6p-hero-left {
  display: flex;
  flex-direction: column;
}

/* Hero badges row */
.g6p-hero-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.g6p-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--g6p-border);
  background-color: color-mix(in srgb, var(--g6p-card) 70%, transparent);
}

.g6p-hero-badge svg {
  width: 1rem;
  height: 1rem;
  color: var(--g6p-primary);
  flex-shrink: 0;
}

.g6p-hero-badge span {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

/* Hero headline */
.g6p-hero-headline {
  margin-top: 1.5rem;
  font-family: var(--wp--preset--font-family--heading);
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--g6p-foreground);
}

@media (min-width: 768px) {
  .g6p-hero-headline {
    font-size: 3.75rem;
  }
}

/* Hero subtitle */
.g6p-hero-subtitle {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 0.875rem;
  color: var(--g6p-muted-foreground);
  line-height: 1.6;
}

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

/* Hero CTAs */
.g6p-hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .g6p-hero-ctas {
    flex-direction: row;
  }
}

/* Hero stat cards */
.g6p-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 36rem;
  margin-top: 2.5rem;
}

.g6p-hero-stat {
  padding: 1rem;
  border: 1px solid var(--g6p-border);
  background-color: var(--g6p-card);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.g6p-hero-stat-value {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--g6p-foreground);
}

/* Hero scroll prompt */
.g6p-hero-scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  color: var(--g6p-muted-foreground);
}

.g6p-hero-scroll svg {
  width: 1rem;
  height: 1rem;
}

.g6p-hero-scroll span {
  font-size: 0.75rem;
}

/* ==========================================================================
   Hero Right Column - Video Card
   ========================================================================== */

.g6p-hero-right {
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .g6p-hero-right {
    margin-top: 0;
  }
}

.g6p-hero-video-card {
  border: 1px solid var(--g6p-border);
  background-color: var(--g6p-card);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.g6p-hero-video-header {
  padding: 1rem;
  border-bottom: 1px solid var(--g6p-border);
}

.g6p-hero-video-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.g6p-hero-video-title {
  font-weight: 500;
  color: var(--g6p-foreground);
}

.g6p-hero-video-note {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

.g6p-hero-video-body {
  padding: 1rem;
}

/* Video placeholder container */
.g6p-hero-video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--g6p-border);
  background-color: black;
}

.g6p-hero-video-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: contrast(1.25) saturate(0.85);
}

.g6p-hero-video-grain {
  position: absolute;
  inset: 0;
  background-size: 700px 700px;
  background-repeat: repeat;
  opacity: 0.14;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.g6p-hero-video-placeholder .g6p-scanlines {
  position: absolute;
  inset: 0;
}

/* Video overlay bar at bottom */
.g6p-hero-video-overlay-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  border-top: 1px solid var(--g6p-border);
  background-color: color-mix(in srgb, var(--g6p-background) 70%, transparent);
}

.g6p-hero-video-overlay-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.g6p-hero-video-overlay-title {
  font-size: 0.875rem;
  color: var(--g6p-foreground);
}

/* Hero info points below video */
.g6p-hero-points {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.g6p-hero-point {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--g6p-border);
  background-color: color-mix(in srgb, var(--g6p-background) 40%, transparent);
}

.g6p-hero-point svg {
  margin-top: 0.125rem;
  width: 1rem;
  height: 1rem;
  color: var(--g6p-primary);
  flex-shrink: 0;
}

.g6p-hero-point-title {
  font-size: 0.875rem;
  color: var(--g6p-foreground);
}

.g6p-hero-point-desc {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

/* ==========================================================================
   Header Sticky
   ========================================================================== */

.g6p-header-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--g6p-border) 70%, transparent);
  background-color: color-mix(in srgb, var(--g6p-background) 80%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
  .g6p-header-sticky {
    background-color: var(--g6p-background);
  }
}

/* Light mode header */
[data-theme="light"] .g6p-header-sticky {
  border-bottom-color: hsl(220 13% 91%);
  background-color: hsl(0 0% 100% / 0.9);
}

@supports not (backdrop-filter: blur(10px)) {
  [data-theme="light"] .g6p-header-sticky {
    background-color: var(--g6p-background);
  }
}

/* Header inner container */
.g6p-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

/* ==========================================================================
   Header Brand
   ========================================================================== */

.g6p-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

/* Real logo image — replaces placeholder mark */
.g6p-logo {
  display: block;
  height: 4rem;
  width: auto;
  /* Dark mode default: SVG fills are black, invert to white */
  filter: brightness(0) invert(1);
  transition: filter 0.2s ease;
  flex-shrink: 0;
}

[data-theme="light"] .g6p-logo {
  filter: none; /* Black logo on light background */
}

/* Legacy placeholder mark — kept for fallback */
.g6p-logo-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--g6p-border);
  background-color: var(--g6p-card);
}

.g6p-logo-mark svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--g6p-primary);
}

.g6p-brand-text {
  line-height: 1.2;
}

.g6p-brand-name {
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--g6p-foreground);
}

.g6p-brand-tagline {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g6p-muted-foreground);
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

/* Desktop nav - hidden on mobile */
.g6p-nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .g6p-nav-desktop {
    display: flex;
  }
}

/* Nav link styling */
.g6p-nav-link {
  font-size: 0.875rem;
  color: var(--g6p-muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.g6p-nav-link:hover {
  color: var(--g6p-foreground);
}

/* Cart nav link with icon */
.g6p-nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.g6p-nav-cart svg {
  flex-shrink: 0;
}

/* ==========================================================================
   Header CTAs
   ========================================================================== */

.g6p-header-ctas {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hide Book Consult on mobile */
.g6p-header-ctas .g6p-cta-secondary {
  display: none;
}

@media (min-width: 768px) {
  .g6p-header-ctas .g6p-cta-secondary {
    display: inline-flex;
  }
}

/* ==========================================================================
   Mobile Navigation Toggle
   ========================================================================== */

.mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--g6p-border);
  background: transparent;
  cursor: pointer;
  color: var(--g6p-foreground);
}

.mobile-nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (min-width: 768px) {
  .mobile-nav-toggle {
    display: none;
  }
}

/* ==========================================================================
   Mobile Navigation Drawer
   ========================================================================== */

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 80vw;
  background-color: var(--g6p-card);
  border-left: 1px solid var(--g6p-border);
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
  z-index: 100;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
}

/* Drawer header with close button */
.mobile-nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--g6p-border);
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--g6p-border);
  background: transparent;
  cursor: pointer;
  color: var(--g6p-foreground);
}

.mobile-nav-close svg {
  width: 1rem;
  height: 1rem;
}

/* Drawer navigation links */
.mobile-nav-links {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0;
}

.mobile-nav-links a {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--g6p-muted-foreground);
  text-decoration: none;
  border-bottom: 1px solid var(--g6p-border);
  transition: color 0.2s ease;
}

.mobile-nav-links a:hover {
  color: var(--g6p-foreground);
}

.mobile-nav-links a:last-child {
  border-bottom: none;
}

/* Drawer CTAs */
.mobile-nav-ctas {
  margin-top: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--g6p-border);
}

/* Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background-color: hsl(0 0% 0% / 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-out;
  z-index: 90;
}

.mobile-nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .mobile-nav-drawer,
  .mobile-nav-overlay {
    transition: none;
  }
}

/* GPU acceleration for smooth animation */
.mobile-nav-drawer {
  will-change: transform;
}

.mobile-nav-drawer.is-open {
  will-change: auto;
}

/* Hide drawer on desktop */
@media (min-width: 768px) {
  .mobile-nav-drawer,
  .mobile-nav-overlay {
    display: none !important;
  }
}

/* Mobile drawer header actions wrapper */
.mobile-nav-drawer-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */

.g6p-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  color: var(--g6p-muted-foreground);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.g6p-theme-toggle:hover {
  color: var(--g6p-foreground);
  border-color: var(--g6p-primary);
}

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

.g6p-theme-toggle svg {
  width: 1.125rem;
  height: 1.125rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .g6p-theme-toggle {
    transition: none;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.g6p-footer {
  border-top: 1px solid hsl(0 0% 100% / 0.07);
  background-color: var(--g6p-background);
}

.g6p-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

/* Footer grid layout */
.g6p-footer-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .g6p-footer-grid {
    grid-template-columns: 1fr 2fr;
  }
}

/* Footer brand section */
.g6p-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.g6p-footer-brand-header {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.g6p-footer-brand-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--g6p-foreground);
  font-family: var(--wp--preset--font-family--heading);
}

.g6p-footer-desc {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
  max-width: 24rem;
  line-height: 1.5;
  margin: 0;
}

/* Footer links columns */
.g6p-footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.g6p-footer-col-title {
  margin-bottom: 0.75rem;
}

.g6p-footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.g6p-footer-link {
  font-size: 0.875rem;
  color: var(--g6p-muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.g6p-footer-link:hover {
  color: var(--g6p-foreground);
}

/* Footer separator */
.g6p-footer-separator {
  height: 1px;
  background-color: var(--g6p-border);
  margin: 2rem 0;
  border: none;
}

/* Footer bottom row */
.g6p-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .g6p-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.g6p-footer-copyright {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

/* Footer badges */
.g6p-footer-badges {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.g6p-footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--g6p-border);
  background-color: hsl(222 16% 6% / 0.4);
}

.g6p-footer-badge svg {
  width: 1rem;
  height: 1rem;
  color: var(--g6p-primary);
  flex-shrink: 0;
}

.g6p-footer-badge span {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

/* ==========================================================================
   Section Pattern Layout
   ========================================================================== */

/* Section container - max-width and centered */
.g6p-section-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}

/* In-person section uses less top padding (follows courses) */
.g6p-section-inperson-container {
  padding-top: 0;
}

/* Section header */
.g6p-section-header {
  margin-bottom: 2rem;
}

/* Title row - flex with space-between */
.g6p-section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.75rem;
}

/* Section title */
.g6p-section-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-family: var(--wp--preset--font-family--heading);
  color: var(--g6p-foreground);
  margin: 0;
}

@media (min-width: 768px) {
  .g6p-section-title {
    font-size: 1.875rem;
  }
}

/* Section note - desktop only */
.g6p-section-note {
  display: none;
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
  max-width: 28ch;
  text-align: right;
}

@media (min-width: 768px) {
  .g6p-section-note {
    display: block;
  }
}

/* Section subtitle */
.g6p-section-subtitle {
  margin-top: 0.75rem;
  max-width: 42rem;
  font-size: 0.875rem;
  color: var(--g6p-muted-foreground);
}

/* Course selector wrapper */
.g6p-course-selector-wrapper {
  margin-top: 2rem;
}

/* ==========================================================================
   In-Person Training Cards
   ========================================================================== */

/* Grid layout */
.g6p-inperson-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .g6p-inperson-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card container */
.g6p-inperson-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--g6p-border);
  background-color: var(--g6p-card);
}

/* Card header */
.g6p-inperson-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.g6p-inperson-card-head svg {
  color: var(--g6p-primary);
  flex-shrink: 0;
}

/* Card title */
.g6p-inperson-card-title {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--g6p-foreground);
}

/* Card description */
.g6p-inperson-card-desc {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
  line-height: 1.5;
}

/* Card footer */
.g6p-inperson-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
}

/* Card meta text */
.g6p-inperson-card-meta {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

/* ==========================================================================
   Frame Card Component
   ========================================================================== */

.g6p-frame-card {
  border: 1px solid var(--g6p-border);
  background-color: var(--g6p-card);
}

/* Card header/body padding */
.g6p-frame-card-header,
.g6p-merch-featured-header,
.g6p-merch-products-header,
.g6p-services-calendar-header,
.g6p-services-benefits-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--g6p-border);
}

.g6p-frame-card-body,
.g6p-merch-featured-body,
.g6p-merch-bundle-inner,
.g6p-services-calendar-body,
.g6p-services-benefits-inner {
  padding: 1.25rem;
}

/* Card title and subtitle */
.g6p-card-title {
  font-weight: 500;
  color: var(--g6p-foreground);
  margin: 0;
}

.g6p-card-subtitle {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
  margin: 0;
}

/* Icon box (used for card header icons) */
.g6p-icon-box {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--g6p-border);
  background-color: var(--g6p-background);
}

.g6p-icon-box svg {
  color: var(--g6p-primary);
}

/* Icon primary color utility */
.g6p-icon-primary {
  color: var(--g6p-primary);
}

/* ==========================================================================
   Merch Section
   ========================================================================== */

/* Merch grid layout */
.g6p-merch-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.g6p-merch-grid > .wp-block-group {
  margin-block-start: 0;
  margin-block-end: 0;
}

@media (min-width: 768px) {
  .g6p-merch-grid {
    grid-template-columns: 0.95fr 1.05fr;
  }
}

/* Merch title row - note on right */
.g6p-merch-title-row {
  margin-top: 0.75rem;
}

.g6p-merch-note {
  display: none;
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
  max-width: 28ch;
  text-align: right;
}

@media (min-width: 768px) {
  .g6p-merch-note {
    display: block;
  }
}

/* Featured drop card - flex column to push CTA to bottom */
.g6p-merch-featured {
  display: flex;
  flex-direction: column;
}

.g6p-merch-featured > .g6p-merch-featured-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.g6p-merch-featured-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.g6p-merch-featured-copy .g6p-button {
  margin-top: auto;
}

.g6p-merch-featured-image {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  filter: contrast(1.2) saturate(0.85);
  border: 1px solid var(--g6p-border);
  background-color: black;
}

/* Light mode: match React filter values */
[data-theme="light"] .g6p-merch-featured-image {
  filter: contrast(1.1) saturate(0.8);
  background-color: hsl(0 0% 90%);
}

.g6p-merch-featured-copy {
  margin-top: 1rem;
  gap: 0.5rem;
}

.g6p-featured-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--g6p-foreground);
  margin: 0;
}

.g6p-featured-desc {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
  margin: 0;
}

/* Merch right column */
.g6p-merch-right {
  display: grid;
  gap: 1.5rem;
}

/* Product list */
.g6p-product-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.g6p-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--g6p-border);
  background-color: hsl(222 16% 6% / 0.4);
  transition: border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
}

/* Product row hover effect highlights the product name link */
.g6p-product-row:hover {
  border-color: var(--g6p-primary);
  background-color: hsl(222 16% 8% / 0.6);
}

.g6p-product-row:hover .g6p-product-name {
  color: var(--g6p-primary);
}

.g6p-product-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.g6p-product-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--g6p-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

a.g6p-product-name:hover,
a.g6p-product-name:focus {
  color: var(--g6p-primary);
  text-decoration: none;
}

.g6p-product-tag {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

.g6p-product-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.g6p-product-price {
  font-size: 0.875rem;
  color: var(--g6p-foreground);
}

/* Products footer */
.g6p-merch-products-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem 1.25rem;
}

.g6p-shipping-note {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

/* View all link */
.g6p-link-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--g6p-primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.g6p-link-primary:hover {
  opacity: 0.9;
}

.g6p-link-primary svg {
  color: inherit;
}

/* Bundle card */
.g6p-bundle-title {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--g6p-foreground);
}

.g6p-bundle-desc {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

.g6p-bundle-actions {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

/* Services grid layout */
.g6p-services-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .g6p-services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Benefits list */
.g6p-benefits-list {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.g6p-benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--g6p-border);
  background-color: hsl(222 16% 6% / 0.4);
}

.g6p-benefit-icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  color: var(--g6p-primary);
  flex-shrink: 0;
}

.g6p-benefit-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.g6p-benefit-title {
  font-size: 0.875rem;
  color: var(--g6p-foreground);
}

.g6p-benefit-desc {
  font-size: 0.75rem;
  color: var(--g6p-muted-foreground);
}

/* Services actions */
.g6p-services-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .g6p-services-actions {
    flex-direction: row;
  }
}

/* GHL embed wrapper */
.g6p-ghl-embed-wrapper {
  min-height: 300px;
}

/* ==========================================================================
   Blog Card Component
   ========================================================================== */

/* Blog card wrapper */
.g6p-blog-card {
  background-color: var(--g6p-card);
  border: 1px solid var(--g6p-border);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.g6p-blog-card:hover {
  border-color: var(--g6p-primary);
  transform: translateY(-2px);
}

/* Featured image container */
.g6p-blog-card .wp-block-post-featured-image {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.g6p-blog-card .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.g6p-blog-card:hover .wp-block-post-featured-image img {
  transform: scale(1.05);
}

/* Card content area */
.g6p-blog-card-content {
  padding: 1.5rem;
}

/* Post title in card */
.g6p-blog-card .wp-block-post-title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--lg);
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.g6p-blog-card .wp-block-post-title a {
  color: var(--g6p-foreground);
  text-decoration: none;
}

.g6p-blog-card .wp-block-post-title a:hover {
  color: var(--g6p-primary);
}

/* Post date in card */
.g6p-blog-card .wp-block-post-date {
  font-size: var(--wp--preset--font-size--sm);
  color: var(--g6p-muted-foreground);
  margin-bottom: 0.75rem;
}

/* Post excerpt in card */
.g6p-blog-card .wp-block-post-excerpt {
  font-size: var(--wp--preset--font-size--sm);
  color: var(--g6p-muted-foreground);
  margin: 0;
  line-height: 1.6;
}

.g6p-blog-card .wp-block-post-excerpt__more-link {
  color: var(--g6p-primary);
  text-decoration: none;
  font-weight: 500;
}

.g6p-blog-card .wp-block-post-excerpt__more-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Blog Pagination
   ========================================================================== */

.g6p-pagination {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--g6p-border);
}

.g6p-pagination .wp-block-query-pagination-numbers {
  display: flex;
  gap: 0.5rem;
}

.g6p-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: var(--wp--preset--font-size--sm);
  color: var(--g6p-foreground);
  background-color: transparent;
  border: 1px solid var(--g6p-border);
  text-decoration: none;
  transition: all 0.2s ease;
}

.g6p-pagination .page-numbers:hover {
  border-color: var(--g6p-primary);
  color: var(--g6p-primary);
}

.g6p-pagination .page-numbers.current {
  background-color: var(--g6p-primary);
  color: var(--g6p-primary-foreground);
  border-color: var(--g6p-primary);
}

.g6p-pagination .prev,
.g6p-pagination .next {
  font-weight: 500;
}

/* ==========================================================================
   Blog Grid Responsive
   ========================================================================== */

/* The grid is handled by WordPress post-template block, but we add responsive overrides */
@media (max-width: 1023px) {
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* Respect reduced motion preference for blog cards */
@media (prefers-reduced-motion: reduce) {
  .g6p-blog-card {
    transition: none;
  }

  .g6p-blog-card .wp-block-post-featured-image img {
    transition: none;
  }

  .g6p-pagination .page-numbers {
    transition: none;
  }
}

/* ==========================================================================
   Single Post Template
   ========================================================================== */

/* Hero featured image */
.g6p-single-hero {
  margin-bottom: 0;
  max-height: 60vh;
  overflow: hidden;
}

.g6p-single-hero img {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  object-fit: cover;
}

/* Main content wrapper */
.g6p-single-post {
  max-width: 48rem; /* Optimal reading width */
  margin: 0 auto;
}

/* Post metadata row */
.g6p-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--g6p-border);
}

.g6p-single-meta .wp-block-post-date,
.g6p-single-meta .wp-block-post-author {
  font-size: var(--wp--preset--font-size--sm);
  color: var(--g6p-muted-foreground);
}

.g6p-single-meta .wp-block-post-author__name {
  color: var(--g6p-foreground);
}

/* Categories/terms */
.g6p-single-meta .wp-block-post-terms {
  font-size: var(--wp--preset--font-size--sm);
}

.g6p-single-meta .wp-block-post-terms a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--g6p-secondary);
  color: var(--g6p-foreground);
  text-decoration: none;
  transition: all 0.2s ease;
}

.g6p-single-meta .wp-block-post-terms a:hover {
  background-color: var(--g6p-primary);
  color: var(--g6p-primary-foreground);
}

/* Post title */
.g6p-single-post .wp-block-post-title {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--4xl);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 2rem;
}

@media (max-width: 639px) {
  .g6p-single-post .wp-block-post-title {
    font-size: var(--wp--preset--font-size--3xl);
  }
}

/* Post content typography */
.g6p-single-post .wp-block-post-content {
  font-size: var(--wp--preset--font-size--lg);
  line-height: 1.75;
}

.g6p-single-post .wp-block-post-content p {
  margin-bottom: 1.5rem;
}

.g6p-single-post .wp-block-post-content h2 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--2xl);
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.g6p-single-post .wp-block-post-content h3 {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--xl);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.g6p-single-post .wp-block-post-content ul,
.g6p-single-post .wp-block-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.g6p-single-post .wp-block-post-content li {
  margin-bottom: 0.5rem;
}

.g6p-single-post .wp-block-post-content blockquote {
  border-left: 3px solid var(--g6p-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--g6p-muted-foreground);
}

.g6p-single-post .wp-block-post-content code {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.9em;
  padding: 0.2rem 0.4rem;
  background-color: var(--g6p-secondary);
  border-radius: 0;
}

.g6p-single-post .wp-block-post-content pre {
  background-color: hsl(222 16% 4%);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.g6p-single-post .wp-block-post-content pre code {
  padding: 0;
  background: transparent;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.g6p-post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--g6p-border);
}

.g6p-post-navigation .wp-block-post-navigation-link {
  flex: 1;
  max-width: 45%;
}

.g6p-post-navigation .wp-block-post-navigation-link a {
  display: block;
  padding: 1rem;
  border: 1px solid var(--g6p-border);
  text-decoration: none;
  transition: all 0.2s ease;
}

.g6p-post-navigation .wp-block-post-navigation-link a:hover {
  border-color: var(--g6p-primary);
  background-color: var(--g6p-secondary);
}

.g6p-post-navigation .wp-block-post-navigation-link__label {
  display: block;
  font-size: var(--wp--preset--font-size--xs);
  color: var(--g6p-muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.g6p-post-navigation .wp-block-post-navigation-link__title {
  font-family: var(--wp--preset--font-family--heading);
  font-weight: 600;
  color: var(--g6p-foreground);
}

/* Next link alignment */
.g6p-post-navigation .post-navigation-link-next {
  text-align: right;
  margin-left: auto;
}

@media (max-width: 639px) {
  .g6p-post-navigation {
    flex-direction: column;
  }

  .g6p-post-navigation .wp-block-post-navigation-link {
    max-width: 100%;
    width: 100%;
  }

  .g6p-post-navigation .post-navigation-link-next {
    text-align: left;
  }
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.g6p-404-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4rem 1.5rem;
}

.g6p-404-content {
  text-align: center;
  max-width: 32rem;
  position: relative;
  z-index: 10;
}

/* Main heading */
.g6p-404-heading {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--4xl);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--g6p-foreground);
}

@media (min-width: 640px) {
  .g6p-404-heading {
    font-size: var(--wp--preset--font-size--5xl);
  }
}

/* Subheading */
.g6p-404-subheading {
  font-size: var(--wp--preset--font-size--lg);
  color: var(--g6p-muted-foreground);
  margin-bottom: 2.5rem;
}

/* Status indicator */
.g6p-404-status {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background-color: var(--g6p-secondary);
  border: 1px solid var(--g6p-border);
}

.g6p-404-status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.g6p-404-label {
  font-family: var(--wp--preset--font-family--mono);
  font-size: var(--wp--preset--font-size--xs);
  color: var(--g6p-muted-foreground);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.g6p-404-value {
  font-family: var(--wp--preset--font-family--heading);
  font-size: var(--wp--preset--font-size--2xl);
  font-weight: 600;
  color: var(--g6p-foreground);
}

.g6p-404-failed {
  color: var(--g6p-destructive);
}

/* Home button container */
.g6p-404-actions {
  display: flex;
  justify-content: center;
}

.g6p-404-actions .wp-block-button__link {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  background-color: var(--g6p-primary);
  color: var(--g6p-primary-foreground);
}

.g6p-404-actions .wp-block-button__link:hover {
  background-color: hsl(74 67% 45%);
}

/* Light mode - white text on red background */
[data-theme="light"] .g6p-404-actions .wp-block-button__link {
  color: hsl(0 0% 100%);
}

[data-theme="light"] .g6p-404-actions .wp-block-button__link:hover {
  background-color: hsl(346 84% 42%);
}

/* Mobile adjustments */
@media (max-width: 639px) {
  .g6p-404-section {
    min-height: 60vh;
    padding: 3rem 1rem;
  }

  .g6p-404-status {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .g6p-404-status-item {
    flex-direction: row;
    gap: 1rem;
  }
}
