/* Globaler Font und Textfarbe */
body {
    font-family: 'Open Sans', sans-serif;
    color: #1a1c39;
    font-size: 1.1rem;
}

/* Weniger Top-Padding auf Mobile für die erste Section */
@media (max-width: 768px) {
    #main > section:first-child {
        padding-top: 1rem !important;
    }
}

/* Responsive Bilder */
img {
    max-width: 100%;
    height: auto;
}

.lead {
    font-family: 'Open Sans', sans-serif;
    color: #1a1c39; /* falls du die Textfarbe auch hier haben willst */
}


/* Überschriften */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Open Sans', sans-serif;
    color: #333f70;
    line-height: 1.3;
}

/* Responsive Typography */
h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem) !important;
    margin-bottom: 1.5rem !important;
  }
  
  h1 .normal-weight {
    font-weight: 400; /* dünn/normal */
  }
  
  h1 .bold-weight {
    font-weight: 700; /* fett */
  }
  





h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem) !important;
    margin-top: 0 !important;
    margin-bottom: 1.5rem !important;
}

p {
    margin-bottom: 0.75rem !important;
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 700 !important;
    margin-bottom: 0.75rem !important;
}

/* Card-Titel einheitlich — unabhängig ob h3 oder h5 */
.card-title {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem) !important;
}

h4 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

h6 {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* Weniger Spacing zwischen Karten (alle Größen) */
.g-4 {
    --bs-gutter-x: 0.75rem !important;
    --bs-gutter-y: 0.75rem !important;
}

.mb-4 {
    margin-bottom: 0.75rem !important;
}

/* Buttons Spacing - nur nach nicht-Button Elementen */
p + .btn,
div + .btn,
.row + .btn {
    margin-top: 1rem;
}

.btn + .btn {
    margin-top: 0;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    p {
        margin-bottom: 0.5rem !important;
        font-size: 14px;
    }

    .lead {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    /* Noch weniger Spacing auf Mobile */
    .row {
        --bs-gutter-y: 0.5rem !important;
    }

    .mb-4 {
        margin-bottom: 0.5rem !important;
    }

    .mb-3 {
        margin-bottom: 0.25rem !important;
    }

    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .g-4, .g-3 {
        --bs-gutter-x: 0.25rem !important;
        --bs-gutter-y: 0.25rem !important;
    }
}

/* Überschriften mit span (für Teilfarben) */
.highlight {
    color: #83C6A9;
}


/* Hero Section */
.hero-section {
    background: #ffffff;
    position: relative;
    z-index: 1;
}

.hero-section .container {
    position: relative;
}

.hero-section h1 {
    clear: both;
}

.hero-section p {
    clear: both;
    position: relative;
    font-size: 1.1rem;
}

.hero-section .d-flex {
    clear: both;
    position: relative;
    z-index: 2;
    margin-top: 1rem;
}

/* Ensure buttons don't have any pseudo-elements or overlays */
.btn-highlight::before,
.btn-highlight::after,
.btn-outline-highlight::before,
.btn-outline-highlight::after {
    display: none !important;
}

/* Prevent any text from floating over buttons */
.hero-section * {
    position: relative;
}

.hero-section .btn {
    isolation: isolate;
}

#about {
    background-color: #eff7f0;
}

#about p {
    font-size: 1.1rem;
}

#events-header {
    background-color: #eff7f0; 
}
#about-header {
    background-color: #eff7f0; 
}

#calls-header {
    background-color: #eff7f0; 
}

#events {
    background-color: white; 
}

#news-header {
    background-color: #eff7f0; 
}
#core-facilities-header {
    background-color: #eff7f0; 
}

#objectives {
    background-color: #1a1c39;
    color: white;
}



#objectives h2,
#objectives h3,
#objectives h4,
#objectives h5,
#objectives h6 {
    color: white !important;
}

#objectives .highlight {
    color: #83c6a9 !important;
}

#objectives p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem !important;
}

#members p,
#research p,
#profileareas p,
#events p,
#news p,
#contact p {
    font-size: 1.1rem;
}

#objectives .feature-icon i {
    color: #83c6a9 !important;
}

#profileareas {
    background-color: #1a1c39;
    color: white;
}

#profileareas h2,
#profileareas h3,
#profileareas h4,
#profileareas h5,
#profileareas h6 {
    color: white !important;
}

#profileareas .highlight {
    color: #83c6a9 !important;
}

#profileareas p {
    color: rgba(255, 255, 255, 0.9) !important;
}

#profileareas i {
    color: #83c6a9 !important;
}

#profileareas .bg-white {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#profileareas .bg-white h2,
#profileareas .bg-white h5 {
    color: white !important;
}

#profileareas .bg-white p {
    color: rgba(255, 255, 255, 0.85) !important;
}

#research {
    background-color: #eff7f0;
}
#news {
    background-color: #eff7f0; 
}

#contact {
    background-color: #1a1c39; 
}

/* Allgemeine Icon-Klasse */
.icon {
    display: inline-block;
    vertical-align: middle;
}

/* Event card content alignment */
.current-event-card .card-body > p,
.current-event-card .card-body > .card-text,
.current-event-card .card-body > .short-desc,
.current-event-card .card-body > .full-desc,
.past-event-card .card-body > p,
.past-event-card .card-body > .card-text,
.past-event-card .card-body > .short-desc,
.past-event-card .card-body > .full-desc {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* Spezielle Icons mit Abstand */
.link-icon::before,
.agenda-icon::before,
.youtube-icon::before,
.ics-icon::before,
.date-icon::before,
.venue-icon::before {
    margin-right: 10px; /* Abstand zwischen Icon und Text */
    font-family: 'FontAwesome';
    display: inline-block;
    width: 1em; /* optional, sorgt für gleichmäßige Breite */
    text-align: center; /* Icon zentriert */
    color: #1a1c39; /* Icon übernimmt Textfarbe */
}

/* Beispiele für die Icons selbst */
.link-icon::before { content: '\f0c1'; }   /* link */
.agenda-icon::before { content: '\f1c1'; } /* PDF / Agenda */
.youtube-icon::before { content: '\f167'; } /* YouTube */
.ics-icon::before { content: '\f019'; }    /* download / calendar */
.date-icon::before { content: '\f073'; }   /* calendar */
.venue-icon::before { content: '\f3c5'; }  /* location */

.card-img-small-top {
    object-fit: cover;
    object-position: top; /* Kopf oben sichtbar */
}

.card-img-small-center {
    object-fit: cover;
    object-position: center; /* Standard, mittig */
}

.card-img-small-bottom {
    object-fit: cover;
    object-position: bottom; /* Fokus auf unteren Bereich */
}
/* Zwischen top und center, z. B. 25% von oben */
.card-img-small-topcenter {
    object-fit: cover;
    object-position: 50% 25%;
}



/* Optional: Links */
a {
    color: #333f70;
    text-decoration: none;
}

a:hover {
    color: #83c6a9;
}

#news .text-readmore {
    color: #83c6a9;       /* dauerhaft grün */
    text-decoration: none; /* optional: kein Unterstrich */
}

#news .text-readmore:hover {
    color: #218838;       /* dunkleres Grün beim Hover */
}

  




/* Globale Button-Farben */
.btn-highlight {
    background-color: #83c6a9 !important;
    border: none !important;
    color: white !important;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 600;
    padding: 12px 24px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    position: relative;
    z-index: 5;
    overflow: hidden;
}

.btn-highlight:hover {
    background-color: #6aa889 !important;
    color: white !important;
    transform: translateY(-1px);
}

.btn-outline-highlight {
    background-color: #eff7f0 !important;
    color: #333f70 !important;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 600;
    padding: 12px 24px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    position: relative;
    z-index: 5;
    overflow: hidden;
}

.btn-outline-highlight:hover {
    background-color: #83c6a9 !important;
    color: white !important;
    transform: translateY(-1px);
}

/* Mobile button optimizations */
@media (max-width: 768px) {
    .btn-highlight,
    .btn-outline-highlight {
        width: 100%;
        margin-bottom: 0.75rem;
        font-size: 16px;
        padding: 14px 20px;
        min-height: 52px;
        position: relative;
        z-index: 10;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        border-radius: 0 !important;
    }

    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .d-flex.flex-wrap.gap-2 {
        flex-direction: column;
        gap: 0.75rem !important;
    }

    .d-flex.flex-column.gap-2 {
        gap: 0.75rem !important;
    }
}
  

/* Alle Überschriften H1–H6 */
h1, h2, h3, h4, h5, h6 {
    color: #333F70;
}


/* Optional: wenn nur bestimmte Überschriften "unterteilt" sein sollen, z.B. in Sections */
.section-title span {
    color: #83c6a9;
}
/* Padding für alle Sections selbst */


/* Optional: Padding für Container innerhalb der Sections */
section .container {
    padding-top: 4rem;  /* extra innen, optional */
    padding-bottom: 4rem;
}


/* Container um das Icon – gleich großes Quadrat */
.icon-square {
    width: 60px;               /* feste Breite */
    height: 60px;              /* feste Höhe */
    background-color: #DFF6E3; /* hellgrün, beliebig anpassbar */
    border-radius: 8px;        /* abgerundete Ecken */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;            /* verhindert Schrumpfen */
  }
  
  /* Icon selbst */
  .icon-square i {
    font-size: 2rem;           /* Icon-Größe */
    color: #1A1C39;            /* Icon-Farbe */
  }
  
  /* Flexbox für Item: Icon links, Text rechts */
  .objective-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;                 /* Abstand zwischen Icon und Text */
  }

  /* News Card Text konsistent mit anderen Sections */
#news .card-body {
    font-family: 'Open Sans', sans-serif;
    color: #1a1c39;  /* Standardfarbe für normalen Text */
}

#news .card-title {
    color: #333f70; /* Überschriften wie in anderen Sections */
}

#news .card-text {
    color: #1a1c39; /* Textfarbe im Body */
}

#news .card-body p.small {
    color: rgba(26,28,57,0.7); /* Datum leicht gedämpft */
}


#contact {
    color: white;
}

#contact h1,
#contact h2,
#contact h3,
#contact h4,
#contact h5 {
    color: white;
}


.icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
  }

  .icon-circle i {
    font-size: 2.5rem;
    color: #fff; /* Icon-Farbe */
  }

  .bg-light-green {
    background-color: #83c6a9; /* zartes Grün */
  }

  .bg-dark-blue {
    background-color: #83c6a9; /* dunkles Blau */
  }
/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Container padding for mobile */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Section spacing */
    section {
        padding: 2rem 0 !important;
    }

    /* Card improvements */
    .card {
        margin-bottom: 1.5rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Grid improvements */
    .row.g-4 {
        --bs-gutter-y: 1.5rem;
    }

    /* Icon container mobile */
    .icon-square {
        width: 50px;
        height: 50px;
        margin-bottom: 0.5rem;
    }

    .icon-square i {
        font-size: 1.5rem;
    }

    /* Feature columns stack better on mobile */
    .feature {
        text-align: center;
        margin-bottom: 2rem;
    }

    /* Objective items better spacing */
    .objective-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    /* Display numbers better on mobile */
    .display-6 {
        font-size: 2rem;
    }

    /* Profile areas better layout */
    #profileareas .col-12 {
        margin-bottom: 1.5rem;
    }
    #profileareas h3 {
        margin-bottom: 0.25rem;
    }

    /* News cards full width on mobile */
    #news .col-md-4 {
        margin-bottom: 1.5rem;
    }

    /* Contact section improvements */
    #contact .col-md-4 {
        margin-bottom: 2rem;
        text-align: center;
    }

    /* Hero section mobile */
    .hero-section {
        padding: 3rem 0 !important;
        text-align: center;
    }

    .hero-section .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* About section mobile adjustments */
    #about .col-md-4 {
        margin-bottom: 2rem;
        text-align: center;
    }

    /* Members section mobile */
    #members .col-md-4 {
        margin-bottom: 1.5rem;
        text-align: center;
    }

}

#members {
    background: white;
}

#members .big-number {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 0.5rem;
    color: #333f70;
    transition: transform 0.15s ease-out;
  }

#news .card-img-top {
    width: 100%;      /* volle Breite behalten */
    height: 200px;    /* gewünschte Höhe */
    object-fit: cover; /* Bild wird zugeschnitten, aber verhältnis bleibt */
  }
  
  #events .card-img-top {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center;
  }

  .card-img-small {
    height: 210px;        /* gewünschte Höhe */
    object-fit: cover;    /* Bild füllt den Container, ohne verzerrt zu werden */
    border-radius:0.5rem;
}


/* Past Events Full-width Background */
.past-events-section {
    background-color: #ffffff; /* gewünschte Farbe */
    width: 100%;
    padding-top: 60px;
    padding-bottom: 60px;
    margin: 0;
}

/* Karten innerhalb der Past Events */
.past-events-section .card {
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.upcoming-events-section .card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


  

/* Navigation mobile optimizations */
@media (max-width: 991px) {
    .navbar-brand img {
        width: 120px;
        height: auto;
    }

    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        font-size: 1.5rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }
}

/* Touch target improvements */
@media (max-width: 768px) {
    /* Ensure clickable buttons are at least 44px */
    button, .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Social media links */
    #contact .d-flex a {
        padding: 0.5rem;
        display: inline-block;
        margin: 0.25rem 0;
    }

    /* Card links */
    .card .btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Image optimizations */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }

    .card-img-top {
        aspect-ratio: 16/9;
        object-fit: cover;
    }

    /* Icons in about section */
    .col-md-4 img {
        margin-bottom: 1rem;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    * {
        animation-duration: 0.3s !important;
    }

    /* Optimize scrolling */
    body {
        -webkit-overflow-scrolling: touch;
    }

    /* Reduce motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* ===========================================
   PEOPLE PAGE STYLES
   =========================================== */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  justify-content: center;
}

.people-section {
  background-color: white;
  color: #212529;
}

.member-card {
  background: white;
  padding: 30px 20px 25px;
  text-align: center;
  display: block;
}

.member-card.hidden {
  display: none;
}

.member-link,
.member-name-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.member-link:hover .member-avatar,
.member-name-link:hover .member-name {
  opacity: 0.8;
}

.member-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: #83c6a9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
  font-weight: 600;
  overflow: hidden;
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.member-name,
.member-name a,
.member-name-link .member-name {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  text-decoration: none;
  line-height: 1.2;
}

.member-name {
  margin-bottom: 5px;
  text-align: center;
}

.member-orcid {
  font-size: 0.8rem;
  margin-top: 5px;
}

.member-orcid a {
  color: #83c6a9;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.member-orcid a:hover {
  text-decoration: underline;
}

.member-website {
  font-size: 0.8rem;
  margin-top: 3px;
}

.member-website a {
  color: #83c6a9;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.member-website a:hover {
  text-decoration: underline;
}

/* Filter Styles */
.filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

.filter-group label {
  display: block;
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #2d405f;
}

.filter-group select {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-family: "Open Sans", sans-serif;
  font-size: 0.95rem;
  background-color: rgba(131, 198, 169, 0.15);
  color: #444444;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2383c6a9' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.filter-group select:focus,
.filter-group select:hover {
  outline: none;
  background-color: rgba(131, 198, 169, 0.25);
}

@media (max-width: 768px) {
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .member-card {
    padding: 15px 10px;
  }

  .member-avatar {
    width: 80px;
    height: 80px;
    font-size: 24px;
    margin-bottom: 10px;
  }

  .member-name,
  .member-name a,
  .member-name-link .member-name {
    font-size: 0.85rem;
  }

  .member-affiliation {
    font-size: 0.75rem;
  }

  .filters-container {
    flex-direction: column;
    gap: 15px;
  }

  .filter-group {
    min-width: 100%;
  }
}

/* Mobile: mehr Abstand zwischen Karten (Events + News) */
@media (max-width: 768px) {
  .past-event-card,
  .current-event-card,
  .news-card,
  #events .row.g-4 > div,
  #news .row.g-4 > div {
    margin-bottom: 1.5rem !important;
  }
}

/* ===========================================
   NEWS & EVENTS CARD STYLES
   =========================================== */
/* News: oberer Bildausschnitt (für Personen-Köpfe) */
#news .card-img-small {
  object-position: top !important;
}

/* Events: Bildmitte */
#events .card-img-small {
  object-position: center !important;
}

.news-card,
.current-event-card,
.past-event-card {
  /* Card visibility controlled by JS */
}

/* Green title box in cards */
.card-title-box {
  background-color: #eff7f0;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 4px;
}

.card-title-box .card-title {
  color: #83c6a9;
  margin-bottom: 0;
}

/* Card borders and shadows */
.card.news-card-style,
.card.event-card-style {
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Date styling in cards */
.card-date {
  color: #1a1c39;
  margin-bottom: 0.5rem;
}

/* Read more links */
.read-more {
  color: #83c6a9 !important;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

.read-more span {
  color: #83c6a9;
}

.read-more:hover,
.read-more:hover span {
  text-decoration: underline;
}

/* Full-width background sections */
.full-width-bg {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 60px 0;
}

.full-width-bg-light {
  background-color: #eff7f0;
}

/* ===========================================
   ABOUT US PAGE STYLES
   =========================================== */

/* Subsection titles */
.subsection-title {
  text-align: left;
}

/* History Section Colors */
#history {
  background-color: white;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline-line {
  position: absolute;
  width: 3px;
  background: #83c6a9;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 48%;
  padding: 10px 25px;
  box-sizing: border-box;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 52%;
  text-align: left;
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #83c6a9;
  border-radius: 50%;
  top: 18px;
}

.timeline-item.left::before {
  right: -30px;
}

.timeline-item.right::before {
  left: -30px;
}

.timeline-content {
  padding: 10px 0;
}

/* Vision & Mission */
.vision-mission-section {
  background: white;
}

.vision-mission-circle {
  background: #eff7f0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vision-mission-circle i {
  color: #83c6a9;
  font-size: 2rem;
}

.mission-title,
.vision-title {
  color: #333f70;
}

/* Scope of Impact */
.impact-icon {
  background: #eff7f0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.impact-icon i {
  color: #83c6a9;
  font-size: 1.25rem;
}

/* Core Competencies Network */
.competency-node {
  background: #eff7f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: bold;
  color: #333f70;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Partners Section */
.partners-section {
  background: #eff7f0;
}

.partner-logo img {
  max-width: 100%;
  height: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.partner-logo img:hover {
  opacity: 1;
}

/* Mobile Timeline */
@media (max-width: 768px) {
  .timeline-line {
    left: 15px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 45px;
    padding-right: 10px;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
    text-align: left;
  }

  .timeline-item.left::before,
  .timeline-item.right::before {
    left: 9px;
    right: auto;
  }

  .vision-mission-circle {
    width: 60px;
    height: 60px;
  }

  .vision-mission-circle i {
    font-size: 1.5rem;
  }

  .impact-icon {
    width: 40px;
    height: 40px;
  }

  .impact-icon i {
    font-size: 1rem;
  }
}

/* ===========================================
   CORE FACILITIES, RESEARCH, CALLS STYLES
   =========================================== */

/* Note: Core Facilities page has its own inline styles in the template */

/* Research area tags */
.research-tag {
  background: #eff7f0;
  color: #333f70;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: inline-block;
  margin: 2px;
}

/* Call cards */
.call-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.call-card-header {
  background: #83c6a9;
  color: white;
  padding: 15px 20px;
}

.call-card-body {
  padding: 20px;
}

.call-deadline {
  background: #eff7f0;
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: 600;
  color: #333f70;
}

/* ===========================================
   EVENTS TIMELINE STYLES
   =========================================== */
.events-timeline-wrapper {
  position: relative;
}

.events-timeline {
  overflow: hidden;
  margin: 0;
}

.events-timeline .swiper-slide {
  height: auto;
  opacity: 1;
  will-change: opacity;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.events-timeline .swiper-slide .card {
  height: 380px;
  overflow: hidden;
}

.events-timeline .swiper-slide .card.expanded {
  height: auto;
  overflow: visible;
}

.events-timeline .swiper-slide-next {
  opacity: 1;
}

.events-timeline .swiper-slide-active {
  z-index: 2;
  opacity: 1;
}

.events-timeline .swiper-slide-active .card {
  box-shadow: 0 6px 24px rgba(0,0,0,0.13) !important;
  border-left: 3px solid #83c6a9;
}

.events-timeline-prev,
.events-timeline-next {
  border: none;
  background: none;
  color: #4a9175;
  cursor: pointer;
  transition: color 0.2s ease;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
}

.events-timeline-prev:hover,
.events-timeline-next:hover {
  color: #3a7d62;
}

.events-timeline-prev.swiper-button-disabled,
.events-timeline-next.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Pagination dots — hidden on desktop */
.events-pagination,
.news-pagination {
  display: none;
}

@media (max-width: 768px) {
  .events-timeline {
    margin: 0;
  }

  .events-timeline-prev,
  .events-timeline-next {
    font-size: 0.8rem;
  }

  .events-pagination,
  .news-pagination {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin-top: 10px !important;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .events-pagination .swiper-pagination-bullet,
  .news-pagination .swiper-pagination-bullet {
    width: 6px !important;
    height: 6px !important;
    min-width: 6px !important;
    background: #c8c8c8 !important;
    opacity: 1 !important;
    border-radius: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .events-pagination .swiper-pagination-bullet-active,
  .news-pagination .swiper-pagination-bullet-active {
    background: #83c6a9 !important;
  }
}

/* --- Event Card Badges --- */
.events-timeline .card {
  position: relative;
}

.event-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 12px;
  border-radius: 0 0 0 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 3;
}

.event-badge-next {
  background: #83c6a9;
  color: #fff;
}

.event-badge-upcoming {
  background: #83c6a9;
  color: #fff;
}

.event-badge-past {
  background: #c8c8c8;
  color: #fff;
}

/* ===========================================
   NEWS TIMELINE STYLES
   =========================================== */
.news-timeline-wrapper {
  position: relative;
}

.news-timeline {
  overflow: hidden;
  margin: 0;
}

.news-timeline .swiper-slide {
  height: auto;
  opacity: 1;
  will-change: opacity;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.news-timeline .swiper-slide .card {
  height: 380px;
  overflow: hidden;
}

.news-timeline .swiper-slide .card.expanded {
  height: auto;
  overflow: visible;
}

.news-timeline .swiper-slide-active {
  z-index: 2;
  opacity: 1;
}

.news-timeline .swiper-slide-active .card {
  box-shadow: 0 6px 24px rgba(0,0,0,0.13) !important;
  border-left: 3px solid #83c6a9;
}

.news-timeline-prev,
.news-timeline-next {
  border: none;
  background: none;
  color: #4a9175;
  cursor: pointer;
  transition: color 0.2s ease;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
}

.news-timeline-prev:hover,
.news-timeline-next:hover {
  color: #3a7d62;
}

.news-timeline-prev.swiper-button-disabled,
.news-timeline-next.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.news-timeline .card {
  position: relative;
}

@media (max-width: 768px) {
  .news-timeline-prev,
  .news-timeline-next {
    font-size: 0;
  }
  .news-timeline-prev i,
  .news-timeline-next i {
    font-size: 1.2rem;
    margin: 0 !important;
  }
}

/* ===========================================
   HOME PAGE CARD STYLES
   =========================================== */
section#events .card .card-title,
section#news .card .card-title {
  text-align: left;
  font-size: 1.05rem;
}

section#events .card .card-text,
section#news .card .card-text {
  font-size: 0.92rem;
}

section#events .card .mb-2,
section#news .card .mb-2 {
  font-size: 0.85rem;
}

section#events h2,
section#news h2 {
  font-size: 1.2rem;
}

.news-card .card-body > p,
.news-card .card-body > .card-text {
  padding-left: 16px;
  padding-right: 16px;
}

@media (max-width: 767.98px) {
  section#events .row > .col-lg-4:not(:first-child),
  section#news .row > .col-lg-4:not(:first-child) {
    display: none;
  }
}

/* ===========================================
   CALENDAR VIEW STYLES
   =========================================== */

/* Calendar Card Container */
.cal-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  padding: 28px;
}

/* Calendar Header / Navigation */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.cal-header h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #333f70;
  margin: 0 !important;
}

.cal-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #eff7f0;
  color: #333f70;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
  min-height: auto;
}

.cal-nav-btn:hover {
  background: #83c6a9;
  color: white;
  transform: scale(1.08);
}

/* Weekday Headers */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.cal-weekdays div {
  text-align: center;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #aaa;
  padding: 8px 0;
}

/* Calendar Grid */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

/* Calendar Cells */
.cal-cell {
  position: relative;
  min-height: 90px;
  padding: 8px 6px 6px;
  border-radius: 12px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: all 0.2s ease;
  overflow: hidden;
}

.cal-cell:not(.cal-empty):hover {
  background: #eef0f2;
}

.cal-cell.cal-empty {
  background: transparent;
  min-height: 0;
}

.cal-day-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  line-height: 1;
  margin-bottom: 6px;
  flex-shrink: 0;
}

/* Today */
.cal-cell.cal-today {
  background: #eff7f0;
}

.cal-cell.cal-today .cal-day-num {
  background: #83c6a9;
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Cells with upcoming events */
.cal-cell.cal-has-upcoming {
  background: rgba(131, 198, 169, 0.08);
  cursor: pointer;
}

.cal-cell.cal-has-upcoming:hover {
  background: rgba(131, 198, 169, 0.18);
  transform: scale(1.04);
}

.cal-cell.cal-has-upcoming .cal-day-num {
  color: #333f70;
  font-weight: 700;
}

/* Cells with past events */
.cal-cell.cal-has-past {
  cursor: pointer;
}

.cal-cell.cal-has-past:hover {
  background: #eee;
  transform: scale(1.04);
}

/* Event tags inside cells */
.cal-events {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  flex: 1;
}

.cal-event-tag {
  font-size: 0.6rem;
  line-height: 1.35;
  padding: 3px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-weight: 600;
}

.cal-tag-upcoming {
  background: rgba(131, 198, 169, 0.18);
  color: #2d6a4f;
  border-left: 3px solid #83c6a9;
}

.cal-tag-past {
  background: rgba(0, 0, 0, 0.04);
  color: #888;
  border-left: 3px solid #ccc;
}

/* Detail Panel */
.cal-detail {
  margin-top: 20px;
  padding: 24px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  font-size: 0.9rem;
}

.cal-detail h4 {
  margin-bottom: 16px;
  color: #333f70;
  font-weight: 700;
  font-size: 0.9rem;
}

.cal-detail-event {
  padding: 16px;
  border-radius: 12px;
  background: #f8f9fa;
  margin-bottom: 10px;
}

.cal-detail-event:last-child {
  margin-bottom: 0;
}

.cal-detail-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.cal-goto-card,
.cal-ics-link {
  color: #6c757d !important;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  min-height: auto;
}

.cal-goto-card:hover,
.cal-ics-link:hover {
  color: #333f70 !important;
  text-decoration: none !important;
}

.cal-ics-link:hover {
  color: #83c6a9 !important;
  text-decoration: none !important;
}

/* Card highlight animation */
.cal-highlight {
  animation: calHighlight 2s ease;
}

@keyframes calHighlight {
  0% { box-shadow: 0 0 0 4px rgba(131, 198, 169, 0.7); }
  100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
}

/* Calendar Mobile */
@media (max-width: 768px) {
  .cal-container {
    padding: 16px;
    border-radius: 12px;
  }

  .cal-cell {
    min-height: 52px;
    padding: 5px 3px 4px;
    border-radius: 8px;
  }

  .cal-day-num {
    font-size: 0.72rem;
    margin-bottom: 4px;
  }

  .cal-events {
    display: none;
  }

  .cal-cell.cal-has-upcoming,
  .cal-cell.cal-has-upcoming:hover,
  .cal-cell.cal-has-upcoming:active {
    background: #83c6a9;
    transform: none;
  }

  .cal-cell.cal-has-upcoming .cal-day-num {
    color: #fff;
  }

  .cal-cell.cal-has-past,
  .cal-cell.cal-has-past:hover,
  .cal-cell.cal-has-past:active {
    background: rgba(160, 160, 160, 0.45);
    transform: none;
  }

  .cal-cell.cal-today .cal-day-num {
    background: rgba(255, 255, 255, 0.45);
    color: #333f70;
  }

  .cal-weekdays div {
    font-size: 0.6rem;
    letter-spacing: 0;
    padding: 4px 0;
  }

  .cal-cell.cal-today .cal-day-num {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
  }

  .view-toggle-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
  }

  .cal-header h3 {
    font-size: 1.1rem;
  }

  .cal-nav-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    flex-shrink: 0;
    font-size: 0.9rem;
  }

  .cal-nav-btn:hover,
  .cal-nav-btn:active {
    background: #eff7f0;
    color: #333f70;
    transform: none;
  }

  .cal-detail {
    padding: 16px;
    border-radius: 12px;
  }

  .cal-detail-event {
    padding: 12px;
    border-radius: 8px;
  }
}


