/* ============================================
   MAGTEK HERO SYSTEM
   ============================================
   
   Purpose: Centralized hero section system for MagTek website
   Philosophy: Flexible, beautiful, maintainable
   
   USAGE:
   Choose a base hero style, add optional modifiers
   
   BASE STYLES:
   - .hero-dark (default - dark gradient)
   - .hero-light (light background)
   - .hero-gradient (customizable gradient)
   - .hero-image (background image)
   
   MODIFIERS:
   - .hero-centered (center all content)
   - .hero-split (content on left, visual on right)
   - .hero-large (extra height)
   - .hero-compact (reduced height)
   
   ============================================ */

/* ============================================
   CSS VARIABLES - HERO SETTINGS
   ============================================ */
:root {
  /* Hero Heights */
  --hero-height-default: 60vh;
  --hero-height-large: 75vh;
  --hero-height-compact: 45vh;

  /* Hero Padding */
  --hero-padding-y: 8rem;
  --hero-padding-x: 2rem;

  /* Hero Gradients */
  --hero-gradient-dark: linear-gradient(
    135deg,
    #263c50 0%,
    #1e293b 50%,
    #0f3460 100%
  );
  --hero-gradient-red: linear-gradient(
    135deg,
    #d21242 0%,
    #b01035 50%,
    #8b0d2a 100%
  );
  --hero-gradient-blue: linear-gradient(
    135deg,
    #0ea5e9 0%,
    #0284c7 50%,
    #0369a1 100%
  );
  --hero-gradient-light: linear-gradient(
    135deg,
    #f8f9fa 0%,
    #e9ecef 50%,
    #dee2e6 100%
  );

  /* Hero Overlay */
  --hero-overlay-opacity: 0.6;
}

/* ============================================
   BASE HERO STYLES
   ============================================ */

.hero,
.hero-dark,
.hero-light,
.hero-gradient,
.hero-image {
  min-height: var(--hero-height-default);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--hero-padding-y) 0;
  margin-bottom: 0;
}

/* ============================================
   HERO DARK (Default)
   ============================================ */

.hero-dark,
.hero {
  background: var(--hero-gradient-dark);
  color: white;
}

/* Grid pattern overlay for dark hero */
.hero-dark::before,
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

/* ============================================
   HERO LIGHT
   ============================================ */

.hero-light {
  background: var(--hero-gradient-light);
  color: #263c50;
}

/* Subtle pattern for light hero */
.hero-light::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="2" cy="2" r="1" fill="rgba(0,0,0,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  opacity: 0.5;
  z-index: 1;
}

/* ============================================
   HERO GRADIENT (Customizable)
   ============================================ */

.hero-gradient {
  background: var(--hero-gradient-dark);
  color: white;
}

/* Grid pattern for gradient heroes */
.hero-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
  z-index: 1;
}

.hero-gradient.hero-gradient-red {
  background: var(--hero-gradient-red);
}

.hero-gradient.hero-gradient-blue {
  background: var(--hero-gradient-blue);
}

/* ============================================
   HERO QUANTUM (Tech/Security Focused)
   ============================================ */

.hero-quantum {
  background: linear-gradient(
    135deg,
    #0a1628 0%,
    #0f1b2e 25%,
    #162845 50%,
    #1a2f4d 75%,
    #1e3a5f 100%
  );
  color: white;
  position: relative;
  min-height: var(--hero-height-large);
  padding: 10rem 0;
}

/* Quantum circuit pattern overlay */
.hero-quantum::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      circle at 20% 50%,
      rgba(59, 130, 246, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(96, 165, 250, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 20%,
      rgba(147, 197, 253, 0.05) 0%,
      transparent 50%
    ),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="quantum-grid" width="25" height="25" patternUnits="userSpaceOnUse"><path d="M 25 0 L 0 0 0 25" fill="none" stroke="rgba(59,130,246,0.12)" stroke-width="0.5"/><circle cx="0" cy="0" r="1.5" fill="rgba(96,165,250,0.2)"/><circle cx="25" cy="25" r="1.5" fill="rgba(96,165,250,0.2)"/></pattern></defs><rect width="100" height="100" fill="url(%23quantum-grid)"/></svg>');
  opacity: 0.5;
  z-index: 1;
  animation: quantumPulse 20s ease-in-out infinite;
}

/* Animated particle effect overlay */
.hero-quantum::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
      2px 2px at 20% 30%,
      rgba(59, 130, 246, 0.25),
      transparent
    ),
    radial-gradient(2px 2px at 60% 70%, rgba(96, 165, 250, 0.2), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(147, 197, 253, 0.15), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(59, 130, 246, 0.2), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(96, 165, 250, 0.18), transparent),
    radial-gradient(1px 1px at 33% 80%, rgba(147, 197, 253, 0.15), transparent),
    radial-gradient(2px 2px at 15% 90%, rgba(59, 130, 246, 0.2), transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  opacity: 0.3;
  z-index: 1;
  animation: particleFloat 30s ease-in-out infinite;
}

@keyframes quantumPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.65;
  }
}

@keyframes particleFloat {
  0%,
  100% {
    background-position: 0% 0%;
  }
  25% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 50% 100%;
  }
  75% {
    background-position: 0% 50%;
  }
}

/* Quantum hero specific text styling */
.hero-quantum h1 {
  text-shadow: 0 2px 20px rgba(59, 130, 246, 0.15);
}

.hero-quantum .hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-quantum::before,
  .hero-quantum::after {
    animation: none;
  }
}

/* ============================================
   HERO IMAGE (Background Image)
   ============================================ */

.hero-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
}

/* Dark overlay for image heroes */
.hero-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, var(--hero-overlay-opacity));
  z-index: 1;
}

/* ============================================
   HERO CONTENT CONTAINER
   ============================================ */

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--hero-padding-x);
  width: 100%;
}

/* Centered layout (default) */
.hero-centered .hero-content,
.hero .hero-content,
.hero-dark .hero-content,
.hero-light .hero-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Split layout */
.hero-split .hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  text-align: left;
}

/* ============================================
   HERO TEXT CONTENT
   ============================================ */

.hero-text {
  padding: 0;
}

.hero-text h1,
.hero h1 {
  font-size: clamp(4rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
}

/* Dark hero text color */
.hero-dark .hero-text h1,
.hero-dark h1,
.hero .hero-text h1,
.hero h1,
.hero-gradient .hero-text h1,
.hero-gradient h1,
.hero-image .hero-text h1,
.hero-image h1 {
  color: white;
}

/* Light hero text color */
.hero-light .hero-text h1,
.hero-light h1 {
  color: #263c50;
}

.hero-subtitle {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 3rem;
  line-height: 1.5;
  max-width: 800px;
  font-weight: 400;
}

/* Dark hero subtitle */
.hero-dark .hero-subtitle,
.hero .hero-subtitle,
.hero-gradient .hero-subtitle,
.hero-image .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* Light hero subtitle */
.hero-light .hero-subtitle {
  color: rgba(38, 60, 80, 0.8);
}

/* Centered subtitle */
.hero-centered .hero-subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   HERO CTA BUTTONS
   ============================================ */

.hero-buttons,
.hero-cta-buttons {
  display: flex;
  gap: 2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

/* Centered buttons */
.hero-centered .hero-buttons,
.hero-centered .hero-cta-buttons {
  justify-content: center;
}

/* Left-aligned buttons in split layout */
.hero-split .hero-buttons,
.hero-split .hero-cta-buttons {
  justify-content: flex-start;
}

/* ============================================
   HERO TRUST BADGES
   ============================================ */

.hero-badges,
.hero-trust-badges {
  display: flex;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding-top: 1rem;
}

/* Centered badges */
.hero-centered .hero-badges,
.hero-centered .hero-trust-badges {
  justify-content: center;
}

/* Left-aligned badges in split layout */
.hero-split .hero-badges,
.hero-split .hero-trust-badges {
  justify-content: flex-start;
}

.hero-badge,
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.4rem;
  font-weight: 600;
}

/* Light hero badges */
.hero-light .hero-badge,
.hero-light .trust-badge {
  background: rgba(38, 60, 80, 0.08);
  border-color: rgba(38, 60, 80, 0.15);
  color: #263c50;
}

.hero-badge:hover,
.trust-badge:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
}

.hero-light .hero-badge:hover,
.hero-light .trust-badge:hover {
  background: rgba(38, 60, 80, 0.12);
  border-color: rgba(38, 60, 80, 0.25);
}

.hero-badge i,
.trust-badge i {
  font-size: 1.6rem;
  color: #d21242;
}

.hero-light .hero-badge i,
.hero-light .trust-badge i {
  color: #d21242;
}

/* ============================================
   HERO VISUAL/IMAGE
   ============================================ */

.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.hero-light .hero-visual {
  border-color: rgba(38, 60, 80, 0.1);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hero:hover .hero-visual img,
.hero-dark:hover .hero-visual img,
.hero-light:hover .hero-visual img {
  transform: scale(1.05);
}

/* ============================================
   HERO SIZE MODIFIERS
   ============================================ */

.hero-large {
  min-height: var(--hero-height-large);
}

.hero-compact {
  min-height: var(--hero-height-compact);
  padding: 6rem 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
  .hero-split .hero-content {
    grid-template-columns: 1fr;
    gap: 4rem;
    text-align: center;
  }

  .hero-split .hero-buttons,
  .hero-split .hero-cta-buttons,
  .hero-split .hero-badges,
  .hero-split .hero-trust-badges {
    justify-content: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  :root {
    --hero-padding-y: 6rem;
  }

  .hero-buttons,
  .hero-cta-buttons {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-buttons a,
  .hero-cta-buttons a {
    width: 100%;
    max-width: 400px;
  }

  .hero-badges,
  .hero-trust-badges {
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  :root {
    --hero-padding-y: 4rem;
  }

  .hero,
  .hero-dark,
  .hero-light,
  .hero-gradient,
  .hero-image {
    min-height: auto;
  }

  .hero-text h1,
  .hero h1 {
    font-size: clamp(3rem, 8vw, 4rem);
  }

  .hero-subtitle {
    font-size: clamp(1.6rem, 4vw, 1.8rem);
  }

  .hero-badges,
  .hero-trust-badges {
    flex-direction: column;
    gap: 1.5rem;
  }

  .hero-badge,
  .trust-badge {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .hero-visual img,
  .hero-badge,
  .trust-badge {
    transition: none !important;
  }

  .hero:hover .hero-visual img,
  .hero-dark:hover .hero-visual img,
  .hero-light:hover .hero-visual img {
    transform: none !important;
  }
}

/* ============================================
   IMPLEMENTATION NOTES
   ============================================
   
   DARK HERO (default):
   <section class="hero-dark hero-centered">
     <div class="hero-content">
       <div class="hero-text">
         <h1>Your Headline</h1>
         <p class="hero-subtitle">Your subtitle text</p>
       </div>
       <div class="hero-buttons">
         <a href="#" class="cta-button">Get Started</a>
         <a href="#" class="btn-secondary">Learn More</a>
       </div>
       <div class="hero-badges">
         <div class="hero-badge">
           <i class="fas fa-check"></i>
           <span>Feature 1</span>
         </div>
       </div>
     </div>
   </section>
   
   LIGHT HERO:
   <section class="hero-light hero-centered">
     ...same structure...
   </section>
   
   SPLIT HERO WITH IMAGE:
   <section class="hero-dark hero-split">
     <div class="hero-content">
       <div class="hero-text">
         <h1>Your Headline</h1>
         <p class="hero-subtitle">Your subtitle</p>
         <div class="hero-buttons">...</div>
       </div>
       <div class="hero-visual">
         <img src="image.jpg" alt="Hero image">
       </div>
     </div>
   </section>
   
   GRADIENT HERO:
   <section class="hero-gradient hero-gradient-red hero-centered">
     ...same structure...
   </section>
   
   IMAGE BACKGROUND HERO:
   <section class="hero-image hero-centered" 
            style="background-image: url('hero.jpg');">
     ...same structure...
   </section>
   
   ============================================ */
