/* =========================================================
   AFFCatalog Events Header — Editorial Signature v1.2.0
   ========================================================= */

.aff-event-wrap{
  --aff-pink:#ff2f78;
  --aff-blue:#2454ea;
  --aff-ink:#101522;
  --aff-muted:#7f8ba1;
  --aff-line:#e8ecf3;
  --aff-soft:#f7f9fc;
  max-width:1836px;
  margin:0 auto 38px;
  font-family:inherit;
  color:var(--aff-ink);
}

/* Breadcrumbs */
.aff-event-breadcrumbs{
  display:flex;
  gap:12px;
  align-items:center;
  color:#98a3b7;
  font-size:15px;
  line-height:1.4;
  margin:0 0 22px;
  padding:0 2px;
}
.aff-event-breadcrumbs b{font-weight:400;color:#c1c8d4}
.aff-event-breadcrumbs a{
  color:#ff2f78;
  text-decoration:none;
  transition:color .18s ease,opacity .18s ease;
}
.aff-event-breadcrumbs a:hover{color:#2454ea;text-decoration:none}
.aff-event-breadcrumbs span{color:#9aa5b8}

/* Main card */
.aff-event-header{
  position:relative;
  background:#fff;
  border:1px solid rgba(224,229,238,.9);
  border-radius:26px;
  overflow:hidden;
  box-shadow:0 18px 45px rgba(26,38,62,.09);
}

/* Fine signature line at the very top */
.aff-event-header:before{
  content:"";
  position:absolute;
  z-index:5;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg,var(--aff-pink) 0 22%,var(--aff-blue) 58%,#77a0ff 100%);
}

/* Cover */
.aff-event-cover{
  height:340px;
  background:#101f36 center/cover no-repeat;
  position:relative;
  overflow:hidden;
}
.aff-event-cover:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg,rgba(7,17,32,.03) 20%,rgba(7,17,32,.08) 55%,rgba(7,17,32,.30) 100%),
    linear-gradient(110deg,rgba(255,47,120,.08),transparent 36%,rgba(36,84,234,.10));
}
.aff-event-cover:before{
  content:"";
  position:absolute;
  z-index:1;
  width:360px;
  height:360px;
  right:-105px;
  bottom:-190px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:50%;
  box-shadow:0 0 0 42px rgba(255,255,255,.035),0 0 0 84px rgba(255,255,255,.025);
  pointer-events:none;
}
.aff-event-cover-placeholder{
  height:100%;
  background:
    radial-gradient(circle at 78% 28%,rgba(255,47,120,.16),transparent 23%),
    radial-gradient(circle at 18% 75%,rgba(36,84,234,.22),transparent 29%),
    linear-gradient(135deg,#10213a,#0b1628 55%,#14294b);
  position:relative;
}

/* Floating event logo */
.aff-event-logo{
  position:absolute;
  z-index:4;
  left:56px;
  top:248px;
  width:196px;
  height:196px;
  border-radius:50%;
  overflow:hidden;
  background:#fff;
  border:9px solid #fff;
  box-shadow:
    0 12px 28px rgba(16,24,40,.18),
    0 0 0 1px rgba(16,24,40,.04);
}
.aff-event-logo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
}

/* Information area */
.aff-event-main{
  min-height:205px;
  position:relative;
  display:flex;
  align-items:center;
  gap:28px;
  padding:44px 58px 40px;
}

.aff-event-info{
  flex:1;
  min-width:0;
}
.aff-event-title-row{
  display:flex;
  align-items:center;
  gap:13px;
  flex-wrap:wrap;
}
.aff-event-title-row h1{
  margin:0;
  font-size:40px;
  line-height:1.08;
  letter-spacing:-1.45px;
  font-weight:750;
  color:#090d18;
}

/* Status */
.aff-event-status{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(42,198,222,.48);
  border-radius:999px;
  padding:6px 12px 6px 10px;
  color:#25b5d0;
  background:#f4fdff;
  font-size:13px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}
.aff-event-status:before{
  content:"";
  width:6px;
  height:6px;
  border-radius:50%;
  background:#31c4dc;
  box-shadow:0 0 0 3px rgba(49,196,220,.12);
}
.aff-status-upcoming{
  color:#2454ea;
  border-color:rgba(36,84,234,.25);
  background:#f5f7ff;
}
.aff-status-upcoming:before{background:#2454ea;box-shadow:0 0 0 3px rgba(36,84,234,.10)}
.aff-status-ended{
  color:#7a8495;
  border-color:#d9dee7;
  background:#fafbfc;
}
.aff-status-ended:before{background:#9aa3b2;box-shadow:none}

/* Signature metadata — deliberately different from standard pills */
.aff-event-meta{
  display:flex;
  align-items:stretch;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}

/* Date: editorial date strip */
.aff-event-date-card{
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  min-height:54px;
  padding:0 18px 0 15px;
  border-left:4px solid #ff2f78;
  background:linear-gradient(90deg,#fff4f8,#fff);
  border-radius:0 13px 13px 0;
  box-shadow:inset 0 0 0 1px #f0e4e9;
}
.aff-event-date-card:before{
  content:"";
  width:9px;
  height:9px;
  border-radius:2px;
  border:1.5px solid #ff2f78;
  transform:rotate(45deg);
  flex-shrink:0;
}
.aff-event-meta-label{
  align-self:stretch;
  display:flex;
  align-items:center;
  font-size:10px;
  letter-spacing:1.8px;
  font-weight:800;
  color:#ff2f78;
}
.aff-event-date-value{
  font-size:17px;
  font-weight:650;
  letter-spacing:-.25px;
  color:#20283a;
  white-space:nowrap;
}

/* Rating: compact editorial score block */
.aff-event-rating-card{
  min-height:54px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:0 15px 0 12px;
  border-radius:13px;
  background:#101827;
  color:#fff;
  box-shadow:0 7px 16px rgba(16,24,39,.12);
}
.aff-event-rating-score{
  display:flex;
  align-items:center;
  gap:5px;
  line-height:1;
}
.aff-event-rating-star{
  color:#ff3b80;
  font-size:17px;
  line-height:1;
}
.aff-event-rating-score strong{
  font-size:18px;
  font-weight:750;
  letter-spacing:-.3px;
}
.aff-event-rating-reviews{
  padding-left:11px;
  border-left:1px solid rgba(255,255,255,.18);
  color:#aab5c7;
  font-size:12px;
  white-space:nowrap;
}

/* Venue */
.aff-event-venue{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:13px;
  color:#6e7b90;
  font-size:14px;
  font-weight:500;
}
.aff-event-venue:first-letter{color:var(--aff-pink)}

/* Actions */
.aff-event-actions{
  display:flex;
  gap:10px;
  align-items:center;
  margin-left:auto;
  flex-shrink:0;
}
.aff-event-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:112px;
  height:52px;
  padding:0 23px;
  border-radius:13px;
  text-decoration:none!important;
  font-size:15px;
  font-weight:650;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.aff-event-btn-light{
  background:#fff;
  border:1px solid #e0e5ee;
  color:var(--aff-pink);
  box-shadow:0 2px 5px rgba(20,28,45,.03);
}
.aff-event-btn-light:hover{
  background:#fff5f8;
  border-color:#ffc5d8;
  transform:translateY(-1px);
}
.aff-event-btn-primary{
  background:linear-gradient(135deg,#2d5af0,#2149d8);
  border:1px solid #2454ea;
  color:#fff;
  box-shadow:0 9px 18px rgba(36,84,234,.18);
}
.aff-event-btn-primary:hover{
  background:linear-gradient(135deg,#ff3b80,#f42468);
  border-color:#ff2f78;
  box-shadow:0 10px 22px rgba(255,47,120,.20);
  transform:translateY(-1px);
}

/* Small desktop accent — gives the block its own identity */
.aff-event-main:after{
  content:"EVENT";
  position:absolute;
  right:58px;
  bottom:13px;
  font-size:9px;
  letter-spacing:3px;
  font-weight:800;
  color:#d7dce5;
  pointer-events:none;
}

/* Responsive */
@media (max-width:1100px){
  .aff-event-cover{height:300px}
  .aff-event-logo{width:170px;height:170px;left:40px;top:220px}
  .aff-event-main{padding:42px 36px 38px 240px}
  .aff-event-title-row h1{font-size:34px}
  .aff-event-actions{margin-left:0}
}

@media (max-width:900px){
  .aff-event-cover{height:260px}
  .aff-event-main{
    padding:32px 28px;
    display:block;
  }
  .aff-event-logo{
    width:150px;height:150px;
    left:28px;top:185px;
  }
  .aff-event-info{padding-top:0}
  .aff-event-actions{margin-top:22px}
  .aff-event-main:after{display:none}
}

@media (max-width:600px){
  .aff-event-wrap{margin-bottom:24px}
  .aff-event-breadcrumbs{
    font-size:13px;
    gap:8px;
    overflow:hidden;
    white-space:nowrap;
    margin-bottom:15px;
  }
  .aff-event-header{border-radius:20px}
  .aff-event-cover{height:185px}
  .aff-event-logo{
    width:112px;height:112px;
    left:18px;top:126px;
    border-width:5px;
  }
  .aff-event-main{padding:20px 18px 23px}
  .aff-event-info{padding-top:0}
  .aff-event-title-row h1{
    font-size:27px;
    letter-spacing:-.8px;
  }
  .aff-event-status{font-size:12px;padding:6px 10px}
  .aff-event-meta{gap:8px;margin-top:14px}
  .aff-event-date-card{min-height:48px;padding:0 12px 0 11px;gap:10px}
  .aff-event-date-value{font-size:14px}
  .aff-event-rating-card{min-height:48px;padding:0 12px 0 10px}
  .aff-event-rating-score strong{font-size:16px}
  .aff-event-rating-reviews{font-size:11px}
  .aff-event-venue{font-size:13px}
  .aff-event-actions{width:100%;gap:8px}
  .aff-event-btn{
    flex:1;
    min-width:0;
    height:48px;
    padding:0 14px;
  }
}

/* Fix: when an event has no logo, the content uses the full card width.
   This prevents the large empty left column visible in logo-less events. */
.aff-event-main.no-logo .aff-event-info{padding-top:0}

/* v1.4.0 — the event header no longer uses a circular logo */
.aff-event-logo{display:none!important}

/* Full-width editorial content: metadata starts at the left edge */
.aff-event-main .aff-event-info{
  width:100%;
  max-width:none;
  padding-left:0!important;
}
.aff-event-main .aff-event-meta{
  justify-content:flex-start;
}
.aff-event-main .aff-event-venue{
  justify-content:flex-start;
}

/* =========================================================
   v1.5.0 — Full-width event header / sidebar starts below
   ========================================================= */

.aff-event-layout-with-header{
  /* The exact display model remains controlled by the theme.
     These rules only create a new full-width row for our header. */
}

.aff-event-layout-with-header > .aff-event-wrap--positioned{
  width:100%;
  max-width:none;
  grid-column:1 / -1;
  grid-row:auto;
  flex:0 0 100%;
  order:-1;
  box-sizing:border-box;
}

/* If the theme uses flex columns, allow the header to occupy its own row. */
.aff-event-layout-with-header{
  flex-wrap:wrap;
}

/* The header is now a sibling of the content/sidebar columns,
   so it must not inherit a narrow column width. */
.aff-event-layout-with-header .aff-event-wrap--positioned .aff-event-header{
  width:100%;
}

@media (max-width:900px){
  .aff-event-layout-with-header{
    display:block;
  }
  .aff-event-layout-with-header > .aff-event-wrap--positioned{
    width:100%;
    display:block;
  }
}

/* v1.5.1 — align the content column and sidebar at the same top edge.
   The theme may apply different top margins to the two columns after the
   full-width event header is moved above the layout. */
.aff-event-content-layout,
.aff-event-main-content,
.aff-event-sidebar,
.aff-event-wrap + .site-content,
.aff-event-wrap + .content-area{
  scroll-margin-top:0;
}

/* Common WordPress/theme sidebar wrappers */
.aff-event-wrap ~ .site-content,
.aff-event-wrap ~ .content-area{
  margin-top:0!important;
}

.aff-event-wrap ~ .site-content .widget-area,
.aff-event-wrap ~ .content-area .widget-area,
.aff-event-wrap ~ aside{
  margin-top:0!important;
}

/* When the plugin-created layout is used, both columns start at y=0. */
.aff-event-columns{
  display:grid;
  grid-template-columns:minmax(0,1fr) var(--aff-event-sidebar-width,320px);
  gap:32px;
  align-items:start;
}
.aff-event-columns > *{
  margin-top:0!important;
  align-self:start;
}

@media (max-width:900px){
  .aff-event-columns{
    grid-template-columns:1fr;
    gap:24px;
  }
}

/* v1.5.2 — slightly lower breadcrumbs for more breathing room */
.aff-event-breadcrumbs{
  padding-top:8px;
}

/* =========================================================
   v1.7.0 — Events archive
   ========================================================= */

/* Page-level breathing room */
body.category-events .site-main,
body.category-events .content-area{
  --aff-event-archive-gap:32px;
}

/* Event cards: keep the theme structure, refine the visual language. */
body.category-events article.aff-event-archive-card{
  position:relative;
  background:#fff;
  border:1px solid #e9edf4;
  border-radius:24px;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(24,35,58,.07);
  margin-bottom:var(--aff-event-archive-gap);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

body.category-events article.aff-event-archive-card:hover{
  transform:translateY(-3px);
  border-color:#e2dce3;
  box-shadow:0 18px 38px rgba(24,35,58,.10);
}

/* Common theme image wrappers */
body.category-events article.aff-event-archive-card .post-thumbnail,
body.category-events article.aff-event-archive-card .featured-image,
body.category-events article.aff-event-archive-card .entry-thumbnail,
body.category-events article.aff-event-archive-card .post-image{
  overflow:hidden;
  border-radius:0;
}

body.category-events article.aff-event-archive-card img{
  transition:transform .35s ease;
}

body.category-events article.aff-event-archive-card:hover img{
  transform:scale(1.025);
}

/* Content area */
body.category-events article.aff-event-archive-card .entry-content,
body.category-events article.aff-event-archive-card .post-content{
  color:#18345e;
}

body.category-events article.aff-event-archive-card .entry-title,
body.category-events article.aff-event-archive-card h2.entry-title,
body.category-events article.aff-event-archive-card h3.entry-title{
  color:#30305e;
  letter-spacing:-.55px;
  line-height:1.12;
}

body.category-events article.aff-event-archive-card .entry-title a,
body.category-events article.aff-event-archive-card h2.entry-title a,
body.category-events article.aff-event-archive-card h3.entry-title a{
  color:inherit;
  text-decoration:none;
}

body.category-events article.aff-event-archive-card .entry-title a:hover,
body.category-events article.aff-event-archive-card h2.entry-title a:hover,
body.category-events article.aff-event-archive-card h3.entry-title a:hover{
  color:#f52f78;
}

/* Small event badge inserted before the title */
body.category-events .aff-event-archive-title-badge{
  display:block;
  width:max-content;
  margin:0 0 12px;
  padding:7px 13px;
  border-radius:999px;
  background:#ffe1eb;
  color:#f52f78;
  font-size:11px;
  line-height:1;
  font-weight:800;
  letter-spacing:.6px;
  text-transform:uppercase;
}

/* Archive metadata */
body.category-events .aff-event-archive-meta{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 16px;
  margin:0 0 14px;
  color:#69758b;
  font-size:13px;
  font-weight:600;
}

body.category-events .aff-event-archive-meta-item{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

body.category-events .aff-event-archive-meta-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#f52f78;
  box-shadow:0 0 0 4px rgba(245,47,120,.10);
}

body.category-events .aff-event-archive-location{
  color:#7a8598;
}

/* Read more */
body.category-events article.aff-event-archive-card .read-more,
body.category-events article.aff-event-archive-card .more-link{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#f52f78;
  font-weight:700;
  text-decoration:none;
  transition:gap .18s ease,color .18s ease;
}

body.category-events article.aff-event-archive-card .read-more:hover,
body.category-events article.aff-event-archive-card .more-link:hover{
  color:#2454ea;
  gap:10px;
}

/* Archive date row from the theme */
body.category-events article.aff-event-archive-card .entry-meta{
  color:#6f7b91;
  font-size:12px;
}

body.category-events article.aff-event-archive-card .entry-meta a:hover{
  color:#f52f78;
}

/* Mobile */
@media (max-width:900px){
  body.category-events article.aff-event-archive-card{
    border-radius:20px;
    margin-bottom:22px;
  }
}

@media (max-width:600px){
  body.category-events article.aff-event-archive-card{
    border-radius:18px;
    box-shadow:0 8px 22px rgba(24,35,58,.07);
  }

  body.category-events .aff-event-archive-title-badge{
    margin-bottom:9px;
    padding:6px 10px;
    font-size:10px;
  }

  body.category-events .aff-event-archive-meta{
    font-size:12px;
    gap:7px 12px;
  }
}

/* Events archive promo banner */
.aff-events-archive-banner{
  width:100%;
  margin:28px auto 34px;
  clear:both;
  position:relative;
  z-index:2;
}
.aff-events-archive-banner-link{
  display:block;
  width:100%;
  text-decoration:none !important;
}
.aff-events-archive-banner img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  border-radius:22px;
  border:1px solid rgba(224,229,238,.9);
  box-shadow:0 16px 38px rgba(26,38,62,.10);
}
@media (max-width:767px){
  .aff-events-archive-banner{margin:20px 0 26px}
  .aff-events-archive-banner img{border-radius:16px}
}
