/* ==========================================================
   LAYOUT VARIANT: grid-cards
   Source: design-system/layouts/grid-cards/site-layout.css
   ========================================================== */

/* ==========================================================
   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;
  }
}


/**
 * Site-Specific Custom Styles (Layer 5)
 * =====================================
 *
 * 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)
 *
 * THIS FILE HAS TWO SECTIONS:
 * ────────────────────────────────────────────────────────────
 *
 * Section A:  LAYOUT VARIANT CSS
 *   Loaded from design-system/layouts/<layout>/site-layout.css
 *   during cloning (Phase 5). Defines homepage grid, category page,
 *   and SEO component structures unique to each layout type.
 *
 *   Available layouts:
 *   - grid-cards   : Equal-height square product cards (default)
 *   - magazine     : Editorial 3-col with featured cards
 *   - masonry      : Pinterest-style CSS columns
 *   - list-rows    : Full-width horizontal rows
 *   - sidebar-nav  : 2-column split with sticky sidebar
 *
 *   The layout is set in site-profile.json → design.layout
 *   and auto-applied by generate-design-tokens.py during cloning.
 *
 * Section B:  CONTENT-TYPE-SPECIFIC STYLES
 *   Manually added per site for puzzle/content rendering.
 *   Examples: sudoku grids, arithmetic layouts, bingo cards.
 *
 * GUIDELINES:
 * -----------
 * DO:
 *    - Keep layout CSS in Section A (auto-generated)
 *    - Add content-specific layouts in Section B
 *    - Override generic styles for your site's unique needs
 *
 * DON'T:
 *    - Redefine design tokens (use tokens.css)
 *    - Copy/paste from other sites (each site is unique)
 *    - Modify Section A manually (re-run pipeline instead)
 */

/* ==========================================================
   Section A: LAYOUT VARIANT CSS
   ==========================================================
   AUTO-GENERATED — Do not edit manually.
   Layout: [will be set during cloning based on site-profile.json]
   Source: design-system/layouts/<layout>/site-layout.css
   ========================================================== */

/* Layout CSS will be injected here by generate-design-tokens.py */


/* ==========================================================
   Section B: CONTENT-TYPE-SPECIFIC STYLES
   ==========================================================
   Add your site's unique content styles below.
   Examples: sudoku grids, math layouts, word search, etc.
   ========================================================== */

