/*
Theme Name: Voxel Child
Description: Child theme for Greensboro Arts Hub 2.0
Author: Greensboro Arts Hub
Template: voxel
Version: 2.0.1
Text Domain: voxel-child
*/

/*
 * Custom styles for Greensboro Arts Hub
 * Parent theme styles are loaded via functions.php
 */

/* ================================
   Fonts - Loaded by Elementor 3.27+ (Local Google Fonts)
   Noto Serif (headings) + Inter (body) are auto-hosted by Elementor
   ================================ */

/* ================================
   Dark Mode System
   ================================ */

/* CSS Custom Properties for Theme Colors */
:root {
  /* Light Mode (default) - Design System V2 */
  --bg-canvas: #f8f7f4;
  --bg-gallery: #f5f5f5;
  --bg-warm: #e8e8e8;
  --text-primary: #2d3436;
  --color-primary: #2c5f8d; /* Hero Blue */
  --color-creative: #f27878; /* Creative Coral (desaturated) */
  --color-success: #4ecdc4; /* Community Green */
  --color-warning: #ffd93d; /* Sunshine Yellow */
  --text-metadata: #888888; /* Medium Gray - metadata */

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);

  /* Legacy brand colors (for backward compatibility) */
  --gah-primary: #2c5f8d;
  --gah-secondary: #ff6b6b;
  --gah-accent: #4ecdc4;
  --gah-success: #27ae60;
  --gah-warning: #ffd93d;
  --gah-gray-light: #f8f9fa;
  --gah-gray-dark: #6c757d;
  --gah-text: #2d3436;
  --gah-text-light: #6c757d;
}

/* Dark Mode Override */
[data-theme="dark"] {
  /* Custom Variables */
  --bg-canvas: #1a1a1a;
  --bg-gallery: #2d2d2d;
  --bg-warm: #404040;
  --text-primary: #e8e8e8;
  --color-primary: #5a8fc4; /* Lighter blue for dark bg */
  --color-creative: #ff8585; /* Lighter coral */
  --color-success: #6eded4; /* Lighter teal */
  --color-warning: #ffe66d; /* Lighter yellow */
  --text-metadata: #999999; /* Medium Gray - metadata (lighter for dark bg) */

  /* Shadows (darker in dark mode) */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.24);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.36);

  /* Legacy colors for dark mode */
  --gah-primary: #5a8fc4;
  --gah-secondary: #ff8585;
  --gah-accent: #6eded4;
  --gah-warning: #ffe66d;
  --gah-gray-light: #2d2d2d;
  --gah-gray-dark: #e8e8e8;
  --gah-text: #e8e8e8;
  --gah-text-light: #b0b0b0;

  /* ===================================
       ELEMENTOR GLOBAL COLORS - DARK MODE
       Override Elementor's global color variables
       =================================== */

  /* Standard Elementor Colors - Override to dark mode equivalents */
  --e-global-color-primary: #5a8fc4; /* Dark Primary (was #2C5F8D) */
  --e-global-color-secondary: #ff8585; /* Dark Creative (was #FF6B6B) */
  --e-global-color-text: #e8e8e8; /* Dark Text (was #2D3436) */
  --e-global-color-accent: #6eded4; /* Dark Success (was #4ECDC4) */

  /* Custom Light Colors - Override to dark mode equivalents */
  --e-global-color-0d1f28c: #5a8fc4; /* Light Primary → Dark Primary */
  --e-global-color-0c6c884: #2d2d2d; /* Gallery Gray → Dark Surface */
  --e-global-color-ae7ab98: #404040; /* Warm Gray → Dark Warm */
  --e-global-color-c0a1184: #5a5a5a; /* Light Border → Dark Border */
  --e-global-color-c2fa2f3: #5a8fc4; /* Border Hover → Dark Primary */
  --e-global-color-de1b9b0: #ffe66d; /* Light Warning → Dark Warning */
  --e-global-color-c798801: #1a1a1a; /* Canvas White → Dark Canvas */
  --e-global-color-45408bb: #ff8585; /* Light Creative → Dark Creative */
  --e-global-color-53bd778: #6eded4; /* Light Success → Dark Success */

  /* Dark Color variables (already correct values, but listed for completeness) */
  /* These don't need overriding - they're already dark mode values:
       --e-global-color-ffb4cf8: #1A1A1A  (Dark Canvas)
       --e-global-color-7a298b9: #2D2D2D  (Dark Surface)
       --e-global-color-c106258: #5A5A5A  (Dark Border)
       --e-global-color-fa09490: #E8E8E8  (Dark Text)
       --e-global-color-7379946: #5A8FC4  (Dark Primary)
       --e-global-color-e4cd306: #FF8585  (Dark Creative)
       --e-global-color-26a91ad: #6EDED4  (Dark Success)
       --e-global-color-79c4d62: #FFE66D  (Dark Warning)
    */
}

/* Smooth color transitions */
body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Apply theme colors to common elements */
.elementor-section {
  transition: background-color 0.3s ease;
}

.elementor-widget-heading {
  transition: color 0.3s ease;
}

.elementor-widget-text-editor {
  transition: color 0.3s ease;
}

.elementor-button {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .elementor-section {
  background-color: var(--bg-canvas);
}

[data-theme="dark"] img {
  opacity: 0.9; /* Slightly dim images in dark mode */
}

[data-theme="dark"] .elementor-widget-divider {
  border-color: var(--bg-warm);
}

/* Dark mode toggle widget wrapper */
.elementor-widget-html:has(.dark-mode-toggle) {
  align-self: center;
  display: flex;
  align-items: center;
}

.elementor-widget-html:has(.dark-mode-toggle) .elementor-widget-container {
  display: flex;
  align-items: center;
  line-height: 0;
}

/* Dark mode toggle button styles */
.dark-mode-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: transparent;
  border: 2px solid var(--bg-warm);
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  margin: 0 12px;
  line-height: 0;
  vertical-align: middle;
  flex-shrink: 0;
  align-self: center;
}

.dark-mode-toggle:hover {
  background: var(--bg-gallery);
  border-color: var(--color-primary);
}

.dark-mode-toggle:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

.dark-mode-toggle svg {
  width: 14px;
  height: 14px;
  fill: var(--text-primary);
  transition: fill 0.3s ease, transform 0.3s ease;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dark-mode-toggle:hover svg {
  transform: rotate(15deg);
}

/* Icon visibility based on theme */
[data-theme="light"] .dark-mode-toggle .moon-icon {
  display: block;
}

[data-theme="light"] .dark-mode-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
  display: block;
}

/* ================================
   Color Semantics Overrides
   Voxel Timeline: username & timestamp → metadata gray
   ================================ */
.vxf-user > span a {
  color: var(--text-metadata) !important;
}

/* Fix Voxel button text color override from Elementor global link color */
a.ts-btn.ts-btn-2 {
  color: #fff;
}

/* Voxel search filter icon color — .ts-filter uses different markup than .ts-input-icon */
.ts-filter img,
.ts-filter svg {
  fill: #a40303 !important;
}

/* Dark mode adjustments for Voxel elements */
[data-theme="dark"] .ts-form {
  background-color: var(--bg-gallery);
  border-color: var(--bg-warm);
}

[data-theme="dark"] .ts-form input,
[data-theme="dark"] .ts-form textarea,
[data-theme="dark"] .ts-form select {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border-color: var(--bg-warm);
}

[data-theme="dark"] .ts-form input::placeholder,
[data-theme="dark"] .ts-form textarea::placeholder {
  color: #808080;
}

[data-theme="dark"] .post-card,
[data-theme="dark"] .preview-card {
  background-color: var(--bg-gallery);
  border-color: var(--bg-warm);
}

[data-theme="dark"] .ts-timeline-item {
  background-color: var(--bg-gallery);
  border-color: var(--bg-warm);
}

[data-theme="dark"] .voxel-modal {
  background-color: var(--bg-gallery);
}

[data-theme="dark"] .voxel-nav {
  background-color: var(--bg-canvas);
  border-color: var(--bg-warm);
}

/* Adjust text in dark mode */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text-primary);
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span {
  color: var(--text-primary);
}

[data-theme="dark"] a {
  color: var(--color-primary);
}

[data-theme="dark"] a:hover {
  color: var(--color-creative);
}

/* Typography */
.gah-heading-large {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gah-primary);
  margin-bottom: 1rem;
}

.gah-heading-medium {
  font-size: 2rem;
  font-weight: 600;
  color: var(--gah-primary);
  margin-bottom: 0.75rem;
}

.gah-text-accent {
  color: var(--gah-accent);
}

/* Custom Components */
.gah-announcement-bar {
  background: var(--gah-secondary);
  color: white;
  padding: 10px 20px;
  text-align: center;
  font-weight: 500;
}

.gah-event-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1.5rem;
}

.gah-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.gah-event-card.featured {
  border: 2px solid var(--gah-secondary);
  position: relative;
}

.gah-event-card.featured::before {
  content: "Featured";
  position: absolute;
  top: -10px;
  right: 20px;
  background: var(--gah-secondary);
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Button Styles */
.gah-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.gah-btn-primary {
  background: var(--gah-primary);
  color: white;
}

.gah-btn-primary:hover {
  background: var(--gah-gray-dark);
  transform: translateY(-2px);
}

.gah-btn-secondary {
  background: transparent;
  color: var(--gah-secondary);
  border: 2px solid var(--gah-secondary);
}

.gah-btn-secondary:hover {
  background: var(--gah-secondary);
  color: white;
}

/* Utility Classes */
.gah-text-center {
  text-align: center;
}
.gah-text-left {
  text-align: left;
}
.gah-text-right {
  text-align: right;
}

.gah-mb-0 {
  margin-bottom: 0;
}
.gah-mb-1 {
  margin-bottom: 0.5rem;
}
.gah-mb-2 {
  margin-bottom: 1rem;
}
.gah-mb-3 {
  margin-bottom: 1.5rem;
}
.gah-mb-4 {
  margin-bottom: 2rem;
}

.gah-mt-0 {
  margin-top: 0;
}
.gah-mt-1 {
  margin-top: 0.5rem;
}
.gah-mt-2 {
  margin-top: 1rem;
}
.gah-mt-3 {
  margin-top: 1.5rem;
}
.gah-mt-4 {
  margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gah-heading-large {
    font-size: 2rem;
  }

  .gah-heading-medium {
    font-size: 1.5rem;
  }

  .gah-event-card {
    padding: 1rem;
  }
}

/* ========================================
   HEADER BRANDING STYLES
   "Greensboro Arts Hub 2.oh!"
   ======================================== */

/* NOTE: Permanent Marker font removed for GDPR compliance.
   Using fallback fonts for "oh!" styling. */

/* Site logo image - Target the actual img inside the Elementor widget */
.elementor-widget-image.gah-site-logo img,
.gah-site-logo img,
img.gah-site-logo {
  height: 50px !important;
  width: auto !important;
  margin-right: 12px !important;
  vertical-align: middle !important;
  transition: transform 0.3s ease !important;
  max-width: none !important;
}

.elementor-widget-image.gah-site-logo:hover img,
.gah-site-logo:hover img,
img.gah-site-logo:hover {
  transform: rotate(5deg) scale(1.05) !important;
}

/* Site title wrapper */
.gah-site-title,
.elementor-heading-title.gah-site-title {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* Main site name text - Override Elementor text editor styles */
.gah-site-name,
.elementor-widget-text-editor.gah-site-name,
.elementor-widget-text-editor.gah-site-name p,
.elementor-heading-title .gah-site-name,
span.gah-site-name {
  font-family: "Noto Serif", serif !important;
  font-size: 1.5rem !important;
  font-weight: 200 !important;
  color: var(--gah-primary) !important;
  letter-spacing: -0.5px !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

/* The "oh!" part with comic book styling - Target as separate widget AND as span */
.gah-site-name .oh,
.elementor-heading-title .gah-site-name .oh,
span.gah-site-name .oh,
.elementor-widget-text-editor.oh,
.elementor-widget-text-editor.oh p,
.oh {
  font-family: "Permanent Marker", cursive !important;
  color: var(--gah-secondary) !important;
  font-size: 1.65rem !important;
  position: relative !important;
  top: -2px !important;
  margin-left: 2px !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  display: inline-block !important;
  animation: subtle-bounce 3s ease-in-out infinite !important;
}

/* Exclamation point special styling */
.gah-site-name .oh::after,
.elementor-heading-title .gah-site-name .oh::after,
span.gah-site-name .oh::after,
.oh::after {
  content: "" !important;
  position: absolute !important;
  bottom: -3px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 80% !important;
  height: 3px !important;
  background: var(--gah-accent) !important;
  border-radius: 2px !important;
  opacity: 0.6 !important;
}

/* Subtle bounce animation for "oh!" */
@keyframes subtle-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
  .elementor-widget-image .gah-site-logo,
  img.gah-site-logo {
    height: 45px !important;
    margin-right: 10px !important;
  }

  .gah-site-name,
  .elementor-heading-title .gah-site-name,
  span.gah-site-name {
    font-size: 1.5rem !important;
  }

  .gah-site-name .oh,
  .elementor-heading-title .gah-site-name .oh,
  span.gah-site-name .oh,
  .oh {
    font-size: 1.6rem !important;
  }
}

@media (max-width: 480px) {
  .elementor-widget-image .gah-site-logo,
  img.gah-site-logo {
    height: 40px !important;
    margin-right: 8px !important;
  }

  .gah-site-name,
  .elementor-heading-title .gah-site-name,
  span.gah-site-name {
    font-size: 1.25rem !important;
  }

  .gah-site-name .oh,
  .elementor-heading-title .gah-site-name .oh,
  span.gah-site-name .oh,
  .oh {
    font-size: 1.35rem !important;
  }
}

/* ========================================
   FOOTER STYLES
   ======================================== */

/* Footer branding container - centered */
.gah-footer-branding {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto !important;
  padding: 20px 0 !important;
}

/* Footer logo */
.gah-footer-logo {
  height: 40px !important;
  width: auto !important;
  margin-right: 12px !important;
}

/* Footer text */
.gah-footer-name {
  font-family: "Noto Serif", serif !important;
  font-size: 1.25rem !important;
  font-weight: 200 !important;
  color: var(--gah-primary) !important;
  white-space: nowrap !important;
}

/* Footer oh! styling */
.gah-footer-name .oh {
  font-family: "Permanent Marker", cursive !important;
  font-size: 1.4rem !important;
  color: var(--gah-secondary) !important;
}
