/**
 * SixtySixTen Theme - Custom Styles
 * Complementary styles for Tailwind CSS
 */

/* ============================================
   ANIMATIONS - Keyframes
   ============================================ */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(0deg) scale(0.8);
  }
  to {
    opacity: 1;
    transform: rotate(360deg) scale(1);
  }
}

/* ============================================
   ANIMATIONS - Classes
   ============================================ */

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
  opacity: 0;
}

.animate-slide-down {
  animation: slideDown 0.6s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
  opacity: 0;
}

.animate-rotate {
  animation: rotate360 1.5s ease-out forwards;
}

/* ============================================
   ANIMATIONS - Stagger Delays
   ============================================ */

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ============================================
   COMPONENTS - Radial Burst
   ============================================ */

.radial-burst {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  animation: rotateIn 1.5s ease-out;
}

/* ============================================
   GLOBAL - Smooth Transitions
   ============================================ */

* {
  transition-timing-function: ease-out;
}

/* ============================================
   COMPONENTS - FAQ Accordion
   ============================================ */

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.faq-answer.open {
  max-height: 500px;
  opacity: 1;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-icon.open {
  transform: rotate(45deg);
}

/* ============================================
   ANIMATIONS - Scroll-Triggered Fade-In
   ============================================ */

.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Above-fold elements - visible immediately for LCP detection */
.fade-in-section.above-fold {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   COMPONENTS - Mega Menu (Prevent CLS)
   ============================================ */

.mega-menu {
  contain: layout style;
  will-change: opacity, visibility;
  pointer-events: none;
}

.group:hover .mega-menu {
  pointer-events: auto;
}

/* ============================================
   COMPONENTS - Roadmap SVG Lines
   ============================================ */

.roadmap-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.roadmap-desktop-card {
  position: relative;
  z-index: 2;
}

/* ============================================
   COMPONENTS - Copy to Clipboard Button
   ============================================ */

.copy-btn {
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.copy-btn.copied {
  background-color: #10b981;
  color: white;
}

/* ============================================
   COMPONENTS - Table of Contents
   ============================================ */

.toc-link {
  transition: all 0.2s ease;
}

.toc-link:hover,
.toc-link.active {
  color: #000;
  font-weight: 600;
}

.toc-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 100%;
  background-color: #000;
}

/* ============================================
   COMPONENTS - Sticky Sidebar
   ============================================ */

.sticky-sidebar {
  position: sticky;
  top: 100px;
}

/* ============================================
   COMPONENTS - Filter Chips
   ============================================ */

.filter-chip {
  transition: all 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  background-color: #000;
  color: #fff;
}

/* Filter Chips - Collapsible Wrapper */
.filter-chips-wrapper {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}

.filter-chips-wrapper.no-expand .filter-chips-container {
  max-height: none;
  overflow: visible;
}

.filter-chips-container {
  flex: 1;
  min-width: 0;
  max-height: 42px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.filter-chips-wrapper.expanded .filter-chips-container {
  max-height: 500px;
}

.filter-expand-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #000;
  color: #fff;
  border: 1px solid #000;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-expand-btn:hover {
  background-color: #333;
}

/* ============================================
   WORDPRESS - Editor Styles
   ============================================ */

.entry-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.entry-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.entry-content p {
  margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid #D1D5DB;
  padding: 0.75rem 1rem;
  text-align: left;
}

.entry-content th {
  background-color: #F3F4F6;
  font-weight: 600;
}

.entry-content tr:nth-child(even) {
  background-color: #F9FAFB;
}

/* ============================================
   COMPONENTS - Cards
   ============================================ */

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ============================================
   COMPONENTS - Code Blocks
   ============================================ */

.code-block {
  position: relative;
  background-color: #1f2937;
  border-radius: 0.5rem;
  overflow: hidden;
}

.code-block pre {
  padding: 1rem;
  overflow-x: auto;
  color: #e5e7eb;
  font-size: 0.875rem;
  line-height: 1.5;
}

.code-block .copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

/* ============================================
   COMPONENTS - Navbar Logo
   ============================================ */

.custom-logo-link {
  display: block;
  width: 50%;
  text-align: left;
}

.custom-logo-link .custom-logo {
  width: 100%;
  height: auto;
  max-width: 100%;
}

.mobile-logo-link {
  display: block;
  width: 15%;
  text-align: left;
}

.mobile-logo-link .mobile-logo {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* ============================================
   UTILITIES - Hidden Scrollbar
   ============================================ */

/* Hide scrollbar for Chrome, Safari and Opera */
.overflow-y-auto::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for Firefox and IE/Edge */
.overflow-y-auto,
.overflow-x-auto {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
