:root {
  /* Inverted ramp: same names, mirrored values (50<->900, 100<->800, 200<->700, 300<->500)
     so every existing usage flips from light-dominant to black-dominant automatically. */
  --white: #ffffff;
  --gray-50: #181d1d;
  --gray-100: #2c3232;
  --gray-200: #4b5252;
  --gray-300: #838b8b;
  --gray-500: #bcc2c2;
  --gray-700: #d8dcdc;
  --gray-800: #eaeded;
  --gray-900: #f6f8f8;
  --black: #060807;
  --charcoal: #1c2222;

  --accent: #f2b705;
  --accent-dark: #c99400;
  --accent-tint: #fdeeb0;

  --sport: #ffffff;
  --culture: var(--accent);
  --other: #8b9291;

  --radius-lg: 0;
  --radius-md: 0;
  --radius-sm: 0;

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

html {
  scroll-behavior: smooth;
  background: var(--gray-50);
}

body {
  margin: 0;
  font-family: "Unbounded", Helvetica, "Helvetica Neue", Arial, sans-serif;
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
}

.bg-photo {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("bg-turquel.jpg");
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.6) brightness(0.35);
  opacity: 0.28;
  pointer-events: none;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

/* Background wash behind the glass hero */
.hero {
  position: relative;
  padding: 0 20px 90px;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  z-index: -1;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(242, 183, 5, 0.35),
      transparent 55%
    ),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.1), transparent 50%),
    radial-gradient(circle at 50% 60%, rgba(12, 15, 15, 0.06), transparent 60%);
  filter: blur(10px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(6, 8, 7, 0.7);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  height: 24px;
  width: auto;
  display: block;
}

.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--gray-900);
}

.brand-text .accent {
  color: var(--white);
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gray-700);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--gray-900);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gray-900);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(6, 8, 7, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease;
  }

  .site-nav.open {
    max-height: 220px;
  }

  .site-nav a {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* Hero text */
.hero-intro {
  text-align: center;
  margin: 64px auto 40px;
}

.hero-intro h1 {
  font-size: clamp(1.1rem, 6.2vw, 3.4rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  font-weight: 800;
  white-space: nowrap;
}

.hero-intro h1 .accent {
  color: var(--white);
}

.hero-intro p {
  margin: 0;
  color: var(--gray-700);
  font-size: clamp(0.5rem, 2.2vw, 1.08rem);
  white-space: nowrap;
}

/* Glass utility */
.glass {
  background: rgba(10, 13, 13, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Calendar layout */
.calendar-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.calendar-card-wrap {
  position: relative;
}

.calendar-card {
  padding: 0;
}

@media (max-width: 480px) {
  .weekdays,
  .days-grid {
    gap: 6px;
  }
  .nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.calendar-header h2 {
  margin: 0;
  min-width: 0;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.nav-btn:hover {
  background: rgba(242, 183, 5, 0.18);
  border-color: rgba(242, 183, 5, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(242, 183, 5, 0.4);
}

.weekdays,
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.weekdays {
  margin-bottom: 12px;
}

.weekdays span {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 0;
  color: var(--gray-800);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease,
    transform 0.15s ease;
}

.day-num {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1;
}

.day-cell.outside {
  color: var(--gray-300);
  cursor: default;
  background: transparent;
  border-color: transparent;
}

.day-cell:not(.outside):hover {
  background: rgba(242, 183, 5, 0.12);
  border-color: rgba(242, 183, 5, 0.45);
  box-shadow: 0 0 16px rgba(242, 183, 5, 0.35);
  transform: translateY(-1px);
}

.day-cell.has-events:not(.selected) {
  border-color: rgba(242, 183, 5, 0.4);
  box-shadow: 0 0 14px rgba(242, 183, 5, 0.22);
}

.day-cell.today {
  border-color: var(--accent);
  color: var(--accent-dark);
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(242, 183, 5, 0.5);
}

.day-cell.selected {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 26px rgba(242, 183, 5, 0.65);
}

.day-cell.holiday:not(.selected) {
  color: #d6636b;
  border-color: rgba(214, 99, 107, 0.4);
  box-shadow: 0 0 14px rgba(214, 99, 107, 0.22);
}

.day-triangle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-bottom: 18px solid var(--other);
  border-left: 18px solid transparent;
}

.day-triangle.desportivo {
  border-bottom-color: var(--sport);
}
.day-triangle.cultural {
  border-bottom-color: var(--culture);
}
.day-triangle.outro {
  border-bottom-color: var(--other);
}
.day-cell.selected .day-triangle {
  border-bottom-color: rgba(255, 255, 255, 0.85);
}

/* Event popup — overlays the calendar when a day is clicked */
.event-panel {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(8, 10, 10, 0.97);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.event-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.event-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray-800);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.event-panel-close:hover {
  background: rgba(242, 183, 5, 0.18);
  border-color: rgba(242, 183, 5, 0.5);
}

#eventPanelContent {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 30px;
}

.event-panel h3 {
  margin: 0;
  font-size: 1.05rem;
  text-transform: capitalize;
}

.event-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-tag {
  flex-shrink: 0;
  width: 10px;
  border-radius: 0;
  margin-top: 2px;
}

.event-cal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cal-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--gray-800);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cal-btn:hover {
  background: rgba(242, 183, 5, 0.18);
  border-color: rgba(242, 183, 5, 0.5);
}

.event-tag.desportivo {
  background: var(--sport);
}
.event-tag.cultural {
  background: var(--culture);
}
.event-tag.outro {
  background: var(--other);
}

.event-item h4 {
  margin: 0 0 2px;
  font-size: 0.95rem;
}

.event-meta {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin: 0 0 6px;
}

.event-desc {
  font-size: 0.85rem;
  color: var(--gray-700);
  margin: 0;
}

.event-empty {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin: auto 0;
  text-align: center;
}

.sponsor-empty {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Main event highlight */
.main-event {
  max-width: 960px;
  margin: 0 auto 90px;
  padding: 0 20px;
}

.main-event-card {
  border-radius: var(--radius-lg);
  padding: 36px;
  background: linear-gradient(135deg, var(--charcoal), var(--black));
  border: 1px solid rgba(242, 183, 5, 0.3);
  color: var(--white);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.main-event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 90% 0%,
    rgba(242, 183, 5, 0.35),
    transparent 60%
  );
}

.main-event-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.main-event-card h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  position: relative;
}

.main-event-card p {
  margin: 0;
  color: var(--gray-300);
  font-size: 0.95rem;
  max-width: 480px;
  position: relative;
  text-wrap: balance;
}

.main-event-sponsor {
  position: relative;
  text-align: right;
  font-size: 0.78rem;
  color: var(--gray-300);
}

.main-event-sponsor strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .main-event-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .main-event-sponsor {
    text-align: left;
  }
}

/* Sections shared */
.section {
  max-width: 820px;
  margin: 0 auto 90px;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.section-sub {
  text-align: center;
  color: var(--gray-500);
  margin: 0 0 34px;
  font-size: 0.98rem;
  text-wrap: balance;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 4px;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-900);
}

.faq-icon {
  color: var(--accent-dark);
  font-size: 1.3rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-item.open .faq-answer {
  max-height: 240px;
}

.faq-answer p {
  margin: 0 0 18px 4px;
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Sponsors */
.sponsors-section {
  max-width: 960px;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.sponsor-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 22px 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray-700);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.sponsor-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sponsor-card img {
  max-height: 40px;
  margin-bottom: 8px;
}

.sponsor-cta {
  text-align: center;
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.sponsor-cta a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 34px 20px 50px;
  color: var(--gray-500);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
}
