:root {
    --mcdl-turquoise: #1abc9c; /* Primary Turquoise */
    --mcdl-dark-turquoise: #16a085;
    --dark-grey: #2c3e50;
    --light-grey: #f9f9f9;
    --white: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.7;
    color: var(--dark-grey);
    background-color: var(--white);
}

/* Top Bar */
.top-bar {
    background: #f1f1f1;
    text-align: right;
    padding: 8px 10%;
    font-size: 0.85rem;
    border-bottom: 1px solid #ddd;
}
.top-bar a { text-decoration: none; color: #777; margin-left: 15px; font-weight: 500; }
.top-bar a:hover { color: var(--mcdl-turquoise); }
.top-bar a.active-lang { color: var(--mcdl-turquoise); font-weight: 700; }

/* Header */
header {
    border-bottom: 5px solid var(--mcdl-turquoise);
    padding: 25px 10%;
    background: var(--white);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.lab-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.affiliation {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.affiliation img {
    height: 72px;
    width: auto;
}

.lab-logo-text {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--mcdl-turquoise);
    margin-right: 15px;
}

.lab-full-name {
    font-size: 1.1rem;
    color: var(--dark-grey);
    font-weight: 400;
    border-left: 1px solid #ccc;
    padding-left: 15px;
    line-height: 1.2;
}

/* Navigation */
nav {
    background: var(--dark-grey);
    padding: 0 10%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 15px 0;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-item > a,
.nav-item > span {
    display: block;
    padding: 15px 16px;
    color: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.3s;
}

.nav-item:hover > a,
.nav-item:hover > span,
.nav-item.active > a,
.nav-item.active > span {
    background: var(--mcdl-turquoise);
}

/* Submenu: opens on hover on desktop, on tap below the nav breakpoint. */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 10;
}

.nav-item:hover .dropdown,
.nav-item.dropdown-open .dropdown { display: block; }

.dropdown a {
    color: var(--dark-grey);
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
    text-transform: none;
}

.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: #f4f4f4; color: var(--mcdl-turquoise); }

/* Hero image */
.hero-image-container {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 8px;
}

.hero-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.page-hero {
    padding: 50px 10%;
    background: var(--dark-grey);
    color: white;
}
.page-hero h1 { margin: 0 0 8px; font-size: 2rem; }
.page-hero p { margin: 0; color: #ccc; }

/* Two-column home layout */
.main-container {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 50px;
    padding: 40px 10%;
}

/* Single-column content pages */
.page-container {
    padding: 40px 10%;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    color: var(--dark-grey);
    border-bottom: 3px solid var(--mcdl-turquoise);
    padding-bottom: 8px;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.subsection-title {
    color: var(--dark-grey);
    margin-top: 50px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    border-left: 5px solid var(--mcdl-turquoise);
    padding-left: 12px;
}
.subsection-title:first-of-type { margin-top: 0; }

/* Introduction styling (home) */
.intro-text {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 30px;
}

/* Callout box. Not italic: it holds a normal paragraph rather than the
   pull-quote it originally carried, and italic hurts readability at length. */
.intro-highlight {
    background: #e0f2f1;
    padding: 20px;
    border-left: 5px solid var(--mcdl-turquoise);
    margin-bottom: 25px;
}

/* Sidebar */
.sidebar-box {
    background: var(--light-grey);
    padding: 25px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.news-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.news-date {
    color: var(--mcdl-turquoise);
    font-weight: bold;
    font-size: 0.8rem;
}

/* People cards */
/* People are listed vertically, photo beside the text, so that bios of a
   few paragraphs stay readable instead of stretching narrow grid columns. */
.people-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.person-card {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    background: var(--light-grey);
    border-radius: 6px;
    padding: 25px;
}

.person-info { flex: 1; min-width: 0; }

.person-photo {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 2rem;
    overflow: hidden;
}

/* Crops any photo to fill the circle without distorting it. */
.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-name { font-weight: 700; margin: 0 0 4px; font-size: 1.05rem; }
.person-role { color: var(--mcdl-dark-turquoise); font-size: 0.85rem; font-weight: 600; margin: 0 0 2px; }
.person-email { font-size: 0.85rem; margin: 0 0 12px; word-break: break-word; }
.person-email a { color: #666; text-decoration: none; }
.person-email a:hover { color: var(--mcdl-turquoise); text-decoration: underline; }
/* Left-aligned while the name and role above stay centred: the bios run to
   several sentences, and centred body text is hard to read at that length. */
.person-bio { font-size: 0.85rem; color: #555; text-align: left; }

/* FAQ accordion. Built on <details>, so it opens without any JavaScript. */
.faq-list { margin: 0 0 30px; }

.faq-item {
    background: var(--light-grey);
    border-left: 3px solid var(--mcdl-turquoise);
    border-radius: 4px;
    margin-bottom: 12px;
}

.faq-item summary {
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    color: var(--mcdl-turquoise);
    font-size: 1.3rem;
    line-height: 1;
    flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2013"; }

.faq-answer {
    padding: 0 20px 18px;
    color: #555;
    font-size: 0.95rem;
}
.faq-answer p { margin: 0 0 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer a { color: var(--mcdl-dark-turquoise); }

/* Compact list for entries that are just a name and an institution. */
.collab-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.collab-list li {
    background: var(--light-grey);
    border-left: 3px solid var(--mcdl-turquoise);
    border-radius: 4px;
    padding: 14px 18px;
}

.collab-name { display: block; font-weight: 600; }
.collab-org { display: block; font-size: 0.85rem; color: #666; margin-top: 2px; }

/* Research themes */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.theme-card {
    background: var(--light-grey);
    border-radius: 6px;
    padding: 25px;
    border-top: 4px solid var(--mcdl-turquoise);
}

/* Running studies: a title with the participant group beneath it. */
.project-list { list-style: none; padding: 0; margin: 0; }

.project-list li {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}
.project-list li:first-child { padding-top: 0; }

.project-name { display: block; font-weight: 600; }
.project-group { display: block; font-size: 0.85rem; color: #666; margin-top: 4px; }
.project-group i { color: var(--mcdl-turquoise); margin-right: 6px; }

.theme-card h3 { margin-top: 0; color: var(--dark-grey); }
.theme-card p { font-size: 0.9rem; color: #555; margin-bottom: 0; }

/* Publications */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-item {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}
.pub-item:first-child { padding-top: 0; }
/* Badges the kind of output (preprint, chapter, ...) rather than the year,
   which the section heading above already carries. */
.pub-type {
    display: inline-block;
    background: var(--mcdl-turquoise);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 8px;
    border-radius: 3px;
    margin-right: 10px;
    white-space: nowrap;
}
.pub-title { font-weight: 600; }
.pub-meta { color: #666; font-size: 0.9rem; margin-top: 4px; }
.pub-meta a { color: var(--mcdl-turquoise); text-decoration: none; }
.pub-meta a:hover { text-decoration: underline; }

/* Events */
.event-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.event-date-box {
    flex: 0 0 80px;
    background: var(--light-grey);
    border-radius: 6px;
    text-align: center;
    padding: 12px 5px;
    height: fit-content;
}
.event-date-box .day { font-size: 1.5rem; font-weight: 800; color: var(--mcdl-turquoise); display: block; }
.event-date-box .month { font-size: 0.75rem; text-transform: uppercase; color: #777; }
.event-title { margin: 0 0 6px; font-size: 1.1rem; }
.event-meta { font-size: 0.85rem; color: #777; margin-bottom: 6px; }

/* Forms */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}
.contact-info-item { margin-bottom: 20px; }
.contact-info-item i { color: var(--mcdl-turquoise); width: 20px; }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--mcdl-turquoise);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
}
.btn:hover { background: var(--mcdl-dark-turquoise); }
.btn-white { background: white; color: var(--mcdl-turquoise); }

/* Footer */
footer {
    background: #222;
    color: #bbb;
    padding: 50px 10% 30px;
    margin-top: 60px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #444;
    padding-bottom: 30px;
    margin-bottom: 20px;
}

/* Nav collapses earlier than the rest of the layout: the Turkish labels
   are long enough that eight items overflow before 1000px is reached. */
@media (max-width: 1150px) {
    .nav-toggle { display: block; }
    nav { padding: 0 6%; }
    .nav-links {
        flex-direction: column;
        display: none;
        padding-bottom: 10px;
    }
    .nav-links.nav-open { display: flex; }
    .dropdown { position: static; box-shadow: none; min-width: 0; }
}

@media (max-width: 1000px) {
    .main-container { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .lab-brand { flex-direction: column; align-items: flex-start; }
    .lab-full-name { border-left: none; padding-left: 0; margin-top: 5px; }
    .affiliation img { height: 52px; }
}

/* On narrow screens the photo moves above the text instead of beside it. */
@media (max-width: 640px) {
    .person-card { flex-direction: column; align-items: center; }
    .person-name, .person-role, .person-email { text-align: center; }
}
