/* static/css/main.css */
/* Tools4Wisdom - Custom Styles */

:root {
  /* Brand Colors */
  --primary: #2563eb;      /* Blue */
  --secondary: #f59e0b;    /* Amber */
  --accent: #8b5cf6;       /* Purple */
  --dark: #1f2937;
  --light: #f9fafb;
  --success: #10b981;
  --danger: #ef4444;

  --t4w-ink: #0F172A;
  --t4w-paper: #FAFAFA;
  --t4w-primary: #C7398A;  /* Magenta/Pink */
  --t4w-secondary: #F4B96E; /* Warm Orange */
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-heading: 'Georgia', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  color: var(--dark);
  line-height: 1.6;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--t4w-primary);
  color: white;
}

.btn-secondary {
  background: var(--t4w-secondary);
  color: var(--t4w-ink);
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-amazon {
  background: #ff9900;
  color: #232f3e;
}

.btn-amazon:hover {
  background: #ffad33;
  transform: translateY(-2px);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.product-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.product-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.product-card-body {
  padding: 1rem;
}

.product-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.product-card p {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.star {
  color: #fbbf24;
}

/* Navigation */
nav {
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
}

/* Why Section */
.why-section {
  padding: 4rem 1rem;
  background: var(--light);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.why-card {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  text-align: center;
}

.why-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 3rem 1rem 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.py-2 { padding: 1rem 0; }
.py-4 { padding: 2rem 0; }

.bg-t4w-primary { background-color: #C7398A; }
.bg-t4w-secondary { background-color: #F4B96E; }
.bg-t4w-ink { background-color: #0F172A; }
.bg-t4w-paper { background-color: #FAFAFA; }

.text-t4w-primary { color: #C7398A; }
.text-t4w-secondary { color: #F4B96E; }
.text-t4w-ink { color: #0F172A; }
.text-t4w-paper { color: #FAFAFA; }

.border-t4w-primary { border-color: #C7398A; }
.border-t4w-secondary { border-color: #F4B96E; }

.decoration-t4w-primary { text-decoration-color: #C7398A; }
.decoration-t4w-secondary { text-decoration-color: #F4B96E; }

/* Gradients */
.bg-gradient-t4w {
  background: linear-gradient(135deg, #C7398A 0%, #F4B96E 100%);
}

/* Opacity variants */
.bg-t4w-primary-10 { background-color: rgba(199, 57, 138, 0.1); }
.bg-t4w-secondary-20 { background-color: rgba(244, 185, 110, 0.2); }

.wisdom-card:hover .card-inner {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border: 2px solid #F4B96E !important;  /* Note: just 2px, not 4px on top */
    background: linear-gradient(135deg, #FAFAFA 0%, rgba(244, 185, 110, 0.2) 100%) !important;
}

.wisdom-card:hover .text-t4w-primary {
    text-decoration: underline;
}

#wisdom-scroll-wrapper {
    animation: infiniteScroll 45s linear infinite;
}

#wisdom-scroll-wrapper:hover {
    animation-play-state: paused;
}

@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% / 2));
    }
}

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

.product-card:not(:last-child):hover {
    border-color: #F4B96E !important;
}

.product-card:last-child:hover {
    border-color: #C7398A !important;
    background: linear-gradient(to br, rgba(199, 57, 138, 0.15), rgba(244, 185, 110, 0.15)) !important;
}

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

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #C7398A 0%, #F4B96E 100%);
    color: white;
    padding: 4rem 1rem;
    margin-top: 4rem;
}

.newsletter-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-box h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.newsletter-form button {
    background: white;
    color: #C7398A;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    background: #FAFAFA;
    transform: translateY(-2px);
}

.newsletter-note {
    font-size: 0.9rem;
    opacity: 0.9;
}