/* CSS Variables with fallbacks for IE11 */
:root {
  --color-primary: #0f4480;
  --color-primary-dark: #003356;
  --color-primary-light: #005a9e;
  --color-metal-100: #f8f9fa;
  --color-metal-200: #e9ecef;
  --color-metal-300: #dee2e6;
  --color-metal-500: #adb5bd;
  --color-metal-700: #6c757d;
  --color-metal-900: #343a40;
  --color-text-primary: #212529;
  --color-text-secondary: #6c757d;
  --color-text-on-dark: #ffffff;
  --color-border: #dee2e6;
  --color-shadow: rgba(0, 70, 121, 0.15);
  --color-card-bg: #ffffff;
  --color-footer-bg: #d8d8d8;
  --color-footer-text: #343a40;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #212529;
  background-color: #f8f9fa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0f4480;
  color: #ffffff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-weight: normal;
  line-height: 1.3;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 16px;
}

a {
  color: #0f4480;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: #005a9e;
}

a:focus {
  outline: 2px solid #0f4480;
  outline-offset: 2px;
}

/* Toolbar */
.toolbar-container {
  background-color: #0f4480;
}

.toolbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 0 24px;
  background-color: #0f4480;
  position: sticky;
  top: 0;
  z-index: 50;
}

.toolbar-link {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
}

.toolbar-logo {
  height: 32px;
  width: auto;
  display: block;
}

.toolbar-link:hover,
.toolbar-link:focus {
  color: #ffffff;
  opacity: 0.8;
}

.share-buttons {
  display: flex;
  gap: 12px;
}

.share-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.share-icon-img {
  width: 20px;
  height: 20px;
  display: block;
}

.share-icon:hover,
.share-icon:focus {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.15);
}

.share-icon:active {
  transform: scale(0.95);
}

/* Banner */
.banner-container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 70, 121, 0.15);
}

.banner-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Timeline Container */
.timeline-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
  background-color: #f8f9fa;
}

.timeline {
  position: relative;
  padding-left: 36px;
  padding-top: 24px;
}

/* Timeline Vertical Line */
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #dee2e6 0%, rgba(222, 226, 230, 0.3) 100%);
}

/* News Card */
.card {
  position: relative;
  background-color: #ffffff;
  border-radius: 0 8px 8px 8px;
  padding: 20px;
  margin-bottom: 24px;
  margin-left: 11px;
  box-shadow: 0 2px 8px rgba(0, 70, 121, 0.15);
  opacity: 0;
  animation: cardEnter 0.6s ease-out forwards;
}

/* Timeline Node - positioned on the vertical line */
.card::before {
  content: "";
  position: absolute;
  left: -54px;
  top: -4px;
  width: 12px;
  height: 12px;
  background-color: #0f4480;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #dee2e6;
  transition: box-shadow 0.3s ease;
  z-index: 1;
}

/* Triangle pointer effect (chat bubble style) */
.card::after {
  content: "";
  position: absolute;
  left: -12px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 0 solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid #ffffff;
  z-index: 0;
  filter: drop-shadow(-2px 2px 2px rgba(0, 70, 121, 0.15));
}

.card:hover::before {
  box-shadow: 0 0 0 4px rgba(0, 70, 121, 0.2);
}

/* Card Hover Effect */
.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 70, 121, 0.15);
  transition: all 0.3s ease;
}

/* Card Timestamp */
.card-timestamp {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  margin-bottom: 12px;
}

/* Card Image */
.card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 16px;
  display: block;
}

/* Card Title */
.card-title {
  font-family: "Georgia", "Times New Roman", Times, serif;
  font-size: 24px;
  color: #0f4480;
  margin-bottom: 12px;
  display: inline-block;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.card-title:hover {
  color: #0a2d54;
  transform: translateX(4px);
}

.card-title:focus {
  outline: 2px solid #0f4480;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Card Summary */
.card-summary {
  font-size: 16px;
  line-height: 1.6;
  color: #212529;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Card More Link */
.card-more {
  font-size: 16px;
  color: #0f4480;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.card-more:hover {
  color: #0a2d54;
  transform: translateX(4px);
}

.card-more .more-icon {
  width: 16px;
  height: 16px;
}

/* Entrance Animation */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered Animation Delays */
.card:nth-child(1) {
  animation-delay: 0s;
}
.card:nth-child(2) {
  animation-delay: 0.1s;
}
.card:nth-child(3) {
  animation-delay: 0.2s;
}
.card:nth-child(4) {
  animation-delay: 0.3s;
}
.card:nth-child(5) {
  animation-delay: 0.4s;
}
.card:nth-child(6) {
  animation-delay: 0.5s;
}
.card:nth-child(7) {
  animation-delay: 0.6s;
}
.card:nth-child(8) {
  animation-delay: 0.7s;
}
.card:nth-child(9) {
  animation-delay: 0.8s;
}
.card:nth-child(10) {
  animation-delay: 0.9s;
}

/* Footer */
.footer {
  background-color: #d8d8d8;
  padding: 24px 16px;
  margin-top: 48px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-content p {
  font-size: 14px;
  line-height: 1.5;
  color: #343a40;
  margin: 0;
}

.footer-content a {
  color: #0f4480;
  text-decoration: underline;
}

.footer-content a:hover,
.footer-content a:focus {
  color: #003356;
  text-decoration: underline;
}

.footer-content a:focus {
  outline: 2px solid #0f4480;
  outline-offset: 2px;
}

/* ============================================
   TABLET STYLES (max-width: 900px)
   ============================================ */
@media (max-width: 900px) {
  .banner-image {
    width: 100%;
    height: auto;
    aspect-ratio: 8 / 3;
    display: block;
    object-fit: cover;
  }

  .timeline-container {
    max-width: 100%;
  }

  .timeline {
    padding-left: 24px;
  }

  .card {
    border-radius: 0 8px 8px 8px;
  }

  .card::before {
    left: -42px;
  }

  .card::after {
    left: -11px;
    top: 0;
    border-top: 0 solid transparent;
    border-bottom: 11px solid transparent;
    border-right: 11px solid #ffffff;
    filter: drop-shadow(-2px 2px 2px rgba(0, 70, 121, 0.15));
  }

  .card-title {
    font-size: 20px;
  }
}

/* ============================================
   MOBILE STYLES (max-width: 600px)
   ============================================ */
@media (max-width: 600px) {
  /* Toolbar */
  .toolbar {
    height: 44px;
    padding: 0 16px;
  }

  .toolbar-logo {
    height: 28px;
  }

  .share-buttons {
    gap: 8px;
  }

  .share-icon {
    width: 28px;
    height: 28px;
  }

  .share-icon-img {
    width: 18px;
    height: 18px;
  }

  /* Timeline */
  .timeline-container {
    padding: 32px 16px;
  }

  .timeline {
    padding-left: 16px;
  }

  /* Card */
  .card {
    margin-left: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 8px;
  }

  .card::before {
    left: -38px;
    top: -4px;
    width: 10px;
    height: 10px;
    z-index: 1;
  }

  .card::after {
    left: -10px;
    top: 0px;
    border-top: 0 solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #ffffff;
    filter: drop-shadow(-2px 2px 2px rgba(0, 70, 121, 0.15));
  }

  .card-title {
    font-size: 18px;
  }

  /* Footer */
  .footer {
    padding: 16px 12px;
    margin-top: 32px;
  }

  .footer-content p {
    font-size: 14px;
  }
}
