/* ===================================
   Variegate Labs — Site Stylesheet
   Brand accent: #E2856E (soft coral)
   =================================== */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg: #FAF9F7;
  --bg-white: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --muted: #6b6b6b;
  --border: #e5e5e5;
  --border-light: #f0f0f0;

  /* Locked brand accent */
  --accent: #E2856E;
  --accent-hover: #d4775f;
  --accent-dark: #c46a55; /* For better contrast when needed */

  /* Typography */
  --font-heading: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 72px;

  /* Layout */
  --max-width: 960px;
  --content-width: 65ch;

  /* Components */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.03), 0 10px 24px rgba(0, 0, 0, 0.06);

  /* Transitions - reduced to 200ms or less */
  --transition-fast: 0.15s ease;
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  background: #f5f5f5;
  color: #1d1d1d;
  padding: 8px;
  z-index: 100;
  outline: 2px solid var(--accent);
}

/* --- Theme Classes --- */
.light-theme {
  --bg: #f5f5f5;
  --bg-white: #ffffff;
  --text: #1d1d1d;
  --text-secondary: #4a4a4a;
  --muted: #6b6b6b;
  --accent: #e56c5c;
}

.dark-theme {
  --bg: #1d1d1d;
  --bg-white: #2a2a2a;
  --text: #f5f5f5;
  --text-secondary: #cccccc;
  --muted: #999999;
  --border: #444444;
  --border-light: #333333;
  --accent: #e56c5c;
}

.dark-theme header {
  background: #2a2a2a;
  border-bottom-color: #444444;
}

.dark-theme .card {
  background: #2a2a2a;
  border-color: #444444;
}

.high-contrast-theme {
  --bg: #000000;
  --bg-white: #000000;
  --text: #FFFFFF;
  --text-secondary: #FFFFFF;
  --muted: #CCCCCC;
  --border: #FFFFFF;
  --border-light: #666666;
  --accent: #FFD700;
  --accent-hover: #FFEA00;
  background-color: var(--bg);
  color: var(--text);
}

.high-contrast-theme a {
  background-color: var(--accent);
  color: #000000;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 2px;
}

.high-contrast-theme a:hover {
  background-color: var(--accent-hover);
}

.high-contrast-theme header {
  background: #000000;
  border-bottom: 3px solid #FFFFFF;
}

.high-contrast-theme .card {
  background: #000000;
  border: 3px solid #FFFFFF;
}

.high-contrast-theme .card:hover {
  border-color: var(--accent);
}

.high-contrast-theme nav a {
  background-color: var(--accent);
  color: #000000;
  text-decoration: none;
}

.high-contrast-theme nav a:hover {
  background-color: var(--accent-hover);
}

.high-contrast-theme nav a[aria-current="page"] {
  background: #FFFFFF;
  color: #000000;
  text-decoration: none;
}

.high-contrast-theme .btn {
  background-color: var(--accent);
  color: #000000;
}

.high-contrast-theme .btn:hover {
  background-color: var(--accent-hover);
}

.high-contrast-theme .container {
  background: #000000;
}

.high-contrast-theme .brand {
  color: #FFFFFF;
}

.high-contrast-theme .brand:hover {
  background: transparent;
}

.high-contrast-theme .footer a {
  background-color: var(--accent);
  color: #000000;
}

/* --- Font Size Classes --- */
.font-size-small {
  font-size: 14px;
}

.font-size-medium {
  font-size: 16px;
}

.font-size-large {
  font-size: 18px;
}

/* --- Reduced Motion Class --- */
.reduced-motion *,
.reduced-motion *::before,
.reduced-motion *::after {
  transition: none !important;
  animation: none !important;
}

.reduced-motion .card:hover {
  transform: none;
}

.reduced-motion .btn:hover {
  transform: none;
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2rem);
  margin-bottom: var(--space-sm);
}

h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-sm);
  color: var(--text);
  max-width: var(--content-width);
}

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

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration: none;
}

ul, ol {
  margin: 0 0 var(--space-sm);
  padding-left: var(--space-md);
  max-width: var(--content-width);
}

li {
  margin-bottom: var(--space-xs);
}

li:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 600;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-xl);
  background: var(--bg-white);
  min-height: calc(100vh - 73px);
}

/* --- Header & Navigation --- */
header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.brand .name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background var(--transition-fast), color var(--transition-fast);
}

nav a:hover {
  background: var(--bg);
  color: var(--text);
}

nav a[aria-current="page"] {
  color: var(--accent-dark);
  background: rgba(226, 133, 110, 0.1);
}

nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-top: 1px;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 4px 0;
  z-index: 200;
  list-style: none;
  margin: 4px 0 0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-dropdown-menu a:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-dropdown-menu a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Dark theme dropdown */
.dark-theme .nav-dropdown-menu {
  background: #2a2a2a;
  border-color: #444444;
}

.dark-theme .nav-dropdown-menu a:hover {
  background: #333333;
}

/* High contrast dropdown */
.high-contrast-theme .nav-dropdown-menu {
  background: #000000;
  border: 3px solid #FFFFFF;
}

.high-contrast-theme .nav-dropdown-menu a {
  background-color: transparent;
  color: #FFFFFF;
  padding: 2px 16px;
}

.high-contrast-theme .nav-dropdown-menu a:hover {
  background-color: var(--accent);
  color: #000000;
}

/* --- Hero Section (Home Page) --- */
.hero {
  text-align: center;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: var(--space-lg);
}

.hero-logo {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 0 auto var(--space-lg);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: var(--space-xs);
}

/* Visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero p {
  margin-left: auto;
  margin-right: auto;
  max-width: 540px;
}

.hero p strong {
  font-size: 1.125rem;
  color: var(--text);
}

.hero .muted {
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Section Styling --- */
section {
  margin-bottom: var(--space-lg);
}

/* --- Cards --- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
  margin-bottom: var(--space-lg);
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: var(--space-sm);
  align-self: center;
}

/* Product page header */
.product-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  flex-shrink: 0;
}

.product-header h1 {
  margin-bottom: 0;
}

/* --- App Carousel --- */
.app-carousel {
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.app-carousel h2 {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.app-carousel-track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.app-carousel-track::-webkit-scrollbar {
  height: 8px;
}

.app-carousel-track::-webkit-scrollbar-track {
  background: transparent;
}

.app-carousel-track::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.app-carousel-track::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.app-carousel-item {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-sm);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.app-carousel-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.app-carousel-item:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.app-carousel-item img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin-bottom: var(--space-xs);
}

.app-carousel-item span {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.dark-theme .app-carousel-item {
  background: #2a2a2a;
  border-color: #444444;
}

.dark-theme .app-carousel-track::-webkit-scrollbar-thumb {
  background: #444444;
}

.dark-theme .app-carousel-track::-webkit-scrollbar-thumb:hover {
  background: #666666;
}

.high-contrast-theme .app-carousel-item {
  background: #000000;
  border: 3px solid #FFFFFF;
}

.high-contrast-theme .app-carousel-item:hover {
  border-color: var(--accent);
}

.high-contrast-theme .app-carousel-item span {
  color: #FFFFFF;
}

.high-contrast-theme .app-carousel-track::-webkit-scrollbar-thumb {
  background: #FFFFFF;
}

.card h3 {
  margin: 0 0 var(--space-xs);
  color: var(--text);
  text-align: center;
}

.card p {
  flex: 1;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card .btn {
  align-self: center;
  margin-top: auto;
  text-align: center;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: #d9655d; /* darken accent by ~5% */
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn:active {
  background: #cf5e56; /* slightly darker on active */
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--accent);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-outline:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-outline:active {
  background: #d9655d;
  border-color: #d9655d;
  color: #fff;
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}

.high-contrast-theme .btn-outline {
  border-color: var(--accent);
  color: var(--accent);
}

.high-contrast-theme .btn-outline:hover {
  background-color: var(--accent);
  color: #000000;
}

.btn-disabled {
  background: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-disabled:hover {
  background: var(--muted);
}

.btn-disabled:active {
  background: var(--muted);
}

.high-contrast-theme .btn-disabled {
  background: #666666;
  color: #CCCCCC;
}

.high-contrast-theme .btn-disabled:hover {
  background: #666666;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p {
  margin: var(--space-xs) 0;
  max-width: none;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Customization Panel --- */
#customization-panel {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

#customization-panel button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #333333;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

#customization-panel button .label {
  color: inherit;
}

#customization-panel button .state-label {
  font-weight: 600;
  color: var(--accent);
}

#customization-panel button:hover {
  background: #444444;
}

#customization-panel button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

#customization-panel button[aria-checked="true"] {
  background-color: var(--accent);
  color: #000000;
}

#customization-panel button[aria-checked="true"] .state-label {
  color: #000000;
}

/* Light theme toggle adjustments */
.light-theme #customization-panel button {
  background: #f0f0f0;
  color: var(--text);
}

.light-theme #customization-panel button:hover {
  background: #e0e0e0;
}

.light-theme #customization-panel button .state-label {
  color: var(--accent-dark);
}

/* Dark theme toggle adjustments */
.dark-theme #customization-panel button {
  background: #333333;
  color: var(--text);
}

.dark-theme #customization-panel button:hover {
  background: #444444;
}

/* High contrast theme toggle adjustments */
.high-contrast-theme #customization-panel button {
  background: #000000;
  border: 3px solid #FFD700;
  color: #FFFFFF;
}

.high-contrast-theme #customization-panel button .state-label {
  color: #FFD700;
}

.high-contrast-theme #customization-panel button:hover {
  background: #222222;
}

.high-contrast-theme #customization-panel button[aria-checked="true"] {
  background-color: #FFD700;
  color: #000000;
}

.high-contrast-theme #customization-panel button[aria-checked="true"] .state-label {
  color: #000000;
}

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

/* --- Utility --- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-lg) 0;
}

/* --- 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;
    scroll-behavior: auto !important;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --space-lg: 36px;
    --space-xl: 48px;
  }

  .navbar {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    gap: 2px;
  }

  nav a {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .nav-dropdown-menu {
    position: absolute;
    left: 0;
  }

  #customization-panel {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    flex-wrap: wrap;
  }

  #customization-panel button {
    padding: 8px 10px;
    font-size: 0.8rem;
    min-height: 44px;
  }

  .hero {
    padding: var(--space-md) 0;
  }

  .hero-logo {
    max-width: 100%;
  }

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

@media (max-width: 480px) {
  .container {
    padding: var(--space-sm) var(--space-sm) var(--space-lg);
  }

  .brand .name {
    font-size: 1rem;
  }

  nav a {
    padding: 8px 10px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .btn {
    padding: 12px 16px;
    width: 100%;
    text-align: center;
  }

  .btn-outline {
    padding: 12px 16px;
    width: 100%;
    text-align: center;
  }

  .btn-group {
    flex-direction: column;
  }
}

/* --- Screenshot Gallery --- */
.screenshot-gallery {
  margin: var(--space-lg) 0;
}

.screenshot-gallery h2 {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.gallery-main {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.gallery-main-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  max-height: 600px;
  padding: var(--space-sm);
}

.gallery-main-image img,
.gallery-main-image video {
  max-width: 100%;
  max-height: 560px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.gallery-main-image video {
  background: #000;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--text);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  z-index: 10;
}

.gallery-nav:hover {
  background: var(--bg);
  border-color: var(--accent);
}

.gallery-nav:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.gallery-nav--prev {
  left: var(--space-sm);
}

.gallery-nav--next {
  right: var(--space-sm);
}

.gallery-caption {
  text-align: center;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
}

.gallery-counter {
  font-weight: 600;
  color: var(--text);
}

.gallery-thumbnails {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast), opacity var(--transition-fast);
  background: var(--bg);
}

.gallery-thumb:hover {
  border-color: var(--accent);
}

.gallery-thumb:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.gallery-thumb.active {
  border-color: var(--accent);
  border-width: 3px;
}

.gallery-thumb img,
.gallery-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb--video {
  position: relative;
}

.gallery-thumb--video::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  border: 2px solid #fff;
}

.gallery-thumb--video::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-left: 8px solid #fff;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  z-index: 1;
}

/* Dark theme gallery adjustments */
.dark-theme .gallery-main {
  background: #1d1d1d;
  border-color: #444444;
}

.dark-theme .gallery-nav {
  background: #2a2a2a;
  border-color: #444444;
}

.dark-theme .gallery-nav:hover {
  background: #333333;
}

.dark-theme .gallery-caption {
  background: #2a2a2a;
  border-top-color: #333333;
}

.dark-theme .gallery-thumb {
  border-color: #444444;
  background: #1d1d1d;
}

/* High contrast theme gallery adjustments */
.high-contrast-theme .gallery-main {
  border: 3px solid #FFFFFF;
}

.high-contrast-theme .gallery-nav {
  background: #000000;
  border: 3px solid #FFD700;
  color: #FFFFFF;
}

.high-contrast-theme .gallery-nav:hover {
  background: #222222;
}

.high-contrast-theme .gallery-caption {
  background: #000000;
  border-top: 3px solid #FFFFFF;
}

.high-contrast-theme .gallery-thumb {
  border: 3px solid #FFFFFF;
}

.high-contrast-theme .gallery-thumb.active {
  border-color: #FFD700;
}

/* Responsive gallery */
@media (max-width: 768px) {
  .gallery-main-image {
    min-height: 300px;
    max-height: 450px;
  }

  .gallery-main-image img {
    max-height: 410px;
  }

  .gallery-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .gallery-thumb {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .gallery-main-image {
    min-height: 250px;
    max-height: 400px;
  }

  .gallery-main-image img {
    max-height: 360px;
  }

  .gallery-nav {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .gallery-nav--prev {
    left: 4px;
  }

  .gallery-nav--next {
    right: 4px;
  }

  .gallery-thumb {
    width: 48px;
    height: 48px;
  }
}
