/* =========================================================
   KC FACE PAINTING — RESPONSIVE FESTIVAL DIRECTORY
   ========================================================= */

:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #222222;
  --muted: #555555;
  --accent: #008f57;
  --line: #d5d5d5;
}

* { box-sizing: border-box; }

html {
  width: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Montserrat, Arial, sans-serif;
  line-height: 1.45;
}

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

/* Main page width: percentage of browser, centered */
.site-wrap {
  width: 86%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Header / instructions / pricing */
.top-images {
  width: 100%;
  padding: 12px 0 6px;
}

.top-images img {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto 12px;
}

/* Directory */
.directory-title {
  margin: 20px 0 8px;
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
}

.directory-note {
  margin: 0 0 22px;
  text-align: center;
  color: var(--muted);
}

.category-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 30px;
}

.category-card {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}

.category-card:hover,
.category-card:focus-visible {
  border-color: var(--accent);
}

.category-card:active {
  transform: scale(.985);
}

/* Show the complete thumbnail instead of cropping it */
.category-card img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
}

.category-card h2 {
  margin: 0;
  padding: 9px 6px 11px;
  text-align: center;
  font-size: clamp(.78rem, 1.25vw, 1rem);
}

/* Individual catalog pages */
.page-header {
  padding: 14px 0 8px;
  text-align: center;
}

.page-header a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.page-header h1 {
  margin: 12px 0;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
}

/* Full catalog sheet always fits browser/container */
.catalog-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto 24px;
}

.back-wrap {
  text-align: center;
}

.back-button {
  display: inline-block;
  margin: 4px 0 20px;
  padding: 10px 16px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

footer {
  width: 100%;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  padding: 18px 12px 28px;
  font-size: .85rem;
}

/* Tablet */
@media (max-width: 900px) {
  .site-wrap {
    width: 92%;
    max-width: none;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Phone */
@media (max-width: 600px) {
  .site-wrap {
    width: 96%;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .category-card h2 {
    font-size: .78rem;
    padding: 8px 4px 9px;
  }

  .directory-title {
    font-size: 1.35rem;
  }

  .directory-note {
    font-size: .9rem;
  }
}
