/* =========================================
   Custom Post Cards – Dark Asymmetric Grid
   ========================================= */

/* Grid Layout
   6-column grid:
   Card 1 (large): cols 1–4, row 1
   Card 2 (small): cols 5–6, row 1
   Card 3:         cols 1–3, row 2
   Card 4:         cols 4–6, row 2
*/

.cpc-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}

/* ── Card Placement ── */
.cpc-card--1 { grid-column: 1 / 5; grid-row: 1; }
.cpc-card--2 { grid-column: 5 / 7; grid-row: 1; }
.cpc-card--3 { grid-column: 1 / 4; grid-row: 2; }
.cpc-card--4 { grid-column: 4 / 7; grid-row: 2; }

/* ── Base Card ── */
.cpc-card {
  background: #0f1a2e;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cpc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ── Image Area ── */
.cpc-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a3a6e 0%, #0d2249 60%, #0a1628 100%);
}

/* Subtle grid texture on image background */
.cpc-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: 1;
  pointer-events: none;
}

/* Image height per card size */
.cpc-card--1 .cpc-image { height: 220px; }
.cpc-card--2 .cpc-image { height: 160px; }
.cpc-card--3 .cpc-image,
.cpc-card--4 .cpc-image { height: 160px; }

.cpc-image img,
.cpc-no-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.7;
  mix-blend-mode: luminosity;
  transition: transform 0.4s ease;
}

.cpc-card:hover .cpc-image img {
  transform: scale(1.06);
}

/* ── Category Badge ── */
.cpc-badge {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 2;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(10, 22, 40, 0.75);
  color: #e2e8f0;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
}

/* Category-specific badge colors */
.cpc-badge.trainingslager { border-color: #3b82f6; color: #93c5fd; }
.cpc-badge.ausruestung    { border-color: #06b6d4; color: #67e8f9; }
.cpc-badge.turnier        { border-color: #6366f1; color: #a5b4fc; }
.cpc-badge.infrastruktur  { border-color: #10b981; color: #6ee7b7; }
.cpc-badge.jugend         { border-color: #f59e0b; color: #fcd34d; }
.cpc-badge.news           { border-color: #ec4899; color: #f9a8d4; }
.cpc-badge.event          { border-color: #8b5cf6; color: #c4b5fd; }

/* ── Content Area ── */
.cpc-content {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
}

.cpc-body {
  flex: 1;
}

.cpc-title {
  margin: 0 0 8px;
  font-size: 18px;
  
  line-height: 1.3;
}

.cpc-card--1 .cpc-title {
  font-size: 22px;
 font-family: "Inter", Sans-serif !important;
    
   
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    line-height: 1.1;
}

.cpc-title a {
  color: #f1f5f9;
  text-decoration: none !important;
  transition: color 0.2s;
 font-family: "Inter", Sans-serif !important;
    font-size: 22px;
    
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    line-height: 1.1;
}

.cpc-title a:hover {
  color: #60a5fa;
}

.cpc-excerpt {
  color: #94a3b8;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

/* ── Divider ── */
.cpc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 -22px;
  align-self: stretch;
}

/* ── Meta Row ── */
.cpc-meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.cpc-funding {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cpc-price {
  font-size: 22px;
  font-weight: 800;
  color: #3b82f6;
  letter-spacing: -0.02em;
  line-height: 1;
}

.cpc-funding-label {
  font-size: 11px;
  color: #64748b;
  text-transform: none;
}

.cpc-date {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

/* ── Responsive ── */

/* Tablet landscape: keep asymmetric top row, stack bottom equally */
@media (max-width: 1100px) {
  .cpc-grid {
    grid-template-columns: 3fr 2fr;
    grid-template-rows: auto auto;
  }

  .cpc-card--1 { grid-column: 1 / 2; grid-row: 1; }
  .cpc-card--2 { grid-column: 2 / 3; grid-row: 1; }
  .cpc-card--3 { grid-column: 1 / 2; grid-row: 2; }
  .cpc-card--4 { grid-column: 2 / 3; grid-row: 2; }

  .cpc-card--1 .cpc-image { height: 190px; }
  .cpc-card--2 .cpc-image,
  .cpc-card--3 .cpc-image,
  .cpc-card--4 .cpc-image { height: 150px; }

  .cpc-card--1 .cpc-title { font-size: 19px; }
}

/* Tablet portrait: 2 equal columns, all cards same weight */
@media (max-width: 768px) {
  .cpc-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: 14px;
  }

  .cpc-card--1,
  .cpc-card--2,
  .cpc-card--3,
  .cpc-card--4 {
    grid-column: auto;
    grid-row: auto;
  }

  .cpc-card--1 .cpc-image,
  .cpc-card--2 .cpc-image,
  .cpc-card--3 .cpc-image,
  .cpc-card--4 .cpc-image { height: 170px; }

  .cpc-card--1 .cpc-title { font-size: 18px; }

  .cpc-content { padding: 16px 18px 14px; gap: 12px; }
  .cpc-divider { margin: 0 -18px; }
}

/* Mobile: single column, full width */
@media (max-width: 480px) {
  .cpc-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cpc-card--1 .cpc-image,
  .cpc-card--2 .cpc-image,
  .cpc-card--3 .cpc-image,
  .cpc-card--4 .cpc-image { height: 200px; }

  .cpc-card--1 .cpc-title,
  .cpc-title { font-size: 24px; }

  .cpc-excerpt { font-size: 13px; }

  .cpc-price { font-size: 20px; }

  .cpc-content { padding: 14px 16px 13px; gap: 10px; }
  .cpc-divider { margin: 0 -16px; }

  /* Disable hover lift on touch devices */
  .cpc-card:hover {
    transform: none;
    box-shadow: none;
  }
}