/**
 * Martinelli Winery — Events Theme Stylesheet
 * Native styles for adaptdevblocktheme archive-events.php and events-block.php
 * Modeled after Eden Rift design system, customized for Martinelli Winery branding.
 */

:root {
  --mw-navy: #131f38;
  --mw-gold: #a58237;
  --mw-gold-light: #c6a66f;
  --mw-burgundy: #9a2339;
  --mw-burgundy-hover: #7d1b2d;
  --mw-cream-warm: #faf8eb;
  --mw-cream-bg: #fdfcf7;
  --mw-charcoal: #202020;
  --mw-gray-text: #717171;
  --mw-rule: #e6e2d6;
  --mw-white: #ffffff;
}

/* Evergreen Hero Banner */
.mw-hero {
  position: relative;
  width: 100%;
  min-height: 380px;
  background-color: var(--mw-navy);
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff !important;
  padding: 70px 24px;
  box-sizing: border-box;
}

.mw-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
}

.mw-hero-eyebrow {
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 4px !important;
  text-transform: uppercase !important;
  color: #e5c78a !important;
  margin-bottom: 14px !important;
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

.mw-hero-title {
  font-family: 'Georgia', 'Georgia Regular', serif !important;
  font-size: 52px !important;
  font-weight: 400 !important;
  letter-spacing: 6px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  margin: 0 0 18px !important;
  line-height: 1.1 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85) !important;
}

/* Hero Description: Crisp, high-contrast white text immune to theme paragraph colors */
.mw-hero p.mw-hero-desc,
.mw-hero .mw-hero-desc,
p.mw-hero-desc {
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  letter-spacing: 0.3px !important;
  line-height: 1.7 !important;
  color: #ffffff !important;
  margin: 0 auto !important;
  max-width: 700px !important;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.9) !important;
}

/* Events Container */
.mw-events-page {
  background: var(--mw-cream-bg);
  min-height: 60vh;
}

.mw-events-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 70px 24px 90px;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--mw-charcoal);
  box-sizing: border-box;
}

/* Section Header */
.mw-section-header {
  text-align: center;
  margin-bottom: 50px;
}

.mw-section-tagline {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--mw-gold);
  margin-bottom: 8px;
}

.mw-section-title {
  font-family: 'Georgia', 'Georgia Regular', serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--mw-navy);
  margin: 0 0 12px;
  line-height: 1.2;
}

.mw-section-intro {
  max-width: 680px;
  margin: 0 auto;
  color: var(--mw-charcoal);
  font-size: 15px;
  line-height: 1.65;
}

.mw-section-rule {
  width: 100%;
  height: 1px;
  background: var(--mw-rule);
  margin: 30px 0 0;
}

/* Section Break for On The Road */
.mw-section-break {
  margin-top: 80px;
}

/* Event List Stream */
.mw-events-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--mw-rule);
}

/* Single Event Row */
.mw-event-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 36px;
  padding: 38px 0;
  border-bottom: 1px solid var(--mw-rule);
  transition: background-color 0.2s ease;
}

.mw-event-row:hover {
  background-color: rgba(250, 248, 235, 0.45);
}

/* Date Block (Eden Rift Serif Stack) */
.mw-date-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 4px;
}

.mw-date-month {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--mw-gold);
  line-height: 1.2;
}

.mw-date-day {
  font-family: 'Georgia', 'Georgia Regular', serif;
  font-size: 50px;
  line-height: 1.05;
  font-weight: 400;
  color: var(--mw-navy);
  margin: 4px 0 2px;
  letter-spacing: -0.5px;
}

.mw-date-year {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--mw-gray-text);
}

/* Event Content */
.mw-event-content {
  display: flex;
  flex-direction: column;
}

.mw-event-title {
  font-family: 'Georgia', 'Georgia Regular', serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--mw-navy);
  margin: 0 0 10px;
  letter-spacing: 0.2px;
}

.mw-event-title a {
  color: var(--mw-navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mw-event-title a:hover {
  color: var(--mw-burgundy);
}

.mw-event-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mw-gray-text);
  margin-bottom: 14px;
}

.mw-meta-item {
  display: inline-flex;
  align-items: center;
}

.mw-meta-item:not(:last-child)::after {
  content: "·";
  margin-left: 18px;
  color: var(--mw-gold);
  font-weight: 700;
}

.mw-badge {
  display: inline-block;
  background: #eef2eb;
  color: #3b5f41;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 2px;
}

.mw-badge-exclusive {
  background: #fbf2e3;
  color: #8b6b27;
}

.mw-event-desc {
  font-size: 15px;
  line-height: 1.65;
  color: #383838;
  max-width: 640px;
  margin: 0 0 20px;
}

/* Conditional Button (Rendered ONLY when ticket link exists) */
.mw-event-action {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

/* Martinelli Ticket / RSVP Button */
a.mw-ticket-btn,
.mw-ticket-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  background-color: var(--mw-burgundy, #9a2339) !important;
  color: #ffffff !important;
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  padding: 12px 24px !important;
  line-height: 1.2 !important;
  border: 1px solid var(--mw-burgundy, #9a2339) !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

/* Button text protection: immune to theme a:hover font or capitalization changes */
.mw-ticket-btn .mw-btn-text,
.mw-ticket-btn span:not(.mw-btn-arrow) {
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  line-height: 1.2 !important;
  transition: none !important;
}

/* Arrow: smooth glide to the right on hover */
.mw-ticket-btn .mw-btn-arrow {
  display: inline-block !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1 !important;
  color: #ffffff !important;
  transition: transform 0.25s ease !important;
}

/* Hover State: Charcoal black background, preserved uppercase typography */
a.mw-ticket-btn:hover,
a.mw-ticket-btn:focus,
a.mw-ticket-btn:active,
.mw-ticket-btn:hover,
.mw-ticket-btn:focus,
.mw-ticket-btn:active,
article a.mw-ticket-btn:hover,
article.event-list-item a.mw-ticket-btn:hover,
article.post-list-item a.mw-ticket-btn:hover,
.mw-home-card a.mw-ticket-btn:hover,
.mw-event-row a.mw-ticket-btn:hover {
  background-color: #202020 !important;
  border-color: #202020 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
}

a.mw-ticket-btn:hover .mw-btn-text,
.mw-ticket-btn:hover .mw-btn-text,
article a.mw-ticket-btn:hover .mw-btn-text {
  text-transform: uppercase !important;
  font-size: 12px !important;
  color: #ffffff !important;
}

a.mw-ticket-btn:hover .mw-btn-arrow,
.mw-ticket-btn:hover .mw-btn-arrow,
article a.mw-ticket-btn:hover .mw-btn-arrow {
  transform: translateX(4px) !important;
  color: #ffffff !important;
}

/* Mailing List Callout Strip */
.mw-cta-strip {
  background: var(--mw-cream-warm);
  border: 1px solid var(--mw-rule);
  border-left: 4px solid var(--mw-burgundy);
  padding: 34px 38px;
  margin-top: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  box-sizing: border-box;
}

.mw-cta-text h3 {
  font-family: 'Georgia', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--mw-navy);
  margin: 0 0 6px;
}

.mw-cta-text p {
  font-size: 14px;
  color: var(--mw-gray-text);
  margin: 0;
}

a.mw-cta-btn,
.mw-cta-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  background-color: var(--mw-burgundy, #9a2339) !important;
  color: #ffffff !important;
  padding: 12px 28px !important;
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  border: 1px solid var(--mw-burgundy, #9a2339) !important;
  border-radius: 0 !important;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease !important;
}

a.mw-cta-btn:hover,
a.mw-cta-btn:focus,
.mw-cta-btn:hover,
.mw-cta-btn:focus,
article a.mw-cta-btn:hover {
  background-color: #202020 !important;
  border-color: #202020 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
}

/* Empty State Notice */
.mw-no-events {
  text-align: center;
  padding: 50px 20px;
  color: var(--mw-gray-text);
  font-style: italic;
  font-size: 15px;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .mw-home-events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 680px) {
  .mw-event-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 28px 0;
  }

  .mw-date-block {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }

  .mw-date-day {
    font-size: 38px;
    margin: 0;
  }

  .mw-hero {
    min-height: 280px;
    padding: 40px 16px;
  }

  .mw-hero-title {
    font-size: 34px;
    letter-spacing: 4px;
  }

  .mw-section-title {
    font-size: 26px;
  }

  .mw-cta-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .mw-home-events-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mw-home-events-section {
    padding: 45px 0 35px;
  }

  .mw-home-card {
    padding: 24px 20px;
  }
}

/* ====================================================================
   HOMEPAGE EVENTS BLOCK (acf/event-block) — Eden Rift Grid System
   ==================================================================== */
.mw-home-events-section {
  padding: 70px 0 60px;
  background-color: var(--mw-cream-bg);
}

.mw-home-events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 45px;
}

.mw-home-card {
  background: var(--mw-white);
  border: 1px solid var(--mw-rule);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.mw-home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(19, 31, 56, 0.08);
  border-color: var(--mw-gold);
}

.mw-home-card-header {
  margin-bottom: 14px;
}

.mw-home-date-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--mw-rule);
}

.mw-home-date-month {
  font-family: 'Nunito', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--mw-gold);
  line-height: 1.2;
}

.mw-home-date-day {
  font-family: 'Georgia', 'Georgia Regular', serif;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 400;
  color: var(--mw-navy);
  margin: 4px 0 2px;
}

.mw-home-date-year {
  font-family: 'Nunito', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--mw-gray-text);
}

.mw-home-card-title {
  font-family: 'Georgia', 'Georgia Regular', serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--mw-navy);
  margin: 0;
}

.mw-home-card-title a {
  color: var(--mw-navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

.mw-home-card-title a:hover {
  color: var(--mw-burgundy);
}

.mw-home-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--mw-gray-text);
  margin-bottom: 16px;
  line-height: 1.4;
}

.mw-home-card-desc {
  font-family: 'Nunito', sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: #383838;
  margin-bottom: 24px;
  flex-grow: 1;
}

.mw-home-card-desc p {
  margin: 0 0 10px;
}

.mw-home-card-desc p:last-child {
  margin-bottom: 0;
}

.mw-home-card-action {
  margin-top: auto;
  padding-top: 10px;
}

.mw-home-view-all {
  text-align: center;
  margin-top: 15px;
}

a.mw-home-view-all-link,
.mw-home-view-all-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--mw-navy, #131f38) !important;
  text-decoration: none !important;
  padding: 13px 32px !important;
  border: 1px solid var(--mw-gold, #a58237) !important;
  background-color: transparent !important;
  border-radius: 0 !important;
  transition: all 0.25s ease !important;
  white-space: nowrap !important;
}

.mw-home-view-all-link .mw-btn-text {
  font-family: 'nunitoregular', 'Nunito', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: inherit !important;
  transition: none !important;
}

.mw-home-view-all-link .mw-btn-arrow {
  display: inline-block !important;
  font-size: 14px !important;
  line-height: 1 !important;
  transition: transform 0.25s ease !important;
}

a.mw-home-view-all-link:hover,
a.mw-home-view-all-link:focus,
.mw-home-view-all-link:hover,
.mw-home-view-all-link:focus,
article a.mw-home-view-all-link:hover {
  background-color: var(--mw-navy, #131f38) !important;
  border-color: var(--mw-navy, #131f38) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  font-size: 12px !important;
  letter-spacing: 2px !important;
}

.mw-home-view-all-link:hover .mw-btn-text {
  color: #ffffff !important;
  text-transform: uppercase !important;
}

.mw-home-view-all-link:hover .mw-btn-arrow {
  transform: translateX(4px) !important;
  color: #ffffff !important;
}
