* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: white;
}

#fair{
  height: 50vh;
  width: 100%;
}
.placeholder-img {
  border: 1px solid #d5d5d5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9a9a;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: 100%;
}

/* ============ EVENTS GRID ============ */

.events-section {
  padding: 70px 40px 30px;
  background: white;
}

.events-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 40px;
  row-gap: 55px;
}

.event-card {
  display: flex;
  flex-direction: column;
}
.event-card-img{
  object-fit: cover;
}

.event-card .placeholder-img {
  margin-bottom: 24px;
}

.event-card h3 {
  font-family: var(--serif);
  color: var(--main);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.35;
  margin: 0 0 12px;
}

.event-card h3 a {
  color: inherit;
  text-decoration: none;
}

.event-card h3 a:hover {
  text-decoration: underline;
}

.event-date {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}

.read-more-btn {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  background: var(--main);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 12px 26px;
  border-radius: 2px;
  transition: background 0.2s ease;
}

.read-more-btn:hover {
  background: var(--main-lighter);
}

/* ============ PAGINATION ============ */

.pagination {
  max-width: 1180px;
  margin: 40px auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink);
  padding-bottom: 70px;
  letter-spacing: 0.02em;
}

.pagination a {
  color: var(--ink);
  text-decoration: none;
  margin: 0 10px;
}

.pagination a.active,
.pagination a:hover {
  color: var(--main);
  text-decoration: underline;
}

.pagination .arrow {
  color: var(--muted);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
  .events-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 44px;
  }

  .events-section {
    padding: 50px 24px 20px;
  }
}

@media (max-width: 620px) {
  .events-grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .events-section {
    padding: 40px 20px 10px;
  }

  .event-card h3 {
    font-size: 1.15rem;
  }
}

/* ============ ARTICLE MODAL ============ */

.article-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.article-modal.open {
  display: block;
}

.article-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 12, 30, 0.6);
  backdrop-filter: blur(2px);
  animation: articleFadeIn 0.2s ease;
}

.article-modal-content {
  position: relative;
  z-index: 1;
  background: #fff;
  max-width: 760px;
  width: min(94vw, 780px);
  max-height: 90vh;
  overflow-y: auto;
  margin: 5vh auto 0;
  border-radius: 8px;
  padding: 2.75rem 2.75rem 3rem;
  box-shadow: 0 24px 60px rgba(0, 12, 30, 0.35);
  animation: articleSlideUp 0.25s ease;
}

.article-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  border: none;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.15s ease;
}

.article-modal-close:hover,
.article-modal-close:focus {
  color: var(--main);
}

.article-modal-img {
  margin: 0 auto 1.75rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 12, 30, 0.1);
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  display: block;
}

.article-modal-date {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.article-modal-content h2 {
  font-family: var(--serif);
  color: var(--main);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1.1rem;
}

.article-modal-body {
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}

@keyframes articleFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes articleSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  .article-modal-content {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100vh;
    margin: 0;
    border-radius: 0;
    padding: 2.5rem 1.25rem 2rem;
  }

  .article-modal-close {
    top: 1rem;
    right: 0.75rem;
  }

  .article-modal-img {
    max-height: 220px;
  }
}
