/**
 * Video Hero Component - RomaPaint
 * Full-screen video background with overlay
 * Mobile-optimized with image fallback
 */

/* ============================================
   VIDEO HERO CONTAINER
   ============================================ */

.video-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1C1917;
}

/* Shorter on mobile for better UX */
@media (max-width: 767px) {
  .video-hero {
    min-height: 85vh;
  }
}

/* ============================================
   VIDEO BACKGROUND
   ============================================ */

.video-background {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
}

/* Hide video on mobile, show fallback image */
@media (max-width: 767px) {
  .video-background {
    display: none;
  }
}

/* ============================================
   FALLBACK IMAGE (Mobile)
   ============================================ */

.video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  display: none;
}

@media (max-width: 767px) {
  .video-fallback {
    display: block;
  }
}

/* ============================================
   OVERLAY
   ============================================ */

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(155, 139, 126, 0.85) 0%,
    rgba(87, 72, 58, 0.9) 100%
  );
  z-index: 1;
}

/* Lighter overlay on larger screens */
@media (min-width: 1024px) {
  .video-overlay {
    background: linear-gradient(
      135deg,
      rgba(155, 139, 126, 0.75) 0%,
      rgba(87, 72, 58, 0.85) 100%
    );
  }
}

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

.video-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .video-content {
    padding: 3rem 2rem;
  }
}

@media (min-width: 1024px) {
  .video-content {
    padding: 4rem 2rem;
  }
}

/* ============================================
   TEXT ELEMENTS
   ============================================ */

.video-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease;
}

@media (min-width: 768px) {
  .video-badge {
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
  }
}

.video-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease 0.2s both;
}

@media (min-width: 768px) {
  .video-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  .video-title {
    font-size: 4.5rem;
  }
}

.video-subtitle {
  font-size: 1.125rem;
  color: #F7F5F3;
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.8s ease 0.4s both;
}

@media (min-width: 768px) {
  .video-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .video-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
  }
}

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

.video-cta-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease 0.6s both;
}

@media (min-width: 640px) {
  .video-cta-group {
    flex-direction: row;
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .video-cta-group {
    margin-bottom: 4rem;
  }
}

/* ============================================
   TRUST SIGNALS
   ============================================ */

.video-trust-signals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.8s both;
}

@media (min-width: 768px) {
  .video-trust-signals {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

.trust-signal-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.25rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

@media (min-width: 768px) {
  .trust-signal-card {
    padding: 1.5rem;
  }
}

.trust-signal-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-4px);
}

.trust-signal-number {
  font-size: 2rem;
  font-weight: 800;
  color: #D4A574;
  margin-bottom: 0.25rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .trust-signal-number {
    font-size: 2.5rem;
  }
}

.trust-signal-label {
  font-size: 0.875rem;
  color: #FFFFFF;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .trust-signal-label {
    font-size: 1rem;
  }
}

.trust-signal-detail {
  font-size: 0.75rem;
  color: #E7E5E4;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 30px;
  height: 30px;
  border-left: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  transform: rotate(-45deg);
  opacity: 0.7;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Hide on mobile */
@media (max-width: 767px) {
  .scroll-indicator {
    display: none;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   VIDEO CONTROLS (Optional)
   ============================================ */

.video-controls {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.75rem;
}

.video-control-btn {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-control-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.video-control-btn i {
  font-size: 1rem;
}

/* Hide controls on mobile */
@media (max-width: 767px) {
  .video-controls {
    display: none;
  }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .video-badge,
  .video-title,
  .video-subtitle,
  .video-cta-group,
  .video-trust-signals {
    animation: none;
  }

  .scroll-indicator {
    animation: none;
  }

  .trust-signal-card:hover {
    transform: none;
  }
}

/* Pause video when not visible */
.video-background[data-paused="true"] {
  opacity: 0.5;
}

/* Loading state */
.video-hero.loading .video-content {
  opacity: 0;
}

.video-hero.loaded .video-content {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* ============================================
   PATTERN OVERLAY (Optional)
   ============================================ */

.video-pattern-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(155, 139, 126, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 139, 126, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
}
