/* Theme Variables - Import first for use throughout */
@import url('variables.css?v=3');

/* Base Styles for Westport-Grayland Chamber of Commerce */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--ce-font-body);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
}

/* Announcement Bar — styled by js/alert-bar.js (AlertBarManager.ensureStyles), which is the
   ONE definition. It used to live here, but only the 14 pages that load style.css got it,
   so adding the alert bar to a record page rendered it as unstyled text (INC-5E0D5361).
   The component now carries its own baseline; override it here or in coastal.css if needed. */

/* Header Styles - Two Tier Layout */
header {
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-light);
}

/* Upper Header Section */
.header-top {
  background-color: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border-light);
  padding: 1rem 0;
}

.header-top-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  height: auto;
  max-height: 100px;
  width: auto;
  display: block;
}

.header-contact {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-gray-500);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.contact-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-gray-900);
  text-transform: uppercase;
  line-height: 1.4;
}

.contact-value a {
  color: var(--color-gray-900);
  text-decoration: none;
  transition: color var(--transition);
}

.contact-value a:hover {
  color: var(--color-primary-darkest);
}

.header-search {
  flex-shrink: 0;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: color 0.3s ease;
}

.search-btn:hover {
  color: var(--ce-ocean);
}

.search-btn svg {
  width: 20px;
  height: 20px;
}

/* Lower Header Section (Navigation) */
.header-bottom {
  background-color: #fff;
}

.header-bottom-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation Styles - Override NavigationManager styles */
[data-navigation] {
  background-color: #fff !important;
}

[data-navigation] .universal-nav {
  background-color: #fff !important;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

[data-navigation] .nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}

[data-navigation] .nav-menu > li {
  position: relative;
}

[data-navigation] .nav-menu > li > a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--ce-ocean);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}

[data-navigation] .nav-menu > li > a:hover {
  background-color: var(--ce-bg-soft);
  color: var(--ce-ocean-deepest);
}

[data-navigation] .nav-menu > li > a.active {
  background-color: var(--ce-line-soft);
  color: var(--ce-ocean-deepest);
}

/* Social Media Icons */
.nav-social {
  margin-left: auto;
}

.social-icons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 0 1rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid var(--ce-line-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #000;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--ce-bg-soft);
  border-color: var(--ce-gray-soft);
  transform: scale(1.05);
}

.social-icon span {
  display: block;
}

/* Hide mobile toggle in desktop view */
[data-navigation] .mobile-menu-toggle {
  display: none;
}

/* Main Content */
main {
  min-height: calc(100vh - 400px);
}

.hero {
  background: linear-gradient(135deg, var(--color-primary-darker) 0%, var(--color-primary) 100%);
  color: var(--color-text-inverse);
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.container h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Footer Styles - Matching Original Design */
footer {
  background-color: var(--color-gray-600);
  color: var(--color-gray-300);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-main {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 2rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ce-line-gray);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

/* Contact Info Column */
.footer-contact {
  gap: 1.5rem;
}

.footer-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ce-line-gray);
  letter-spacing: 0.5px;
}

.footer-value {
  font-size: 0.875rem;
  color: var(--ce-line-gray);
  line-height: 1.6;
}

.footer-value a {
  color: var(--ce-line-gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-value a:hover {
  color: #fff;
}

/* Useful Links Column */
.footer-links {
  gap: 0;
}

.footer-link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link-list li {
  margin: 0;
}

.footer-link-list a {
  color: var(--ce-line-gray);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
  display: inline-block;
}

.footer-link-list a:hover {
  color: #fff;
}

/* Social Media Icons */
.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ce-gray);
}

.footer-social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  transition: all 0.3s ease;
}

.footer-social-icon:hover {
  background-color: #fff;
  color: var(--ce-slate-mid);
  transform: scale(1.1);
}

.footer-social-icon svg {
  width: 20px;
  height: 20px;
}

.footer-social-icon span {
  font-weight: 600;
  font-size: 1rem;
}

/* Copyright */
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ce-gray);
  text-align: center;
}

.footer-bottom p {
  color: var(--ce-line-gray);
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .header-top-content {
    padding: 0 1rem;
  }
  
  .header-contact {
    gap: 1.5rem;
  }
  
  .header-bottom-content {
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .header-top {
    padding: 1rem 0;
  }
  
  .header-top-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .header-logo {
    width: 100%;
    text-align: center;
  }
  
  .header-logo img {
    max-height: 80px;
    margin: 0 auto;
  }
  
  .header-contact {
    width: 100%;
    flex-direction: column;
    gap: 1rem;
  }
  
  .contact-item {
    width: 100%;
  }
  
  .header-search {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }
  
  /* Show mobile toggle */
  [data-navigation] .mobile-menu-toggle {
    display: block;
  }
  
  [data-navigation] .nav-menu {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  
  [data-navigation] .nav-menu.active {
    max-height: 100vh;
  }
  
  [data-navigation] .nav-social {
    margin-left: 0;
    width: 100%;
    border-top: 1px solid var(--ce-line-soft);
    padding: 1rem;
  }
  
  .social-icons {
    justify-content: center;
    padding: 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-social {
    gap: 0.75rem;
  }
  
  .footer-social-icon {
    width: 36px;
    height: 36px;
  }
}

/* ============================================
   EVENTS SECTION STYLES
   ============================================ */

/* Events Grid Layout */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

/* Event Card */
.event-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   THE ART WINDOW — show the whole flyer, never a crop.
   ------------------------------------------------------------
   43% of this site's event art is PORTRAIT (flyers, posters, a
   sign photographed on a phone). This box used to be a fixed
   200px-tall `object-fit: cover` crop, which threw away about
   60% of a tall flyer — normally the half carrying the times,
   the price and the phone number. The letterbox-over-a-blurred-
   copy treatment now comes from the SHARED .ce-artwin (see
   css/ce-artwin.css + CE.artWindow in js/coastal.js, which the
   trading card uses too); what stays here is only the shape of
   the box and the card's own chrome.

   WHY 4:3 AND NOT THE OLD 200px. A ratio, not a height, so the
   window scales with the card instead of squeezing the picture
   as the column narrows. At the real column widths — ~373px in
   the 3-up desktop grid, ~350px full-bleed on a phone — 4:3
   gives a 280px / 262px-tall window, and an 8.5x11 flyer lands
   ~210px wide inside it: its body text measured legible at both
   widths. Deeper (1:1) reads the flyer better but pillarboxes
   every landscape photo into a band of blur and pushes the date
   and title below the fold on a phone; shallower (16:9) shrinks
   a portrait flyer back to thumbnail size. 4:3 is the point
   where BOTH shapes are still themselves. The text block below
   is untouched — none of this was bought with its space.
   ============================================================ */
.event-image-wrapper {
  /* position/overflow/`contain` come from .ce-artwin; this one is repeated
     because the badges inside are absolutely positioned against it and must
     not fall out of the card if that stylesheet ever fails to arrive. */
  position: relative;
  aspect-ratio: 4 / 3;
  /* A very wide single-column card (a tablet in landscape, a wide
     Happening-Now panel) would otherwise grow a 500px-tall window. */
  max-height: 340px;
}

/* The art is a real <button>: it is the control that opens the full-size
   flyer, so it must be tabbable and take Enter/Space, and a <div> with a
   click handler is neither. These declarations only undo what a browser
   puts on a button. */
button.event-image-wrapper {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
  -webkit-appearance: none;
  appearance: none;
}

button.event-image-wrapper:focus-visible {
  outline: 3px solid var(--ce-coral-deep, #c2410c);
  outline-offset: -3px;
}

/* No zoom-on-hover any more: scaling a `contain` image pushes the edges of
   the flyer out through the box, which is the crop we just removed. The
   affordance moves to the corner chip instead. */
.event-image {
  transition: opacity 0.3s ease;
}

/* "This opens bigger" — bottom-RIGHT, because the category pill owns the
   top-left and the "Happening Now" pill the bottom-left, so the three can
   never collide however long either label runs. */
.event-image-zoom {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.75rem;
  color: #fff;
  background: rgba(6, 9, 14, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.event-card:hover .event-image-zoom,
button.event-image-wrapper:focus-visible .event-image-zoom {
  opacity: 1;
}

/* Touch has no hover, so the chip would never appear — show it there. */
@media (hover: none) {
  .event-image-zoom { opacity: 1; }
}

/* A dead image path (a legacy URL whose file never made it across) must not
   leave a 280px hole. Collapse to a short brand band, but KEEP the badges
   that live in this box — losing those would be a real regression. */
.event-image-wrapper.is-broken {
  aspect-ratio: auto;
  height: 7rem;
  background: linear-gradient(135deg, var(--ce-ocean-navy, #0a1a30), var(--ce-ocean-sky, #2c6e91));
}

.event-image-wrapper.is-broken .event-image,
.event-image-wrapper.is-broken .event-image-zoom { display: none; }

/* Nothing to enlarge, so it must not offer to. */
button.event-image-wrapper.is-broken { cursor: default; }

.event-image-wrapper.is-broken::before { display: none; }

.event-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #fff;
  background: var(--ce-ocean-sky);
  /* Category colors come from event DATA (any hue) — this overlay darkens whatever
     arrives so white 12px text always meets WCAG-AA contrast. Don't remove. */
  background-image: linear-gradient(rgba(0, 0, 0, .30), rgba(0, 0, 0, .30));
}

.event-image-wrapper .event-category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  /* MUST be >= 2. The art window's <img> is itself positioned at z-index 1
     (.ce-artwin > img), so a badge left on z-index:auto paints UNDERNEATH the
     picture no matter that it comes later in the DOM — a portrait flyer, which
     fills the middle of a `contain` box, then sliced this pill in half. The
     other two overlays in this box (.happening-now-badge, .event-image-zoom)
     were already on 2; this one was the one that got missed. */
  z-index: 2;
}

/* ============================================================
   "Happening Now" live badge — added by renderEventCard()
   (js/events-loader.js) to any card whose window contains right
   now. It shipped with NO rule at all, so it rendered as bare
   text shoved above the photo; this is the styling it was always
   meant to have. Deliberately BOTTOM-LEFT of the image: the
   category pill owns the top-left, so the two can't collide no
   matter how long either label runs. Same visual language as the
   homepage seasons "now-chip" — coral pill, micro-caps, pulsing
   dot — so "this is live" looks the same everywhere on the site.
   ============================================================ */
.happening-now-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.375rem 0.75rem 0.375rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #fff;
  background: var(--ce-coral-deep, var(--ce-coral-deep));
  box-shadow: 0 2px 10px rgba(194, 65, 12, 0.45),
              inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.happening-now-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: happeningPulse 2s ease-out infinite;
}

/* Ring pulse stays inside the pill's own padding, so the card's
   overflow:hidden never clips it. */
@keyframes happeningPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .happening-now-badge::before { animation: none; }
}

.event-image-wrapper .happening-now-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 2;
}

/* No-photo card: the badge just flows next to the category pill. */
.event-content .happening-now-badge {
  margin: 0 0 0.75rem 0.35rem;
}

.event-content {
  padding: 1.25rem;
}

.event-content .event-category-badge {
  margin-bottom: 0.75rem;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--ce-navy-alt);
}

.event-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.event-title a:hover {
  color: var(--ce-ocean-bright);
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--ce-slate);
}

.event-meta p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.event-meta i {
  width: 16px;
  text-align: center;
  color: var(--ce-ocean-bright);
}

.event-description {
  font-size: 0.9rem;
  color: var(--ce-slate-dark);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.event-cost {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #047857; /* AA on white (was #059669 @ 3.9:1) */
  margin-bottom: 1rem;
}

.event-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Event List Layout */
.events-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-list-item {
  border-bottom: 1px solid var(--ce-line-soft);
}

.event-list-item:last-child {
  border-bottom: none;
}

.event-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.event-link:hover {
  background-color: var(--ce-slate-bg);
}

.event-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 0.5rem;
  background: var(--ce-ocean-bright);
  color: #fff;
  border-radius: 8px;
  text-align: center;
}

.event-date-badge .month {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-date-badge .day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.event-link .event-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.event-link .event-location {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* Compact Events (Sidebar Widget) */
.events-compact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-compact-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  transition: background-color var(--transition);
}

.event-compact-item:hover {
  background: var(--color-bg-tertiary);
}

.event-compact-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  padding: 0.5rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius);
  text-align: center;
}

.event-compact-date .month {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.event-compact-date .day {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.event-compact-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.event-compact-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
  line-height: 1.3;
}

.event-compact-title:hover {
  color: var(--color-primary);
}

.event-compact-time {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* Events Loading & Error States */
.events-loading,
.events-error,
.no-events {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--ce-slate);
}

.events-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.events-error i {
  font-size: 2.5rem;
  color: #ef4444;
}

.no-events {
  font-size: 1.1rem;
  font-style: italic;
}

/* Button Styles for Events */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--ce-ocean-bright);
  color: #fff;
  border-color: var(--ce-ocean-bright);
}

.btn-primary:hover {
  background: var(--ce-ocean-deeper);
  border-color: var(--ce-ocean-deeper);
}

.btn-outline {
  background: transparent;
  color: var(--ce-ocean-bright);
  border-color: var(--ce-ocean-bright);
}

.btn-outline:hover {
  background: var(--ce-ocean-bright);
  color: #fff;
}

/* Events Section Container */
.events-section {
  padding: 4rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.events-section h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ce-navy-alt);
  margin-bottom: 0.5rem;
}

.events-section .section-subtitle {
  font-size: 1.1rem;
  color: var(--ce-slate);
  margin-bottom: 2rem;
}

/* Responsive Events */
@media (max-width: 768px) {
  .events-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* The ratio already scales the window with the card, so the old fixed
     180px phone height (which cropped a portrait flyer hardest of all,
     the card being at its WIDEST here) has nothing left to do. */
  .event-image-wrapper {
    max-height: 300px;
  }
  
  .events-section {
    padding: 2rem 1rem;
  }
  
  .events-section h2 {
    font-size: 1.5rem;
  }
  
  .event-actions {
    flex-direction: column;
  }
  
  .event-actions .btn {
    width: 100%;
    text-align: center;
  }
}


/* ==============================================
   EVENTS ATTRIBUTION (Powered by Westport Events)
   ============================================== */

.events-attribution {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--color-border-light, var(--ce-line-soft));
  color: var(--color-text-secondary, var(--ce-slate));
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.events-attribution.visible {
  opacity: 1;
  transform: translateY(0);
}

.events-attribution p {
  margin: 0;
}

.events-attribution a {
  color: var(--color-primary, var(--ce-ocean-bright));
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition, 0.2s ease);
}

.events-attribution a:hover {
  text-decoration: underline;
}

.events-attribution .brand-name {
  font-weight: 600;
}

.events-attribution .copyright {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted, #94a3b8);
}


/* ==============================================
   MEMBER DIRECTORY STYLES
   ============================================== */

/* ==============================================
   PAGE HERO — shared cinematic page header
   ONE component for events / contact / members
   (replaces the three copy-pasted flat-blue heroes:
   .events-page-header, .contact-hero, .directory-hero)
   Signature: dawn over the Pacific — a coral horizon
   glow low on deep ocean-navy, closed by a luminous
   horizon rule that also blends the seam below.
   Language borrowed from the site's own .signature /
   event .hero (ocean-navy #0a1a30, coral #ff7a45,
   Playfair Display) so every page speaks one dialect.
   ============================================== */
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(3.25rem, 6vw, 5rem) 1.5rem clamp(3.5rem, 6vw, 5.25rem);
  text-align: center;
  color: #fff;
  background: var(--ce-navy); /* deep ocean-navy fallback */
}
/* atmosphere: base navy + dawn glow (low-right) + cool sky wash (top-left) */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(115% 135% at 80% 118%, color-mix(in srgb, var(--ce-coral-hot) 30%, transparent), rgba(194, 65, 12, .10) 34%, transparent 62%),
    radial-gradient(90% 120% at 12% -12%, rgba(59, 130, 246, .20), transparent 55%),
    linear-gradient(168deg, var(--ce-deep-2) 0%, var(--ce-deep-3) 44%, var(--ce-navy) 100%);
}
/* luminous horizon rule at the base — signature + blended seam */
.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ce-coral-hot) 50%, transparent) 20%, rgba(255, 255, 255, .55) 50%, color-mix(in srgb, var(--ce-coral-hot) 50%, transparent) 80%, transparent);
  opacity: .7;
}
.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}
.page-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.05rem;
  font-family: var(--ce-font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ce-coral-soft); /* coral, lightened for AA contrast on navy */
}
.page-hero__kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ce-coral-hot);
  box-shadow: 0 0 12px color-mix(in srgb, var(--ce-coral-hot) 85%, transparent);
}
.page-hero h1 {
  margin: 0;
  font-family: var(--ce-font-display);
  font-weight: 800;
  font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -.01em;
  color: #fff;
  text-shadow: 0 4px 34px rgba(0, 0, 0, .38);
}
.page-hero__sub {
  max-width: 60ch;
  margin: 1.15rem auto 0;
  font-family: var(--ce-font-body);
  font-size: clamp(1rem, 1.45vw, 1.18rem);
  line-height: 1.6;
  color: var(--ce-hero-lede);
}
/* Optional action row: ONE primary (coral) + ghost secondaries on the navy,
   with a single fine-print line beneath. Lives on the shared component so any
   page-hero can carry its call to action instead of bolting a button row onto
   the section below (that reads as an afterthought — webcams, 2026-08-13). */
.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  margin-top: clamp(1.6rem, 3vw, 2.1rem);
}
.page-hero__actions .ce-cta {
  cursor: pointer;
  font-size: .97rem;
  padding: 14px 26px;
}
/* :not() — a blanket border:0 here would out-specify .ce-cta--ghost's outline
   and flatten the secondary button into a grey blob on the navy. Transparent
   rather than 0 so the filled button boxes out to the same height as the ghost
   (border:0 left them 47px vs 49px — visibly mismatched side by side). */
.page-hero__actions .ce-cta:not(.ce-cta--ghost) { border: 1.5px solid transparent; }
.page-hero__actions .ce-cta svg { width: 18px; height: 18px; flex-shrink: 0; }
.page-hero__actions .ce-cta--ghost:hover { background: rgba(255, 255, 255, .22); }
.page-hero__actions .ce-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .8);
}
.page-hero__fine {
  max-width: 62ch;
  margin: 1.1rem auto 0;
  font-family: var(--ce-font-body);
  font-size: .875rem;
  line-height: 1.65;
  color: var(--ce-hero-fine);
}
.page-hero__fine a {
  color: var(--ce-hero-link);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 211, 224, .45);
  white-space: nowrap;
}
.page-hero__fine a:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, .75); }
@media (max-width: 640px) {
  .page-hero { padding: 2.75rem 1.25rem 3rem; }
}
@media (max-width: 560px) {
  .page-hero__actions { flex-direction: column; gap: .7rem; }
  .page-hero__actions .ce-cta { width: 100%; max-width: 320px; justify-content: center; }
}

/* Directory Controls */
.directory-controls {
  background: var(--ce-slate-bg);
  border-bottom: 1px solid var(--ce-slate-line);
  padding: 1rem 0;
  position: sticky;
  /* Pin BELOW the sticky site header (z-1000) — at top:0 the header painted over
     the first ~60px of this bar, hiding the top row of group pills. The header
     shrinks to --ce-hdr-h-sm once scrolled, which is exactly when this pins. */
  top: var(--ce-hdr-h-sm, 60px);
  z-index: 100;
}

/* The shared .container carries 3rem of vertical padding for page sections —
   inside a filter bar that was 96px of dead height. Reset it here only. */
.directory-controls .container {
  padding-top: 0;
  padding-bottom: 0;
}

.controls-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box i {
  position: absolute;
  left: 1rem;
  color: var(--ce-slate);
}

.search-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 2.75rem 0.75rem 2.5rem;
  border: 1px solid var(--ce-slate-line);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--ce-ocean-bright);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.clear-search {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  line-height: 1;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--ce-slate);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.clear-search:hover {
  color: var(--ce-navy-alt);
  background: var(--ce-slate-bg-2);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  color: var(--ce-slate);
  white-space: nowrap;
}

.filter-group select {
  padding: 0.625rem 2rem 0.625rem 1rem;
  border: 1px solid var(--ce-slate-line);
  border-radius: 6px;
  font-size: 0.875rem;
  background: #fff;
  cursor: pointer;
}

.view-toggle {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--ce-slate-line);
  border-radius: 6px;
}

.view-btn {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ce-slate);
  transition: all 0.2s ease;
}

.view-btn.active {
  background: #fff;
  color: var(--ce-ocean-bright);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.results-count {
  font-size: 0.875rem;
  color: var(--ce-slate);
}

/* Directory Content */
.directory-content {
  padding: 2rem 0;
  min-height: 60vh;
}

.directory-loading,
.directory-error,
.directory-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--ce-slate);
}

.directory-loading .spinner,
.member-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ce-slate-line);
  border-top-color: var(--ce-ocean-bright);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.directory-error i,
.directory-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.directory-error i {
  color: #ef4444;
}

.directory-empty i {
  color: var(--ce-gray-soft);
}

/* Member Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Member List View */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.members-list .member-card {
  flex-direction: row;
}

.members-list .member-card-image {
  width: 200px;
  min-width: 200px;
  border-radius: 8px 0 0 8px;
}

/* Member Card */
.member-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.member-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--ce-slate-bg-2);
}

.member-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.member-card:hover .member-card-image img {
  transform: scale(1.05);
}

.member-card-category {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(37, 99, 235, 0.9);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.member-card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.member-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

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

.member-card-title a:hover {
  color: var(--ce-ocean-bright);
}

.member-card-description {
  font-size: 0.875rem;
  color: var(--ce-slate);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.member-card-address,
.member-card-phone {
  font-size: 0.8rem;
  color: var(--ce-slate);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.member-card-address i,
.member-card-phone i {
  color: var(--ce-ocean-bright);
  width: 1rem;
}

.member-card-phone a {
  color: var(--ce-slate);
  text-decoration: none;
}

.member-card-phone a:hover {
  color: var(--ce-ocean-bright);
}

.member-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ce-slate-line);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* Join Chamber Banner */
.join-chamber-banner {
  background: linear-gradient(135deg, var(--ce-slate-bg) 0%, var(--ce-slate-line) 100%);
  padding: 3rem 2rem;
  margin-top: 3rem;
}

.banner-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.banner-content h2 {
  font-size: 1.5rem;
  color: var(--ce-navy-alt);
  margin-bottom: 0.5rem;
}

.banner-content p {
  color: var(--ce-slate);
  margin-bottom: 1.5rem;
}


/* ==============================================
   MEMBER PROFILE STYLES
   ============================================== */

/* Member Loading */
.member-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
  color: var(--ce-slate);
}

/* Member Error */
.member-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.member-error i {
  font-size: 4rem;
  color: #ef4444;
  margin-bottom: 1rem;
}

.member-error h2 {
  font-size: 1.75rem;
  color: var(--ce-navy-alt);
  margin-bottom: 0.75rem;
}

.member-error p {
  color: var(--ce-slate);
  max-width: 400px;
  margin-bottom: 1.5rem;
}

.member-error a {
  color: var(--ce-ocean-bright);
}

/* Member Hero */
.member-hero {
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, var(--ce-navy-alt) 0%, var(--ce-ocean-bright) 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.member-hero.has-image {
  background-size: cover;
  background-position: center;
}

.member-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,0.95) 0%, rgba(26,26,46,0.5) 50%, rgba(26,26,46,0.3) 100%);
}

.member-hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.member-name {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.member-category {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
  display: inline-block;
  background: rgba(37, 99, 235, 0.6);
  padding: 0.25rem 1rem;
  border-radius: 20px;
}

/* Member Details Section */
.member-details-section {
  padding: 3rem 0;
  background: var(--ce-slate-bg);
}

.member-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

/* Main Content */
.member-main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.member-image-wrapper {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.member-primary-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 500px;
  object-fit: cover;
}

.member-description {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.member-description h2 {
  font-size: 1.5rem;
  color: var(--ce-navy-alt);
  margin: 0 0 1.25rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ce-ocean-bright);
}

.description-text {
  color: var(--ce-slate-dark);
  line-height: 1.7;
}

.description-text p {
  margin: 0 0 1rem 0;
}

.description-text p:last-child {
  margin-bottom: 0;
}

/* Fun Facts */
.member-fun-facts {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.member-fun-facts h2 {
  font-size: 1.25rem;
  color: #92400e;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.member-fun-facts h2 i {
  color: #d97706;
}

.fun-facts-content {
  color: #78350f;
  line-height: 1.6;
}

/* Photo Gallery */
.member-gallery {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.member-gallery h2 {
  font-size: 1.5rem;
  color: var(--ce-navy-alt);
  margin: 0 0 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.member-gallery h2 i {
  color: var(--ce-ocean-bright);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background-color 0.2s ease;
}

.gallery-item:hover::after {
  background: rgba(0,0,0,0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Sidebar */
.member-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-card h3 {
  font-size: 1rem;
  color: var(--ce-navy-alt);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-card h3 i {
  color: var(--ce-ocean-bright);
}

/* Member Badge */
.member-badge {
  background: linear-gradient(135deg, var(--ce-ocean-bright) 0%, var(--ce-ocean-deeper) 100%);
  color: #fff;
  text-align: center;
}

.member-badge p {
  margin: 0;
}

.member-badge strong {
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.member-badge i {
  color: #86efac;
}

.badge-text {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: 0.25rem !important;
}

/* Contact Card */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-phone {
  background: #dcfce7;
  color: #166534;
}

.btn-phone:hover {
  background: #bbf7d0;
}

.btn-email {
  background: #dbeafe;
  color: var(--ce-ocean);
}

.btn-email:hover {
  background: #bfdbfe;
}

.btn-website {
  background: #f3e8ff;
  color: #7c3aed;
}

.btn-website:hover {
  background: #e9d5ff;
}

/* Address */
.address-text {
  color: var(--ce-slate-dark);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

/* Hours */
.hours-content {
  color: var(--ce-slate-dark);
}

.hours-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--ce-slate-line);
}

.hours-row:last-child {
  border-bottom: none;
}

.hours-row .day {
  font-weight: 500;
  color: var(--ce-navy-alt);
}

/* Category Tags */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--ce-slate-line);
  color: var(--ce-slate-dark);
  border-radius: 20px;
  font-size: 0.8rem;
}

.tag-category {
  background: var(--ce-ocean-bright);
  color: #fff;
}

/* Back to Directory */
.back-to-directory {
  padding: 2rem 0;
  background: var(--ce-slate-bg);
  border-top: 1px solid var(--ce-slate-line);
}

.btn-secondary {
  background: var(--ce-slate-dark);
  color: #fff;
  border-color: var(--ce-slate-dark);
}

.btn-secondary:hover {
  background: var(--ce-slate-deep);
  border-color: var(--ce-slate-deep);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10001;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  transition: background-color 0.2s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

#lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}

/* Responsive Member Styles */
@media (max-width: 1024px) {
  .member-layout {
    grid-template-columns: 1fr;
  }
  
  .member-sidebar {
    order: -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}


/* ==============================================
   UTILITY COMPONENTS - Shared across site
   ============================================== */

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--color-primary, var(--ce-ocean-bright));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading State */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1rem;
  color: var(--color-text-secondary, var(--ce-slate));
}

.loading-state p {
  margin: 0;
  font-size: 1rem;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.loading-overlay.show {
  display: flex;
}

.loading-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Alert Container */
.alert-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3000;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

/* Alert Messages */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.1));
  pointer-events: auto;
  animation: slideInRight 0.3s ease;
  opacity: 0;
  transform: translateX(100%);
}

.alert.show {
  opacity: 1;
  transform: translateX(0);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.alert i {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.alert span {
  flex: 1;
  line-height: 1.5;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  padding: 0;
  margin-left: 0.5rem;
  transition: opacity 0.2s ease;
}

.alert-close:hover {
  opacity: 1;
}

.alert-success {
  background: var(--color-success-bg, #dcfce7);
  color: var(--color-success-text, #166534);
  border-left: 4px solid var(--color-success, #059669);
}

.alert-error {
  background: var(--color-error-bg, #fee2e2);
  color: var(--color-error-text, #991b1b);
  border-left: 4px solid var(--color-error, #ef4444);
}

.alert-warning {
  background: var(--color-warning-bg, #fef3c7);
  color: var(--color-warning-text, #92400e);
  border-left: 4px solid var(--color-warning, #f59e0b);
}

.alert-info {
  background: var(--color-info-bg, #dbeafe);
  color: var(--color-info-text, var(--ce-ocean));
  border-left: 4px solid var(--color-info, var(--ce-ocean-light));
}

/* Button Spinner */
.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.btn-loading {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-secondary, var(--ce-slate));
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-gray-400, var(--ce-gray-soft));
  display: block;
}

.empty-state h3 {
  margin: 0 0 0.5rem 0;
  color: var(--color-text-primary, var(--ce-navy-alt));
  font-size: 1.25rem;
}

.empty-state p {
  margin: 0 0 1.5rem 0;
  color: var(--color-text-secondary, var(--ce-slate));
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.empty-state .btn {
  margin-top: 1rem;
}

/* Modal Styles (if not already defined) */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg-overlay, rgba(0, 0, 0, 0.6));
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--color-bg-primary, #fff);
  border-radius: var(--radius-lg, 12px);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl, 0 20px 25px rgba(0, 0, 0, 0.3));
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border, var(--ce-slate-line));
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--color-bg-primary, #fff);
  z-index: 10;
}

.modal-header h2 {
  margin: 0;
  color: var(--color-text-primary, var(--ce-navy-alt));
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-secondary, #666);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius, 6px);
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background: var(--color-gray-100, var(--ce-bg-soft));
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border, var(--ce-slate-line));
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  position: sticky;
  bottom: 0;
  background: var(--color-bg-primary, #fff);
}

@media (max-width: 768px) {
  /* ---- Mobile filter bar --------------------------------------------------
     This bar used to pin at top:0 while stacking every control on its own row
     (582px tall on a 375x812 phone), leaving a ~166px window onto the results.
     On mobile it now scrolls away with the page and lays the controls out in
     two compact rows, so the directory gets the whole screen. */
  .directory-controls {
    position: static;
    padding: 0.75rem 0;
  }

  .controls-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
  }

  /* Row 1: search, full width. Row 2: category + view toggle + count. */
  .search-box {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  /* basis 0, not auto — at auto the select's max-content width claimed the whole
     row and bumped the view toggle onto a line of its own. */
  .filter-group {
    flex: 1 1 0;
    min-width: 0;
    gap: 0.4rem;
  }

  .filter-group select {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 1.75rem 0.5rem 0.7rem;
  }

  .view-toggle {
    flex: 0 0 auto;
    align-self: center;
  }

  .results-count {
    flex: 1 1 100%;
    text-align: right;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }
  
  .members-list .member-card {
    flex-direction: column;
  }
  
  .members-list .member-card-image {
    width: 100%;
    border-radius: 8px 8px 0 0;
  }
  
  .member-name {
    font-size: 2rem;
  }
  
  .member-hero-content {
    padding: 2rem 1.5rem;
  }
  
  .member-sidebar {
    grid-template-columns: 1fr;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

/* ===========================================
   TODAY IN WESTPORT SECTION
   =========================================== */

.today-section {
  background: linear-gradient(135deg, var(--ce-slate-bg) 0%, var(--ce-ocean-wash) 100%);
  padding: 3rem 0;
  margin: 2rem 0;
}

.today-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.today-header h2 {
  font-size: 1.75rem;
  color: var(--color-primary-darker, var(--ce-ocean-deepest));
  margin: 0;
}

.view-all-link {
  color: var(--color-primary, var(--ce-ocean-light));
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.view-all-link:hover {
  color: var(--color-primary-darker, var(--ce-ocean));
  text-decoration: underline;
}

.today-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.today-event-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--color-primary, var(--ce-ocean-light));
}

.today-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.today-event-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-primary, var(--ce-ocean-light));
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.time-icon {
  font-size: 1rem;
}

.today-event-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-primary, var(--ce-gray-deep));
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.today-event-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary, var(--ce-gray));
  margin-bottom: 0.5rem;
}

.location-icon {
  font-size: 0.9rem;
}

.today-event-category {
  display: inline-block;
  background: var(--color-bg-secondary, var(--ce-bg-soft));
  color: var(--color-text-secondary, var(--ce-gray));
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.today-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--color-text-secondary, var(--ce-gray));
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-border-light, var(--ce-line-soft));
  border-top-color: var(--color-primary, var(--ce-ocean-light));
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.today-no-events {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  color: var(--color-text-secondary, var(--ce-gray));
}

.today-no-events a {
  color: var(--color-primary, var(--ce-ocean-light));
  text-decoration: none;
}

.today-no-events a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .today-section {
    padding: 2rem 0;
  }
  
  .today-header {
    flex-direction: column;
    text-align: center;
  }
  
  .today-header h2 {
    font-size: 1.5rem;
  }
  
  .today-events-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Chamber-hosted event marker — an inline SVG star (a shape, not
   an emoji; project rule) that distinguishes the Chamber's OWN
   events from community events across every listing (events page,
   today/happening-now widgets, sidebar). Shared here so one rule
   colours it everywhere a card renders. Legend explains it.
   ============================================================ */
.chamber-star {
  display: inline-flex;
  align-items: center;
  vertical-align: baseline;
  margin-left: 0.35em;
  color: #f59e0b; /* amber "award" gold — reads as special on light + dark cards */
}
.chamber-star svg {
  width: 0.9em;
  height: 0.9em;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}