/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Theme System - CSS Variables */
:root {
  /* Light Theme (Default) */
  --bg-primary: #ffffff;        /* White background */
  --bg-secondary: #f8f9fa;      /* Light gray for cards */
  --bg-tertiary: #e9ecef;       /* Light gray for secondary elements */
  --text-primary: #8B8282;      /* Universal gray text - visible on both themes */
  --text-secondary: #8B8282;    /* Universal gray text */
  --text-muted: #8B8282;        /* Universal gray text */
  --text-title: #8B8282;        /* Universal gray titles */
  --text-content: #8B8282;      /* Universal gray content text */
  --badge-bg: #6b7280;          /* Gray middle for badges */
  --badge-text: #ffffff;        /* White text on badges */
  --border-color: #e5e7eb;      /* Light border */
  --shadow-color: rgba(0, 0, 0, 0.1);
  --accent-color: #10b981;      /* Green accent */
  --accent-hover: #059669;
}

/* Dark Theme */
.dark {
  --bg-primary: #000000;        /* Black background */
  --bg-secondary: #111111;      /* Dark gray for cards */
  --bg-tertiary: #1a1a1a;       /* Darker gray for secondary elements */
  --text-primary: #8B8282;      /* Universal gray text - visible on both themes */
  --text-secondary: #8B8282;    /* Universal gray text */
  --text-muted: #8B8282;        /* Universal gray text */
  --text-title: #8B8282;        /* Universal gray titles */
  --text-content: #8B8282;      /* Universal gray content text */
  --badge-bg: #6b7280;          /* Gray middle for badges */
  --badge-text: #ffffff;        /* White text on badges */
  --border-color: #374151;      /* Dark border */
  --shadow-color: rgba(0, 0, 0, 0.3);
  --accent-color: #10b981;      /* Green accent */
  --accent-hover: #059669;
}

/* Apply theme variables to body and main elements */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme-aware utility classes */
.theme-bg-primary { background-color: var(--bg-primary); }
.theme-bg-secondary { background-color: var(--bg-secondary); }
.theme-bg-tertiary { background-color: var(--bg-tertiary); }
.theme-text-primary { color: var(--text-primary); }
.theme-text-secondary { color: var(--text-secondary); }
.theme-text-muted { color: var(--text-muted); }
.theme-text-title { color: var(--text-title); }
.theme-text-content { color: var(--text-content); }
.theme-badge-bg { background-color: var(--badge-bg); }
.theme-badge-text { color: var(--badge-text); }
.theme-border { border-color: var(--border-color); }
.theme-shadow { box-shadow: 0 1px 3px var(--shadow-color); }

/* Universal text color for all content */
.universal-text { color: #8B8282; }
.universal-title { color: #8B8282; }

/* Theme-aware component styles */
.theme-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px var(--shadow-color);
}

.theme-button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  transition: background-color 0.2s ease;
}

.theme-button:hover {
  background-color: var(--accent-hover);
}

.theme-button-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.theme-button-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--accent-color);
}

/* Hide scrollbar for category navigation */
.scrollbar-hide {
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
  scrollbar-width: none;  /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar { 
  display: none;  /* Safari and Chrome */
}

/* Category navigation arrows */
.category-arrow {
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.category-arrow:hover {
  transform: scale(1.1);
}

.category-arrow:disabled {
  opacity: 0.3;
  pointer-events: none;
}


/* Hero section optimizations */
.hero-section {
  background-attachment: fixed;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 400px;
  max-height: 800px;
  width: 100%;
  /* Ensure image scales with viewport */
  height: min(80vh, 800px);
  /* Ensure proper aspect ratio maintenance */
  aspect-ratio: 16/9;
  /* Fallback for older browsers */
  min-height: 400px;
}

.hero-content {
  min-height: 400px;
  max-height: 800px;
  /* Match the hero section height */
  height: min(80vh, 800px);
  /* Match aspect ratio */
  aspect-ratio: 16/9;
}

/* Responsive breakpoints for different screen sizes */
@media (max-width: 1200px) {
  .hero-section {
    height: min(75vh, 700px);
  }
  .hero-content {
    height: min(75vh, 700px);
  }
}

@media (max-width: 992px) {
  .hero-section {
    height: min(70vh, 600px);
  }
  .hero-content {
    height: min(70vh, 600px);
  }
}

@media (max-width: 768px) {
  .hero-section {
    background-attachment: scroll; /* Better performance on mobile */
    background-size: contain; /* Keep full image visible on mobile too */
    height: min(60vh, 500px);
    min-height: 300px;
  }
  .hero-content {
    height: min(60vh, 500px);
    min-height: 300px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    height: min(50vh, 400px);
    min-height: 250px;
  }
  .hero-content {
    height: min(50vh, 400px);
    min-height: 250px;
  }
}

/* For very wide screens, ensure image doesn't get too large */
@media (min-width: 1400px) {
  .hero-section {
    height: min(80vh, 800px);
  }
  .hero-content {
    height: min(80vh, 800px);
  }
}

/* Gradient blur effect for hero content */
.hero-content-blur {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
}
