/* PawNest Canada - Pet Care & Training Blog
   Design System with Paw-grid Background Pattern */

:root {
  /* Color Palette */
  --warm-sand: #E9D7B7;
  --deep-navy: #0B1220;
  --teal: #20C6B7;
  --soft-gray: #A7B0BD;
  --coral: #FF8A65;
  
  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3.1rem;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  
  /* Layout */
  --max-width: 1200px;
  --gutter: 20px;
  
  /* Transitions */
  --transition-base: all 0.16s ease;
  --transition-slow: all 0.22s ease;
  
  /* Shadows */
  --shadow-card: 0 12px 28px rgba(0, 0, 0, 0.18);
  --shadow-hover: 0 14px 30px rgba(0, 0, 0, 0.2);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-base: 16px;
  --radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--deep-navy);
  background: var(--warm-sand);
  overflow-x: hidden;
}

/* Paw-grid Background Pattern */
.paw-grid-bg {
  position: relative;
  min-height: 100vh;
}

.paw-grid-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(32, 198, 183, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(32, 198, 183, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 50% 50%, rgba(167, 176, 189, 0.05) 1px, transparent 1px);
  background-size: 60px 60px, 60px 60px, 20px 20px;
  pointer-events: none;
  z-index: -1;
}

/* Header and Navigation */
.header {
  position: sticky;
  top: 0;
  background: rgba(11, 18, 32, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: var(--space-4) 0;
  transition: var(--transition-base);
}

.header.scrolled {
  padding: var(--space-2) 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--warm-sand);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
  align-items: center;
}

.nav-link {
  color: var(--warm-sand);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-base);
  position: relative;
}

.nav-link:hover {
  color: var(--teal);
}

.nav-link.active {
  color: var(--teal);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--teal);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--warm-sand);
  transition: var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Main Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Hero Section */
.hero {
  padding: var(--space-20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(32, 198, 183, 0.1) 0%, rgba(11, 18, 32, 0.05) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  line-height: 1.1;
}

.hero p {
  font-size: var(--text-xl);
  color: var(--deep-navy);
  opacity: 0.8;
  margin-bottom: var(--space-12);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-button {
  display: inline-block;
  background: var(--teal);
  color: white;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-base);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-base);
  box-shadow: var(--shadow-card);
}

.cta-button:hover {
  background: var(--deep-navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Stats Section */
.stats {
  padding: var(--space-16) 0;
  background: rgba(11, 18, 32, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
}

.stat-item {
  text-align: center;
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
}

.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--teal);
  margin-bottom: var(--space-2);
}

.stat-label {
  color: var(--soft-gray);
  font-weight: 500;
}

/* Sections */
.section {
  padding: var(--space-20) 0;
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-12);
  letter-spacing: -0.02em;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-8);
}

.card {
  background: white;
  border-radius: var(--radius-base);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.card-description {
  color: var(--soft-gray);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--soft-gray);
}

.badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.badge {
  background: var(--teal);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
}

.badge.coral {
  background: var(--coral);
}

.badge.sand {
  background: var(--warm-sand);
  color: var(--deep-navy);
}

/* Advantages Section */
.advantages {
  background: rgba(11, 18, 32, 0.05);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
}

.advantage-item {
  text-align: center;
  padding: var(--space-6);
  background: white;
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
}

.advantage-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.advantage-icon {
  width: 60px;
  height: 60px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  transition: var(--transition-base);
}

.advantage-item:hover .advantage-icon {
  background: var(--coral);
  transform: scale(1.1);
}

.advantage-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

/* Reviews Section */
.reviews {
  background: rgba(11, 18, 32, 0.05);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

.review-item {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-card);
  transition: var(--transition-base);
}

.review-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.review-text {
  font-style: italic;
  margin-bottom: var(--space-4);
  color: var(--soft-gray);
  line-height: 1.6;
}

.review-author {
  font-weight: 700;
  color: var(--deep-navy);
}

/* Categories Section */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-8);
}

.category-card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-base);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.category-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--teal), var(--coral));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}

.category-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.category-description {
  color: var(--soft-gray);
  line-height: 1.5;
}

/* Newsletter Section */
.newsletter {
  background: var(--deep-navy);
  color: var(--warm-sand);
  text-align: center;
  padding: var(--space-20) 0;
}

.newsletter h2 {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-6);
}

.newsletter p {
  font-size: var(--text-lg);
  opacity: 0.8;
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: var(--space-4);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: var(--space-4);
  border: none;
  border-radius: var(--radius-base);
  font-size: var(--text-base);
}

.newsletter-button {
  background: var(--teal);
  color: white;
  border: none;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
}

.newsletter-button:hover {
  background: var(--coral);
}

/* Footer */
.footer {
  background: var(--deep-navy);
  color: var(--warm-sand);
  padding: var(--space-16) 0 var(--space-8);
}

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

.footer-section h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-section p,
.footer-section a {
  color: var(--warm-sand);
  opacity: 0.8;
  text-decoration: none;
  transition: var(--transition-base);
  margin-bottom: var(--space-2);
  display: block;
}

.footer-section a:hover {
  opacity: 1;
  color: var(--teal);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(233, 215, 183, 0.2);
  opacity: 0.6;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--teal), var(--coral));
  color: white;
  padding: var(--space-20) 0;
  text-align: center;
}

.page-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.page-description {
  font-size: var(--text-xl);
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  background: var(--teal);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  z-index: 1000;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--coral);
  transform: translateY(-4px);
}

/* Scroll Reveal Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--deep-navy);
    flex-direction: column;
    padding: var(--space-8);
    gap: var(--space-4);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .hero {
    padding: var(--space-12) 0;
  }
  
  .section {
    padding: var(--space-12) 0;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .advantages-grid {
    grid-template-columns: 1fr;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 16px;
  }
  
  .hero h1 {
    font-size: var(--text-3xl);
  }
  
  .hero p {
    font-size: var(--text-lg);
  }
  
  .section-title {
    font-size: var(--text-3xl);
  }
  
  .card-content {
    padding: var(--space-4);
  }
}