/* ========== HERO SECTION ========== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0066cc 0%, #00a3e0 100%);
}

/* Background Video */
.hero-video {
  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;
  transition: transform 0.1s ease-out;
}

/* Enhanced Video Overlay with Better Colors */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 102, 204, 0.75) 0%,
    rgba(0, 163, 224, 0.65) 35%,
    rgba(13, 202, 240, 0.55) 70%,
    rgba(56, 189, 248, 0.45) 100%
  );
  z-index: 1;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* ========== PARTICLE EFFECTS ========== */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: float-particle 15s infinite ease-in-out;
}

.particle:nth-child(1) {
  width: 4px;
  height: 4px;
  left: 10%;
  top: 20%;
  animation-delay: 0s;
  animation-duration: 12s;
}

.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  left: 25%;
  top: 40%;
  animation-delay: 2s;
  animation-duration: 14s;
}

.particle:nth-child(3) {
  width: 3px;
  height: 3px;
  left: 40%;
  top: 15%;
  animation-delay: 4s;
  animation-duration: 10s;
}

.particle:nth-child(4) {
  width: 5px;
  height: 5px;
  left: 55%;
  top: 35%;
  animation-delay: 1s;
  animation-duration: 13s;
}

.particle:nth-child(5) {
  width: 4px;
  height: 4px;
  left: 70%;
  top: 25%;
  animation-delay: 3s;
  animation-duration: 11s;
}

.particle:nth-child(6) {
  width: 6px;
  height: 6px;
  left: 85%;
  top: 45%;
  animation-delay: 5s;
  animation-duration: 15s;
}

.particle:nth-child(7) {
  width: 3px;
  height: 3px;
  left: 15%;
  top: 60%;
  animation-delay: 2.5s;
  animation-duration: 12s;
}

.particle:nth-child(8) {
  width: 5px;
  height: 5px;
  left: 45%;
  top: 70%;
  animation-delay: 4.5s;
  animation-duration: 14s;
}

.particle:nth-child(9) {
  width: 4px;
  height: 4px;
  left: 65%;
  top: 55%;
  animation-delay: 1.5s;
  animation-duration: 13s;
}

.particle:nth-child(10) {
  width: 6px;
  height: 6px;
  left: 90%;
  top: 65%;
  animation-delay: 3.5s;
  animation-duration: 11s;
}

@keyframes float-particle {
  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    transform: translateY(-50px) translateX(30px);
    opacity: 0.8;
  }
  90% {
    opacity: 0.5;
  }
}

/* ========== ANIMATED BUBBLES ========== */
.bubbles {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 600px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.7;
}

.bubble {
  animation: riseBubble 10s ease-in infinite;
  filter: blur(1px);
}

.bubble-1 {
  animation-delay: 0s;
}
.bubble-2 {
  animation-delay: 1.2s;
}
.bubble-3 {
  animation-delay: 2.4s;
}
.bubble-4 {
  animation-delay: 3.6s;
}
.bubble-5 {
  animation-delay: 4.8s;
}
.bubble-6 {
  animation-delay: 1.8s;
}
.bubble-7 {
  animation-delay: 3s;
}
.bubble-8 {
  animation-delay: 4.2s;
}

@keyframes riseBubble {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(-300px) translateX(30px) scale(1.3);
    opacity: 0.6;
  }
  100% {
    transform: translateY(-600px) translateX(-20px) scale(1.5);
    opacity: 0;
  }
}

/* ========== HERO CONTENT ========== */
.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  padding: 30px;
  max-width: 1000px;
  margin: 0 auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero Logo */
.hero-logo {
  width: 200px;
  height: auto;
  margin-bottom: 2rem;
  animation: fadeInDown 1s ease 0.1s backwards;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

/* Hero Title */
.hero-title-hero {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 25px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease 0.3s backwards;
  line-height: 1.2;
  letter-spacing: -1px;
}

/* Hero Subtitle */
.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 40px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 1s ease 0.5s backwards;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

/* ========== HERO BUTTONS ========== */
.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.7s backwards;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 45px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-size: 14px;
  animation: floatButton 3s ease-in-out infinite;
}

/* Floating Animation for Buttons */
@keyframes floatButton {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.02);
  }
}

/* Shimmer Effect */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.7s ease;
  z-index: 1;
}

.btn:hover::before {
  left: 100%;
}

/* Ripple Effect */
.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
  opacity: 0;
  z-index: 0;
}

.btn:hover::after {
  width: 400px;
  height: 400px;
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  color: #0066cc;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  animation-delay: 0s;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.4),
    0 0 40px rgba(255, 255, 255, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(255, 255, 255, 0.1) inset;
  animation-delay: 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0066cc;
  border-color: white;
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 20px 50px rgba(255, 255, 255, 0.35),
    0 0 40px rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

/* Glow Effect on Hover */
.btn-primary:hover,
.btn-secondary:hover {
  animation: floatButton 3s ease-in-out infinite,
    glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

/* Text styling */
.btn span {
  position: relative;
  z-index: 2;
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: fadeIn 1s ease 1.2s backwards,
    floatIndicator 3s ease-in-out infinite 1.5s;
  text-align: center;
  transition: opacity 0.3s ease;
}

.mouse {
  width: 30px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 25px;
  position: relative;
  margin: 0 auto;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 4px 20px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  animation: mouseFloat 2.5s ease-in-out infinite,
    mousePulse 2s ease-in-out infinite;
}

.mouse::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 12px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  animation: scroll 2.5s ease-in-out infinite;
}

.mouse::after {
  content: "";
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 15px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.6), transparent);
  animation: arrowBounce 2s ease-in-out infinite;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes floatIndicator {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-15px);
  }
}

@keyframes mouseFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-8px) scale(1.02);
  }
  50% {
    transform: translateY(-15px) scale(1.05);
  }
  75% {
    transform: translateY(-8px) scale(1.02);
  }
}

@keyframes mousePulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1),
      0 4px 20px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.2),
      0 6px 30px rgba(0, 0, 0, 0.4);
  }
}

@keyframes scroll {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0) scale(0.8);
  }
  30% {
    opacity: 1;
    transform: translateX(-50%) translateY(8px) scale(1);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(20px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(30px) scale(0.8);
  }
}

@keyframes arrowBounce {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }
  50% {
    opacity: 0.6;
    transform: translateX(-50%) translateY(5px);
  }
}

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

/* Large Desktop (1440px+) */
@media screen and (min-width: 1440px) {
  .hero-logo {
    width: 220px;
  }

  .hero-title-hero {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1.75rem;
  }

  .hero-content {
    max-width: 1200px;
  }
}

/* Desktop (1200px - 1440px) */
@media screen and (max-width: 1440px) {
  .hero-title-hero {
    font-size: 3.25rem;
  }
}

/* Laptop (1024px - 1200px) */
@media screen and (max-width: 1200px) {
  .hero-title-hero {
    font-size: 3rem;
  }

  .hero-subtitle {
    font-size: 1.4rem;
  }

  .hero-content {
    padding: 25px 40px;
  }

  .bubbles {
    max-width: 500px;
  }
}

/* Tablet Landscape (900px - 1024px) */
@media screen and (max-width: 1024px) {
  .hero {
    min-height: 600px;
  }

  .hero-title-hero {
    font-size: 2.75rem;
  }

  .hero-subtitle {
    font-size: 1.3rem;
  }

  .btn {
    padding: 14px 35px;
    font-size: 15px;
  }
}

/* Tablet Portrait (768px - 900px) */
@media screen and (max-width: 900px) {
  .hero-title-hero {
    font-size: 2.5rem;
  }

  .bubbles {
    max-width: 450px;
  }

  .particles .particle {
    display: none;
  }
}

/* Mobile Large (600px - 768px) */
@media screen and (max-width: 768px) {
  .hero {
    min-height: 550px;
  }

  .hero-logo {
    width: 150px;
    margin-bottom: 1.5rem;
  }

  .hero-title-hero {
    font-size: 2.25rem;
    margin-bottom: 20px;
  }

  .hero-subtitle {
    font-size: 1.15rem;
    margin-bottom: 35px;
  }

  .hero-content {
    padding: 20px;
  }

  .hero-buttons {
    gap: 15px;
  }

  .btn {
    padding: 13px 32px;
    font-size: 14px;
  }

  .bubbles {
    max-width: 400px;
    height: 500px;
  }

  .scroll-indicator {
    bottom: 30px;
  }
}

/* Mobile Medium (480px - 600px) */
@media screen and (max-width: 600px) {
  .hero {
    min-height: 500px;
  }

  .hero-title-hero {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }
}

/* Mobile Small (360px - 480px) */
@media screen and (max-width: 480px) {
  .hero {
    min-height: 480px;
  }

  .hero-logo {
    width: 120px;
    margin-bottom: 1rem;
  }

  .hero-title-hero {
    font-size: 1.75rem;
    margin-bottom: 15px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }

  .btn {
    padding: 12px 28px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }

  .bubbles {
    max-width: 300px;
    height: 400px;
    opacity: 0.5;
  }

  .scroll-indicator {
    bottom: 25px;
  }

  .mouse {
    width: 28px;
    height: 45px;
  }
}

/* Mobile Extra Small (max-width: 360px) */
@media screen and (max-width: 360px) {
  .hero {
    min-height: 450px;
  }

  .hero-logo {
    width: 100px;
    margin-bottom: 0.8rem;
  }

  .hero-title-hero {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-content {
    padding: 15px;
  }

  .btn {
    padding: 11px 24px;
    font-size: 13px;
  }
}

/* Landscape Mobile Orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }

  .hero-title-hero {
    font-size: 1.75rem;
    margin-bottom: 10px;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero-buttons {
    gap: 12px;
  }

  .btn {
    padding: 10px 24px;
    font-size: 13px;
  }

  .scroll-indicator {
    display: none;
  }

  .bubbles {
    opacity: 0.3;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn::before,
  .btn::after {
    display: none;
  }

  .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .btn {
    animation: floatButton 3s ease-in-out infinite;
  }
}

/* High DPI Screens (Retina) */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
  only screen and (min-resolution: 192dpi) {
  .hero-video {
    object-fit: cover;
  }

  .hero-title {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  .hero-title-hero,
  .hero-subtitle,
  .hero-buttons,
  .scroll-indicator {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .btn {
    animation: none;
  }

  .scroll-indicator {
    transform: translateX(-50%);
  }

  .bubble {
    animation: none;
    opacity: 0.3;
  }

  .particle {
    animation: none;
    display: none;
  }

  .mouse {
    animation: none;
    transform: none;
  }

  .mouse::before {
    animation: none;
  }

  .mouse::after {
    animation: none;
  }

  .btn::before {
    transition: none;
  }

  .btn::after {
    transition: none;
  }

  .btn:hover::before,
  .btn:hover::after {
    display: none;
  }

  .hero-video {
    transition: none;
  }

  .hero-overlay {
    transition: none;
  }

  .hero-content {
    transition: none;
  }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
  .hero-overlay {
    background: linear-gradient(
      135deg,
      rgba(0, 51, 102, 0.85) 0%,
      rgba(0, 102, 153, 0.75) 35%,
      rgba(0, 128, 192, 0.65) 70%,
      rgba(25, 151, 210, 0.55) 100%
    );
  }
}

/* Print Styles */
@media print {
  .hero {
    min-height: 400px;
    height: auto;
    page-break-after: always;
  }

  .hero-video,
  .bubbles,
  .particles,
  .scroll-indicator {
    display: none;
  }

  .hero-overlay {
    opacity: 0.5;
  }

  .hero-content {
    color: #000;
  }

  .btn {
    border: 2px solid #000;
    color: #000;
  }
}

/* ========== ACCESSIBILITY IMPROVEMENTS ========== */
.btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========== PERFORMANCE OPTIMIZATION ========== */
.hero-video,
.hero-overlay,
.bubbles,
.particles {
  will-change: transform, opacity;
}

/* Safari Specific Fixes */
@supports (-webkit-appearance: none) {
  .hero-video {
    transform: translate(-50%, -50%) translateZ(0);
  }

  .btn {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
}

/* iOS Safari Fixes */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }

  .btn {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Hover Effects for Desktop Only */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    transform: translateY(-6px) scale(1.05);
  }

  .btn-secondary:hover {
    transform: translateY(-6px) scale(1.05);
  }
}

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

.hero.loaded .hero-content {
  opacity: 1;
}

/* Container adjustments for ultra-wide screens */
@media screen and (min-width: 1920px) {
  .hero-content {
    max-width: 1400px;
  }

  .hero-title-hero {
    font-size: 4rem;
  }

  .hero-subtitle {
    font-size: 2rem;
  }
}

/* Very Small Screens (Galaxy Fold, etc.) */
@media screen and (max-width: 280px) {
  .hero {
    min-height: 400px;
  }

  .hero-title-hero {
    font-size: 1.35rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 12px;
  }
}

/* Ensure smooth scrolling */
html {
  scroll-behavior: smooth;
}
