/* ========================================
   CSS Variables & Reset
   ======================================== */
:root {
  --color-primary: #2d7a4f;
  --color-primary-dark: #1e5c3a;
  --color-primary-light: #e8f5ee;
  --color-accent: #e8772e;
  --color-accent-dark: #c9621b;
  --color-accent-light: #fff3eb;
  --color-text: #2c3e50;
  --color-text-light: #64748b;
  --color-bg: #ffffff;
  --color-bg-alt: #f8faf9;
  --color-border: #e2e8f0;
  --color-white: #ffffff;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

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

.container-narrow {
  max-width: 800px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  gap: 8px;
}

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

.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

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

.btn-sm {
  padding: 8px 20px;
  font-size: 0.875rem;
}

/* ========================================
   Header
   ======================================== */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  display: block;
  padding: 8px 16px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.main-nav a:hover {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.has-dropdown {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  padding: 8px 0;
  z-index: 50;
}

.has-dropdown:hover .dropdown {
  display: block;
}

.dropdown a {
  padding: 10px 20px;
  border-radius: 0;
}

/* Mobile menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent-light) 100%);
  padding: 80px 0;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--color-text);
}

.hero p {
  font-size: 1.2rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========================================
   Page Hero (sub-pages)
   ======================================== */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-accent-light) 100%);
  padding: 50px 0;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

.page-hero .post-date {
  display: inline-block;
  margin-bottom: 12px;
}

/* ========================================
   Features Section
   ======================================== */
.features {
  padding: 70px 0;
  background: var(--color-white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  text-align: center;
  padding: 30px 20px;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--color-text);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

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

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-text-light);
}

.section-cta {
  text-align: center;
  margin-top: 40px;
}

.section-cta p {
  margin-bottom: 12px;
  color: var(--color-text-light);
}

/* ========================================
   Categories Grid
   ======================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.category-card {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--color-text);
}

.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-text);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.category-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.category-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.category-card-large {
  padding: 40px 30px;
}

.category-card-large .read-more {
  display: inline-block;
  margin-top: 12px;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ========================================
   Posts Grid
   ======================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--color-text);
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-text);
}

.post-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .post-card-img img {
  transform: scale(1.05);
}

.post-card-body {
  padding: 20px;
}

.post-date {
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card-body h3 {
  font-size: 1.1rem;
  margin: 8px 0;
  line-height: 1.4;
}

.post-card-body p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ========================================
   Products Grid
   ======================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

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

.product-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

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

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-card-body {
  padding: 20px;
}

.product-card-body h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.product-description {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
  line-height: 1.5;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.stars {
  color: #f59e0b;
  font-size: 0.95rem;
}

.rating-value {
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 14px;
}

/* ========================================
   Article
   ======================================== */
.article {
  padding: 50px 0;
}

.article-hero-img {
  border-radius: var(--radius-lg);
  margin-bottom: 30px;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.article h2 {
  font-size: 1.6rem;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--color-text);
}

.article h3 {
  font-size: 1.2rem;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--color-text);
}

.article p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.article ul, .article ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.article ul {
  list-style: disc;
}

.article ol {
  list-style: decimal;
}

.article li {
  margin-bottom: 6px;
  line-height: 1.6;
}

.article a {
  color: var(--color-accent);
  font-weight: 500;
}

.article a:hover {
  text-decoration: underline;
}

.article-cta {
  margin-top: 40px;
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
}

.article-cta h3 {
  margin-top: 0;
  color: var(--color-primary-dark);
}

.article-cta p {
  color: var(--color-text-light);
}

/* ========================================
   Rankings
   ======================================== */
.ranking-info {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.ranking-info p {
  margin: 0;
  font-size: 0.95rem;
}

.ranking-list {
  margin-top: 30px;
}

.ranking-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  margin-bottom: 20px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: box-shadow var(--transition);
}

.ranking-item:hover {
  box-shadow: var(--shadow-sm);
}

.ranking-position {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.ranking-item:first-child .ranking-position {
  background: var(--color-accent);
}

.ranking-content h2 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 6px;
}

.ranking-rating {
  color: #f59e0b;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.ranking-content p {
  font-size: 0.95rem;
}

.ranking-content ul {
  list-style: none;
  padding-left: 0;
  margin: 12px 0;
}

.ranking-content li {
  font-size: 0.9rem;
  padding: 2px 0;
}

.ranking-price {
  font-weight: 700;
  color: var(--color-primary);
}

/* ========================================
   Newsletter Section
   ======================================== */
.newsletter-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 60px 0;
  color: var(--color-white);
}

.newsletter-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.newsletter-text {
  flex: 1;
}

.newsletter-text h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.newsletter-text p {
  opacity: 0.9;
  font-size: 1rem;
}

.newsletter-form {
  flex: 1;
}

.form-group {
  display: flex;
  gap: 10px;
}

.form-group input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-family);
  outline: none;
}

.form-group .btn {
  white-space: nowrap;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.form-group .btn:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
}

.newsletter-disclaimer {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 10px;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-about .logo {
  margin-bottom: 12px;
}

.footer-about .logo-text {
  color: var(--color-white);
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-links h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 14px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 6px;
}

.affiliate-disclosure {
  font-size: 0.8rem;
  font-style: italic;
}

/* ========================================
   Cookie Consent
   ======================================== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  padding: 20px;
}

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.cookie-text {
  flex: 1;
}

.cookie-text p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--color-text-light);
  line-height: 1.5;
}

.cookie-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ========================================
   Legal Page
   ======================================== */
.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 32px;
}

.legal-page h3 {
  font-size: 1.1rem;
}

.legal-page p,
.legal-page li {
  font-size: 0.95rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 992px) {
  .features-grid,
  .categories-grid,
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-about {
    grid-column: 1 / -1;
  }

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

  .newsletter-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 16px;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    display: none;
  }

  .has-dropdown:hover .dropdown,
  .has-dropdown.active .dropdown {
    display: block;
  }

  .hero {
    padding: 50px 0;
  }

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

  .hero p {
    font-size: 1.05rem;
  }

  .features-grid,
  .categories-grid,
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 50px 0;
  }

  .page-hero {
    padding: 35px 0;
  }

  .page-hero h1 {
    font-size: 1.7rem;
  }

  .ranking-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-consent-inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }

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

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

  .footer-about {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .cookie-buttons {
    flex-direction: column;
  }

  .cookie-buttons .btn {
    width: 100%;
  }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
