/* Theme colors */
:root {
  --brand-red: #DB2017;
  --brand-yellow: #FFFF00;
  --text: #222222;
  --muted: #6c757d;
  --surface: #ffffff;
}

html,
body {
  height: 100%;
  font-family: 'Roboto', sans-serif;
}

body {
  color: var(--text);
  background-color: #fffaf0;
  /* Warm floral white base */
  /* Intense, rich mesh gradient using brand colors */
  background-image:
    radial-gradient(circle at 0% 0%, rgba(219, 32, 23, 0.4) 0%, rgba(219, 32, 23, 0.1) 30%, transparent 60%),
    radial-gradient(circle at 100% 0%, rgba(255, 215, 0, 0.35) 0%, rgba(255, 215, 0, 0.1) 30%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(219, 32, 23, 0.2) 0%, rgba(219, 32, 23, 0.05) 30%, transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(255, 215, 0, 0.2) 0%, rgba(255, 215, 0, 0.05) 30%, transparent 60%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Header Styling */
.main-header {
  position: relative;
  text-shadow: none;
}

.main-title {
  font-family: 'Playfair Display', serif;
  color: var(--brand-red);
  font-weight: 700;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  line-height: 1.2;
}

.main-description {
  font-family: 'Roboto', sans-serif;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #555;
  max-width: 900px;
  /* Limit width for reading comfort */
}

/* Tweak TimelineJS theme accents via CSS overrides */
/* Force Playfair Display on headlines only */
.tl-headline,
.tl-text-content h2.tl-headline,
h2.tl-headline {
  font-family: 'Playfair Display', serif !important;
  font-weight: 700;
}

/* Red color for Main Headline only */
.tl-headline,
.tl-text-content h2.tl-headline,
h2.tl-headline {
  color: var(--brand-red) !important;
}

/* Black color for Date, Nav Title, and Body Text for clarity */
.tl-headline-date,
.tl-slidenav-title,
.tl-text-content,
.tl-text-content p,
.tl-caption,
.tl-credit {
  color: #000000 !important;
  text-shadow: none !important;
}

/* Force Roboto on dates, nav titles, and body text */
.tl-headline-date,
.tl-slidenav-title,
.tl-text,
.tl-text-content,
.tl-text-content p,
.tl-caption,
.tl-credit {
  font-family: 'Roboto', sans-serif !important;
}

.tl-timegroup .tl-timegroup-title .tl-timegroup-title-span {
  color: var(--brand-red);
}

.tl-timemarker:hover .tl-timemarker-content h2.tl-headline {
  color: var(--brand-red);
}

.tl-menubar,
.tl-timenav {
  border-color: var(--brand-red) !important;
}

.tl-slidenav-next .tl-slidenav-icon,
.tl-slidenav-previous .tl-slidenav-icon {
  color: var(--brand-red);
}

/* Buttons and highlights in yellow-red theme */
.btn-brand {
  background: var(--brand-red);
  color: #fff;
  border: none;
}

.btn-brand:hover {
  background: #b61a12;
}

.badge-brand {
  background: var(--brand-yellow);
  color: #000;
}

/* Make embedded images more refined and clickable */
.tl-media .tl-media-content img {
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tl-media .tl-media-content img:hover {
  opacity: 0.95;
  transform: scale(1.02);
}

/* Make headlines clickable */
.tl-text-content h2.tl-headline a {
  color: var(--brand-red);
  text-decoration: none;
  transition: color 0.2s;
}

.tl-text-content h2.tl-headline a:hover {
  color: #a9140d;
  text-decoration: underline;
}

/* Fix timeline overlap issues */
.tl-timeline {
  overflow: visible !important;
}

.tl-timemarker {
  margin-bottom: 10px;
}

/* Better spacing for events on same date */
.tl-timegroup {
  padding-bottom: 20px;
}

/* Responsive height adjustment for timeline area */
@media (max-width: 576px) {
  #timeline-embed {
    height: 75vh !important;
  }

  .main-title {
    font-size: 2rem;
  }

  .main-description {
    width: 100% !important;
    font-size: 1rem;
    text-align: justify;
  }
}

/* Related links styling */
.related-links {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.related-item {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.related-item::before {
  content: "•";
  color: var(--brand-red);
  position: absolute;
  left: 0;
  top: 0;
}

.related-item a {
  color: #333;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  font-family: 'Roboto', sans-serif;
}

.related-item a:hover {
  color: var(--brand-red);
  text-decoration: none;
}

/* Main Headline inside content styling */
.tl-text-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: 'Roboto', sans-serif !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  text-transform: none !important;
}

.tl-text-content h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}

.tl-text-content h3 a:hover {
  color: var(--brand-red);
  text-decoration: underline;
}