/* ==========================================================================
   VARIABLES
   ========================================================================== */
/* CSS variables are defined in styles.css - only homepage-specific variables here */
:root {
  --card-width:       350px;
  --card-max-width:   600px;
  --transition-fast:  0.4s ease;
  --transition-slow:  0.6s cubic-bezier(0.65,0.05,0.36,1);
  --header-height:    30vh;
}

/* ==========================================================================
   RESET & BASE LAYOUT
   ========================================================================== */
/* Reset and base styles are in styles.css - only homepage-specific overrides here */

/* Body styles are in styles.css - only homepage-specific overrides here */
body {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   HEADER / HERO
   ========================================================================== */
.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
  gap: 0.5rem;
}

.page-title {
  font-family: 'Source Serif Pro', serif;
  font-size: 40px;
  color: #000000;
  margin: 0;
  font-weight: 400;
  text-transform: none;
  line-height: 1.2;
}

.date-display {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--haiti-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  line-height: 1.2;
}

/* ==========================================================================
   EVENTS CONTAINER & VERTICAL LIST
   ========================================================================== */
.events-container {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
  padding: 2rem 1rem;
  padding-bottom: 2rem; /* Normal padding at bottom */
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

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

/* ==========================================================================
   EVENT CARD STYLES
   ========================================================================== */
.event-card {
  width: 100%;
  max-width: 1200px;
  background: #fff;
  color: #333;
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: flex-start;
}

.event-image-wrapper {
  flex-shrink: 0;
  width: 300px;
  display: flex;
  flex-direction: column;
}

.event-image-container {
  position: relative;
  width: 100%;
  margin-bottom: 24px; /* Match Figma spacing */
}

.event-year {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--haiti-red);
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 20px;
  z-index: 10;
  border-radius: 0 0 4px 0;
  line-height: 1.2;
  pointer-events: none;
}

.event-image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-size: 0.9rem;
  font-style: italic;
}

.event-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid #e0e0e0;
}

.image-attribution {
  margin-top: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  color: #666666;
  line-height: 1.4;
}

.image-attribution a {
  color: #666666;
  text-decoration: underline;
}

.image-attribution a:hover {
  color: var(--haiti-blue);
}

.event-title {
  font-family: 'DM Sans', sans-serif;
  margin: 0 0 0.75rem 0;
  color: var(--dark-text);
  font-size: 24px;
  font-weight: 600;
  line-height: 28.8px;
  text-transform: none;
}

.event-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-tag {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--tag-border);
  background: transparent;
  color: var(--dark-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 16px;
  border-radius: 4px;
}

.event-text-content {
  flex: 1;
  width: 48.7%; /* ~526px out of 1076px from Figma */
  max-width: 526px;
  display: flex;
  flex-direction: column;
  gap: 32px; /* Match Figma spacing between sections */
}

.event-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.section-heading {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--haiti-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  line-height: 14px;
}

.event-section p {
  font-family: 'Source Serif Pro', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 25.2px;
  color: #000000;
  margin: 0;
}

.event-sources {
  margin-top: 0.5rem;
}

.event-sources a {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  text-decoration: none;
  line-height: 24px;
}

.event-sources a:hover {
  text-decoration: underline;
}

.event-body a {
  color: var(--haiti-blue);
  text-decoration: underline;
}

.event-body a:hover {
  color: var(--haiti-red);
}

/* ==========================================================================
   FOOTER ARTICLES SECTION (footer-articles)
   ========================================================================== */
.sticky-bottom-section {
  position: relative;
  width: 100%;
  min-height: 560px; /* Match Figma footer-articles height */
  background: #ffffff; /* White background from Figma */
  padding: 2rem 0;
  margin-top: 2rem;
  margin-bottom: 0;
  clear: both;
  flex-shrink: 0;
}

.sticky-bottom-content {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  padding: 1.5rem 2rem;
  gap: 2rem;
}

.bottom-card {
  flex: 1;
  background: #ffffff; /* White card background from Figma */
  color: #000000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 300px;
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bottom-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.bottom-card-image .image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-size: 0.8rem;
}

.bottom-card-type {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--haiti-blue);
  background: transparent;
  padding: 0.25rem 0;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bottom-card h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--dark-text);
  line-height: 1.3;
}

.bottom-card p {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #000000;
  margin: 0;
}

.bottom-card .placeholder-text {
  font-style: italic;
  opacity: 0.7;
  font-size: 0.8rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
/* Footer styles are in styles.css */

/* ==========================================================================
   RESPONSIVE: TABLET
   ========================================================================== */
@media (max-width: 900px) {
  .events-container {
    padding: 1.5rem 1rem;
    padding-bottom: 2rem;
  }

  .event-card {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .event-text-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sticky-bottom-section {
    margin-bottom: 0;
  }

  .sticky-bottom-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    height: auto;
    min-height: var(--sticky-bottom-height);
    align-items: center;
  }

  .bottom-card {
    max-width: 100%;
  }

  .bottom-card h3 {
    font-size: 0.95rem;
  }

  .bottom-card p {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   RESPONSIVE: MOBILE
   ========================================================================== */
@media (max-width: var(--mobile-break)) {
  .hero {
    height: auto;
    padding: 1rem 0.5rem;
    gap: 0.25rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .date-display {
    font-size: 1.2rem;
  }

  .events-container {
    padding: 1rem 0.5rem;
    padding-bottom: 1rem;
  }

  .event-card {
    width: 100%;
  }

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

  .event-image-wrapper {
    width: 100%;
  }
  
  .event-text-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .event-title {
    font-size: 1.1rem;
  }

  .event-year {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .section-heading {
    font-size: 0.85rem;
  }

  .event-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .event-sources {
    margin-top: 1rem;
  }
  
  .event-sources a {
    font-size: 14px;
    display: inline-block;
    word-wrap: break-word;
  }

  .sticky-bottom-section {
    height: auto;
    min-height: 300px;
  }

  .sticky-bottom-content {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    align-items: center;
  }

  .bottom-card {
    max-width: 100%;
  }

  .bottom-card-image {
    aspect-ratio: 16 / 9;
  }

  .bottom-card h3 {
    font-size: 0.9rem;
  }

  .bottom-card p {
    font-size: 0.75rem;
  }
}
