/* ============================================
   PLAY Base Styles — base.css
   Resets, accessibility, basic element styles.
   ============================================ */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--gray-900);
  background: var(--off-white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent-green);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* ---------- Utility Classes ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-green {
  background: var(--accent-green);
  color: var(--white);
}

.btn-green:hover {
  background: var(--accent-green-dark);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-donate {
  background: var(--accent-orange);
  color: var(--white);
  padding: 10px 26px;
  font-weight: 700;
}

.btn-donate:hover {
  background: #d0752f;
  transform: translateY(-1px);
}

.accent-green {
  color: var(--accent-green);
  text-decoration: underline;
  text-decoration-color: var(--accent-green);
  text-underline-offset: 4px;
}

.accent-red {
  color: var(--accent-red);
  font-style: italic;
  font-family: var(--font-accent);
}

.button-back {
  max-width: 900px;
  margin: 0 auto;
}

/* ---------- Section Titles ---------- */
.section-title {
  font-size: 1.65rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 28px;
}

.section-title-sm {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.section-desc {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 36px;
  color: var(--gray-700);
  font-size: 1.05rem;
}

/* ---------- View All Link ---------- */
.view-all {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-green);
  transition: color var(--transition);
}

.view-all:hover {
  color: var(--accent-green-dark);
}

/* ---------- Back Link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-green);
  font-weight: 600;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--accent-green-dark);
}

/* ---------- Loading / Error States ---------- */
.loading-spinner {
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.end-message,
.error-msg,
.no-events-msg {
  text-align: center;
  color: var(--gray-500);
  margin: 40px 0;
  font-weight: 500;
}

/* ---------- Tag Pills ---------- */
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-pill {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 50px;
  background: rgba(40, 167, 69, 0.1);
  color: var(--accent-green-dark);
  letter-spacing: 0.3px;
  text-transform: capitalize;
  transition: all var(--transition);
}

.tag-pill:hover {
  background: rgba(40, 167, 69, 0.2);
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags .tag-pill {
  padding: 5px 16px;
  font-size: 0.8rem;
}

/* ---------- Scroll Reveal ---------- */
.fade-in-section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}
