/* ============================================
   GSAP Examples Page Styles
   ============================================ */

/* --- Root Variables --- */
:root {
  --ex-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ex-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --ex-glow: 0 0 20px rgba(0, 255, 102, 0.2);
}

/* ========== HERO SECTION ========== */
.ex-hero {
  background: var(--gs-darker);
  padding: 10rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

/* ::before gradient replaced by shared hero-bg-anim system */

.ex-hero > .container {
  position: relative;
  z-index: 1;
}

.ex-page-headline {
  background: linear-gradient(135deg, #00FF66 0%, #00CC88 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out;
}

.ex-page-subtitle {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

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

/* ========== CATEGORY NAVIGATION ========== */
.ex-cat-nav {
  cursor: pointer;
  transition: var(--ex-transition);
}

.ex-cat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--ex-transition);
}

.ex-cat-card:hover,
.ex-cat-card.active {
  border-color: rgba(0, 255, 102, 0.35);
  background: rgba(0, 255, 102, 0.05);
  transform: translateY(-2px);
}

.ex-cat-card.active {
  border-color: var(--gs-primary);
  box-shadow: var(--ex-glow);
}

.ex-cat-card-icon {
  font-size: 1.5rem;
  color: var(--gs-primary);
  line-height: 1;
}

.ex-cat-card-label {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
}

.ex-cat-card-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ex-cat-card-count {
  font-size: 0.65rem;
  color: var(--gs-primary);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* ========== CATEGORY SECTIONS ========== */
.ex-category {
  padding: 6rem 0;
  scroll-margin-top: 120px;
}

/* ========== EXAMPLE CARD STYLING ========== */
.ex-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: var(--ex-transition);
  overflow: hidden;
}

.ex-card:hover {
  border-color: rgba(0, 255, 102, 0.25);
  background: rgba(0, 255, 102, 0.03);
  box-shadow: var(--ex-glow);
  transform: translateY(-4px);
}

/* Preview Area */
.ex-preview {
  min-height: 280px;
  background: rgba(15, 15, 26, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.ex-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 102, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Replay Button */
.ex-replay-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.3);
  color: var(--gs-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--ex-transition);
  z-index: 10;
}

.ex-replay-btn:hover {
  background: rgba(0, 255, 102, 0.2);
  border-color: var(--gs-primary);
  transform: scale(1.1);
}

.ex-replay-btn i {
  font-size: 0.8rem;
}

/* Card Footer */
.ex-footer {
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.01);
}

.ex-footer h3 {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.ex-footer p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
}

/* Tag Badges */
.ex-tag-badge {
  background: rgba(0, 255, 102, 0.1);
  color: var(--gs-primary);
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(0, 255, 102, 0.2);
  font-weight: 500;
}

/* Code Buttons */
.ex-copy-btn,
.btn-outline-light {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--ex-transition);
  padding: 0.25rem 0.5rem;
}

.ex-copy-btn:hover,
.btn-outline-light:hover {
  color: var(--gs-primary);
  border-color: var(--gs-primary);
  background: rgba(0, 255, 102, 0.1);
}

/* Code Block */
.ex-code-snippet {
  color: var(--gs-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.collapse pre {
  background: rgba(15, 15, 26, 0.8);
  border: 1px solid rgba(0, 255, 102, 0.15);
  margin-bottom: 0;
}

/* ========== DEMO SECTION STYLING ========== */
.ex-demo-section {
  scroll-margin-top: 140px;
}

/* --- Hero Sections Previews --- */
.ex-hero-text-reveal {
  text-align: center;
  width: 100%;
}

.ex-hero-text-reveal .ex-headline {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gs-primary);
  margin-bottom: 0.5rem;
}

.ex-hero-text-reveal .ex-subheading {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
}

.ex-hero-text-reveal .ex-tagline {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
}

.ex-cta-btn {
  background: var(--gs-primary);
  color: var(--gs-dark);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ex-transition);
}

.ex-cta-btn:hover {
  background: var(--gs-secondary);
  transform: translateY(-2px);
}

.ex-hero-video-bg {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ex-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 255, 102, 0.2) 0%, rgba(0, 204, 136, 0.1) 100%);
  animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(10deg); }
}

.ex-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.ex-title {
  font-size: 1.8rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ex-subtitle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.ex-hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  height: 100%;
}

.ex-split-left,
.ex-split-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: 12px;
}

.ex-split-left {
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.2);
}

.ex-split-right {
  background: rgba(0, 204, 136, 0.1);
  border: 1px solid rgba(0, 204, 136, 0.2);
}

.ex-split-left h2,
.ex-split-right h2 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.ex-split-left p,
.ex-split-right p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 0;
}

.ex-hero-minimal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.ex-fade-item {
  text-align: center;
}

.ex-label {
  display: inline-block;
  background: var(--gs-primary);
  color: var(--gs-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ex-fade-item h1 {
  color: #fff;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.ex-fade-item p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* --- Scroll Reveals Previews --- */
.ex-scroll-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

.ex-card-item {
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(0, 255, 102, 0.15) 0%, rgba(0, 204, 136, 0.1) 100%);
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 12px;
}

.ex-scroll-sides {
  display: flex;
  gap: 2rem;
  width: 100%;
  align-items: center;
}

.ex-side-left,
.ex-side-right {
  flex: 1;
  padding: 1.5rem;
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.15);
  border-radius: 12px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.ex-side-right {
  background: rgba(0, 204, 136, 0.08);
  border-color: rgba(0, 204, 136, 0.15);
}

.ex-scroll-rotate {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  flex-wrap: wrap;
}

.ex-rotate-item {
  font-size: 2rem;
  color: var(--gs-primary);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 255, 102, 0.1);
  border-radius: 12px;
}

.ex-parallax-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ex-parallax-bg,
.ex-parallax-mid,
.ex-parallax-fg {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.ex-parallax-bg {
  width: 200px;
  height: 200px;
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8rem;
  z-index: 1;
}

.ex-parallax-mid {
  width: 150px;
  height: 150px;
  background: rgba(0, 204, 136, 0.12);
  border: 1px solid rgba(0, 204, 136, 0.25);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  z-index: 2;
}

.ex-parallax-fg {
  width: 100px;
  height: 100px;
  background: var(--gs-primary);
  color: var(--gs-dark);
  border-radius: 50%;
  font-weight: 700;
  z-index: 3;
}

/* --- Navigation Previews --- */
.ex-nav-demo {
  width: 100%;
}

.ex-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 0;
  height: auto;
}

.ex-logo {
  color: var(--gs-primary);
  font-weight: 700;
  font-size: 1rem;
}

.ex-menu-icon {
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.ex-nav-spacer {
  padding: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.ex-nav-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.ex-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.3s;
}

.ex-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gs-primary);
  transition: width 0.3s;
}

.ex-link:hover {
  color: var(--gs-primary);
}

.ex-link:hover::after {
  width: 100%;
}

.ex-mobile-nav {
  position: relative;
  width: 100%;
}

.ex-menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  margin: 0.5rem;
}

.ex-menu-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(15, 15, 26, 0.95);
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  max-height: 0;
}

.ex-menu-overlay.open {
  opacity: 1;
  pointer-events: all;
  max-height: 300px;
}

.ex-menu-item {
  padding: 1rem;
  color: #fff;
  cursor: pointer;
  transition: var(--ex-transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ex-menu-item:hover {
  background: rgba(0, 255, 102, 0.1);
  padding-left: 1.5rem;
}

/* --- Text Effects Previews --- */
.ex-typewriter {
  text-align: center;
}

.ex-type-text {
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  display: inline;
  min-height: 2rem;
}

.ex-type-cursor {
  color: var(--gs-primary);
  font-weight: 700;
  font-size: 1.5rem;
  animation: typeCursor 0.7s infinite;
}

@keyframes typeCursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.ex-scramble {
  text-align: center;
}

.ex-scramble-text {
  color: var(--gs-primary);
  font-weight: 700;
  font-size: 1.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.ex-word-rotate {
  text-align: center;
}

.ex-word-rotate h2 {
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
}

.ex-rotating-word {
  color: var(--gs-primary);
  display: inline-block;
  min-width: 120px;
}

/* --- Loader Previews --- */
.ex-loader-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ex-progress-bar {
  width: 80%;
  max-width: 300px;
  height: 6px;
  background: rgba(0, 255, 102, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.ex-progress-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: var(--gs-primary);
}

.ex-progress-text {
  color: var(--gs-primary);
  font-weight: 700;
  font-size: 1rem;
  font-family: 'JetBrains Mono', monospace;
}

.ex-page-wipe {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ex-wipe-panel {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gs-primary);
  z-index: 10;
}

.ex-wipe-content {
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
  z-index: 5;
}

.ex-skeleton-loader {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.ex-skeleton-line {
  height: 12px;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 102, 0.1) 0%,
    rgba(0, 255, 102, 0.2) 50%,
    rgba(0, 255, 102, 0.1) 100%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 2s infinite;
}

.ex-skeleton-block {
  height: 60px;
  background: linear-gradient(
    90deg,
    rgba(0, 255, 102, 0.1) 0%,
    rgba(0, 255, 102, 0.2) 50%,
    rgba(0, 255, 102, 0.1) 100%
  );
  background-size: 200% 100%;
  border-radius: 4px;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Interactive Previews --- */
.ex-tilt-card {
  perspective: 1000px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ex-card-content {
  width: 200px;
  height: 150px;
  background: linear-gradient(135deg, rgba(0, 255, 102, 0.15) 0%, rgba(0, 204, 136, 0.1) 100%);
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ex-transition);
}

.ex-card-content h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.ex-card-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
  text-align: center;
}

.ex-accordion {
  width: 100%;
}

.ex-accordion-item {
  border: 1px solid rgba(0, 255, 102, 0.2);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: rgba(0, 255, 102, 0.05);
}

.ex-accordion-header {
  width: 100%;
  padding: 1rem;
  background: rgba(0, 255, 102, 0.1);
  border: none;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--ex-transition);
}

.ex-accordion-header:hover {
  background: rgba(0, 255, 102, 0.15);
}

.ex-button-demo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ex-morph-button {
  padding: 0.8rem 1.8rem;
  background: var(--gs-primary);
  color: var(--gs-dark);
  border: none;
  border-radius: 25px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--ex-transition);
  font-size: 0.95rem;
}

.ex-morph-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.4);
}

/* ========== BEST PRACTICES SECTION ========== */
.bg-dark {
  background-color: var(--gs-dark) !important;
}

.border-white-10 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
  .ex-hero {
    padding: 6rem 1rem 4rem;
  }

  .ex-page-headline {
    font-size: 2rem;
  }

  .ex-category {
    padding: 4rem 0;
  }

  .ex-preview {
    min-height: 240px;
  }

  .ex-hero-split {
    grid-template-columns: 1fr;
  }

  .ex-scroll-cards {
    grid-template-columns: 1fr;
  }

  .ex-scroll-sides {
    flex-direction: column;
    gap: 1rem;
  }

  .ex-nav-links {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .ex-hero {
    padding: 4rem 1rem 3rem;
  }

  .ex-page-headline {
    font-size: 1.75rem;
  }

  .ex-cat-card {
    text-align: center;
  }

  .ex-cat-card-icon {
    font-size: 1.25rem;
  }

  .ex-category {
    padding: 2.5rem 0;
  }

  .ex-preview {
    min-height: 200px;
  }

  .ex-hero-text-reveal .ex-headline {
    font-size: 1.3rem;
  }

  .ex-hero-text-reveal .ex-subheading {
    font-size: 1.1rem;
  }

  .ex-title {
    font-size: 1.2rem;
  }

  .ex-footer {
    padding: 1rem;
  }

  .ex-scroll-rotate {
    gap: 1rem;
  }

  .ex-rotate-item {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .ex-type-text,
  .ex-scramble-text {
    font-size: 1.2rem;
  }

  .ex-word-rotate h2 {
    font-size: 1.2rem;
  }

  .ex-rotating-word {
    min-width: 80px;
  }

  .ex-parallax-bg {
    width: 150px;
    height: 150px;
  }

  .ex-parallax-mid {
    width: 110px;
    height: 110px;
  }

  .ex-parallax-fg {
    width: 80px;
    height: 80px;
  }

  .display-5 {
    font-size: 1.8rem;
  }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== UTILITY CLASSES ========== */
.cursor-pointer {
  cursor: pointer;
}

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

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

.py-8 {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.mb-6 {
  margin-bottom: 3rem;
}

.min-vh-100 {
  min-height: 100vh;
}
