/* ============================================================
   Rhyno ERP Landing Page - Custom Styles
   ============================================================ */

/* ----- Base ----- */
body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: #050b14;
  color: #f1f5f9;
  overflow-x: hidden;
}

/* ----- Background Effects ----- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -10;
  background:
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(59, 130, 246, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 50% 75%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #050b14 0%, #081322 50%, #050b14 100%);
}

.grid-pattern {
  position: fixed;
  inset: 0;
  z-index: -9;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ----- Glassmorphism ----- */
.glass-card {
  background: rgba(13, 27, 46, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.12);
  box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.37);
}

.glass-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 40px 0 rgba(6, 182, 212, 0.12);
}

.glass-nav {
  background: rgba(5, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #050b14;
}
::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* ----- Text Gradients ----- */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 10%, #38bdf8 55%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ----- Module Tab Active ----- */
.tab-active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.15)) !important;
  border-color: rgba(56, 189, 248, 0.6) !important;
  color: #ffffff !important;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* ----- Module Content Animation ----- */
@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-module-content {
  animation: fadeInSlide 0.35s ease-out forwards;
}

/* ----- Pulse Dot ----- */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ----- RTL icon fix ----- */
button i[data-lucide="arrow-left"] {
  margin-right: 0;
}

/* ============================================================
   Section Reveal on Scroll (Intersection Observer)
   ============================================================ */

/* All major sections start hidden & slide up */
.section-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Delay helpers for staggered children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero section always visible (no hiding) */
#hero.section-reveal {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Section visual breathing & dividers
   ============================================================ */

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.25), transparent);
  margin: 0;
  opacity: 0.6;
}

/* Glowing separator between major sections */
.section-glow {
  position: relative;
}
.section-glow::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
  border-radius: 2px;
}

/* ============================================================
   Module explorer initial state (collapsed)
   ============================================================ */

.module-explorer-wrapper {
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* CTA footer banner visual pop */
.cta-banner-glow {
  box-shadow: 0 0 60px rgba(6, 182, 212, 0.08);
}

/* ============================================================
   Category Grid - Compact Overview Cards (Drill-down UX)
   ============================================================ */

/* The grid of category cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-card {
  position: relative;
  cursor: pointer;
  background: rgba(13, 27, 46, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.06), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card:hover::before {
  opacity: 1;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 20px 40px -12px rgba(6, 182, 212, 0.15);
}

.category-card:active {
  transform: translateY(-1px) scale(0.98);
}

.category-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  transition: all 0.3s ease;
}

.category-card:hover .category-card-icon {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  transform: scale(1.05);
}

.category-card-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.category-card-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.category-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.675rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.2s ease;
}

.category-card:hover .category-card-badge {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.35);
}

/* Section detail panels (hidden by default, shown on card click) */
.section-detail-panel {
  display: none;
  animation: fadeInSlide 0.4s ease-out forwards;
}

.section-detail-panel.active {
  display: block;
}

/* Back button for drill-down navigation */
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(13, 27, 46, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1.5rem;
}

.detail-back-btn:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(13, 27, 46, 0.8);
  transform: translateX(-2px);
}

/* Category overview wrapper transitions */
#categoryOverview {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#categoryOverview.hidden-overview {
  display: none;
}

/* Hide dividers that appear inside detail panels */
.section-detail-panel + .section-divider,
.section-detail-panel .section-divider {
  display: none;
}

/* ============================================================
   Responsive refinements
   ============================================================ */
@media (max-width: 768px) {
  .section-reveal {
    transform: translateY(24px);
  }
  .section-divider {
    margin: 0 -4px;
  }
  .category-card {
    padding: 1.25rem;
  }
  .category-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  .category-card-title {
    font-size: 0.875rem;
  }
}