/**
 * SinabroG Landing Page - Features Page Styles
 * Professional Design System with Swiper Coverflow
 */

/* ========== Header Override for Features Page ========== */
/* Initial state: plain, no background */
#top-nav {
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}

/* Logo: always original color (no invert) */
#top-nav .nav-logo img {
  filter: none;
}

#top-nav .nav-link {
  color: var(--grayscale-700);
}

#top-nav .nav-link:hover {
  color: var(--primary-500);
}

/* Active state for current page */
#top-nav .nav-link[href="features.html"] {
  color: var(--primary-500);
  font-weight: 600;
}

#top-nav .nav-toggle span {
  background-color: var(--grayscale-800);
}

/* Scrolled state: glassmorphism (same as index) */
#top-nav.scrolled {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.2) 100%
  );
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Logo: keep original color on scroll */
#top-nav.scrolled .nav-logo img {
  filter: none;
}

#top-nav.scrolled .nav-link {
  color: var(--dark);
}

#top-nav.scrolled .nav-link:hover {
  color: var(--primary-500);
}

/* 모바일 드롭다운: index와 동일한 다크 스타일 */
@media (max-width: 768px) {
  #top-nav .nav-dropdown-toggle {
    color: var(--dark);
  }

  #top-nav .nav-menu .nav-link {
    color: rgba(255, 255, 255, 0.7);
  }

  #top-nav .nav-menu .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
  }

  #top-nav .nav-menu .nav-link.active {
    color: #fff;
  }
}

/* ========== AI Engines Section (Swiper Coverflow) ========== */
.ai-engines {
  padding-top: calc(var(--nav-height) + var(--section-padding-y));
  padding-bottom: var(--section-padding-y);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative Background Elements */
.ai-engines::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(40, 125, 250, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.ai-engines::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(40, 125, 250, 0.03) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* AI Engines Container */
.ai-engines-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Section Header Enhancement */
.ai-engines .section-header {
  margin-bottom: 60px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-600);
  background: linear-gradient(135deg, var(--primary-50) 0%, rgba(40, 125, 250, 0.08) 100%);
  padding: 0.625rem 1.25rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(40, 125, 250, 0.15);
  box-shadow: 0 2px 10px rgba(40, 125, 250, 0.08);
}

.section-label i {
  font-size: 0.875rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--grayscale-dark) 0%, var(--grayscale-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--grayscale-500);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Swiper Carousel Styles ===== */
.engine-swiper {
  padding: 40px 0 80px;
  overflow: visible;
}

.engine-slide {
  width: 380px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Engine Card - Premium Design */
.engine-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  opacity: 0.6;
  transform: scale(0.9);
}

/* Active Slide - Full Opacity & Scale */
.swiper-slide-active .engine-card {
  opacity: 1;
  transform: scale(1);
  box-shadow:
    0 20px 60px rgba(40, 125, 250, 0.15),
    0 8px 24px rgba(40, 125, 250, 0.1);
  border-color: rgba(40, 125, 250, 0.15);
}

/* Prev/Next Slides - Partial Visibility */
.swiper-slide-prev .engine-card,
.swiper-slide-next .engine-card {
  opacity: 0.75;
  transform: scale(0.92);
}

/* Gradient Overlay on Active */
.swiper-slide-active .engine-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, rgba(40, 125, 250, 0.02) 0%, transparent 50%);
  pointer-events: none;
}

/* Bottom Accent Bar on Active */
.swiper-slide-active .engine-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-400) 50%, #60A5FA 100%);
  border-radius: 4px 4px 0 0;
}

/* Engine Icon - Premium Gradient */
.engine-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(145deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow:
    0 12px 32px rgba(40, 125, 250, 0.3),
    0 6px 12px rgba(40, 125, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  color: var(--grayscale-white);
  font-size: 2.5rem;
  position: relative;
}

.engine-icon::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  border-radius: 25px 25px 50px 50px;
  pointer-events: none;
}

.swiper-slide-active .engine-card:hover .engine-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow:
    0 16px 40px rgba(40, 125, 250, 0.35),
    0 8px 16px rgba(40, 125, 250, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Engine Title */
.engine-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--grayscale-dark);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

/* Engine Subtitle */
.engine-subtitle {
  font-size: 0.875rem;
  color: var(--grayscale-400);
  margin-bottom: 16px;
  font-weight: 500;
}

/* Engine Description */
.engine-description {
  font-size: 1rem;
  color: var(--grayscale-600);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Engine Feature Tags */
.engine-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.engine-feature-tag {
  background: var(--primary-50);
  color: var(--primary-600);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid rgba(40, 125, 250, 0.1);
  transition: all 0.3s ease;
}

.swiper-slide-active .engine-feature-tag:hover {
  background: var(--primary-100);
  border-color: rgba(40, 125, 250, 0.2);
  transform: translateY(-2px);
}

/* ===== Swiper Navigation ===== */
.engine-swiper .swiper-button-prev,
.engine-swiper .swiper-button-next {
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50%;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.05);
  color: var(--primary-500);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.engine-swiper .swiper-button-prev::after,
.engine-swiper .swiper-button-next::after {
  font-size: 1.125rem;
  font-weight: bold;
}

.engine-swiper .swiper-button-prev:hover,
.engine-swiper .swiper-button-next:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: var(--grayscale-white);
  box-shadow: 0 8px 24px rgba(40, 125, 250, 0.35);
  transform: scale(1.08);
  border-color: transparent;
}

/* ===== Swiper Pagination ===== */
.engine-swiper .swiper-pagination {
  bottom: 20px;
}

.engine-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--grayscale-200);
  opacity: 1;
  transition: all 0.3s ease;
  margin: 0 6px;
}

.engine-swiper .swiper-pagination-bullet-active {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  width: 28px;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(40, 125, 250, 0.4);
}

/* ===== AI Engines Responsive ===== */
@media screen and (max-width: 1024px) {
  .engine-slide {
    width: 340px;
  }

  .engine-card {
    padding: 32px 28px;
  }

  .engine-icon {
    width: 90px;
    height: 90px;
    font-size: 2.25rem;
    border-radius: 24px;
  }
}

@media screen and (max-width: 768px) {
  .ai-engines-container {
    padding: 0 16px;
  }

  .engine-swiper {
    padding: 30px 0 70px;
  }

  .engine-slide {
    width: 300px;
  }

  .engine-card {
    padding: 28px 24px;
    border-radius: 20px;
  }

  .engine-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    border-radius: 22px;
    margin-bottom: 20px;
  }

  .engine-title {
    font-size: 1.25rem;
  }

  .engine-subtitle {
    font-size: 0.8125rem;
  }

  .engine-description {
    font-size: 0.9375rem;
  }

  .engine-feature-tag {
    padding: 5px 12px;
    font-size: 0.75rem;
  }

  /* Hide navigation arrows on mobile (swipe to navigate) */
  .engine-swiper .swiper-button-prev,
  .engine-swiper .swiper-button-next {
    display: none;
  }
}

@media screen and (max-width: 480px) {
  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .engine-slide {
    width: 280px;
  }

  .engine-card {
    padding: 24px 20px;
  }

  .engine-icon {
    width: 72px;
    height: 72px;
    font-size: 1.75rem;
  }
}

/* ========== Screenshots Section ========== */
.screenshots {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

.screenshots::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(40, 125, 250, 0.1) 50%, transparent 100%);
}

/* Screenshot Tabs - Premium Pills */
.screenshot-tabs {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.screenshot-tab {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--grayscale-600);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.screenshot-tab:hover {
  border-color: var(--primary-300);
  color: var(--primary-600);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(40, 125, 250, 0.1);
}

.screenshot-tab.active {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border-color: transparent;
  color: var(--grayscale-white);
  box-shadow:
    0 4px 16px rgba(40, 125, 250, 0.35),
    0 2px 4px rgba(40, 125, 250, 0.2);
}

/* Screenshot Viewer - Premium Card */
.screenshot-viewer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 2rem;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.02),
    0 12px 24px rgba(0, 0, 0, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.04);
  max-width: 1000px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Screenshot Image Container - Device Frame Effect */
.screenshot-image-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #e2e8f0 0%, #f1f5f9 100%);
  min-height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Device Frame Border */
.screenshot-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

/* Inner Shadow for Depth */
.screenshot-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  pointer-events: none;
}

.screenshot-image {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 1;
}

.screenshot-image.fade-out {
  opacity: 0;
  transform: scale(0.96);
}

/* Screenshot Navigation */
.screenshot-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.screenshot-arrow {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  color: var(--grayscale-600);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.screenshot-arrow:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border-color: transparent;
  color: var(--grayscale-white);
  box-shadow: 0 4px 16px rgba(40, 125, 250, 0.3);
  transform: scale(1.05);
}

.screenshot-arrow:active {
  transform: scale(0.98);
}

/* Screenshot Dots */
.screenshot-dots {
  display: flex;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 50px;
}

.screenshot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grayscale-300);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  border: none;
  padding: 0;
}

.screenshot-dot:hover {
  background: var(--grayscale-400);
  transform: scale(1.15);
}

.screenshot-dot.active {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  transform: scale(1.3);
  box-shadow: 0 2px 8px rgba(40, 125, 250, 0.4);
}

/* Screenshot Description (above viewer) */
.screenshot-description {
  text-align: center;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--grayscale-600);
  line-height: 1.6;
  margin: 2rem 0;
  transition: opacity 0.3s ease;
}

/* Screenshots Responsive */
@media screen and (max-width: 900px) {
  .screenshot-viewer {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .screenshot-image-container {
    min-height: 350px;
    padding: 1rem;
  }

  .screenshot-image {
    max-height: 400px;
  }
}

@media screen and (max-width: 768px) {
  .screenshot-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0;
  }

  .screenshot-tab {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    text-align: center;
  }

  .screenshot-viewer {
    padding: 1rem;
    border-radius: 16px;
  }

  .screenshot-image-container {
    min-height: 280px;
    border-radius: 12px;
    padding: 0.75rem;
  }

  .screenshot-image {
    max-height: 350px;
    border-radius: 8px;
  }

  .screenshot-arrow {
    width: 40px;
    height: 40px;
  }

  .screenshot-arrow svg {
    width: 18px;
    height: 18px;
  }

  .screenshot-nav {
    gap: 1rem;
  }

  .screenshot-dots {
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
  }

  .screenshot-dot {
    width: 7px;
    height: 7px;
  }

  .screenshot-description {
    font-size: 1rem;
    margin: 1.5rem 0;
  }
}

@media screen and (max-width: 480px) {
  .screenshot-image-container {
    min-height: 240px;
  }

  .screenshot-image {
    max-height: 300px;
  }
}

/* ========== Footer Styles (for features page) ========== */
#footer {
  background: linear-gradient(180deg, var(--grayscale-dark) 0%, #1a1a1a 100%);
  padding: 4.5rem 0 2rem;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
}

#footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 1.25rem;
  opacity: 0.95;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
  line-height: 1.75;
}

.footer-certifications {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.cert-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s;
}

.cert-badge:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.1);
}

.footer-column {}

.footer-title {
  color: var(--grayscale-white);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.375rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.footer-links li {
  margin-bottom: 0.875rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  transition: all 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--grayscale-white);
  transform: translateX(3px);
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: rgba(255, 255, 255, 0.8);
}

@media screen and (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media screen and (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
  }
}

/* ========== Loading Animation ========== */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.screenshot-image-container.loading {
  background: linear-gradient(
    90deg,
    #e2e8f0 0%,
    #f1f5f9 50%,
    #e2e8f0 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
