/*
 Theme Name: Growing Up SC — Child (Calendar + Upsells, Full Build)
 Template: ashe-pro-premium
 Version: 1.7.2
 Text Domain: gusc-ashe-pro-child
*/

:root {
  --gusc-bg: #f8fafc;
  --gusc-line: #e6e8ec;
  --gusc-ink: #0f172a;
  --gusc-muted: #475569;
  --gusc-brand: #0a7bc2;
  --gusc-card: #ffffff;
}

body.tribe-events-page-template {
  background: var(--gusc-bg);
  color: var(--gusc-ink);
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Base buttons */
.gusc-btn,
.gusc-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gusc-brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  padding: 0.55rem 1rem;
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
  cursor: pointer;
}
.gusc-btn:hover,
.gusc-chip-btn:hover {
  background: #0568a3;
}

/* Emphasized "Submit your event" button */
.gusc-btn--submit {
  padding: 0.7rem 1.4rem;
  font-size: 0.96rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  background: #0b84cf;
}
.gusc-btn--submit:hover {
  background: #0666a4;
  transform: translateY(-1px);
}
.gusc-btn--submit::before {
  content: "★ ";
  font-size: 0.9em;
  margin-right: 2px;
}

/* ===== List View Cards (Horizontal) ===== */
.tribe-events-calendar-list__event {
  display: flex;
  flex-direction: row;
  border: 1px solid var(--gusc-line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--gusc-card);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  margin: 14px 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tribe-events-calendar-list__event:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
}

.tribe-events-calendar-list__event-media {
  width: 42%;
  min-width: 300px;
  max-width: 520px;
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.tribe-events-calendar-list__event-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gusc-media-inner {
  border-radius: 0;
  overflow: hidden;
}

/* Inner padding + improved line spacing */
.tribe-events-calendar-list__event-details {
  flex: 1;
  padding: 1.6rem 2rem !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.6;
}

/* Meta, title, body */
.gusc-date-time {
  font-size: 0.8rem;
  color: var(--gusc-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.tribe-events-calendar-list__event-title {
  font-weight: 800;
  margin: 0 0 10px 0;
}
.tribe-events-calendar-list__event-title a {
  color: var(--gusc-ink);
  text-decoration: none;
}
.tribe-events-calendar-list__event-title a:hover {
  color: var(--gusc-brand);
}

/* Truncate body to 4 lines with comfortable leading */
.gusc-blurb {
  color: var(--gusc-muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
  margin-top: 0.4rem;
}

/* Location */
.gusc-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gusc-muted);
  font-size: 0.92rem;
  margin-top: 10px;
}

/* Badges */
.gusc-badges,
.gusc-featured-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}
.gusc-badge {
  pointer-events: auto;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.gusc-badge--featured {
  background: #ffe4e6;
  color: #b91c1c;
  border-color: #fecdd3;
}
.gusc-badge--sponsored {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.gusc-badge--tier1 {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* ===== Featured Carousel ===== */
.gusc-featured-wrap {
  margin: 10px 0 22px;
}
.gusc-featured-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.gusc-featured-head .title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--gusc-ink);
}
.gusc-featured-controls {
  display: flex;
  gap: 8px;
}
.gusc-featured-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--gusc-line);
  background: #fff;
  cursor: pointer;
}
.gusc-featured-btn:hover {
  background: #f8fafc;
}
.gusc-featured-rail {
  display: flex;
  gap: 14px;
  overflow: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.gusc-featured-card {
  min-width: clamp(260px, 38vw, 420px);
  scroll-snap-align: start;
  border: 1px solid var(--gusc-line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gusc-featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.12);
}
.gusc-featured-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.gusc-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gusc-featured-body {
  padding: 12px 14px 14px;
}
.gusc-featured-meta {
  font-size: 0.8rem;
  color: var(--gusc-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.gusc-featured-title a {
  font-weight: 800;
  color: var(--gusc-ink);
  text-decoration: none;
}
.gusc-featured-title a:hover {
  color: var(--gusc-brand);
}
.gusc-featured-blurb {
  color: var(--gusc-muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Partners Banner ===== */
.gusc-partners-banner {
  margin: 18px 0;
  border: 1px solid var(--gusc-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}
.gusc-partners-banner .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f6;
}
.gusc-partners-banner .title {
  font-weight: 800;
  color: var(--gusc-ink);
}
.gusc-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--gusc-line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  color: var(--gusc-brand);
  text-decoration: none;
}
.gusc-partners-banner .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px;
  align-items: center;
}
.gusc-partners-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gusc-line);
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  min-height: 70px;
}
.gusc-partners-logo img {
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
}

/* Events Bar actions */
.gusc-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

/* Hide any old footer CTAs if still present */
.tribe-events-calendar-list__event .gusc-card-footer {
  display: none !important;
}

/* Organizer & Venue header card */
.gusc-entity-header {
  margin-bottom: 1.5rem;
  padding: 1.2rem 1.4rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--gusc-line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.gusc-entity-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 0.6rem 0;
  color: var(--gusc-ink);
}
.gusc-entity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.95rem;
  color: var(--gusc-muted);
}
.gusc-entity-meta-item {
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
}
.gusc-entity-meta-item .label {
  font-weight: 600;
  color: #111827;
}
.gusc-entity-meta-item a {
  color: var(--gusc-brand);
  text-decoration: none;
}
.gusc-entity-meta-item a:hover {
  text-decoration: underline;
}

/* ============================
   MOBILE OPTIMIZATIONS
   ============================ */

/* Tablet and down: stack cards, tighten paddings */
@media (max-width: 900px) {

  .tribe-events-calendar-list__event {
    flex-direction: column;
  }

  /* Hide image block entirely on mobile when there is no image */
  .tribe-events-calendar-list__event[data-has-image="0"] .tribe-events-calendar-list__event-media {
    display: none;
  }


  .tribe-events-calendar-list__event-media {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .tribe-events-calendar-list__event-details {
    padding: 1.1rem 1.2rem !important;
  }

  .gusc-date-time {
    margin-bottom: 6px;
  }

  .tribe-events-calendar-list__event-title {
    margin-bottom: 6px;
    font-size: 1.02rem;
  }

  .gusc-blurb {
    font-size: 0.94rem;
  }

  .gusc-featured-card {
    min-width: 75vw;
  }

  .gusc-featured-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .gusc-featured-controls {
    align-self: flex-end;
  }

  .gusc-partners-banner .row {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .gusc-top-actions {
    flex-wrap: wrap;
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Small phones: full-width buttons, simpler layout */
@media (max-width: 600px) {

  .tribe-events-calendar-list__event-details {
    padding: 1rem 1rem !important;
  }

  .gusc-top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .gusc-btn,
  .gusc-chip-btn {
    width: 100%;
    justify-content: center;
  }

  .gusc-featured-card {
    min-width: 86vw;
  }

  .gusc-partners-banner .head {
    flex-direction: column;
    align-items: flex-start;
  }

  .gusc-entity-header {
    padding: 1rem 1rem;
    border-radius: 12px;
  }

  .gusc-entity-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
