/* ==========================================================================
   RelayEngine Marketing Examples Showcase Stylesheet (examples.css)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sticky Top Navigation Bar (Shared across all demo examples)
   -------------------------------------------------------------------------- */
.examples-top-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #0f172a;
  color: #f8fafc;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.875rem;
}

.examples-back-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease;
}

.examples-back-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

.examples-bar-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   3x2 Showcase Grid Layout (Index Page)
   -------------------------------------------------------------------------- */
.examples-grid-container {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .examples-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .examples-grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.example-card {
  background: var(--bg-card);
  border: var(--card-border-width) solid var(--border-subtle);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.example-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -4px color-mix(in srgb, var(--color-content) 12%, transparent);
}

.example-card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: color-mix(in srgb, var(--color-content) 5%, transparent);
}

.example-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.example-card:hover .example-card-img {
  transform: scale(1.04);
}

.example-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.example-card-body {
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.example-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.example-card-desc {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* --------------------------------------------------------------------------
   Common Business Page Components
   -------------------------------------------------------------------------- */
.biz-nav {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
}

.biz-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.biz-hero {
  padding: clamp(3rem, 5vw, 5rem) 0;
}

.biz-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

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

.biz-hero-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--card-radius);
  box-shadow: 0 12px 30px -5px color-mix(in srgb, var(--color-content) 15%, transparent);
}

.biz-menu-grid,
.biz-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.biz-menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--card-radius);
  padding: 1.5rem;
}

.example-site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  margin-top: 4rem;
  background-color: var(--bg-card);
}

/* ==========================================================================
   DOMAIN SPECIFIC THEME OVERRIDES (Updating Core Derived Variables)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESTAURANT: Warm Warm-Toned Rustic Hospitality
   -------------------------------------------------------------------------- */
.theme-restaurant {
  --color-canvas: #fdfbf7;
  --color-surface: #ffffff;
  --color-content: #1c1917;
  --color-primary: #ea580c;
  --color-secondary: #78350f;
  --color-accent: #d97706;

  --text-main: #1c1917;
  --text-muted: #57534e;
  --text-subtle: #78716c;
  --bg-page: #fdfbf7;
  --bg-card: #ffffff;
  --border-subtle: rgba(234, 88, 12, 0.15);

  --card-radius: 16px;
  --font-sans: 'Georgia', 'Times New Roman', serif;
}

.theme-restaurant .biz-nav {
  border-bottom: 2px solid #ea580c;
  background-color: #fffbf7;
}

.theme-restaurant .biz-hero-banner {
  border-radius: 20px;
  box-shadow: 0 16px 36px -8px rgba(234, 88, 12, 0.2);
}

.theme-restaurant .biz-menu-card {
  border-left: 4px solid #ea580c;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

/* --------------------------------------------------------------------------
   2. BOUTIQUE SHOP: Ultra-Clean Minimal Scandinavian Storefront
   -------------------------------------------------------------------------- */
.theme-boutique {
  --color-canvas: #fafaf9;
  --color-surface: #ffffff;
  --color-content: #0c0a09;
  --color-primary: #292524;
  --color-secondary: #57534e;
  --color-accent: #78716c;

  --text-main: #0c0a09;
  --text-muted: #57534e;
  --text-subtle: #78716c;
  --bg-page: #fafaf9;
  --bg-card: #ffffff;
  --border-subtle: #e7e5e4;

  --card-radius: 0px;
}

.theme-boutique .biz-nav {
  border-bottom: 1px solid #e7e5e4;
  background-color: #ffffff;
}

.theme-boutique .biz-hero {
  text-align: center;
}

.theme-boutique .biz-hero-grid {
  grid-template-columns: 1fr;
  max-width: 860px;
  margin: 0 auto;
}

.theme-boutique .biz-hero-banner {
  border-radius: 0px;
  box-shadow: none;
  border: 1px solid #e7e5e4;
}

.theme-boutique .biz-menu-card {
  border-radius: 0px;
  border: 1px solid #e7e5e4;
  background-color: #ffffff;
}

/* --------------------------------------------------------------------------
   3. DIGITAL ARTIST STUDIO: Dark Neon Cyberpunk Gallery
   -------------------------------------------------------------------------- */
.theme-artist {
  --color-canvas: #09090b;
  --color-surface: #141417;
  --color-content: #f4f4f5;
  --color-primary: #c084fc;
  --color-secondary: #38bdf8;
  --color-accent: #f472b6;

  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  --bg-page: #09090b;
  --bg-card: #141417;
  --border-subtle: rgba(192, 132, 252, 0.25);

  --card-radius: 12px;
}

.theme-artist .biz-nav {
  border-bottom: 1px solid #27272a;
  background-color: #09090b;
}

.theme-artist .biz-hero-banner {
  border: 1px solid rgba(192, 132, 252, 0.4);
  box-shadow: 0 0 25px rgba(192, 132, 252, 0.25);
}

.theme-artist .biz-menu-card {
  background: #141417;
  border: 1px solid #27272a;
}

.theme-artist .biz-menu-card:hover {
  border-color: #c084fc;
  box-shadow: 0 0 15px rgba(192, 132, 252, 0.2);
}

/* --------------------------------------------------------------------------
   4. FINTECH: Modern Financial Tech (Glassmorphism & Emerald Accents)
   -------------------------------------------------------------------------- */
.theme-fintech {
  --color-canvas: #0b1329;
  --color-surface: #132238;
  --color-content: #f8fafc;
  --color-primary: #10b981;
  --color-secondary: #3b82f6;
  --color-accent: #06b6d4;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --bg-page: #0b1329;
  --bg-card: #132238;
  --border-subtle: rgba(16, 185, 129, 0.2);

  --card-radius: 10px;
}

.theme-fintech .biz-nav {
  border-bottom: 1px solid #1e293b;
  background-color: #0b1329;
}

.theme-fintech .biz-hero-banner {
  border-radius: 12px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.15);
}

.theme-fintech .biz-menu-card {
  background: #132238;
  border: 1px solid #1e293b;
}

/* Fintech Telemetry Live Multi-Stream Graph Widget Styles */
.fintech-graph-card {
  background: #132238;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(11, 19, 41, 0.6);
}

.fintech-stats-bar {
  background: rgba(11, 19, 41, 0.75);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.fintech-stat-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
}

.fintech-svg-container {
  position: relative;
  width: 100%;
  height: 280px;
  background: #091222;
  border-radius: 8px;
  padding: 0.5rem;
  border: 1px solid #1e293b;
  overflow: hidden;
}

.fintech-chart-legend {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  z-index: 10;
  background: rgba(11, 19, 41, 0.85);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.775rem;
  color: #94a3b8;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-emerald {
  background-color: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.dot-blue {
  background-color: #3b82f6;
  box-shadow: 0 0 6px #3b82f6;
}

.dot-cyan {
  background-color: #06b6d4;
  box-shadow: 0 0 6px #06b6d4;
}

.fintech-svg-container svg {
  width: 100%;
  height: 100%;
}

/* --------------------------------------------------------------------------
   5. VINEYARD AGTECH: Dark Forest Emerald & Earth Viticulture Dashboard
   -------------------------------------------------------------------------- */
.theme-vineyard {
  --color-canvas: #09140e;
  --color-surface: #102217;
  --color-content: #f2faf5;
  --color-primary: #10b981;
  /* Emerald Green */
  --color-secondary: #059669;
  --color-accent: #06b6d4;

  --text-main: #f2faf5;
  --text-muted: #a7f3d0;
  --text-subtle: #6ee7b7;
  --bg-page: #09140e;
  --bg-card: #102217;
  --border-subtle: rgba(16, 185, 129, 0.25);

  --card-radius: 12px;
}

.theme-vineyard .biz-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(16, 185, 129, 0.3);
  background-color: rgba(9, 20, 14, 0.95);
  backdrop-filter: blur(10px);
}

.vineyard-hamburger-btn {
  background: transparent;
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.vineyard-hamburger-btn:hover {
  background-color: rgba(16, 185, 129, 0.15);
}

.vineyard-status-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.vineyard-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.vineyard-stat-card {
  background-color: #102217;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
}

.vineyard-stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
}

.vineyard-dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .vineyard-dashboard-main-grid {
    grid-template-columns: 340px 1fr;
  }
}

.vineyard-card {
  background-color: #102217;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  box-shadow: 0 16px 35px rgba(9, 20, 14, 0.6);
}

.vineyard-map-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #060e0a;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  overflow: hidden;
}

.map-img-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.map-img-layer.hidden {
  opacity: 0;
  pointer-events: none;
}

.map-base-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vineyard-map-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.vineyard-map-container svg g {
  pointer-events: auto;
}

.map-node-marker {
  cursor: default;
}

.map-node-marker .sensor-hover-tooltip {
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.map-node-marker:hover .sensor-hover-tooltip {
  opacity: 1;
}

.selected-node circle {
  filter: drop-shadow(0 0 8px #10b981);
}

.active-sensor-row {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.12) !important;
}

.heatmap-gradient-bar {
  flex: 1;
  height: 6px;
  margin: 0 0.75rem;
  border-radius: 4px;
  background: linear-gradient(to right, #ef4444, #f59e0b, #10b981, #06b6d4);
}

.vineyard-select-xs {
  background-color: #08160f;
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vineyard-select-xs:hover,
.vineyard-select-xs:focus {
  border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.vineyard-select-xs option {
  background-color: #060e0a;
  color: #a7f3d0;
  padding: 0.5rem;
}

.vineyard-svg-container {
  position: relative;
  width: 100%;
  height: 280px;
  background: #060e0a;
  border-radius: 8px;
  padding: 0.5rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
  overflow: hidden;
}

.vineyard-svg-container svg {
  width: 100%;
  height: 100%;
}

.map-layer-btn-group {
  display: inline-flex;
  gap: 0.25rem;
  background: rgba(6, 14, 10, 0.7);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.map-icon-btn {
  padding: 0.4rem 0.5rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px !important;
  color: #a7f3d0;
  border: none !important;
  background: transparent !important;
  transition: all 0.2s ease;
}

.map-icon-btn:hover {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #ffffff !important;
}

.active-map-btn {
  background: #10b981 !important;
  color: #060e0a !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.vineyard-chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: #a7f3d0;
}

.dot-orange {
  background-color: #f97316;
  box-shadow: 0 0 6px #f97316;
}

.vineyard-dashboard-sub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* Fullscreen Split Layout Mode (Map Left spanning 2 rows, Graph and Log on Right) */
@media (min-width: 1024px) {
  .vineyard-dashboard-sub-grid {
    grid-template-columns: 1fr 340px;
  }

  .vineyard-layout-fullscreen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    align-items: start;
  }

  /* Fullscreen View Width Expansion: Remove max-width caps to stretch edge-to-edge */
  .is-fullscreen-mode #vineyard-dashboard-section,
  .is-fullscreen-mode .biz-nav .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  .vineyard-layout-fullscreen > .vineyard-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-bottom: 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .vineyard-layout-fullscreen > .vineyard-card:nth-child(1) .vineyard-map-container {
    flex: 1;
    min-height: 480px;
  }

  .vineyard-layout-fullscreen > .vineyard-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0 !important;
  }

  .vineyard-layout-fullscreen > .vineyard-dashboard-sub-grid {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: 1fr;
  }
}

.vineyard-terminal {
  background-color: #050b07;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0.85rem;
  height: 220px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #6ee7b7;
}

.terminal-line {
  margin-bottom: 0.4rem;
  line-height: 1.4;
  word-break: break-all;
}

.terminal-time {
  color: #059669;
  font-weight: 700;
}

.terminal-txt {
  color: #a7f3d0;
}

.sensor-status-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
}

.sensor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background-color: #08160f;
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.sensor-item:hover {
  background-color: rgba(16, 185, 129, 0.08);
}

/* --------------------------------------------------------------------------
   6. FITNESS STUDIO: High-Octane Electric Orange & Athletic Navy
   -------------------------------------------------------------------------- */
.theme-fitness {
  --color-canvas: #0a0e1a;
  --color-surface: #141c2e;
  --color-content: #f8fafc;
  --color-primary: #f97316;
  --color-secondary: #0284c7;
  --color-accent: #eab308;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --bg-page: #0a0e1a;
  --bg-card: #141c2e;
  --border-subtle: rgba(249, 115, 22, 0.25);

  --card-radius: 12px;
}

.theme-fitness .biz-nav {
  border-bottom: 2px solid #f97316;
  background-color: #0a0e1a;
}

.theme-fitness .biz-hero-banner {
  border: 2px solid #f97316;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.25);
}

.theme-fitness .biz-menu-card {
  background-color: #141c2e;
  border-top: 3px solid #f97316;
  border-bottom: 1px solid #1f293d;
  border-left: 1px solid #1f293d;
  border-right: 1px solid #1f293d;
}