/* Cloud Rescue Foundation - Custom Styles */

/* ===== CSS Variables ===== */
:root {
  /* Primary Colors */
  --orange-primary: #FF6B35;
  --orange-hover: #FF5722;
  --orange-light: #FFF3E0;
  
  /* Secondary Colors */
  --teal-accent: #4ECDC4;
  --teal-dark: #2BA9A0;
  --yellow-highlight: #FFC107;
  --green-success: #27AE60;
  
  /* Neutral Colors */
  --gray-900: #1A202C;
  --gray-800: #2D3748;
  --gray-700: #4A5568;
  --gray-600: #718096;
  --gray-500: #A0AEC0;
  --gray-400: #CBD5E0;
  --gray-300: #E2E8F0;
  --gray-200: #EDF2F7;
  --gray-100: #F7FAFC;
  --white: #FFFFFF;
  
  /* Background Colors */
  --bg-warm: #FFF9F5;
  --bg-cool: #F0FDFA;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-colored: 0 10px 25px -5px rgba(255, 107, 53, 0.25);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-serif: 'Merriweather', serif; /* Optional: Add if you want a serif font */
}

/* ===== Reset and Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--white);
}

[lang="zh"], [data-lang="zh"] {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

@media (min-width: 640px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 1.75rem; }
}

@media (min-width: 1024px) {
  h1 { font-size: 4.5rem; }
  h2 { font-size: 3rem; }
  h3 { font-size: 2rem; }
}

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(to right, var(--orange-primary), var(--teal-accent));
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  min-height: 52px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--orange-primary);
  color: white;
  box-shadow: 0 4px 6px rgba(255, 107, 53, 0.2);
}

.btn-primary:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--orange-primary);
  border: 2px solid var(--orange-primary);
}

.btn-secondary:hover {
  background: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== Header & Glassmorphism ===== */
header {
  transition: all 0.3s ease;
}

header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
}

/* ===== Mobile Navigation ===== */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 360px;
  height: 100vh;
  background: white;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  z-index: 51;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  display: none;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 50;
  display: none;
}

.mobile-nav-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

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

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.hover-scale {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--gray-100);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--orange-light);
}

/* ===== Carousel ===== */
.success-carousel-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.success-carousel {
  position: relative;
  overflow: hidden;
  height: 0;
  padding-bottom: 100%;
  background-color: var(--gray-100);
}

.success-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.success-slide.active {
  opacity: 1;
}

.success-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.success-carousel-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.success-carousel-controls button {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gray-800);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.success-carousel-controls button:hover {
  background: white;
  transform: scale(1.1);
}

/* ===== FAQ Accordion ===== */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: white;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--orange-primary);
  box-shadow: var(--shadow-md);
}

.faq-question {
  cursor: pointer;
  padding: 1.5rem;
  background: white;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-800);
}

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  color: var(--orange-primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--gray-50);
}

.faq-answer p {
  padding: 1.5rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ===== Utility Classes ===== */
.container-custom {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding: 0 4rem;
  }
}

/* ===== App Store Badges ===== */
.app-store-badge {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: #000;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-height: 60px;
  box-shadow: var(--shadow-md);
}

.app-store-badge:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

