/* Rebuild overrides for static TRISTAN site */
@import url('https://fonts.googleapis.com/css2?family=Hind:wght@300;400;500;600;700&display=swap');

/* Navigation */
.tristan-nav {
    background: #fff;
    border-bottom: 3px solid #5cb85c;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.tristan-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.tristan-nav .nav-logo img {
    height: 50px;
}
.tristan-nav .nav-links {
    list-style: none;
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
}
.tristan-nav .nav-links li a {
    text-decoration: none;
    color: #333;
    font-family: 'Hind', sans-serif;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 4px;
    transition: all 0.2s;
}
.tristan-nav .nav-links li a:hover,
.tristan-nav .nav-links li.active a {
    background: #5cb85c;
    color: #fff;
}
.tristan-nav .nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .tristan-nav .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 3px solid #5cb85c;
        padding: 10px;
    }
    .tristan-nav .nav-links.open {
        display: flex;
    }
    .tristan-nav .nav-toggle {
        display: block;
    }
}

/* Footer - matching original grey Bayer footer */
.tristan-footer {
    background: #d8d8d8;
    color: #333;
    padding: 30px 0 20px;
    margin-top: 0;
    font-family: 'Hind', sans-serif;
}
.tristan-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    text-align: center;
}
.tristan-footer .footer-logos {
    display: none;
}
.tristan-footer .footer-text {
    font-size: 13px;
    color: #555;
    max-width: 800px;
    margin: 0 auto 15px;
    line-height: 1.5;
}
.tristan-footer .footer-links {
    font-size: 13px;
}
.tristan-footer .footer-links a {
    color: #333;
    text-decoration: none;
}
.tristan-footer .footer-links a:hover {
    text-decoration: underline;
}

/* General font overrides */
body {
    font-family: 'Hind', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff !important;
    padding-top: 0 !important;
    font-size: 16px !important;
    color: #333 !important;
    line-height: 1.5 !important;
}
.hind-light { font-weight: 300; }
.hind-regular { font-weight: 400; }
.hind-medium { font-weight: 500; }
.hind-semibold { font-weight: 600; }
.hind-bold { font-weight: 700; }

/* Green brand colors */
.green-font, .green-font2 { color: #5cb85c; }
.btn-green-1 { background: #5cb85c; border-color: #5cb85c; color: #fff; }
.btn-green-2 { background: #4cae4c; border-color: #4cae4c; color: #fff; }
.btn-green-3 { background: #3d9e3d; border-color: #3d9e3d; color: #fff; }
.btn-green-1:hover, .btn-green-2:hover, .btn-green-3:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

/* Fix container widths */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Main content area */
.tristan-main {
    min-height: 60vh;
}
.tristan-main article {
    max-width: 100%;
}

/* Fix common Drupal/Cohesion layout issues */
.coh-container { box-sizing: border-box; }
.coh-wysiwyg img { max-width: 100%; height: auto; }

/* Head box / hero sections */
.head-box {
    background-size: cover;
    background-position: center;
    min-height: 350px;
    display: flex;
    align-items: center;
}
.head-box .headline {
    padding: 40px;
}
.transparent-box-black {
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 20px 40px;
}
.transparent-box-black h1 {
    color: #fff;
    margin: 0;
}
.transparent-box-black .smaller {
    font-size: 0.65em;
    display: block;
}

/* Text sections */
.text-section {
    padding: 40px 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
}
.text-section-p {
    font-size: 18px;
    line-height: 1.6;
    color: #555;
}
.text-section-grey {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Work package cards */
.wp-section {
    padding: 40px 0;
    background-size: contain;
    background-repeat: no-repeat;
}
.wp-wrap {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
}
.wp-head {
    padding: 30px;
    background-size: cover;
    background-position: center;
    min-height: 120px;
    display: flex;
    align-items: flex-end;
}
.wp-head h3 {
    color: #fff;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.wp-body {
    padding: 20px;
}
.wp-body p {
    color: #555;
    line-height: 1.6;
}

/* Partner slider */
.partner-slider-section {
    padding: 40px 0;
}
.partner-slider {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}
.partner-slider .item {
    flex: 0 0 auto;
}
.partner-slider .item img {
    height: 60px;
    object-fit: contain;
    filter: grayscale(50%);
    transition: filter 0.3s;
}
.partner-slider .item img:hover {
    filter: grayscale(0%);
}

/* Publication / article lists */
.coh-style-bordered-bottom {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}
.coh-style-bordered-bottom .date {
    color: #999;
    font-size: 13px;
}

/* Group section (funding logos) - green band from original */
.group-section {
    padding: 30px 0 !important;
    text-align: center !important;
    background-color: #009640 !important;
}
.group-container {
    display: flex !important;
    justify-content: center !important;
    gap: 30px !important;
    align-items: center !important;
    float: none !important;
    background-image: none !important;
    padding: 15px !important;
    margin: 0 auto !important;
}
.group-container a {
    display: inline-block !important;
}
.group-container img {
    height: 50px !important;
    object-fit: contain !important;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
}
table th, table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}
table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Links */
a { color: #5cb85c; }
a:hover { color: #3d9e3d; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 4px; text-decoration: none; }
.btn-primary { background: #5cb85c; color: #fff; border: none; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

/* List pages */
.coh-view-contents article {
    margin-bottom: 15px;
}

/* Contact form - hide since it won't work */
.webform-submission-form input[type="text"],
.webform-submission-form input[type="email"],
.webform-submission-form input[type="tel"],
.webform-submission-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: 'Hind', sans-serif;
    box-sizing: border-box;
}
.webform-submission-form .brand-button {
    background: #5cb85c;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Hind', sans-serif;
    font-size: 16px;
}

/* Background color blocks */
.background-color-inner-block {
    padding: 30px 15px;
}
.coh-style-tristan-latest-posts {
    background: #f8f8f8;
    padding: 40px 15px;
}
.coh-style-tristan-get-in-touch {
    background: #f0f0f0;
    padding: 40px 15px;
}

/* Page index for listing pages */
.page-index {
    list-style: none;
    padding: 0;
}
.page-index li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.page-index li a {
    font-size: 16px;
}

/* Read more links */
.read-more {
    color: #5cb85c;
    text-decoration: none;
    font-weight: 500;
}
.read-more:hover {
    text-decoration: underline;
}

/* Hide Drupal admin artifacts */
.captcha, .url-textfield, [data-drupal-settingstray] { }
.visually-hidden { position: absolute; clip: rect(0,0,0,0); }

/* === FIXES: Override problematic Cohesion/Drupal inherited styles === */

/* Fix grey header block - Cohesion brand footer/header styles leaking */
[class*="coh-ce-cpt_duplicate_of_brand_footer"],
[class*="coh-ce-cpt_top_header_template"],
[class*="coh-ce-cpt_header_row"] {
    background-color: transparent !important;
    border-bottom-style: none !important;
    min-height: 0 !important;
    display: none !important;
}

/* Kill any Cohesion/Drupal header/footer template regions that may render above content */
.tristan-main > article > .coh-container > .coh-block:first-child,
.tristan-main .settings-tray-editable:empty {
    display: none;
}

/* Ensure no unexpected background on page wrapper elements */
.tristan-main,
.tristan-main > article,
.tristan-main > article > .coh-container {
    background-color: transparent !important;
    background: none !important;
}

/* Override any Cohesion template padding that creates grey blocks */
.tristan-main > article > .coh-container > div:first-child > .coh-wysiwyg:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Force #head-box to be flush at top */
#head-box {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Fix partner slider layout - override Cohesion's broken styles */
.partner-slider-section {
    padding: 40px 15px !important;
    overflow: visible !important;
    height: auto !important;
    position: relative !important;
}
.partner-slider-section .headline {
    background-image: none !important;
    float: none !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    text-align: center;
}
.partner-slider-section .headline h2,
.partner-slider-section h2 {
    color: #333 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    font-size: 28px !important;
}
.partner-slider {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 25px !important;
    padding: 20px 0 !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
}
.partner-slider .item {
    flex: 0 0 auto !important;
    display: inline-block !important;
}
.partner-slider .item a {
    display: block;
}
.partner-slider .item img {
    height: 55px !important;
    width: auto !important;
    max-width: 150px !important;
    object-fit: contain !important;
    filter: none !important;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.partner-slider .item img:hover {
    opacity: 1;
    filter: none !important;
}
/* Hide the white-blend overlay that covered the slider */
.white-blend {
    display: none !important;
}
