/* ========================================
   DARE Lab - Layout Styles
   Container, Grid, Header, Footer, Sections
   ======================================== */

/* ===================
   CONTAINER
   =================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-sm {
  max-width: var(--container-md);
}

.container-lg {
  max-width: var(--container-2xl);
}

.container-fluid {
  max-width: none;
}

/* ===================
   GRID SYSTEM
   =================== */

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Auto-fit grids */
.card-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-grid-sm {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Responsive grid adjustments */
@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Flexbox utilities */
.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ===================
   SITE HEADER
   =================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: var(--color-card);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.logo img:first-child {
  height: 48px;
  width: auto;
}

.logo img:last-child {
  height: 32px;
  width: auto;
}

/* Main navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: var(--color-bg-warm);
}

.nav-item.active .nav-link {
  color: var(--color-primary);
}

/* Dropdown arrow */
.nav-item.has-dropdown .nav-link::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--transition-fast);
}

.nav-item.has-dropdown:hover .nav-link::after,
.nav-item.has-dropdown.active .nav-link::after {
  transform: rotate(180deg);
}

/* Mega dropdown menu */
.mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 600px;
  padding: var(--space-6);
  background-color: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.nav-item.has-dropdown:hover .mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.mega-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.mega-dropdown-section h4 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border-light);
}

.mega-dropdown-link {
  display: block;
  padding: var(--space-2) 0;
  color: var(--color-text);
  font-size: var(--font-size-base);
  transition: color var(--transition-fast);
}

.mega-dropdown-link:hover {
  color: var(--color-primary);
}

/* Simple dropdown menu (for Publications) */
.simple-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 180px;
  padding: var(--space-2);
  background-color: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
}

.nav-item.has-dropdown:hover .simple-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.simple-dropdown-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  font-size: var(--font-size-base);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.simple-dropdown-link:hover {
  background-color: var(--color-bg-warm);
  color: var(--color-primary);
}

.simple-dropdown-link.active {
  background-color: var(--color-primary-50);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  position: relative;
  transition: background-color var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform var(--transition-fast);
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  bottom: -7px;
}

/* Mobile menu open state */
.mobile-menu-toggle.active .hamburger {
  background-color: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===================
   MOBILE NAVIGATION
   =================== */

@media (max-width: 1023px) {
  .main-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-card);
    padding: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    overflow-y: auto;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-link {
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
  }

  .mega-dropdown {
    position: static;
    transform: none;
    min-width: auto;
    padding: var(--space-4);
    box-shadow: none;
    background-color: var(--color-bg-warm);
    border-radius: var(--radius-md);
    margin-top: var(--space-2);
    display: none;
  }

  .nav-item.has-dropdown.active .mega-dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .mega-dropdown-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Simple dropdown mobile styles */
  .simple-dropdown {
    position: static;
    transform: none;
    min-width: auto;
    padding: var(--space-2);
    box-shadow: none;
    background-color: var(--color-bg-warm);
    border-radius: var(--radius-md);
    margin-top: var(--space-2);
    display: none;
  }

  .nav-item.has-dropdown.active .simple-dropdown {
    display: block;
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* ===================
   HERO SECTION
   =================== */

.hero {
  background: transparent;
  padding: var(--space-16) 0 var(--space-20);
  position: relative;
  overflow: hidden;
}

/* Soft decorative shapes (Ghibli-inspired) */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(ellipse at center, rgba(168, 196, 212, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(123, 160, 139, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  margin-bottom: var(--space-6);
  color: var(--color-text);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-8);
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual img {
  max-width: 100%;
  max-height: 350px;
  filter: drop-shadow(0 20px 40px rgba(44, 62, 80, 0.15));
}

@media (max-width: 1023px) {
  .hero {
    padding: var(--space-12) 0 var(--space-16);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    margin-bottom: var(--space-6);
  }

  .hero-visual img {
    max-height: 200px;
  }
}

/* ===================
   PAGE SECTIONS
   =================== */

.section {
  padding: var(--section-spacing) 0;
}

.section-alt {
  background-color: var(--color-bg-warm);
}

.section-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.section-primary .section-title {
  color: var(--color-text-inverse);
}

.section-primary .section-title::after {
  background: var(--color-accent);
}

@media (max-width: 767px) {
  .section {
    padding: var(--section-spacing-mobile) 0;
  }
}

/* About section */
.about-section {
  padding: var(--space-16) 0;
}

.about-text {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
  max-width: 800px;
}

/* Research section */
.research-section {
  padding: var(--space-16) 0;
}

/* News/Video section */
.news-section {
  padding: var(--space-16) 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* CTA section */
.cta-section {
  padding: var(--space-16) 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-text-inverse);
  text-align: center;
}

.cta-section h2 {
  color: var(--color-text-inverse);
  margin-bottom: var(--space-4);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-links {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.cta-links .btn-outline {
  border-color: var(--color-text-inverse);
  color: var(--color-text-inverse);
}

.cta-links .btn-outline:hover {
  background-color: var(--color-text-inverse);
  color: var(--color-primary);
}

/* ===================
   SITE FOOTER
   =================== */

.site-footer {
  background-color: var(--color-primary-dark);
  color: var(--color-text-inverse);
  padding-top: var(--space-12);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info h3 {
  color: var(--color-text-inverse);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
}

.footer-info p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 400px;
  line-height: var(--line-height-relaxed);
}

.footer-links {
  display: flex;
  gap: var(--space-12);
}

.footer-links-section h4 {
  color: var(--color-text-inverse);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--space-4);
}

.footer-links-section a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
}

.footer-links-section a:hover {
  color: var(--color-text-inverse);
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.footer-logos img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.footer-logos img:hover {
  opacity: 1;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-6) 0;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--font-size-sm);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-inverse);
  transition: background-color var(--transition-fast);
}

.footer-social a:hover {
  background-color: var(--color-accent);
}

@media (max-width: 1023px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-logos {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .footer-links {
    flex-direction: column;
    gap: var(--space-6);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* ===================
   PAGE LAYOUTS
   =================== */

/* Page header (for sub-pages) */
.page-header {
  background: linear-gradient(135deg, var(--color-bg-warm) 0%, var(--color-nature-sky-light) 100%);
  padding: var(--space-12) 0;
}

.page-title {
  font-size: var(--font-size-h1);
  margin-bottom: var(--space-4);
}

.page-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
}

/* Two column layout */
.two-column {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-10);
}

.sidebar {
  position: sticky;
  top: calc(72px + var(--space-6));
  height: fit-content;
}

.main-content {
  min-width: 0;
}

@media (max-width: 1023px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

/* ===================
   QUICK LINKS (Info cards on homepage)
   =================== */

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: calc(-1 * var(--space-12));
  position: relative;
  z-index: 10;
}

.quick-link-card {
  background-color: var(--color-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.quick-link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.quick-link-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-3);
  color: var(--color-text);
}

.quick-link-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}

.quick-link-card a {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.quick-link-card a:hover {
  color: var(--color-accent);
}

.quick-link-card a::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.quick-link-card a:hover::after {
  transform: translateX(4px);
}

@media (max-width: 1023px) {
  .quick-links {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 0;
  }
}

@media (max-width: 639px) {
  .quick-links {
    grid-template-columns: 1fr;
  }
}

/* ===================
   RESPONSIVE CONTAINER PADDING
   =================== */

@media (max-width: 767px) {
  .container {
    padding-left: var(--container-padding-mobile);
    padding-right: var(--container-padding-mobile);
  }
}

/* ===================
   SCROLL TO TOP BUTTON
   =================== */

.scroll-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  z-index: var(--z-sticky);
  cursor: pointer;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

/* ===================
   OVERLAY (for mobile menu)
   =================== */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: calc(var(--z-sticky) - 1);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===================
   FEATURED VIDEO CAROUSEL SECTION (Broad Institute Style)
   =================== */

.featured-video-section {
  width: 100%;
  padding: var(--space-8) 0;
}

.featured-video-carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
}

.featured-video-wrapper {
  position: absolute;
  inset: 0;
  background: #000;
}

.featured-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
  z-index: 1;
}

.featured-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.featured-slide iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Semi-transparent overlay at bottom-right (Broad Institute style) */
.featured-video-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  max-width: 600px;
  background-color: rgba(77, 130, 107, 0.85);
  color: white;
  padding: var(--space-8) 80px var(--space-8) var(--space-10);
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Fade overlay when video is playing */
.featured-video-overlay.is-faded {
  opacity: 0.1;
  transform: translateY(30px);
  pointer-events: none;
}

.featured-video-overlay.is-faded:hover {
  opacity: 0.85;
  transform: translateY(0);
  pointer-events: auto;
}

.featured-video-overlay h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
  color: white;
  line-height: var(--line-height-tight);
}

.featured-video-overlay .featured-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-4);
}

.featured-video-overlay p {
  font-size: var(--font-size-base);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

/* Navigation arrows - positioned at right edge of overlay */
.featured-nav-container {
  position: absolute;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.featured-nav {
  width: 48px;
  height: 48px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: white;
}

.featured-nav:hover {
  border-color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.featured-nav svg {
  width: 24px;
  height: 24px;
  color: white;
}

/* Watch now button - hidden in Broad Institute style */
.watch-now-btn {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background-color: #c41230;
  color: white;
  border: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 15;
}

.watch-now-btn:hover {
  background-color: #a00f28;
}

.watch-now-btn .play-icon {
  font-size: 12px;
}

/* Dots indicator */
.featured-dots {
  display: none;
}

/* Responsive featured video */
@media (max-width: 1023px) {
  .featured-video-overlay {
    width: 70%;
    padding: var(--space-6) var(--space-8);
  }

  .featured-nav-container {
    right: var(--space-4);
  }
}

@media (max-width: 767px) {
  .featured-video-carousel {
    aspect-ratio: 4 / 3;
  }

  .featured-video-overlay {
    width: 100%;
    max-width: none;
    padding: var(--space-4) var(--space-5);
    padding-right: 70px;
  }

  .featured-video-overlay h3 {
    font-size: 1.25rem;
  }

  .featured-video-overlay .featured-subtitle {
    font-size: 0.95rem;
  }

  .featured-video-overlay p:not(.featured-subtitle) {
    display: none;
  }

  .featured-nav-container {
    right: var(--space-3);
  }

  .featured-nav {
    width: 36px;
    height: 36px;
  }

  .featured-nav svg {
    width: 18px;
    height: 18px;
  }
}

/* Video Modal */
.video-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal.active {
  display: flex;
}

.video-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
}

.video-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 48px;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}

.video-modal-close:hover {
  color: #ccc;
}

.video-modal-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.video-modal-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsive hero video banner */
@media (max-width: 1023px) {
  .hero-video-banner {
    height: auto;
    min-height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
  }

  .hero-video-background {
    position: relative;
    width: 100%;
    height: 45vh;
    min-height: 280px;
  }

  .hero-video-background iframe {
    width: 100%;
    height: 100%;
    min-width: 177.78vh;
    min-height: 56.25vw;
  }

  .hero-video-overlay {
    display: none;
  }

  .watch-now-btn {
    position: relative;
    bottom: auto;
    left: auto;
    margin: 20px;
    align-self: flex-start;
  }

  .hero-text-box {
    position: relative;
    bottom: auto;
    right: auto;
    width: 100%;
    max-width: none;
    min-width: auto;
    padding: 32px 24px;
  }
}

@media (max-width: 767px) {
  .hero-video-background {
    height: 35vh;
    min-height: 220px;
  }

  .hero-text-box {
    padding: 24px 20px;
  }

  .hero-main-title {
    font-size: 1.75rem;
  }

  .hero-rotating-text {
    font-size: 1.1rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .watch-now-btn {
    padding: 12px 20px;
    font-size: 13px;
  }
}

/* ===================
   LATEST NEWS SECTION (Broad Institute Style)
   =================== */

.latest-section {
  padding: var(--space-16) 0;
}

.latest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 3px solid var(--color-text);
}

.latest-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

.latest-title::after {
  display: none;
}

.all-news-link {
  font-size: var(--font-size-base);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: color var(--transition-fast);
}

.all-news-link:hover {
  color: var(--color-primary-dark);
}

/* Home News Grid */
.home-news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.home-news-card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.home-news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.home-news-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--color-bg-warm);
}

.home-news-content {
  padding: var(--space-5);
}

.home-news-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin-bottom: var(--space-3);
}

.home-news-tag.award {
  background: rgba(234, 179, 8, 0.15);
  color: #b45309;
}

.home-news-tag.conference {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.home-news-tag.workshop {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.home-news-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

@media (max-width: 1023px) {
  .home-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .home-news-grid {
    grid-template-columns: 1fr;
  }
}

.latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 200px;
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.latest-featured {
  background-color: var(--color-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.latest-featured-video {
  height: 100%;
}

.latest-featured-video .video-wrapper {
  height: 100%;
  padding-bottom: 0;
}

.latest-featured-video .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.latest-news-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-item {
  padding: var(--space-4);
}

.news-tag {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  margin-right: var(--space-3);
}

.news-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.news-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin: var(--space-3) 0;
  line-height: var(--line-height-tight);
}

.news-title a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.news-title a:hover {
  color: var(--color-primary);
}

.news-excerpt {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.latest-side-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.latest-side-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* More News Grid */
.more-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.news-card {
  background-color: var(--color-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-card-video {
  aspect-ratio: 16 / 9;
}

.news-card-video .video-wrapper {
  height: 100%;
  padding-bottom: 0;
}

.news-card-body {
  padding: var(--space-4);
}

.news-card-body h4 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  margin-top: var(--space-2);
  line-height: var(--line-height-tight);
}

.news-card-body h4 a {
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.news-card-body h4 a:hover {
  color: var(--color-primary);
}

/* Responsive Latest Section */
@media (max-width: 1023px) {
  .latest-grid {
    grid-template-columns: 1fr;
  }

  .latest-featured-video .video-wrapper {
    padding-bottom: 56.25%;
    height: auto;
  }

  .latest-side-image {
    display: none;
  }

  .more-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .more-news-grid {
    grid-template-columns: 1fr;
  }

  .latest-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
}
