/* ========================================
   HERO UNIFIED STYLES
   Centralized hero section styling for all pages
   ======================================== */

/* CSS Variables */
:root {
  --primary-color: #46bbe5;
  --primary-hover: #05425c;
  --secondary-color: #10b981;
  --accent-color: #f59e0b;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, #46bbe5 0%, #2d9cdb 100%);
  --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --gradient-hero: linear-gradient(
    135deg,
    #46bbe5 0%,
    #2d9cdb 50%,
    #10b981 100%
  );
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  --transition-normal: all 0.3s ease;
}

.dark-mode {
  --text-primary: #f3f4f6;
  --text-secondary: #d1d5db;
  --text-light: #9ca3af;
  --bg-primary: #1f2937;
  --bg-secondary: #111827;
  --border-color: #374151;
}

/* Base styles */
html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all 0.3s ease;
  overflow-x: hidden;
  padding-top: 80px;
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
}

/* Smooth scroll indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 10000;
  transition: width 0.1s ease;
}

/* Enhanced focus styles for accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  transition: outline 0.2s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  overflow: hidden;
  padding: 2rem 0 3rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/hero.webp") center/cover no-repeat;
  opacity: 1;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.hero.bg-loaded::before {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 950px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  color: var(--text-primary);
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease 0.3s forwards;
}

.hero-badge i {
  color: #f59e0b;
}

/* Hero Title */
.hero-title {
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(
    135deg,
    #00d4ff 0%,
    #46bbe5 25%,
    #2d9cdb 50%,
    #10b981 75%,
    #0ea97a 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.5s forwards, gradientFlow 6s ease infinite;
  background-size: 300% 300%;
  line-height: 1.2;
}

@keyframes gradientFlow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

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

/* Hero Subtitle */
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  color: #2d3748;
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.9),
    0 3px 12px rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.7s forwards;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 0.9s forwards;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 130px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #ffd700;
  display: block;
  margin-bottom: 0.25rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.85rem;
  opacity: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #2d3748;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* Hero CTA Buttons */
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease 1.1s forwards;
}

.hero-cta-secondary {
  margin-top: 1rem;
  animation-delay: 1.3s;
}

.cta-primary,
.cta-secondary {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 160px;
  min-height: 50px;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cta-primary {
  background: rgba(255, 255, 255, 0.95);
  color: #1a202c;
  backdrop-filter: blur(10px);
  font-weight: 600;
  text-shadow: none;
}

.cta-primary.cta-featured {
  background: linear-gradient(135deg, #46bbe5 0%, #2d9cdb 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(70, 187, 229, 0.4);
}

.cta-primary.cta-featured:hover {
  background: linear-gradient(135deg, #3aa8d1 0%, #2589c4 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(70, 187, 229, 0.5);
}

.cta-primary:hover {
  background: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.cta-primary:active {
  transform: translateY(-1px) scale(1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #1a202c;
  border: 2px solid rgba(26, 32, 44, 0.4);
  backdrop-filter: blur(10px);
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.7);
  padding: 0.8rem 1.5rem;
  min-width: 140px;
  min-height: 46px;
  font-size: 0.95rem;
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #1a202c;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cta-secondary:active {
  transform: translateY(-1px) scale(1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(0, 0, 0, 0.6);
  opacity: 0.8;
  cursor: pointer;
  animation: bounce 2s infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 1;
  color: var(--primary-color);
}

.scroll-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

/* Floating Elements */
.floating-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.floating-element {
  position: absolute;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.floating-element:nth-child(3) {
  bottom: 30%;
  left: 15%;
  animation-delay: 4s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(120deg);
  }
  66% {
    transform: translateY(10px) rotate(240deg);
  }
}

/* ========================================
   MOBILE HERO STYLES
   ======================================== */

@media (max-width: 768px) {
  .hero {
    background: linear-gradient(
      135deg,
      #46bbe5 0%,
      #2d9cdb 50%,
      #10b981 100%
    ) !important;
    min-height: auto !important;
    padding: 1.5rem 0 2rem !important;
    padding-top: calc(70px + 1rem);
  }

  .hero::before {
    display: none !important;
  }

  .floating-elements {
    display: none !important;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
  }

  .hero-title,
  .hero-subtitle {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero-stats {
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 0 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-item {
    flex: 0 1 calc(33% - 0.75rem);
    min-width: 100px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
  }

  .stat-number {
    font-size: 1.6rem !important;
  }

  .stat-label {
    font-size: 0.75rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.9);
  }

  .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 0 0.5rem;
  }

  .hero-cta-secondary {
    margin-top: 0.5rem;
  }

  .cta-primary,
  .cta-secondary {
    flex: 0 1 auto;
    width: auto;
    max-width: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    min-height: 46px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    justify-content: center;
  }

  .cta-primary {
    background: #ffffff;
  }

  .cta-primary.cta-featured {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
  }

  .cta-secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    padding: 0.6rem 1rem;
    min-height: 42px;
    font-size: 0.85rem;
  }

  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.2;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }

  .scroll-indicator {
    position: relative;
    bottom: auto;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
  }

  .scroll-text {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: auto !important;
    padding: 1rem 0 1.5rem !important;
    padding-top: calc(60px + 1rem) !important;
  }

  .scroll-indicator {
    display: none !important;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }

  .hero-content {
    padding: 0.75rem;
  }

  .hero-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 1.25rem;
  }

  .hero-stats {
    gap: 0.5rem;
    margin: 1.25rem 0;
  }

  .stat-item {
    flex: 0 1 calc(33% - 0.35rem);
    min-width: 85px;
    padding: 0.5rem 0.75rem;
  }

  .stat-number {
    font-size: 1.4rem !important;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  .hero-cta {
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0 0.5rem;
  }

  .hero-cta-secondary {
    margin-top: 0.5rem;
  }

  .cta-primary,
  .cta-secondary {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    min-height: 42px;
  }

  .cta-secondary {
    padding: 0.5rem 0.8rem;
    min-height: 38px;
    font-size: 0.8rem;
  }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-subtitle,
  .hero-stats,
  .hero-cta {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Mobile touch optimizations */
@media (hover: none) and (pointer: coarse) {
  .cta-primary:hover,
  .cta-secondary:hover {
    transform: none;
  }

  .cta-primary:active,
  .cta-secondary:active {
    transform: scale(0.98);
  }

  * {
    -webkit-tap-highlight-color: transparent;
  }
}
