/* Custom font loading */
@font-face {
  font-family: 'GeistMono';
  src: url('https://assets.vercel.com/raw/upload/v1703955854/fonts/geist-mono/Geist-Mono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

.font-geist-mono {
  font-family: 'GeistMono', monospace;
}

/* Base styling */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}

/* Utility classes */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideOut {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

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

.animate-fade {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.3s ease-in-out;
}

.animate-slide-in {
  animation: slideIn 0.3s ease-in-out;
}

.animate-slide-out {
  animation: slideOut 0.3s ease-in-out forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Tab navigation styling */
.tab-btn {
  position: relative;
  transition: all 0.2s ease;
  overflow: hidden;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #3b82f6;
  transition: all 0.2s ease;
  transform: translateX(-50%);
  opacity: 0;
}

.tab-btn:hover::after {
  width: 40%;
  opacity: 0.6;
}

.tab-btn.active {
  color: #3b82f6;
}

.tab-btn.active::after {
  width: 100%;
  opacity: 1;
}

/* Tab content transitions */
.tab-content {
  opacity: 0;
  display: none;
  transition: opacity 0.3s ease;
}

.tab-content.active {
  opacity: 1;
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

/* Card hover effects */
.article-card, .product-card, .opinion-card, .investment-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover, .product-card:hover, .opinion-card:hover, .investment-card:hover {
  transform: translateY(-2px);
}

/* Bottom navigation styling */
.nav-btn {
  position: relative;
  transition: color 0.2s ease;
}

.nav-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #3b82f6;
  transition: width 0.2s ease;
  transform: translateX(-50%);
}

.nav-btn.active {
  color: #3b82f6;
}

.nav-btn.active::after {
  width: 24px;
}

/* Button press animation */
button:active {
  transform: scale(0.95);
}

/* Fancy micro-interactions */
.article-card img, .product-card img {
  transition: transform 0.5s ease;
}

.article-card:hover img, .product-card:hover img {
  transform: scale(1.05);
}

/* Refined typography */
.prose p {
  line-height: 1.7;
  margin-bottom: 1.25em;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose ul {
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose li {
  margin-bottom: 0.5em;
}

/* Frosted glass effect for headers */
@supports (backdrop-filter: blur(8px)) {
  header {
    backdrop-filter: blur(8px);
  }
}
