/* Home page styles */

.home-hero {
  display: grid;
  gap: 18px;
  padding: 28px;
  background: linear-gradient(180deg, var(--hero-start), var(--hero-end));
  border: 1px solid var(--border);
  border-radius: 18px;
}
.home-hero h1 { margin: 0; font-size: 32px; }
.home-hero p { margin: 0; color: var(--muted); }

@media (max-width: 768px) {
  .home-hero {
    padding: 20px;
    gap: 12px;
  }
  .home-hero h1 { font-size: 24px; }
  .home-hero p { font-size: 14px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .home-hero {
    padding: 24px;
  }
  .home-hero h1 { font-size: 28px; }
}


.section {
  margin-top: 24px;
}
.section h2 { margin: 0 0 12px; font-size: 20px; }

/* Visual separation for categories section */
.section--categories { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.section--categories + .section { margin-top: 28px; }
.section--categories .section-head { display: grid; gap: 6px; margin-bottom: 12px; }
.section--categories .section-sub { margin: 0; color: var(--muted); font-size: 13px; }

/* Popular areas subtle panel */
.section--popular { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.section--popular .section-head { display: grid; gap: 6px; margin-bottom: 12px; }
.section--popular .section-sub { margin: 0; color: var(--muted); font-size: 13px; }
.section--popular .area-grid { padding-top: 6px; border-top: 1px dashed var(--border); }
/* Hide second slider by default (no title) - will be shown via JS if > 8 items */
.section--popular .card-slider:not(:has(.card-slider__title)) { display: none; }

/* How it works subtle panel */
.section--hiw { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.section--hiw .section-head { display: grid; gap: 6px; margin-bottom: 12px; }
.section--hiw .section-sub { margin: 0; color: var(--muted); font-size: 13px; }

/* Areas */
.area-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.area-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: border-color .16s ease, transform .12s ease;
}
.area-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.area-title { font-weight: 600; margin: 0 0 6px; }
.area-sub { color: var(--muted); font-size: 14px; }

/* Large area card with image */
.area-card--lg { position: relative; padding: 0; overflow: visible; display: block; }
.area-card--lg .area-card__image { height: 160px; background-size: cover; background-position: center; overflow: hidden; border-radius: 14px 14px 0 0; }
.area-card--lg .area-card__content { padding: 14px; }

/* Compact image card (for categories) */
.area-card--sm { position: relative; padding: 0; overflow: visible; display: block; }
.area-card--sm .area-card__image { height: 120px; background-size: cover; background-position: center; position: relative; overflow: hidden; border-radius: 14px 14px 0 0; }
.area-card--sm .area-card__image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--image-overlay-weak), rgba(0,0,0,0)); pointer-events: none; }
.area-card--sm .area-card__content { padding: 12px; }
.area-badge { position: absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 999px; background: var(--overlay-bg); border: 1px solid var(--border); font-size: 12px; color: var(--text-on-overlay); backdrop-filter: blur(4px); z-index: 5; }
.area-card--sm { box-shadow: 0 1px 0 var(--shadow-subtle); }
.area-card--sm:hover { box-shadow: 0 2px 10px var(--shadow-hover); }

/* Grid for categories: 4 in a row */
.category-area-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
/* Subtle top divider to separate from header */
.section--categories .category-area-grid { padding-top: 6px; border-top: 1px dashed var(--border); }

/* Mobile: < 768px */
@media (max-width: 767px) {
  .home-hero {
    padding: 16px;
    border-radius: 12px;
  }
  
  .section {
    margin-top: 20px;
  }
  
  .section--categories,
  .section--popular,
  .section--hiw {
    padding: 12px;
    border-radius: 12px;
  }
  
  .area-grid { 
    grid-template-columns: 1fr; 
    gap: 12px;
  }
  
  .category-area-grid { 
    grid-template-columns: 1fr; 
    gap: 12px;
  }
  
  .area-card {
    padding: 12px;
  }
  
  .area-card--lg .area-card__image {
    height: 140px;
  }
  
  .area-card--sm .area-card__image {
    height: 100px;
  }
  
  .hiw-card, 
  .hiw-card--reverse { 
    grid-template-columns: 1fr; 
    grid-template-areas: "image" "content"; 
  }
  
  .hiw-image { 
    height: 180px; 
  }
  
  .hiw-content {
    padding: 12px;
  }
}

/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .area-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  
  .category-area-grid { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 14px;
  }
  
  .hiw-card,
  .hiw-card--reverse {
    gap: 16px;
  }
  
  .hiw-image {
    height: 220px;
  }
}

/* Categories */
.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.category-chip {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
}
.category-chip:hover { border-color: var(--accent); }

/* How it works */
.how-steps { display: grid; gap: 18px; }
.hiw-card { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-areas: "image content"; gap: 18px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.hiw-card--reverse { grid-template-columns: 1fr 1.3fr; grid-template-areas: "content image"; }
.hiw-image { grid-area: image; width: 100%; height: 260px; background-size: cover; background-position: center; }
.hiw-content { grid-area: content; padding: 16px; display: grid; gap: 8px; }
.hiw-num { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-weak, var(--muted-bg)); display: inline-grid; place-items: center; font-weight: 700; }
.hiw-title { font-weight: 700; font-size: 18px; }
.hiw-sub { color: var(--muted); }

@media (max-width: 960px) {
  .hiw-card, .hiw-card--reverse { grid-template-columns: 1fr; grid-template-areas: "image" "content"; }
  .hiw-image { height: 200px; }
}



