/*
Theme Name:     Neve Child
Theme URI:      https://www.typecalendar.com
Description:    TypeCalendar custom child theme for Neve. Hosts all customizations so the parent theme can be safely updated.
Author:         TypeCalendar
Author URI:     https://www.typecalendar.com
Template:       neve
Version:        1.0.0
License:        GNU General Public License v2 or later
License URI:    http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    neve-child
*/

/* Category Grid — modern minimal system */
.neve-category-grid-wrap {
  --tc-grid-gap: clamp(14px, 2vw, 24px);
  --tc-card-radius: 18px;
  --tc-card-border: #e2e8f0;
  --tc-card-border-hover: #cbd5e1;
  --tc-card-bg: #ffffff;
  --tc-card-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 24px rgba(15, 23, 42, 0.08);
  --tc-card-shadow-hover: 0 3px 8px rgba(15, 23, 42, 0.08), 0 20px 42px rgba(15, 23, 42, 0.14);
  --tc-text-main: #0f172a;
  --tc-text-muted: #64748b;
  --tc-accent: #0f766e;
  --tc-chip-bg: #f8fafc;
  --tc-chip-border: #dbe5f0;
  --tc-chip-text: #155e75;
  margin: clamp(22px, 3vw, 38px) 0;
}

.neve-category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--tc-grid-gap);
}

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

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

.neve-category-grid.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.neve-category-card {
  display: flex;
  flex-direction: column;
  background: var(--tc-card-bg);
  border: 1px solid var(--tc-card-border);
  border-radius: var(--tc-card-radius);
  box-shadow: var(--tc-card-shadow);
  overflow: hidden;
  min-height: 100%;
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease, border-color 220ms ease;
}

.neve-category-card:hover {
  transform: translateY(-4px);
  border-color: var(--tc-card-border-hover);
  box-shadow: var(--tc-card-shadow-hover);
}

.neve-category-link {
  color: inherit;
  text-decoration: none;
}

.neve-category-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
}

.neve-category-image,
.neve-category-icon {
  width: 100%;
  height: 100%;
}

.neve-category-image {
  object-fit: cover;
  transform: scale(1);
  transition: transform 320ms ease;
}

.neve-category-card:hover .neve-category-image {
  transform: scale(1.04);
}

.neve-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.neve-category-icon svg {
  width: 78px;
  height: 78px;
  opacity: 0.92;
}

.neve-category-content {
  padding: 14px 16px 4px;
}

.neve-category-title {
  margin: 0;
  color: var(--tc-text-main);
  font-size: clamp(1.02rem, 0.92rem + 0.38vw, 1.22rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.neve-category-card:hover .neve-category-title {
  color: var(--tc-accent);
}

.neve-category-count {
  display: inline-block;
  margin-top: 8px;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.neve-category-desc {
  margin: 9px 0 0;
  color: var(--tc-text-muted);
  font-size: 0.93rem;
  line-height: 1.58;
}

.neve-subcategory-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 0;
  padding: 0 16px 18px;
  list-style: none;
}

.neve-subcategory-list li {
  margin: 0;
}

.neve-subcategory-list a,
.neve-subcategory-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 6px 11px;
  border: 1px solid var(--tc-chip-border);
  border-radius: 999px;
  background: var(--tc-chip-bg);
  color: var(--tc-chip-text);
  font-size: 0.81rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 130ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.neve-subcategory-list a:hover,
.neve-subcategory-list a:focus-visible {
  transform: translateY(-1px);
  background: #ecfeff;
  border-color: #99f6e4;
  color: #115e59;
}

.neve-subcategory-more {
  color: #475569;
}

.neve-category-footer {
  margin-top: auto;
  padding: 0 16px 16px;
}

.neve-category-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: #ffffff;
  color: #0f766e;
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 130ms ease, border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.neve-category-cta::after {
  content: "→";
  font-weight: 700;
}

.neve-category-cta:hover,
.neve-category-cta:focus-visible {
  transform: translateY(-1px);
  border-color: #5eead4;
  background: #f0fdfa;
  color: #115e59;
}

.neve-category-link:focus-visible,
.neve-subcategory-list a:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

/* Category archive header links */
.category-title {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem);
  line-height: 1.2;
}

.category-subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.subcategory-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #dbe5f0;
  background: #f8fafc;
  color: #155e75;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.subcategory-link:hover,
.subcategory-link:focus-visible {
  background: #ecfeff;
  border-color: #99f6e4;
  color: #115e59;
}

@media (max-width: 1279px) {
  .neve-category-grid.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .neve-category-grid.columns-3,
  .neve-category-grid.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .neve-category-grid.columns-2,
  .neve-category-grid.columns-3,
  .neve-category-grid.columns-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .neve-category-content {
    padding: 13px 14px 4px;
  }

  .neve-subcategory-list {
    padding: 0 14px 16px;
  }
}
