:root {
  --green-dark: #1a3a2a;
  --green-deep: #234d35;
  --green-mid: #2d6a4f;
  --green-bright: #40916c;
  --green-light: #52b788;
  --green-pale: #b7e4c7;
  --green-wash: #d8f3dc;
  --cream: #f7f9f4;
  --white: #ffffff;
  --text: #1a2e1a;
  --text-light: #4a6a4a;
  --text-muted: #6b8a6b;
  --accent: #d4a843;
  --accent-light: #f0d78c;
  --border: #c8dcc8;
  --shadow: rgba(26, 58, 42, 0.12);
}

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

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Hero header with Angra photo ── */
.site-header {
  position: relative;
  background: var(--green-dark);
  overflow: hidden;
  min-height: 220px;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Angra_do_Hero%C3%ADsmo_-_Sicht_vom_Obelisken_auf_Stadt_und_Hafenbucht_mit_Monte_Brasil.JPG/1280px-Angra_do_Hero%C3%ADsmo_-_Sicht_vom_Obelisken_auf_Stadt_und_Hafenbucht_mit_Monte_Brasil.JPG');
  background-size: cover;
  background-position: center 40%;
  filter: brightness(0.55) saturate(1.2);
}

.header-content {
  position: relative;
  z-index: 1;
  padding: 3rem 0 2rem;
  text-align: center;
}

.site-title {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.site-title a {
  color: var(--white);
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.site-tagline {
  font-size: 1.05rem;
  color: var(--green-pale);
  font-style: italic;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

/* ── Navigation ── */
.site-nav {
  position: relative;
  z-index: 1;
  background: rgba(26, 58, 42, 0.85);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.site-nav .container {
  display: flex;
  justify-content: center;
  gap: 0;
}

.site-nav a {
  color: var(--green-pale);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.85rem 1.5rem;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(82, 183, 136, 0.2);
  color: var(--white);
}

/* ── Main content ── */
main {
  padding: 2.5rem 0;
  min-height: 60vh;
}

h2 {
  font-size: 1.6rem;
  color: var(--green-deep);
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 0.6rem;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--green-bright), var(--green-light));
  border-radius: 2px;
}

h3 {
  font-size: 1.15rem;
  color: var(--green-deep);
  margin-bottom: 0.25rem;
}

/* ── Section spacing ── */
.section {
  margin-bottom: 3rem;
}

.section-intro {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
}

/* ── Day schedule blocks ── */
.day-section {
  margin-bottom: 1.5rem;
}

.day-header {
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  color: var(--white);
  padding: 0.6rem 1.25rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 8px 8px 0 0;
}

.day-events {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px var(--shadow);
}

/* ── Event cards ── */
.event-card {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--green-wash);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

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

.event-info {
  flex: 1;
}

.event-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.event-venue {
  color: var(--green-bright);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
}

.event-time {
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  white-space: nowrap;
}

.event-description {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.event-address {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.1rem;
}

.event-map-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary, #2d5016);
  text-decoration: none;
}

.event-map-link:hover {
  text-decoration: underline;
}

.event-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-style: italic;
}

.event-reservations {
  margin-top: 0.35rem;
}

.event-reservations a {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--green-mid);
  color: var(--white);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s;
}

.event-reservations a:visited {
  color: var(--white);
}

.event-reservations a:hover {
  background: var(--green-dark);
  color: var(--white);
}

/* ── Special event cards ── */
.special-event {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.special-event:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
}

.event-date-badge {
  background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
  color: var(--white);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  text-align: center;
  min-width: 72px;
  flex-shrink: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.event-date-badge .month {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--green-pale);
}

.event-date-badge .day {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.2;
}

.event-date-badge .year {
  font-size: 0.65rem;
  opacity: 0.75;
}

.event-details {
  flex: 1;
  min-width: 0;
}

.event-details .event-name {
  font-size: 1.05rem;
}

.event-time-info {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}

/* ── Festival badge ── */
.festival-badge {
  display: inline-block;
  background: linear-gradient(135deg, #8b1538, #c41e3a);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}

.special-event.is-festival {
  border-left: 3px solid #c41e3a;
}

.special-event.is-festival .event-date-badge {
  background: linear-gradient(135deg, #8b1538, #a01530);
}

.event-organizer {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-style: italic;
}

.event-features {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.event-features li {
  margin-bottom: 0.2rem;
}

/* ── Event source link (Instagram, etc.) ── */
.event-source {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--green-bright);
  text-decoration: none;
  font-weight: 500;
}

.event-source:hover {
  color: var(--green-mid);
  text-decoration: underline;
}

/* ── Event images (flyers, posters) — thumbnails ── */
.special-event.has-image {
  flex-wrap: wrap;
}

.event-image {
  flex: 0 0 auto;
  max-width: 90px;
  margin-left: auto;
}

.event-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.event-image img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 14px var(--shadow);
}

/* ── Lightbox overlay ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  cursor: pointer;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  transition: transform 0.25s;
}

.lightbox-overlay.active img {
  transform: scale(1);
}

/* ── Section headings (h3 inside special events) ── */
.section h3 {
  font-size: 1.3rem;
  color: var(--green-deep);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--green-wash);
}

/* ── Archive link section ── */
.archive-link-section {
  margin-top: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* ── Venue cards ── */
.venue-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px var(--shadow);
  border-left: 4px solid var(--green-bright);
}

.venue-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
}

.venue-card .venue-address {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.venue-card .venue-regulars {
  font-size: 0.9rem;
  line-height: 1.8;
}

.venue-card .venue-regulars strong {
  color: var(--green-deep);
}

.venue-card a {
  color: var(--green-bright);
  text-decoration: none;
  font-weight: 500;
}

.venue-card a:hover {
  color: var(--green-mid);
  text-decoration: underline;
}

/* ── Links ── */
a {
  color: var(--green-mid);
}

a:hover {
  color: var(--green-dark);
}

main a {
  font-weight: 500;
}

/* ── View all link ── */
.view-all {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  color: var(--white) !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
}

.view-all:hover {
  opacity: 0.9;
  color: var(--white) !important;
}

/* ── Homepage ── */
.homepage-intro {
  text-align: center;
  max-width: 640px;
  margin: 1rem auto 3rem;
  padding: 2.5rem 2rem;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 12px var(--shadow);
  border-left: 4px solid var(--green-bright);
  border-right: 4px solid var(--green-bright);
}

.intro-text {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  line-height: 1.9;
}

.intro-text:last-child {
  margin-bottom: 0;
  font-weight: 600;
  color: var(--green-deep);
  font-size: 1.1rem;
}

.intro-text em {
  color: var(--green-deep);
  font-style: italic;
}

.homepage-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
}

.homepage-btn {
  display: block;
  border: none;
  border-radius: 14px;
  padding: 2.25rem 1.75rem 1.75rem;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  position: relative;
  overflow: hidden;
}

.homepage-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.homepage-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn-weekly {
  background: linear-gradient(135deg, #2d6a4f, #40916c);
}

.btn-special {
  background: linear-gradient(135deg, #1a4d6e, #2d8ab8);
}

.btn-venues {
  background: linear-gradient(135deg, #6a4c2d, #b8862d);
}

.btn-resources {
  background: linear-gradient(135deg, #4a2d6a, #7b52a8);
}

.btn-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.btn-title {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.btn-desc {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .homepage-buttons {
    grid-template-columns: 1fr;
  }

  .homepage-btn {
    padding: 1.75rem 1.5rem 1.5rem;
  }

  .btn-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
}

/* ── Footer ── */
.site-footer {
  background: var(--green-dark);
  color: var(--green-pale);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  margin-top: 2rem;
}

.site-footer .attribution {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.6;
}

.site-footer a {
  color: var(--green-light);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .site-title {
    font-size: 1.8rem;
  }

  .header-content {
    padding: 2rem 0 1.25rem;
  }

  .site-nav a {
    padding: 0.7rem 0.9rem;
    font-size: 0.75rem;
  }

  .special-event {
    flex-direction: column;
    gap: 0.75rem;
  }

  .special-event.has-image {
    flex-direction: column;
  }

  .event-image {
    max-width: 80px;
    margin-left: 0;
    margin-top: 0.75rem;
  }

  .event-date-badge {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    min-width: auto;
    padding: 0.4rem 0.75rem;
  }

  .event-card {
    flex-direction: column;
    gap: 0.25rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}

/* Flag / suggest edit button on event cards */
.event-flag-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid #d8d4c4;
  border-radius: 14px;
  color: #777;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.event-flag-btn:hover {
  background: #fef3e4;
  border-color: #d93f0b;
  color: #8a3010;
}

/* Flag modal */
.flag-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}
.flag-overlay.active {
  display: flex;
}
.flag-modal {
  background: #faf8f0;
  border-radius: 12px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.flag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.flag-header h3 {
  margin: 0;
  color: #2d5016;
  font-size: 1.4rem;
  border: none;
  padding: 0;
}
.flag-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #777;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
}
.flag-close:hover {
  color: #2c2c2c;
}
.flag-event-context {
  background: #fff;
  border-left: 3px solid #2d5016;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
}
.flag-modal .form-field {
  margin-bottom: 1rem;
}
.flag-modal .form-field label {
  display: block;
  font-weight: 600;
  color: #2d5016;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.flag-modal .form-field .required {
  color: #c0392b;
}
.flag-modal .form-field input,
.flag-modal .form-field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d8d4c4;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
}
.flag-modal .form-field textarea {
  resize: vertical;
  min-height: 100px;
}
.flag-modal .form-submit {
  width: 100%;
  background: #2d5016;
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.flag-modal .form-submit:hover:not(:disabled) {
  background: #1a3009;
}
.flag-modal .form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.flag-modal .form-message {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
}
.flag-modal .form-message.success {
  background: #e8f5e0;
  border-left: 3px solid #2d5016;
  color: #1a3009;
}
.flag-modal .form-message.error {
  background: #fbeaea;
  border-left: 3px solid #c0392b;
  color: #8a1e1e;
}

/* ── Event tag pills (on event cards) ── */
.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.event-tag {
  display: inline-block;
  background: #f4efe0;
  color: #4a3f1a;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e0d6b8;
  line-height: 1.4;
}
.event-tag.tag-kid-friendly {
  background: linear-gradient(135deg, #f5a623, #f7b84b);
  color: #3a2a00;
  border-color: #d68f10;
}
.event-tag.tag-live-music { background: #e4eef8; border-color: #b9ceea; color: #214266; }
.event-tag.tag-cinema { background: #efe6f5; border-color: #cbb6dd; color: #4a2766; }
.event-tag.tag-theater { background: #f5e4ea; border-color: #e0b9c9; color: #66223a; }
.event-tag.tag-dance { background: #fdeaf4; border-color: #f0b9d4; color: #74214d; }
.event-tag.tag-nightlife { background: #2d2a3e; color: #efeaff; border-color: #423d58; }
.event-tag.tag-karaoke { background: #f5ecfa; border-color: #d9bce6; color: #5b2c6f; }
.event-tag.tag-food-drink { background: #f7ecd9; border-color: #e3cb9a; color: #6b4412; }
.event-tag.tag-exhibition { background: #e9eee3; border-color: #c6d1b5; color: #3a4621; }
.event-tag.tag-literature { background: #eae4d9; border-color: #c7bba1; color: #4d3d1e; }
.event-tag.tag-workshop { background: #e3eeee; border-color: #b6cfcf; color: #1f4848; }
.event-tag.tag-free { background: #e8f5e0; border-color: #b8d99f; color: #1a3009; }
.event-tag.tag-outdoor { background: #e4f0e0; border-color: #b5d3a5; color: #26451a; }
.event-tag.tag-bullfighting { background: #f3e4df; border-color: #d9b7a9; color: #5a1f12; }

/* ── Event search & filter bar ── */
.event-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  background: #fdfaf0;
  border: 1px solid #e6decc;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0 1.25rem;
  box-shadow: 0 1px 3px var(--shadow);
}
.event-search-bar .search-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #d8d4c4;
  border-radius: 8px;
  background: #fff;
  color: var(--green-deep);
}
.event-search-bar .search-input:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.15);
}
.event-tag-filter-label {
  display: inline-flex;
  align-items: center;
}
.event-tag-filter {
  padding: 0.55rem 2rem 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--green-deep);
  background: #fff;
  border: 1px solid #d8d4c4;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%234a6a4a' d='M6 8 0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}
.event-tag-filter:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(45, 106, 79, 0.15);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.event-search-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  display: none;
}
.event-search-empty.active {
  display: block;
}
