/* =========================================================
   KG Simple Events + Gravity Booking
   File: assets/kg-events.css
   ========================================================= */

/* Wrapper */
.kg-events {
  display: grid;
  gap: 12px;
}

/* 3-column card */
.kg-event {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden; /* makes the left image flush to the rounded edges */
  background: #fff;
}

/* LEFT: thumbnail panel fills full height (solid version) */
.kg-event__thumbwrap {
  position: relative;
  background: #e5e7eb;
  min-height: 140px;
}

/* Link stays normal block element */
.kg-event__thumblink {
  display: block;
}

/* Image is responsive without trying to control height */
.kg-event__thumb {
  display: block;
  width: 100%;
  height: auto; /* key: prevents image forcing card height */
  object-fit: cover; /* harmless even with auto height */
}

/* Placeholder stays safe */
.kg-event__thumb--placeholder {
  width: 100%;
  min-height: 140px;
  background: #d1d5db;
}

/* MIDDLE: KG blue panel with white text */
.kg-event__body {
  background: #0e2340; /* KG blue */
  color: #fff;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertically centered */
  gap: 0; /* spacing handled below so gaps are exact */
  min-width: 0;
}

/* Title: exact 12px bottom gap */
.kg-event__title {
  margin: 0 0 12px 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
}

.kg-event__titlelink {
  color: #fff;
  text-decoration: none;
}

.kg-event__titlelink:hover {
  color: #fff; /* stays white on hover */
}

/* "Where" + "When" rows: 4px gap, aligned cleanly */
.kg-event__meta {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  opacity: 0.95;
  /* remove the "chip-in" offset and make alignment deliberate */
  padding-left: 0;
}

.kg-event__meta:not(:last-of-type) {
  margin-bottom: 4px; /* exact 4px gap between When/Where */
}

.kg-event__meta strong {
  font-weight: 800;
  /* keeps label/value alignment while keeping the whole row aligned with the title */
  display: inline-block;
  min-width: 64px;
  margin-right: 8px;
}

/* RIGHT: button panel (do NOT change your left alignment) */
.kg-event__actions {
  padding: 12px 20px 12px 2px; /* keep as-is */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* stays left */
  background: transparent;
  min-width: 220px; /* ensures nothing can ever "push" the button right */
  text-align: left;
}

.kg-event__book {
  margin-top: 12px;
  margin-bottom: 0 !important;
  display: inline-block;
  padding: 10px 22px;
  border: 2px solid #f13b2e;
  border-radius: 30px !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  white-space: nowrap;
  color: #fff;
  background: #f13b2e;
  transition: background 0.2s ease, color 0.2s ease;
}

.kg-event__book:hover {
  background: #fff;
  color: #f13b2e;
  text-decoration: none;
}

/* Accessible focus */
.kg-event a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  border-radius: 12px;
}

/* Mobile: stack nicely + center everything on narrow devices */
@media (max-width: 780px) {
  .kg-event {
    grid-template-columns: 1fr;
  }

  .kg-event__thumbwrap {
    min-height: 200px;
  }

  .kg-event__body {
    padding: 18px 20px;
    text-align: center; /* center text on narrow */
    align-items: center; /* center the flex children */
  }

  .kg-event__meta strong {
    min-width: 0; /* avoid awkward spacing on centered mobile */
    margin-right: 6px;
  }

  .kg-event__actions {
    padding: 18px 20px;
    justify-content: center; /* center button on narrow */
    min-width: 0;
  }

  .kg-event__title {
    font-size: 22px;
  }

  .kg-event__book {
    font-size: 18px;
  }
}
