/* SolarWave Canada - Main Stylesheet */
/* Design Signature Color Palette */
:root {
  --solar-yellow: #FFD65A;
  --midnight: #0B1220;
  --forest: #2E5D4A;
  --soft-gray: #A7B0BD;
  --accent-orange: #FF9E3C;
  --white: #FFFFFF;
  --light-gray: #F5F7FA;
  --dark-gray: #4A5568;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--midnight);
  background: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 3.1rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* Container and Grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-12 {
  grid-template-columns: repeat(12, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Header */
.header {
  background: var(--midnight);
  color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header.scrolled {
  background: rgba(11, 18, 32, 0.95);
  backdrop-filter: blur(10px);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--solar-yellow);
  text-decoration: none;
}

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

.nav-link {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--solar-yellow);
}

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

.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.burger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--midnight) 0%, var(--forest) 100%);
  color: var(--white);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 214, 90, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(46, 93, 74, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 158, 60, 0.05) 0%, transparent 50%);
  animation: solar-mesh 20s ease-in-out infinite alternate;
}

@keyframes solar-mesh {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(10px, -10px) rotate(2deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(45deg, var(--solar-yellow), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  background: var(--solar-yellow);
  color: var(--midnight);
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 214, 90, 0.3);
}

.cta-button:hover {
  background: var(--accent-orange);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 158, 60, 0.4);
}

/* Section Styles */
.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  text-align: center;
  color: var(--dark-gray);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 3rem;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(167, 176, 189, 0.1);
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--midnight);
}

.card-content {
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
}

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

.badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-eco {
  background: rgba(46, 93, 74, 0.1);
  color: var(--forest);
}

.badge-diy {
  background: rgba(255, 158, 60, 0.1);
  color: var(--accent-orange);
}

.badge-safety {
  background: rgba(167, 176, 189, 0.1);
  color: var(--soft-gray);
}

/* Stats Section */
.stats {
  background: var(--light-gray);
  padding: 60px 0;
}

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

.stat-item {
  text-align: center;
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--solar-yellow);
  display: block;
}

.stat-label {
  font-size: 1rem;
  color: var(--midnight);
  margin-top: 0.5rem;
}

/* Advantages Grid */
.advantages {
  background: var(--white);
}

.advantage-item {
  text-align: center;
  padding: 2rem 1.5rem;
}

.advantage-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: var(--light-gray);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.advantage-icon svg {
  width: 30px;
  height: 30px;
  fill: var(--forest);
}

.advantage-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--midnight);
}

/* Category Header */
.category-header {
  background: linear-gradient(135deg, var(--solar-yellow) 0%, var(--accent-orange) 100%);
  color: var(--midnight);
  padding: 120px 0 80px;
  text-align: center;
}

.category-header h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.category-description {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* Article Grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Newsletter Section */
.newsletter {
  background: var(--midnight);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}

.newsletter h2 {
  margin-bottom: 1rem;
}

.newsletter p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
}

.newsletter-submit {
  background: var(--solar-yellow);
  color: var(--midnight);
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-submit:hover {
  background: var(--accent-orange);
}

/* Reviews */
.reviews {
  background: var(--light-gray);
}

.review-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.review-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--dark-gray);
}

.review-author {
  font-weight: 600;
  color: var(--midnight);
}

.review-location {
  color: var(--soft-gray);
  font-size: 0.9rem;
}

.rating {
  color: var(--solar-yellow);
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: var(--midnight);
  color: var(--white);
  padding: 60px 0 30px;
}

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

.footer-section h3 {
  color: var(--solar-yellow);
  margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-section a:hover {
  color: var(--solar-yellow);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

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

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--solar-yellow);
  color: var(--midnight);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top:hover {
  background: var(--accent-orange);
  transform: translateY(-2px);
}

.back-to-top.visible {
  display: flex;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--midnight);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .burger {
    display: flex;
  }

  .burger.active span:nth-child(2) {
    opacity: 0;
  }

  .burger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .burger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.8rem; }

  .hero h1 {
    font-size: 2.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 100px 0 60px;
  }

  .section {
    padding: 60px 0;
  }

  .card {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* Filter Chips */
.filter-chips {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  background: var(--light-gray);
  color: var(--midnight);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--solar-yellow);
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

/* Success Message */
.success-message {
  background: var(--forest);
  color: var(--white);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 1rem;
  display: none;
}

.success-message.visible {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}