/* HERO */
.hero {
  background: linear-gradient(
    135deg,
    rgba(15, 44, 76, 0.93),
    rgba(27, 154, 170, 0.92)
  );
  color: #ffffff;
  padding: 3.5rem 0 3rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.hero-kicker {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

/* Animated AIME word */
.hero-logo-word {
  display: inline-flex;
  gap: 0.05em;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.hero-logo-word .letter {
  display: inline-block;
  opacity: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 3.1rem;
  line-height: 1.1;
}

.hero-logo-word .highlight {
  color: white;
  -webkit-text-fill-color: white;
  -webkit-text-stroke: 1.5px #1b9aaa;
  text-stroke: 1.5px #1b9aaa;
}

/* "AI" stays fixed */
.hero-logo-word .ai {
  animation: logoFadeIn 2s forwards;
  animation-delay: 0s;
}

/* "ME" bumps right */
.hero-logo-word .me {
  animation: logoFadeIn 2s forwards, logoMoveRight 1s forwards;
  animation-delay: 0s, 2s;
}

.hero-logo-word .fill {
  color: white;
  -webkit-text-fill-color: white;
  opacity: 0;
  animation: logoFadeIn 2s forwards;
  animation-delay: 2s;
}

@keyframes logoFadeIn {
  to { opacity: 1; }
}

@keyframes logoMoveRight {
  from { transform: translateX(0); }
  to { transform: translateX(1.4em); }
}

.hero-subtitle {
  opacity: 0;
  animation: heroTextIn 2s ease forwards;
  animation-delay: 4s;
  max-width: 34rem;
  margin: 0.4rem 0 1.5rem;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #e5edf7;
}

@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(0.5em); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-meta {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin-bottom: 1.5rem;
}

.hero-meta strong {
  color: #ffffff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.9rem;
}

.hero-stats {
  font-size: 0.85rem;
  margin-top: 0.6rem;
  color: #d1d5db;
}

.hero-stats span {
  margin-right: 1rem;
}

/* HERO RIGHT PANEL + TIMELINE */
.hero-panel {
  background-color: rgba(15, 23, 42, 0.35);
  border-radius: 16px;
  padding: 1.4rem 1.3rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(191, 219, 254, 0.25);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.5);
  font-size: 0.9rem;
}

.hero-panel-header-main h3 {
  font-family: var(--font-family-heading);
  font-size: 1rem;
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #bfdbfe;
}

.hero-panel-header-main p {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: #dbeafe;
}

.hero-timeline {
  margin-top: 0.2rem;
}

.hero-timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
}

.hero-timeline-item + .hero-timeline-item {
  border-top: 1px solid rgba(191, 219, 254, 0.35);
}

.hero-timeline-marker {
  position: relative;
  width: 14px;
  display: flex;
  justify-content: center;
}

.hero-timeline-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  margin-top: 3px;
}

.hero-timeline-item:not(:last-child) .hero-timeline-marker::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -12px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(191, 219, 254, 0.6),
    rgba(191, 219, 254, 0.1)
  );
}

.hero-timeline-item--current .hero-timeline-dot {
  background-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

.hero-timeline-item--next .hero-timeline-dot {
  background-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

.hero-timeline-content {
  flex: 1;
}

.conf-top-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 0.1rem;
}

.conf-year {
  font-size: 0.8rem;
  color: #e0f2fe;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.conf-status {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border: 1px solid rgba(191, 219, 254, 0.4);
}

.conf-status--current {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: #bbf7d0;
}

.conf-status--next {
  background-color: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.45);
  color: #fef9c3;
}

.conf-name {
  font-family: var(--font-family-heading);
  font-size: 0.98rem;
  margin: 0.25rem 0 0.25rem;
}

.conf-meta {
  font-size: 0.82rem;
  color: #dbeafe;
  line-height: 1.5;
}

.conf-link {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #e0f2fe;
  font-weight: 500;
  text-decoration: none;
}

.conf-link:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .hero-panel {
    margin-top: 1.5rem;
  }
}

/* MOBILE TWEAK FOR HERO WORD */
@media (max-width: 720px) {
  .hero-logo-word .letter {
    font-size: 2.4rem;
  }
}

/* ABOUT SECTION ON HOME */
.about {
  background-color: var(--bg-color);
}

.about-text {
  max-width: 700px;
  font-size: 1rem;
  color: var(--muted-text);
}

.about-highlight {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background-color: var(--light-color);
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
}

/* OLD SIMPLE NEWS SECTION (if still used) */
.news {
  background-color: var(--light-color);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-header p {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.95rem;
}

.section-header a {
  font-size: 0.9rem;
  color: var(--secondary-color);
  font-weight: 500;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* first version of news-card */
.news-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.9);
  display: flex;
  flex-direction: column;

  height: 320px;
  scroll-snap-align: start;
}

.news-card h3 {
  font-family: var(--font-family-heading);
  font-size: 1rem;
  margin: 0.35rem 0 0.25rem;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card p {
  font-size: 0.9rem;
  color: var(--text-color);
  margin: 0 0 0.75rem;

  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* second definition (dynamic list) will override where needed */

/* HOME CONFERENCES SECTION */
.conferences {
  background-color: var(--bg-color);
  border-top: 1px solid var(--border-color);
}

.conf-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2.25rem;
}

@media (max-width: 900px) {
  .conf-layout {
    grid-template-columns: 1fr;
  }
}

.conf-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.conf-item {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-color);
}

.conf-date {
  min-width: 80px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: uppercase;
}

.conf-body h3 {
  font-family: var(--font-family-heading);
  font-size: 1rem;
  margin: 0 0 0.2rem;
}

.conf-body p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted-text);
}

.conf-body a {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--secondary-color);
  font-weight: 500;
}

.conf-panel {
  padding: 1.25rem 1.5rem;
  background-color: var(--light-color);
  border-radius: 14px;
  border: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--muted-text);
}

.conf-panel strong {
  color: var(--text-color);
}

.conf-link-muted {
  font-size: 0.85rem;
  color: var(--muted-text);
  cursor: default;
}

/* ================
   NEW DYNAMIC NEWS
   ================ */

/* NEWS SECTION */
.news-section {
  background-color: var(--light-color);
  padding: 3.5rem 0;
}

/* Header */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.news-header h2 {
  margin: 0;
  font-family: var(--font-family-heading);
  font-size: 1.8rem;
}

.news-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted-text);
  font-size: 0.95rem;
}

.news-header-link {
  font-size: 0.9rem;
  color: var(--secondary-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Toolbar: filters + search + view all */
.news-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-filter-btn {
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted-text);
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.news-filter-btn--active {
  background-color: var(--secondary-color);
  color: #ffffff;
  border-color: var(--secondary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.news-search {
  flex: 1;
  min-width: 180px;
  display: flex;
  justify-content: flex-end;
}

.news-search input {
  width: 100%;
  max-width: 260px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-search input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(27, 154, 170, 0.15);
}

.view-all {
  font-size: 0.9rem;
  color: var(--secondary-color);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Base desktop layout: 4 per row, one row tall */
.news-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;

  height: 320px;
  overflow-y: auto;
  padding-right: 4px;

  scroll-snap-type: y mandatory;
}

/* override / refine news-card in dynamic context */
.news-card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.9);
  display: flex;
  flex-direction: column;

  height: 320px;
  scroll-snap-align: start;
}

.news-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background-color: #e0f2f7;
  color: #035a63;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-card h3 {
  font-family: var(--font-family-heading);
  font-size: 1rem;
  margin: 0.35rem 0 0.25rem;
}

.news-card-meta {
  font-size: 0.78rem;
  color: var(--muted-text);
  margin-bottom: 0.5rem;
}

.news-card p {
  font-size: 0.9rem;
  color: var(--text-color);
  margin: 0 0 0.75rem;
}

.news-card a.news-read-more,
.news-read-more {
  font-size: 0.85rem;
  color: var(--secondary-color);
  font-weight: 500;
  margin-top: auto;
}

.conf-location-line {
  display: block;
  line-height: 1.25;
}

.conf-location-line + .conf-location-line {
  margin-top: 0.15rem;
  opacity: 0.85;
  font-size: 0.95em;
}


/* Medium screens: 2 per row */
@media (max-width: 1024px) {
  .news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 320px;
    max-height: none;
  }
}

/* Small screens: 1 per row, no inner scroll */
@media (max-width: 720px) {
  .news-toolbar {
    align-items: stretch;
  }

  .news-search {
    justify-content: flex-start;
  }

  .news-search input {
    max-width: none;
  }

  .news-list {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow-y: visible;
    scroll-snap-type: none;
  }

  .news-card {
    height: auto;
    scroll-snap-align: none;
  }
}

.news-ribbon-wrap {
  padding: 0.9rem 0 0.2rem;
}

.news-ribbon {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;

  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(255, 0, 0, 0.165); /*rgba(20, 40, 80, 0.12)*/;
  border-left: 4px solid #FF0000;/*#1f4e8c;*/
  border-radius: 12px;

  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  box-shadow: 0 6px 18px rgba(15, 35, 70, 0.05);

  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.news-ribbon--clickable:hover,
.news-ribbon--clickable:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 35, 70, 0.08);
  border-color: rgba(31, 78, 140, 0.24);
}

.news-ribbon-badge {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  color: #FF0000; /*#1f4e8c;*/
  background: rgba(31, 78, 140, 0.08);
  border: 1px solid rgba(31, 78, 140, 0.12);
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
}

.news-ribbon-text {
  margin: 0;
  flex: 1 1 420px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #203040;
}

.news-ribbon-link {
  flex: 0 0 auto;
  font-weight: 600;
  color: #1f4e8c;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .news-ribbon {
    align-items: flex-start;
  }
}