/* ============================================================
   Circus Extreme — Non-block templates
   ------------------------------------------------------------
   Blog single and archive, location single and archive, 404 and
   search. These are PHP templates rather than editor blocks, so
   their styles live here rather than in a block folder.

   Flattened from the relevant parts of app.scss and the Cirloxo
   template, with the Bootstrap grid replaced by CSS Grid.
   ============================================================ */

/* ── Shared page intro ───────────────────────────────────── */

.ce-page-intro {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-lg);
}

.ce-page-intro__title {
  max-width: 24ch;
}

.ce-page-intro__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-sm);
  font-size: .95rem;
  opacity: .85;
}

.ce-page-intro__meta span {
  display: inline-flex;
  align-items: center;
  gap: .4em;
}

.ce-page-intro__meta svg {
  color: var(--circus-yellow);
}

/* ── Article + sidebar ───────────────────────────────────── */

.ce-article-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 991px) {
  .ce-article-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.ce-article__thumb {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.ce-article__thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ── Sidebar widgets ─────────────────────────────────────── */

.ce-widget {
  padding: var(--space-md);
  border: 1px solid var(--border-white-color);
  border-radius: 20px;
  background: var(--circus-card-bg);
}

.ce-widget + .ce-widget {
  margin-top: var(--space-md);
}

.ce-widget__title {
  position: relative;
  font-family: var(--heading-font);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--circus-yellow);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
}

.ce-widget__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 2px;
  background: var(--circus-yellow);
}

.ce-recent {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.ce-recent + .ce-recent {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-white-color);
}

.ce-recent__img {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
}

.ce-recent__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ce-recent__title {
  font-family: var(--heading-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.ce-recent__title a:hover,
.ce-recent__title a:focus-visible {
  color: var(--circus-yellow);
}

.ce-recent__date {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  margin-top: 4px;
  font-size: .8rem;
  opacity: .75;
}

/* ── Card grids (blog archive, locations) ────────────────── */

.ce-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 991px) {
  .ce-cards { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
}

@media (max-width: 575px) {
  .ce-cards { grid-template-columns: 1fr; }
}

.ce-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-white-color);
  border-radius: 20px;
  background: var(--circus-card-bg);
  transition: border-color .3s ease, transform .3s ease;
}

.ce-post-card:hover,
.ce-post-card:focus-within {
  border-color: var(--circus-yellow);
  transform: translateY(-4px);
}

.ce-post-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255, 255, 255, .05);
}

.ce-post-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.ce-post-card:hover .ce-post-card__img img {
  transform: scale(1.05);
}

.ce-post-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1 1 auto;
  padding: var(--space-md);
}

.ce-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: .8rem;
  opacity: .75;
}

.ce-post-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: .35em;
}

.ce-post-card__title {
  font-family: var(--heading-font);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--circus-yellow);
}

.ce-post-card__excerpt {
  font-size: .95rem;
  line-height: 1.55;
  opacity: .9;
}

.ce-post-card__more {
  margin-top: auto;
  padding-top: var(--space-sm);
  font-weight: 600;
  font-size: .9rem;
  color: var(--circus-yellow);
}

/* A card that is not itself a link (cabaret's locations) should not
   invite a click by lifting on hover. */
.ce-post-card--static:hover {
  transform: none;
  border-color: var(--border-white-color);
}

@media (prefers-reduced-motion: reduce) {
  .ce-post-card,
  .ce-post-card__img img {
    transition: none;
  }

  .ce-post-card:hover {
    transform: none;
  }

  .ce-post-card:hover .ce-post-card__img img {
    transform: none;
  }
}

/* ── Pagination ──────────────────────────────────────────── */

.ce-pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
}

.ce-pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-white-color);
  border-radius: 50px;
  color: var(--color-white);
  font-weight: 600;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.ce-pagination .page-numbers:hover,
.ce-pagination .page-numbers:focus-visible,
.ce-pagination .page-numbers.current {
  background: var(--circus-yellow);
  border-color: var(--circus-yellow);
  color: var(--circus-purple);
}

/* ── 404 / empty states ──────────────────────────────────── */

.ce-empty {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-xl);
}

.ce-empty p {
  margin-block: var(--space-md);
  font-size: 1.05rem;
  opacity: .9;
}

/* ── Location single ─────────────────────────────────────── */

.ce-location__dates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-block: var(--space-lg);
}

.ce-location__month {
  padding: var(--space-md);
  border: 1px solid var(--border-white-color);
  border-radius: 16px;
  background: var(--circus-card-bg);
}

.ce-location__month h3 {
  font-family: var(--heading-font);
  font-size: 1.05rem;
  color: var(--circus-yellow);
  margin-bottom: var(--space-xs);
}

.ce-location__month ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: .95rem;
}

.ce-location__map {
  margin-block: var(--space-lg);
  border-radius: 20px;
  overflow: hidden;
}

.ce-location__map iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

@media (max-width: 767px) {
  .ce-location__map iframe {
    height: 300px;
  }
}
