@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #0b0d10;
  --color-surface: #12151a;
  --color-surface-2: #191d23;
  --color-text: #f7f8fa;
  --color-muted: #b2bac5;
  --color-primary: #d4242f;
  --color-primary-dark: #a91620;
  --color-border: rgba(255, 255, 255, 0.12);
  --color-white: #ffffff;
  --max-width: 1200px;
  --header-height: 78px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.container { width: min(calc(100% - 2rem), var(--max-width)); margin-inline: auto; }
.section { padding: 6rem 0; }
.section--compact { padding: 4rem 0; }
.section--light { background: #f4f5f7; color: #111318; }
.section--surface { background: var(--color-surface); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1rem;
  color: #ff6871; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 30px; height: 2px; background: currentColor; }
.display-title, h1, h2, h3 {
  margin-top: 0; font-family: 'Barlow Condensed', Impact, sans-serif; line-height: .98; text-transform: uppercase;
}
h1 { font-size: clamp(3.3rem, 9vw, 7.2rem); letter-spacing: -.035em; }
h2 { font-size: clamp(2.5rem, 6vw, 4.7rem); letter-spacing: -.025em; }
h3 { font-size: clamp(1.45rem, 3vw, 2rem); }
.lead { max-width: 720px; font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--color-muted); }
.section--light .lead { color: #545b65; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
.section-heading > div { max-width: 760px; }
.section-heading h2 { margin-bottom: .8rem; }

.button {
  display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: .7rem;
  padding: .85rem 1.35rem; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--color-primary); color: white; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.button:hover { transform: translateY(-2px); background: #ed303b; }
.button--outline { background: transparent; border-color: rgba(255,255,255,.5); }
.button--outline:hover { border-color: white; background: rgba(255,255,255,.08); }
.button--dark { background: #111318; }
.button--dark:hover { background: #2b3038; }
.text-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }

.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 1000; transform: translateY(-150%); background: white; color: black; padding: .7rem 1rem; }
.skip-link:focus { transform: translateY(0); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.content-card { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.content-card__image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.content-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.content-card:hover .content-card__image img { transform: scale(1.04); }
.content-card__body { padding: 1.5rem; }
.content-card__body p { color: var(--color-muted); }
.badge { display: inline-block; margin-bottom: .85rem; padding: .3rem .65rem; border-radius: 99px; background: rgba(212,36,47,.15); color: #ff737b; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

.page-hero { position: relative; min-height: 52vh; display: grid; align-items: end; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,10,13,.96), rgba(8,10,13,.55) 55%, rgba(8,10,13,.15)); }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero__content { position: relative; z-index: 1; padding: 7rem 0 4rem; max-width: 800px; }
.page-hero h1 { margin-bottom: 1rem; font-size: clamp(3.2rem, 8vw, 6rem); }

.prose { max-width: 800px; }
.prose h2 { margin-top: 2.5rem; font-size: 2.6rem; }
.prose p, .prose li { color: var(--color-muted); }

@media (max-width: 900px) {
  .section { padding: 4.5rem 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .container { width: min(calc(100% - 1.25rem), var(--max-width)); }
  .card-grid { grid-template-columns: 1fr; }
  .button { width: 100%; }
  .page-hero__content { padding-bottom: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


.footer { padding: 4rem 0 1.5rem; border-top: 1px solid var(--color-border); background: #080a0d; }
  .footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; }
  .footer-brand { font-family: 'Barlow Condensed'; font-size: 2rem; font-weight: 800; text-transform: uppercase; }
  .footer p, .footer address { color: var(--color-muted); font-style: normal; }
  .footer h2 { margin-bottom: .7rem; font-size: 1.15rem; }
  .footer a:hover { color: white; }
  .social-links { display: flex; gap: .65rem; margin-top: 1.25rem; }
  .social-links a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--color-border); border-radius: 50%; color: white; background: rgba(255,255,255,.03); transition: transform .2s ease, border-color .2s ease, background .2s ease; }
  .social-links a:hover { transform: translateY(-2px); border-color: var(--color-primary); background: var(--color-primary); }
  .social-links svg { width: 20px; height: 20px; fill: currentColor; }
  .footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); color: #858e99; font-size: .82rem; }
  @media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; } }

.coach-card { position: relative; min-height: 530px; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface-2); }
  .coach-image, .coach-image img { width: 100%; height: 100%; }
  .coach-image img { object-fit: cover; }
  .coach-card::after { content: ''; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(7,9,12,.97)); }
  .coach-body { position: absolute; z-index: 2; inset: auto 1.5rem 1.5rem; }
  .coach-body span { color: #ff747c; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
  .coach-body h3 { margin: .45rem 0 .2rem; font-size: 2.4rem; }
  .coach-body p { margin: 0 0 1rem; color: #ccd1d8; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-height); border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease; }
  .site-header.scrolled { background: rgba(9,11,14,.88); border-color: var(--color-border); backdrop-filter: blur(16px); }
  .header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

  /* TX 3rd Coast MMA logo */
 .brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: 75px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
}
  .navigation { display: flex; align-items: center; gap: 1.5rem; }
  .navigation ul { display: flex; align-items: center; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
  .navigation ul a { position: relative; padding: .8rem 0; font-size: .83rem; font-weight: 700; text-transform: uppercase; letter-spacing: .055em; }
  .navigation ul a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: .45rem; height: 2px; background: var(--color-primary); transition: right .2s ease; }
  .navigation ul a:hover::after, .navigation ul a.active::after { right: 0; }
  .nav-cta { min-height: 44px; padding: .65rem 1rem; }
  .menu-toggle { display: none; width: 45px; height: 45px; padding: 10px; border: 0; background: transparent; }
  .menu-toggle span:not(.sr-only) { display: block; height: 2px; margin: 6px 0; background: white; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  @media (max-width: 980px) {
    .menu-toggle { display: block; }
    .navigation { position: fixed; inset: var(--header-height) 0 0; display: grid; align-content: start; gap: 2rem; padding: 2rem 1.25rem; background: rgba(9,11,14,.98); transform: translateX(100%); transition: transform .25s ease; }
    .navigation.open { transform: translateX(0); }
    .navigation ul { align-items: stretch; flex-direction: column; gap: 0; }
    .navigation ul a { display: block; padding: 1rem 0; border-bottom: 1px solid var(--color-border); font-family: 'Barlow Condensed'; font-size: 1.8rem; }
    .navigation ul a::after { display: none; }
  }
  @media (max-width: 640px) {
    .brand-logo { height: 65px; max-width: 260px; }
  }
  @media (max-width: 420px) {
    .brand-logo { height: 55px; max-width: 220px; }
  }

.contact-form { padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-lg); }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
  .contact-form label { display: grid; gap: .45rem; color: #dce1e7; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
  .contact-form input,
  .contact-form select,
  .contact-form textarea { width: 100%; border: 1px solid #353c45; border-radius: var(--radius-sm); background: #0c0f13; color: white; padding: .85rem 1rem; outline: none; }
  .contact-form input:focus,
  .contact-form select:focus,
  .contact-form textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(212,36,47,.16); }
  .form-full { grid-column: 1 / -1; }
  .honeypot { position: absolute; left: -9999px; }
  .form-status { min-height: 1.5rem; color: var(--color-muted); }
  .form-status:empty { display: none; }
  .form-status.success { color: #7fe0a0; }
  .field-validation-error { color: #ff737b; font-size: .78rem; }
  .contact-form button:disabled { opacity: .6; cursor: wait; }

  .contact-form .form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 1.25rem;
  }

  .contact-form .contact-submit {
    width: auto;
    min-width: 160px;
    max-width: 220px;
    padding: .85rem 1.5rem;
  }

  @media (max-width: 620px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-full { grid-column: auto; }
    .contact-form .form-actions { width: 100%; }
    .contact-form .contact-submit { width: 100%; max-width: none; }
  }

.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
  .hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,9,12,.96) 0%, rgba(7,9,12,.77) 45%, rgba(7,9,12,.28) 80%), linear-gradient(0deg, rgba(7,9,12,.82), transparent 50%); }
  .hero-content { position: relative; z-index: 2; padding: calc(var(--header-height) + 5rem) 0 9rem; }
  .hero h1 { max-width: 850px; margin-bottom: 1.2rem; }
  .hero-subtitle { max-width: 680px; margin: 0 0 2rem; color: #d3d8df; font-size: clamp(1.08rem, 2vw, 1.3rem); }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
  .hero-proof { position: absolute; z-index: 2; inset: auto 0 0; border-top: 1px solid var(--color-border); background: rgba(9,11,14,.72); backdrop-filter: blur(12px); }
  .proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
  .proof-grid div { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-right: 1px solid var(--color-border); }
  .proof-grid div:last-child { border-right: 0; }
  .proof-grid strong { font-family: 'Barlow Condensed'; font-size: 2rem; text-transform: uppercase; }
  .proof-grid span { color: var(--color-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
  @media (max-width: 700px) { .hero { min-height: 820px; } .hero-content { padding-bottom: 14rem; } .proof-grid { grid-template-columns: 1fr; } .proof-grid div { padding: .7rem 1rem; border-right: 0; border-bottom: 1px solid var(--color-border); } .proof-grid strong { min-width: 90px; font-size: 1.5rem; } }

.not-found{min-height:80vh;display:grid;align-items:center;padding-top:var(--header-height)}

.contact-grid{display:grid;grid-template-columns:.8fr 1.2fr;gap:clamp(2rem,6vw,6rem);align-items:start}.contact-grid dl{margin-top:2rem}.contact-grid dl div{padding:1rem 0;border-top:1px solid var(--color-border)}dt{color:#ff747c;font-size:.75rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}dd{margin:.25rem 0 0;font-size:1.05rem}@media(max-width:850px){.contact-grid{grid-template-columns:1fr}}

.schedule-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.schedule-grid article{padding:1.5rem;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface)}.schedule-grid h2{font-size:2rem}.class-row{display:grid;grid-template-columns:90px 1fr;gap:1rem;padding:.85rem 0;border-top:1px solid var(--color-border)}.class-row time{color:#ff737b;font-size:.8rem;font-weight:800}.class-row div{display:grid;gap:.2rem}.class-row small{color:var(--color-muted)}.membership{display:grid;grid-template-columns:.8fr 1.2fr;gap:4rem}.membership-cards{display:grid;gap:1rem}.membership-cards article{padding:1.4rem;border:1px solid #d9dce1;border-radius:var(--radius-md);background:white}.membership-cards h3{margin-bottom:.4rem}.membership-cards p{color:#59606a}@media(max-width:850px){.schedule-grid{grid-template-columns:repeat(2,1fr)}.membership{grid-template-columns:1fr}}@media(max-width:560px){.schedule-grid{grid-template-columns:1fr}}

.facility-page{display:grid;grid-template-columns:1.1fr .9fr;gap:clamp(2rem,6vw,6rem);align-items:center}.facility-page img{width:100%;border-radius:var(--radius-md)}.cta{display:flex;align-items:center;justify-content:space-between;gap:3rem}.cta>div{max-width:760px}@media(max-width:800px){.facility-page{grid-template-columns:1fr}.cta{align-items:stretch;flex-direction:column}}

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: end; }
  .intro-grid h2 { margin-bottom: 0; }
  .facility { position: relative; min-height: 720px; display: grid; align-items: center; overflow: hidden; padding: 0; }
  .facility > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.75); }
  .facility::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,9,12,.9), rgba(7,9,12,.18)); }
  .facility-inner { position: relative; z-index: 2; padding-block: 6rem; }
  .facility-panel { max-width: 600px; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: rgba(12,15,19,.82); backdrop-filter: blur(14px); }
  .facility-panel p:not(.eyebrow) { color: #d0d5dc; }
  .cta { display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
  .cta > div { max-width: 760px; }
  .cta h2 { margin-bottom: .6rem; }
  .cta p:not(.eyebrow) { color: #545b65; }
  @media (max-width: 800px) { .intro-grid { grid-template-columns: 1fr; } .cta { align-items: stretch; flex-direction: column; } }

.two-col,.facility-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,7vw,7rem);align-items:center}.facility-grid img{width:100%;border-radius:var(--radius-md)}@media(max-width:760px){.two-col,.facility-grid{grid-template-columns:1fr}}

.gallery-hero { padding: calc(var(--header-height) + 5rem) 0 4.5rem; background: radial-gradient(circle at 85% 30%, rgba(212,36,47,.24), transparent 30%), linear-gradient(135deg, #15191f, #090b0e 72%); border-bottom: 1px solid var(--color-border); }
  .gallery-hero__content { max-width: 850px; }
  .gallery-hero h1 { margin-bottom: 1rem; font-size: clamp(3.5rem, 9vw, 7rem); }
  .gallery-toolbar { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 2rem; }
  .gallery-toolbar .filter-button { padding: .65rem 1rem; border: 1px solid var(--color-border); border-radius: 99px; background: transparent; color: var(--color-muted); font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .gallery-toolbar .filter-button:hover, .gallery-toolbar .filter-button.active { border-color: var(--color-primary); background: var(--color-primary); color: white; }
  .gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
  .gallery-card { position: relative; grid-column: span 4; min-height: 330px; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: white; text-align: left; }
  .gallery-card:nth-child(1), .gallery-card:nth-child(6n + 1) { grid-column: span 8; }
  .gallery-card:nth-child(4n) { min-height: 410px; }
  .gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .45s ease; }
  .gallery-card:hover img { transform: scale(1.045); filter: brightness(.82); }
  .gallery-card__overlay { position: absolute; inset: auto 0 0; display: grid; gap: .25rem; padding: 4rem 1.25rem 1.2rem; background: linear-gradient(transparent, rgba(0,0,0,.9)); }
  .gallery-card__overlay small { color: #ff737b; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  .gallery-card__overlay strong { font-family: 'Barlow Condensed'; font-size: 1.45rem; text-transform: uppercase; }
  .gallery-empty { padding: 3rem; border: 1px dashed var(--color-border); border-radius: var(--radius-md); color: var(--color-muted); text-align: center; }
  .lightbox { width: min(94vw, 1100px); max-width: none; padding: 0; border: 0; border-radius: var(--radius-md); background: #080a0d; color: white; box-shadow: var(--shadow-lg); }
  .lightbox::backdrop { background: rgba(0,0,0,.88); backdrop-filter: blur(8px); }
  .lightbox figure { margin: 0; }
  .lightbox img { width: 100%; max-height: 78vh; object-fit: contain; background: #050607; }
  .lightbox figcaption { display: grid; gap: .25rem; padding: 1rem 1.25rem 1.25rem; }
  .lightbox figcaption small { color: #ff737b; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .lightbox figcaption strong { font-family: 'Barlow Condensed'; font-size: 1.5rem; text-transform: uppercase; }
  .lightbox__close, .lightbox__nav { position: absolute; z-index: 2; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(0,0,0,.62); color: white; }
  .lightbox__close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.8rem; }
  .lightbox__nav { top: 45%; width: 50px; height: 50px; font-size: 2rem; }
  .lightbox__nav--prev { left: 1rem; }
  .lightbox__nav--next { right: 1rem; }
  @media (max-width: 850px) { .gallery-card, .gallery-card:nth-child(1), .gallery-card:nth-child(6n + 1) { grid-column: span 6; min-height: 300px; } }
  @media (max-width: 560px) { .gallery-grid { display: grid; grid-template-columns: 1fr; } .gallery-card, .gallery-card:nth-child(1), .gallery-card:nth-child(6n + 1) { grid-column: auto; min-height: 280px; } .lightbox__nav { top: auto; bottom: 5rem; } }

.coach-list{display:grid;gap:6rem}.coach-profile{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:4rem;align-items:start;scroll-margin-top:110px}.coach-profile:nth-child(even){grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr)}.coach-profile:nth-child(even)>img{order:2}.coach-profile>img{width:100%;aspect-ratio:4/5;object-fit:cover;border-radius:var(--radius-md)}@media(max-width:800px){.coach-profile,.coach-profile:nth-child(even){grid-template-columns:1fr;gap:2rem}.coach-profile:nth-child(even)>img{order:0}}

.detail-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:4rem}.detail-grid aside{align-self:start;padding:2rem;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface)}.detail-grid aside h2{font-size:2.4rem}@media(max-width:800px){.detail-grid{grid-template-columns:1fr}}


/* =========================================================
   HOME HERO + UPCOMING EVENTS
   ========================================================= */
.hero .hero-content.hero-content--with-events {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 500px);
  gap: 2.25rem;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
}

.hero-main {
  min-width: 0;
}

.hero-events {
  width: 100%;
  max-width: 500px;
  justify-self: end;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(11, 13, 16, .86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-events__heading {
  margin-bottom: .75rem;
}

.hero-events__heading .eyebrow {
  margin-bottom: .45rem;
}

.hero-events__heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
}

/* Events displayed as a grid so the event name may wrap while
   date/time is protected in its own fixed-width column. */
.events-grid {
  width: 100%;
}

.events-grid__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 1rem;
  align-items: start;
}

.events-grid__row {
  padding: .7rem .25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.events-grid__row:last-child {
  border-bottom: 0;
}

.events-grid__event {
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.event-name-link {
  color: var(--color-white);
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.event-name-link:hover,
.event-name-link:focus-visible {
  color: #ff8a91;
  text-decoration: underline;
}

.events-grid__date {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    min-width: max-content;
    width: max-content;
    justify-self: end;
    font-size: .88rem;
    opacity: .8;
}


.event-date-fixed {
    display: inline-block;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}
/* Event poster modal */
.event-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: .75rem;
}

.event-modal.is-open {
  display: flex;
}

.event-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .82);
}

.event-modal__dialog {
  position: relative;
  isolation: isolate;
  z-index: 1;
  width: min(900px, 96vw);
  max-height: 96vh;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #111;
  box-shadow: var(--shadow-lg);
}

.event-modal__dialog h2 {
  margin: 0 3rem .75rem 0;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.event-modal__image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  margin: 0 auto;
}

.event-modal__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  background: rgba(0, 0, 0, .8);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
}

.event-modal__close:hover {
  background: rgba(255, 255, 255, .2);
}

/* Stack the hero and events panel on tablets and phones.
   Let the hero grow with its content so the Events card cannot be clipped. */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    align-items: stretch;
  }

  .hero .hero-content.hero-content--with-events {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 13rem;
  }

  .hero-events {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .events-grid {
    display: block;
    width: 100%;
  }
}

/* Mobile event layout:
   event name wraps; date/time remains unbroken and aligned right. */
@media (max-width: 600px) {
  .hero .hero-content.hero-content--with-events {
    gap: 1.5rem;
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 12rem;
  }

  .hero-events {
    padding: .9rem 1rem;
    border-radius: 12px;
  }

  .hero-events__heading h2 {
    font-size: 1.8rem;
  }

  .events-grid__row {
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: .65rem;
    padding: .65rem 0;
  }

  .events-grid__event {
    min-width: 0;
    padding-right: .25rem;
  }

  .events-grid__date {
    width: max-content;
    min-width: max-content;
    justify-self: end;
    white-space: nowrap !important;
    font-size: .72rem;
  }

  .event-date-fixed {
    white-space: nowrap !important;
  }

  .event-modal {
    padding: .5rem;
  }

  .event-modal__dialog {
    width: 98vw;
    max-height: 96vh;
    padding: .75rem;
  }

  .event-modal__dialog h2 {
    font-size: 1.15rem;
    margin-right: 2.75rem;
  }

  .event-modal__image {
    max-height: 86vh;
  }
}
