/**
 * Site-Specific Custom Styles (Layer 5)
 * =====================================
 *
 * Layout: grid-cards
 *
 * This is the 5th and final layer in the CSS cascade:
 *
 * 1. main.css           → Platform base (header, footer, buttons)
 * 2. base-structure.css → Page layout (grids, sections, cards)
 * 3. tokens.css         → Design tokens (colors, spacing, typography)
 * 4. skin.css           → Theme skin (gradients, shadows, effects)
 * 5. site.css           → Site-specific customization (THIS FILE) ⭐
 *
 * PURPOSE:
 * --------
 * Use this file for content-type-specific styles that can't be handled
 * by the generic 4-layer system above.
 *
 * EXAMPLES:
 * ---------
 * - Sudoku grids:      .sudoku-grid { display: grid; grid-template-columns: ... }
 * - Arithmetic layout: .problems-grid { ... }
 * - Bingo cards:       .bingo-card { ... }
 * - Word search:       .word-grid { ... }
 * - Maze paths:        .maze-canvas { ... }
 *
 * GUIDELINES:
 * -----------
 * ✅ DO:
 *    - Add content-specific layouts (grids, special structures)
 *    - Override generic styles for your site's unique needs
 *    - Keep it focused on THIS site's content type
 *
 * ❌ DON'T:
 *    - Add generic styles (those belong in base-structure.css)
 *    - Redefine design tokens (use tokens.css)
 *    - Copy/paste from other sites (each site is unique)
 *
 * WORKFLOW:
 * ---------
 * 1. Clone new site from this template
 * 2. Identify your site's unique content structures
 * 3. Add only those specific styles here
 * 4. Test and refine
 *
 * This file starts empty — fill it based on your site's content type!
 */

/* ==========================================================
   LAYOUT: Grid-Cards — Uniform Product/Catalog
   ==========================================================
   Visual: All cards same size, neat grid like an e-commerce
   product listing. Square aspect-ratio, centered content,
   strong visual hierarchy through icons and hover effects.
   ========================================================== */

/* ── Homepage: Hero Section — Centered, Clean ── */
.hero {
  padding: 5rem 2rem 4.5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

/* ── Homepage: Categories — Uniform Square Cards ── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.category-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  transition: transform var(--dur-normal, 250ms) ease;
}

.category-card:hover .category-icon {
  transform: scale(1.2);
}

.category-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.category-card p {
  font-size: 0.85rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--site-border, #e5e7eb);
  width: 100%;
  justify-content: center;
}

/* ── Homepage: Intro Section ── */
.intro-section {
  border-radius: 16px;
  text-align: center;
}

/* ── List Page: Subcategories — 3-Column Even Grid ── */
.category-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  list-style: none;
  padding: 0;
}

.category-list li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1.25rem;
  border: 1.5px solid var(--site-border, #e5e7eb);
  border-radius: 12px;
  text-decoration: none;
  transition: all var(--dur-normal, 250ms) ease;
  min-height: 120px;
  justify-content: center;
}

.category-list li a:hover {
  border-color: var(--site-primary, #3b82f6);
  box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0,0,0,0.1));
  transform: translateY(-3px);
}

.category-list li a .name {
  font-weight: 700;
  font-size: 1rem;
}

.category-list li a .description {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 0.375rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── List Page: Worksheets — Button Grid ── */
.worksheet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
}

.worksheet-list li a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--site-border, #e5e7eb);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--dur-fast, 150ms) ease;
}

.worksheet-list li a:hover {
  border-color: var(--site-primary, #3b82f6);
  background: var(--site-primary-light, #eff6ff);
}

/* ── SEO Components — Large 3-Column Cards ── */
.seo-components--primary {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.seo-card {
  padding: 2rem 1.75rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

.seo-card p:last-child {
  margin-top: auto;
}

.seo-more-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .seo-components--primary {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .category-card {
    aspect-ratio: auto;
    padding: 1.5rem 1.25rem;
  }
  .seo-components--primary {
    grid-template-columns: 1fr;
  }
  .category-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   YOUR SITE-SPECIFIC STYLES GO BELOW
   ============================================ */
