/* Common styles */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Lexend', sans-serif;
  }
  
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  /* NAVIGATION */
  .navbar {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
  }
  
  .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
  }
  
  .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.2rem;
  }
  
  .logo-img {
    height: 40px;
    margin-right: 1rem;
  }
  
  /* Hamburger icon hidden on desktop by default */
  .hamburger {
    display: none;
    cursor: pointer;
    color: #333;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
  }

  .hamburger:hover {
    background-color: #f8f9fa;
  }

  .hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
  }

  .hamburger-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #333;
    border-radius: 1px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
  }

  .hamburger-icon span:nth-child(1) {
    top: 0px;
  }

  .hamburger-icon span:nth-child(2) {
    top: 8px;
  }

  .hamburger-icon span:nth-child(3) {
    top: 16px;
  }

  /* Hamburger animation when active */
  .hamburger.active .hamburger-icon span:nth-child(1) {
    top: 8px;
    transform: rotate(135deg);
  }

  .hamburger.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    left: -60px;
  }

  .hamburger.active .hamburger-icon span:nth-child(3) {
    top: 8px;
    transform: rotate(-135deg);
  }
  
  /* Nav links container */
  .nav-links {
    display: flex;
    gap: 2rem;
  }
  
  .nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
  }
  
  .nav-links a:hover {
    color: #FF6B00;
  }
  
  .nav-links a.active {
    color: #FF6B00;
  }
  
  /* MAIN CONTENT SECTIONS */
  main {
    padding-top: 70px; /* So main is not hidden behind the fixed navbar */
  }
  
  /* HERO SECTION */
  .hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: black; /* fallback color behind the video */
  }
  
  #hero-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }
  
  .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-align: center;
    padding: 1rem 2rem;
    max-width: 800px;
    width: 90%;
    box-sizing: border-box;
  }
  
  .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
  }
  
  .hero-content p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  }
  
  /* MISSION SECTION */
  .mission-section {
    background: #fff;
    padding: 4rem 0;
  }
  
  .mission-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
  }
  
  .mission-content h2 {
    color: #FF6B00;
    margin-bottom: 2rem;
  }
  
  /* FEATURED SECTIONS */
  .featured-sections {
    background: #f8f9fa;
    padding: 4rem 0;
  }
  
  .featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .featured-tile {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 220px;
  }
  
  .featured-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  }
  
  .tile-content {
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .tile-content h3 {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    color: #FF6B00;
  }
  
  .tile-content p {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #555;
  }
  
  .tile-link {
    display: inline-block;
    color: #FF6B00;
    font-weight: 500;
    transition: transform 0.3s ease;
  }
  
  .featured-tile:hover .tile-link {
    transform: translateX(5px);
  }
  
  /* EVENTS + PUBLICATIONS TILES (similar to .featured-tile) */
  .events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap: 2rem;
    margin-top: 2rem;
  }
  .event-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }
  .event-item:hover {
    transform: translateY(-5px);
  }
  
  .publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap: 2rem;
    margin-top: 2rem;
  }
  .publication-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }
  .publication-item:hover {
    transform: translateY(-5px);
  }
  
  /* FOOTER */
  footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
  }
  
  .footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    row-gap: 2rem;
  }
  
  .footer-info h4 {
    margin: 0 0 1rem;
  }
  
  .footer-info a {
    color: white;
    text-decoration: none;
  }
  
  .footer-info a:hover {
    color: #FF6B00;
  }
  
  .footer-logo {
    max-height: 80px;
    height: auto;
    width: auto;
  }
  
  .footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
  }
  
  .footer-social a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
  }
  
  .footer-social a:hover {
    color: #FF6B00;
  }
  
  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 1rem;
  }
  
  .footer-bottom a {
    color: white;
    text-decoration: none;
    margin-right: 1rem;
  }
  
  .footer-bottom a:hover {
    color: #FF6B00;
  }
  
  /* MEDIA QUERIES */
  @media (max-width: 768px) {
    /* Show hamburger, hide nav-links by default */
    .hamburger {
      display: block;
    }
    
    .nav-links {
      position: fixed;
      top: 70px;
      right: -100%;
      width: 280px;
      height: calc(100vh - 70px);
      background: #fff;
      flex-direction: column;
      gap: 0;
      padding: 2rem 0;
      box-shadow: -2px 0 10px rgba(0,0,0,0.1);
      transition: right 0.3s ease-in-out;
      z-index: 999;
      overflow-y: auto;
    }
    
    .nav-links.active {
      right: 0;
    }
    
    .nav-links a {
      padding: 1rem 2rem;
      border-bottom: 1px solid #f0f0f0;
      display: block;
      font-size: 1.1rem;
      transition: all 0.2s ease;
    }
    
    .nav-links a:hover {
      background-color: #f8f9fa;
      padding-left: 2.5rem;
    }
    
    .nav-links a.active {
      background-color: #fff5f0;
      border-left: 4px solid #FF6B00;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
      position: fixed;
      top: 70px;
      left: 0;
      width: 100%;
      height: calc(100vh - 70px);
      background: rgba(0, 0, 0, 0.5);
      z-index: 998;
      opacity: 0;
      visibility: hidden;
      transition: all 0.3s ease;
    }
    
    .mobile-overlay.active {
      opacity: 1;
      visibility: visible;
    }
  }
  
  /* Even narrower screens: hero text smaller */
  @media (max-width: 600px) {
    .hero-content h1 {
      font-size: 2rem;
    }
    .hero-content p {
      font-size: 1rem;
    }
  }

  /* Loading skeleton styles */
  .loading-skeleton {
    padding: 2rem 0;
  }

  .skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .skeleton-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
  }

  .skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 50%, #e9ecef 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
    margin-bottom: 1rem;
  }

  .skeleton-title {
    height: 1.5rem;
    background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 50%, #e9ecef 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    width: 70%;
  }

  .skeleton-text {
    height: 1rem;
    background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 50%, #e9ecef 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
  }

  .skeleton-text.short {
    width: 40%;
  }

  @keyframes skeleton-loading {
    0% {
      background-position: 200% 0;
    }
    100% {
      background-position: -200% 0;
    }
  }

  /* Error message styles */
  .error-message {
    text-align: center;
    padding: 3rem 2rem;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    margin: 2rem 0;
  }

  .error-message p {
    color: #c53030;
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .retry-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
  }

  .retry-btn:hover {
    background: #c53030;
  }

  /* Accessibility styles */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* Skip links */
  .skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
  }

  .skip-link:focus {
    top: 6px;
  }

  /* Focus indicators */
  :focus {
    outline: 2px solid #FF6B00;
    outline-offset: 2px;
  }

  .team-member:focus,
  .news-item:focus,
  .event-item:focus,
  .publication-item:focus,
  .software-item:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
  }

  /* Notification system */
  .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
  }

  .notification.show {
    opacity: 1;
    transform: translateX(0);
  }

  .notification-info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
  }

  .notification-success {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
  }

  .notification-error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
  }

  .notification-warning {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    color: #f57c00;
  }

  .notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    margin-left: 12px;
  }

  /* Modal accessibility */
  .modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
  }

  .modal[aria-hidden="false"] {
    display: block;
  }

  .modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
  }

  .modal-medium .modal-content {
    max-width: 600px;
  }

  .modal-large .modal-content {
    max-width: 1000px;
  }

  .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
  }

  .close-modal:hover,
  .close-modal:focus {
    color: #000;
  }

  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }

    .skeleton-loading {
      animation: none !important;
    }
  }

  /* Search functionality */
  .search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
  }

  .search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 16px;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
  }

  .search-input:focus {
    border-color: #FF6B00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
  }

  .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
  }

  .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
  }

  .search-results-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    font-size: 14px;
    color: #6c757d;
  }

  .search-result {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
  }

  .search-result:hover,
  .search-result:focus,
  .search-result[aria-selected="true"] {
    background-color: #f8f9fa;
  }

  .search-result:last-child {
    border-bottom: none;
  }

  .search-result-icon {
    width: 40px;
    text-align: center;
    color: #FF6B00;
    font-size: 18px;
  }

  .search-result-content {
    flex: 1;
    min-width: 0;
  }

  .search-result-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-result-title mark {
    background: #fff3cd;
    color: #856404;
    padding: 1px 2px;
    border-radius: 2px;
  }

  .search-result-subtitle {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .search-result-type {
    display: inline-block;
    padding: 2px 8px;
    background: #e9ecef;
    color: #495057;
    font-size: 12px;
    border-radius: 12px;
    text-transform: capitalize;
  }

  .search-no-results {
    padding: 20px;
    text-align: center;
    color: #6c757d;
  }

  /* Global search bar in header */
  .navbar .search-container {
    margin: 0;
    max-width: 300px;
  }

  .navbar .search-input {
    padding: 8px 15px 8px 35px;
    font-size: 14px;
    border-radius: 20px;
  }

  .navbar .search-icon {
    left: 12px;
  }

  @media (max-width: 768px) {
    .navbar .search-container {
      display: none;
    }
  }
  