/* Responsive layout grids & containers - ClarvoTech */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

/* Service-specific grid that auto-adapts */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-md);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-xl);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4, .services-grid, .industries-grid, .portfolio-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .section-padding {
    padding: var(--space-xxl) 0;
  }
}

/* Alignments & Layout structures */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Aspect ratio boxes */
.aspect-video {
  aspect-ratio: 16 / 9;
  width: 100%;
}
.aspect-square {
  aspect-ratio: 1 / 1;
  width: 100%;
}

/* Cinematic Hero Video Background & Mask */
.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1.0;
  pointer-events: none;
  filter: none;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(5, 15, 35, 0.60) 0%,
    rgba(5, 15, 35, 0.45) 35%,
    rgba(5, 15, 35, 0.20) 70%,
    rgba(5, 15, 35, 0.08) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Hero Dark Premium Styling (Dark Hero + Light Website contrast) */
.hero-dark-premium {
  background: radial-gradient(circle at top right, #0F172A 0%, #0B1220 100%);
  color: #f8fafc;
  padding: var(--space-giant) 0;
}

.hero-dark-premium h1 {
  color: #ffffff !important;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.40) !important;
}

.hero-dark-premium p {
  color: #DCE6F5 !important;
  line-height: 1.8 !important;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.40) !important;
}

.hero-dark-premium .subtitle {
  color: #38bdf8; /* Bright Cyan/Sky accent for sub */
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.hero-trust-signals {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
  font-size: 0.85rem;
  font-weight: 600;
  color: #CBD5E1 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

.hero-trust-signals span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Premium Dark-Glass Floating Cards */
.hero-floating-card {
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.hero-floating-card.code-card {
  transform: translate(-10px, 0);
}

.hero-floating-card.chart-card {
  transform: translate(20px, 0);
}

@media (min-width: 769px) {
  .hero-floating-card:hover {
    transform: translateY(-5px) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
  }
}

/* Premium CTA Buttons */
.hero-btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.45), 0 0 30px rgba(124, 58, 237, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

.hero-btn-primary:hover {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6), 0 0 45px rgba(124, 58, 237, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  filter: brightness(1.15) !important;
}

.hero-btn-secondary {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

.hero-btn-secondary:hover {
  transform: translateY(-3px) scale(1.02) !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
}

/* Mobile Responsive Optimization for Viewports (320px, 375px, 390px, 414px, 768px) */
@media (max-width: 768px) {
  main > section:first-of-type,
  .hero-dark-premium {
    padding-top: 7.5rem !important;
    padding-bottom: 3.5rem !important;
  }
  
  .hero-dark-premium .hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-dark-premium h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
    line-height: 1.25 !important;
    text-align: center;
    margin-bottom: var(--space-md);
  }

  .hero-dark-premium p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem !important;
    margin-bottom: var(--space-lg);
  }

  .hero-buttons {
    flex-direction: column !important;
    width: 100%;
    max-width: 320px;
    margin: 0 auto var(--space-md) auto;
    gap: var(--space-sm) !important;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.4rem;
  }

  .hero-trust-signals {
    justify-content: center !important;
    text-align: center;
    margin-top: var(--space-md) !important;
    gap: var(--space-sm) !important;
  }

  .hero-illustration {
    display: none !important; /* Hide the empty illustration column on mobile */
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem !important;
  }
}



/* Homepage navigation styles when header is transparent over the dark hero */
.home-page header.sticky-header:not(.scrolled) {
  background-color: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.home-page header.sticky-header:not(.scrolled) .nav-links a {
  color: #e2e8f0;
}

.home-page header.sticky-header:not(.scrolled) .nav-links a:hover {
  color: #ffffff;
}

.home-page header.sticky-header:not(.scrolled) .logo-wrapper span {
  color: #ffffff;
}

.home-page header.sticky-header:not(.scrolled) .theme-toggle-btn {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.home-page header.sticky-header:not(.scrolled) .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Accent gradients inside the dark hero for high-contrast visibility */
.hero-dark-premium .text-gradient {
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.hero-dark-premium .text-gradient-accent {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

