/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  /* Abstand zwischen Bild und Text */
}

.wp-social-link a {
  font-weight: 600;
  font-family: var(--gp-font--barlow-semi-condensed);
}

.wp-block-social-link {
  border-radius: 5px;
}

p a {
  text-decoration: underline;
}

p.main-title a {
  text-decoration: none;
}

.site-footer a {
  color: var(--base);
  white-space: nowrap;
}

/* ===============================
   EVENT GRID (ARCHIVE)
   =============================== */
.no-events-found {
  color: var(--base-3);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.site-content {
  background-color: var(--contrast);
  color: var(--base);
}

.event-card {
  background: var(--base-3);
  color: var(--contrast);
  border: 1px solid #111;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform-origin: center center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.event-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.event-link {
  display: block;
  text-decoration: none;
  padding-bottom: 1rem;
}

.event-card img {
  width: 100%;
  aspect-ratio: 1132 / 1600;
  object-fit: cover;
  background-color: #111;
  display: block;
  border-bottom: 1px solid #eee;
}

.event-card img.flyer-cover {
  object-fit: cover;
}

.event-card img.flyer-contain {
  object-fit: contain;
}

.event-title {
  font-weight: bold;
  margin: 1rem;
  color: var(--contrast-2);
}

.event-card .event-title a,
.event-card p a {
  color: var(--contrast-2);
  text-decoration: none;
}

.event-card .event-title a:hover,
.event-card p a:hover {
  color: var(--contrast-3);
}

.event-description h2,
.event-description h3,
.event-description h4 {
  font-weight: bold;
  margin: 0 0 1rem 0;
  color: var(--contrast-2);
}

.event-card p {
  margin: 0 1rem 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
}


/* ===============================
   TICKET-BUTTON
   =============================== */
.event-ticket-button {
  display: block;
  text-align: center;
  background: #c40000;
  color: var(--base-3);
  text-decoration: none;
  padding: 0.6em 1.2em;
  margin: auto 1rem 1rem 1rem;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.2s ease, color 0.2s ease;
  font-family: var(--gp-font--barlow-semi-condensed);
  font-size: 1.2rem;
}

.event-ticket-button:hover {
  background: #900000;
  color: var(--base-3);
}


/* ===============================
   SINGLE-EVENT LAYOUT
   =============================== */
.event-flex-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.event-flyer {
  flex: 0 0 33.34%;
  max-width: 33.34%;
}

.event-flyer img {
  width: 100%;
  height: auto;
  aspect-ratio: 1132 / 1600;
  object-fit: cover;
  border: 1px solid #111;
  background-color: #111;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-flyer img.flyer-cover {
  object-fit: cover;
}

.event-flyer img.flyer-contain {
  object-fit: contain;
}

.event-details {
  flex: 0 0 calc(66.66% - 4rem);
  max-width: calc(66.66% - 4rem);
  background-color: var(--base);
  color: var(--contrast);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #111;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-details .event-ticket-button {
  margin-left: 0;
  margin-right: 0;
}

.event-details .event-title {
  margin-top: 0;
  margin-left: 0;
  font-size: 2em;
}

.event-details p a {
  color: var(--contrast-2);
  text-decoration: none;
}

.event-details p a:hover {
  color: var(--contrast-3);
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 1024px) {
  .event-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .event-card:hover {
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .event-flex-wrapper {
    flex-direction: column;
  }

  .event-flyer,
  .event-details {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .site-logo::after {
    content: 'wrestlingtickets.at';
    font-size: 1.25rem;
    line-height: 1;
    color: var(--base);
    font-weight: 600;
    font-family: var(--gp-font--barlow-semi-condensed);
  }
}

@media (max-width: 600px) {
  .event-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Suchformular Styling --- */
.event-search-row {
  display: flex;
  width: 100%;
  max-width: 100%;
}

.event-search-row .event-search-input {
  border: 1px solid #111;
  border-right: none;
  border-radius: 12px 0 0 12px;
  padding: 0.7rem 1.1rem;
  font-size: 1.1rem;
  background: var(--base);
  transition: box-shadow 0.2s;
  outline: none;
  width: 100%;
  font-family: inherit;
}

.event-search-input:focus {
  box-shadow: 0 4px 12px #111;
}

.event-search-btn {
  border-radius: 0 12px 12px 0 !important;
  margin-left: 0;
  padding: 0.7rem 2.1rem;
  color: var(--base-3);
  background: #c40000;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  font-size: 1.2rem;
}

.event-search-btn:hover,
.event-search-btn:focus {
  background: #900000;
  color: var(--base-3);
  outline: none;
  box-shadow: 0 4px 12px #111;
}

@media (max-width: 600px) {
  .event-search-row {
    flex-direction: column;
    max-width: 100%;
  }

  .event-search-input,
  .event-search-btn {
    border-radius: 12px !important;
    margin: 0 0 0.5rem 0;
    width: 100%;
    box-sizing: border-box;
  }

  .event-search-btn {
    padding: 0.7rem 0;
  }
}

/* ===============================
   VERGANGENE EVENTS (kleiner)
   =============================== */
.event-grid-past {
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.event-card-past {
  font-size: 0.8em;
}

.event-card-past .event-title {
  font-size: 1.2em;
  margin: 0.5rem;
}

.event-card-past p {
  margin: 0 0.5rem 0.5rem;
  font-size: 0.85em;
}

/* Responsive für vergangene Events */
@media (max-width: 1024px) {
  .event-grid-past {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .event-grid-past {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .event-grid-past {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===============================
   ARCHIV-LINK & PAGINATION (Vergangene Events)
   =============================== */
.past-events-more {
  text-align: center;
  margin: 2rem 0 0;
}

.past-events-more a {
  display: inline-block;
  background: #c40000;
  color: var(--base-3);
  text-decoration: none;
  padding: 0.6em 1.5em;
  border-radius: 6px;
  font-weight: bold;
  font-family: var(--gp-font--barlow-semi-condensed);
  font-size: 1.1rem;
  transition: background 0.2s ease;
}

.past-events-more a:hover {
  background: #900000;
  color: var(--base-3);
}

.event-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.event-pagination .page-numbers {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.5rem 0.8rem;
  text-align: center;
  text-decoration: none;
  border: 1px solid #111;
  border-radius: 6px;
  background: var(--base-3);
  color: var(--contrast);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.event-pagination a.page-numbers:hover {
  background: #c40000;
  color: var(--base-3);
}

.event-pagination .page-numbers.current {
  background: #c40000;
  color: var(--base-3);
  border-color: #c40000;
}

.event-pagination .page-numbers.dots {
  border: none;
  background: transparent;
}

/* ===============================
   CONTENT-TABELLEN (Cookie-Richtlinie etc.)
   im Look der Karten & Buttons
   =============================== */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--base-3);                 /* weiß wie die Karten */
  color: var(--contrast);                    /* dunkler Text */
  border: 1px solid #111;
  border-radius: 12px;
  overflow: hidden;                          /* rundet die Ecken */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.entry-content table th,
.entry-content table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e5e5e5;
}

.entry-content table thead th,
.entry-content table tr:first-child th {
  background: #c40000;
  color: var(--base-3);
  font-family: var(--gp-font--barlow-semi-condensed);
  font-weight: 700;
  font-size: 1.05rem;
  border-bottom: none;
}

.entry-content table tbody tr:nth-child(even) {
  background: #f7f7f7;
}

.entry-content table tr:last-child td {
  border-bottom: none;
}

/* Mobile: lieber scrollen als quetschen */
@media (max-width: 600px) {
  .wp-block-table { overflow-x: auto; }
}