/* Enhanced Main CSS for Faith & Finance Blog */

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Enhanced Button Styles */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  transition: all 0.3s ease;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Enhanced Input Styles */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  transition: all 0.3s ease;
}

/* Container System */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Page Content Management */
.page-content {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.page-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Navigation Styles */
.nav-btn {
  position: relative;
  color: var(--color-muted-foreground);
  transition: all 0.3s ease;
}

.nav-btn:hover {
  color: var(--color-primary);
  transform: translateY(-1px);
}

.nav-btn.active {
  color: var(--color-primary);
  background-color: var(--color-accent);
}

.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 1px;
}

/* Loading Screen */
#loading-screen {
  transition: all 0.5s ease;
}

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

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

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Counter Animation */
.counter {
  transition: all 0.3s ease;
}

/* Hero Section */
#hero-content {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

#hero-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollbar Styles */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Post Cards */
.post-card {
  transition: all 0.3s ease;
  transform: translateY(0);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Search Modal */
#search-modal {
  backdrop-filter: blur(8px);
}

#search-content {
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s ease;
}

#search-modal.show #search-content {
  transform: scale(1);
  opacity: 1;
}

/* Mobile Navigation */
#mobile-nav {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

#mobile-nav.show {
  opacity: 1;
  transform: translateY(0);
}

/* Toast Notifications */
.toast {
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

/* Progress Bar */
#reading-progress {
  width: 0%;
  transition: width 0.3s ease;
}

/* Utility Classes */
.bg-gradient-purple {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-blue {
  background: linear-gradient(135deg, #6fb3d3 0%, #5a9bcf 100%);
}

.bg-gradient-pink {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #fcb69f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Backdrop Blur */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.backdrop-blur-md {
  backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
  backdrop-filter: blur(16px);
}

/* Responsive Design */
@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }
  
  html {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none;
  }
}

@media (min-width: 768px) {
  .hidden-desktop {
    display: none;
  }
}

/* Dark Mode Enhancements */
.dark {
  color-scheme: dark;
}

/* Focus Styles for Accessibility */
*:focus {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

/* Reduced Motion Support */
@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;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .page-content:not(.active) {
    display: none !important;
  }
}