/* ============================================
   Zenith Framework - Public Site Styles (Premium Cosmic Theme)
   ============================================ */

/* Base Reset & Branded Selection */
::selection {
  background: rgba(200, 80, 192, 0.2);
  color: #4158D0;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #334155;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #4158D0, #C850C0, #FFCC70);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease-out;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: #1e293b;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.display-1 { font-size: 5rem; letter-spacing: -0.03em; }
.display-2 { font-size: 4rem; letter-spacing: -0.03em; }

.text-gradient {
  background: linear-gradient(135deg, #4158D0 0%, #C850C0 50%, #FFCC70 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

/* Glassmorphism */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-radius: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-navbar {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Cosmic Backgrounds & Animations */
.hero-modern {
  position: relative;
  background: radial-gradient(circle at 50% 0%, #f4f7ff 0%, #ffffff 100%);
  overflow: hidden;
  padding: 120px 0;
}

.nebula-drift {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(65, 88, 208, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(200, 80, 192, 0.05) 0%, transparent 40%);
  animation: nebula-float 20s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes nebula-float {
  from { transform: scale(1); opacity: 0.5; }
  to { transform: scale(1.2); opacity: 0.8; }
}

.star-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(1px 1px at 20px 30px, #eee, rgba(0,0,0,0)),
    radial-gradient(1.5px 1.5px at 40px 70px, #fff, rgba(0,0,0,0)),
    radial-gradient(1px 1px at 50px 160px, #ddd, rgba(0,0,0,0));
  background-repeat: repeat;
  background-size: 250px 250px;
  opacity: 0.15;
  animation: stars-move 100s linear infinite;
  pointer-events: none;
}

@keyframes stars-move {
  from { background-position: 0 0; }
  to { background-position: 500px 1000px; }
}

/* Buttons & Micro-interactions */
.btn-gradient {
  background: var(--zenith-gradient);
  border: none;
  color: white !important;
  font-weight: 700;
  padding: 1rem 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 20px rgba(65, 88, 208, 0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-gradient:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 30px rgba(65, 88, 208, 0.3);
  filter: brightness(1.1);
}

/* Feature Cards & Layering */
.feature-card {
  border: 1px solid rgba(0,0,0,0.03);
  border-radius: 1.5rem;
  background: white;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.1);
  z-index: 2;
}

.card-icon-overlap {
  width: 70px;
  height: 70px;
  margin-top: -55px;
  background: white;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.feature-card:hover .card-icon-overlap {
  transform: scale(1.1) rotate(5deg);
  background: var(--zenith-gradient);
  color: white !important;
}

/* System Status */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: inherit;
  border-radius: 50%;
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

/* Footer & CTA */
.cta-section {
  background: #0f172a;
  color: white;
  border-radius: 3rem;
  padding: 80px;
  position: relative;
  overflow: hidden;
}

footer {
  background: #020617;
  padding: 100px 0 50px;
}

/* Mobile Nav Overlay */
@media (max-width: 991px) {
  .navbar-collapse {
    position: fixed;
    top: 80px; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    z-index: 1000;
  }
}

/* SVG & Icon Sizing Fixes */
/* Logo Showcase & Glow Effects */
.logo-showcase {
  position: relative;
  width: 400px;
  height: 400px;
  display: inline-block;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, #4158D0 0%, #C850C0 100%);
  border-radius: 50%;
  opacity: 0.2;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.3; }
}

.logo-showcase .logo-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

.logo-container {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container i {
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-logo {
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.hero-modern .main-logo,
.about-hero .main-logo {
  height: auto;
  width: auto;
  max-height: 350px;
}

@media (max-width: 768px) {
  .hero-modern .main-logo,
  .about-hero .main-logo {
    height: 200px;
  }
}

/* Orbit Animations for Docs */
.orbit-elements {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(65, 88, 208, 0.1);
  border-radius: 50%;
  animation: rotate 20s linear infinite;
}

.orbit-1 { width: 220px; height: 220px; animation-duration: 25s; }
.orbit-2 { width: 280px; height: 280px; animation-duration: 35s; animation-direction: reverse; }
.orbit-3 { width: 340px; height: 340px; animation-duration: 45s; }

.orbit-dot {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--zenith-gradient);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(65, 88, 208, 0.5);
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.floating-card {
  position: absolute;
  padding: 0.75rem 1.25rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  z-index: 5;
  min-width: 140px;
  border: 1px solid rgba(65, 88, 208, 0.1);
  backdrop-filter: blur(4px);
}

.floating-card i {
  font-size: 1.5rem;
}

.floating-card.card-1 {
  top: 20%;
  left: -20%;
  animation: cardFloat1 4s ease-in-out infinite;
}

.floating-card.card-2 {
  top: 10%;
  right: -30%;
  animation: cardFloat2 4s ease-in-out infinite 1s;
}

.floating-card.card-3 {
  bottom: 30%;
  left: -30%;
  animation: cardFloat3 4s ease-in-out infinite 2s;
}

.floating-card.card-4 {
  bottom: 20%;
  right: -20%;
  animation: cardFloat4 4s ease-in-out infinite 3s;
}

@keyframes cardFloat1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes cardFloat2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes cardFloat3 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes cardFloat4 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(1deg); }
}

/* Tenant Portal & Admin Layout Enhancements */
.sidebar-brand {
  background: var(--zenith-gradient);
  color: white !important;
  border-bottom: none !important;
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2) !important;
  color: white !important;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-right: 0.75rem;
}

.nav-link.active {
  background: rgba(65, 88, 208, 0.08) !important;
  color: var(--zenith-primary) !important;
  border-left: 3px solid var(--zenith-primary) !important;
  font-weight: 600;
}

.admin-sidebar {
  border-right: 1px solid rgba(0,0,0,0.05);
  box-shadow: 5px 0 15px rgba(0,0,0,0.02);
}

.admin-topbar {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  height: 70px;
}

.admin-page-content {
  padding: 2rem;
}

.user-avatar.zenith-bg-gradient {
  background: var(--zenith-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Standardized Zenith Cards */
.zenith-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  overflow: hidden;
}

.zenith-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(65, 88, 208, 0.08);
  background: #ffffff; /* Prevents white artifacts */
}

.zenith-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: transparent;
}

.zenith-card-title {
  font-weight: 700;
  margin: 0;
  color: #1e293b;
}

/* Standardized Form Elements */
.zenith-form-group {
  margin-bottom: 1.5rem;
}

.zenith-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 0.5rem;
}

.zenith-input {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  color: #1e293b;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.zenith-input:focus {
  background: #ffffff;
  border-color: #4158D0;
  box-shadow: 0 0 0 4px rgba(65, 88, 208, 0.1);
  outline: none;
}

.zenith-input::placeholder {
  color: #94a3b8;
}

textarea.zenith-input {
  min-height: 100px;
}

.zenith-help {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
}
