/* --- Welcome Section styling --- */
.welcome-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.welcome-logo {
  flex-shrink: 0;
  width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin-top: 0;
  display: block;
}

.welcome-text {
  flex: 1;
}

.welcome-text p:first-child {
  margin-top: 0;
}

/* --- Homepage Layout Grid --- */
.homepage-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

/* --- News Box styling --- */
.news-box-container {
  background-color: rgba(15, 49, 29, 0.03);
  border: 1px solid rgba(15, 49, 29, 0.1);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 460px; /* fixed height for scrollability */
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  box-sizing: border-box;
}

[data-md-color-scheme="slate"] .news-box-container {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.news-box-container h2 {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--md-primary-bg-color);
  font-size: 1rem;
  color: var(--md-primary-fg-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-md-color-scheme="slate"] .news-box-container h2 {
  color: #fff;
}

.news-scroll-box {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
}

/* Style the scrollbar */
.news-scroll-box::-webkit-scrollbar {
  width: 8px;
}

.news-scroll-box::-webkit-scrollbar-track {
  background: transparent;
}

.news-scroll-box::-webkit-scrollbar-thumb {
  background: rgba(15, 49, 29, 0.2);
  border-radius: 4px;
}

.news-scroll-box::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 49, 29, 0.4);
}

[data-md-color-scheme="slate"] .news-scroll-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

[data-md-color-scheme="slate"] .news-scroll-box::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* News Items */
.news-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(15, 49, 29, 0.15);
}

[data-md-color-scheme="slate"] .news-item {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.news-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.news-date {
  font-size: 0.7rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-md-color-scheme="slate"] .news-date {
  color: #aaa;
}

.news-badge {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

/* Badge variants */
.badge-publication {
  background-color: rgba(70, 96, 105, 0.15);
  color: #466069;
}
.badge-presentation {
  background-color: rgba(207, 196, 147, 0.25);
  color: #8c7f46;
}
.badge-award {
  background-color: rgba(255, 193, 7, 0.15);
  color: #b58900;
}
.badge-internship {
  background-color: rgba(15, 49, 29, 0.1);
  color: #0f311d;
}
[data-md-color-scheme="slate"] .badge-internship {
  background-color: rgba(207, 196, 147, 0.15);
  color: #CFC493;
}
.badge-general {
  background-color: rgba(100, 100, 100, 0.1);
  color: #666;
}

.news-item p,
.news-content {
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0;
}

.news-item p strong,
.news-content strong {
  color: var(--md-primary-fg-color);
}

[data-md-color-scheme="slate"] .news-item p strong,
[data-md-color-scheme="slate"] .news-content strong {
  color: var(--md-primary-bg-color);
}

.news-footer-link {
  display: block;
  margin-top: 10px;
  text-align: right;
}

.news-footer-link a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--md-primary-fg-color) !important;
  text-decoration: none !important;
  transition: opacity 0.2s;
}

[data-md-color-scheme="slate"] .news-footer-link a {
  color: var(--md-primary-bg-color) !important;
}

.news-footer-link a:hover {
  opacity: 0.8;
  text-decoration: underline !important;
}

/* --- CTA Card --- */
.cta-card {
  background-color: var(--md-primary-fg-color);
  color: #fff;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 460px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(15, 49, 29, 0.15);
}

/* Subtle background accent for CTA */
.cta-card::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(207, 196, 147, 0.1);
  pointer-events: none;
}

.cta-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--md-primary-bg-color);
  margin-top: 0;
  margin-bottom: 12px;
}

.cta-description {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #edebd1;
}

.cta-button {
  display: inline-block;
  align-self: flex-start;
  background-color: var(--md-primary-bg-color);
  color: var(--md-primary-fg-color) !important;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none !important;
  transition: transform 0.2s, background-color 0.2s;
}

.cta-button:hover {
  transform: translateY(-2px);
  background-color: #e5dbab;
}

/* --- Responsive Media Query --- */
@media (max-width: 960px) {
  .welcome-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .welcome-logo {
    margin-bottom: 16px;
  }
  .homepage-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .news-box-container, .cta-card {
    height: 400px; /* slightly shorter on mobile */
  }
}
