/* ===== WOOPI AI - Custom Styles ===== */

/* CSS Variables (from globals.css) */
:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: #1a1a2e;
  --border: rgba(0, 0, 0, 0.1);
  --ring: #b5b5b5;
  --radius: 0.625rem;
}

html {
  font-size: var(--font-size);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  overflow-x: hidden;
  width: 100%;
}

/* Tight Heading */
.tight-heading {
  line-height: 1.2;
  font-weight: 700;
}

/* Accordion Overlay */
.accordion-overlay {
  background-color: oklch(0.38 0.15 265.52 / 0.51);
}

/* ===== Animations ===== */

/* Floating Arrow Animation */
@keyframes float-arrow-1 {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(5deg);
  }
}

@keyframes float-arrow-2 {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(-5deg);
  }
}

.float-arrow-1 {
  animation: float-arrow-1 4s ease-in-out infinite;
}

.float-arrow-2 {
  animation: float-arrow-2 4.5s ease-in-out infinite 0.5s;
}

/* Fade-in-up on scroll */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll to top button */
.scroll-to-top {
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* ===== Image Accordion ===== */
.accordion-item {
  transition: all 0.7s ease-in-out;
  overflow: hidden;
}

.accordion-item.active {
  width: 400px;
}

.accordion-item:not(.active) {
  width: 60px;
}

.accordion-caption {
  transition: all 0.3s ease-in-out;
}

.accordion-item.active .accordion-caption {
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
}

.accordion-item:not(.active) .accordion-caption {
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%) rotate(90deg);
}

/* ===== Hero Carousel ===== */
.carousel-slide {
  position: absolute;
  width: 100%;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
}

.carousel-slide:not(.active) {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

.carousel-indicator {
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  width: 2rem;
  background-color: white;
}

/* ===== Dropdown Menu ===== */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-menu.open {
  max-height: 600px;
}

/* ===== Button Styles ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-gradient {
  background: linear-gradient(to right, #2563eb, #60a5fa);
  color: white;
}

.btn-gradient:hover {
  background: linear-gradient(to right, #1d4ed8, #3b82f6);
}

.btn-outline-white {
  border: 1px solid white;
  color: black;
  background-color: white;
}

.btn-outline-white:hover {
  background-color: #f3f4f6;
}

/* ===== Card Styles ===== */
.card-glass {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
}

/* ===== WOOPI Brand ===== */
.woopi-brand {
  font-family: 'Segoe UI', sans-serif;
  font-weight: bold;
  color: #0060c7;
  letter-spacing: -1px;
}

/* ===== Perspective for carousel ===== */
.perspective-1000 {
  perspective: 1000px;
}

/* ===== Responsive Accordion ===== */
@media (max-width: 768px) {
  .accordion-item.active {
    width: 200px;
  }

  .accordion-item:not(.active) {
    width: 40px;
  }
}

@media (max-width: 480px) {
  .accordion-item.active {
    width: 160px;
  }

  .accordion-item:not(.active) {
    width: 30px;
  }
}

@keyframes pulse-slow {

  0%,
  100% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.3;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 8s ease-in-out infinite;
}

.line-height-relaxed {
  line-height: 1.6;
}

/* ===== Video Preview & Lightbox Modal ===== */

/* Video Preview */
.video-preview-container {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-preview-container:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.play-button-circle {
  transition: all 0.3s ease;
}

.play-button-circle:hover {
  transform: scale(1.1);
}

/* Video Modal/Lightbox */
.video-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-modal.active {
  display: flex;
}

.video-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.video-modal-content {
  position: relative;
  z-index: 10000;
  width: 100%;
  max-width: 1200px;
  animation: scaleIn 0.3s ease;
}

.video-modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.2s ease;
  z-index: 10001;
}

.video-modal-close:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.video-modal-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: #000;
}

.video-modal-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Modal Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .video-modal-close {
    top: -2.5rem;
  }

  .video-modal-content {
    max-width: 100%;
  }
}

/* ===== Header Scroll States ===== */
#main-header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top State: Dark & Transparent */
#main-header.header-dark {
  background-color: rgba(10, 15, 28, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#main-header.header-dark .nav-link {
  color: rgba(255, 255, 255, 0.7);
}

#main-header.header-dark .nav-link:hover {
  color: white;
}

#main-header.header-dark .nav-link.active {
  color: #fb923c;
  /* orange-400 */
}

#main-header.header-dark .woopi-brand {
  color: white;
}

#main-header.header-dark #mobile-menu-btn {
  color: white;
}

/* Scrolled State: Light & Opaque */
#main-header.header-light {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

#main-header.header-light .nav-link {
  color: #374151;
  /* gray-700 */
}

#main-header.header-light .nav-link:hover {
  color: #2563eb;
  /* blue-600 */
}

#main-header.header-light .nav-link.active {
  color: #2563eb;
  /* blue-600 */
}

#main-header.header-light .woopi-brand {
  color: #0060c7;
}

#main-header.header-light #mobile-menu-btn {
  color: #1a1a2e;
}

/* ===== Logo Handling ===== */
.logo-container {
  display: flex;
  align-items: center;
}

.logo-light,
.logo-dark {
  height: 2.25rem;
  /* h-9 equivalent */
  width: auto;
  transition: opacity 0.4s ease;
}

#main-header.header-dark .logo-light {
  display: block;
}

#main-header.header-dark .logo-dark {
  display: none;
}

#main-header.header-light .logo-light {
  display: none;
}

#main-header.header-light .logo-dark {
  display: block;
}