/* --- Base Styles & Variables --- */
:root {
    --primary-color: #0B132B; /* Deep Blue/Almost Black */
    --secondary-color: #1C2541; /* Slightly Lighter Blue */
    --accent-color: #3A506B; /* Muted Blue/Grey */
    --highlight-color: #5BC0BE; /* Teal/Cyan Accent */
    --text-color: #C5C6C7; /* Light Grey/Off-White */
    --heading-color: #FFFFFF; /* White */
    --background-light: #F8F9FA; /* For alternating sections */
    --text-dark: #333; /* Dark text for light backgrounds */
    --overlay-light: rgba(248, 249, 250, 0.4); /* Light overlay for #consultancy (90% opaque) */
    --overlay-dark: rgba(11, 19, 43, 0.6); /* Dark overlay for hero video */

    --font-primary: 'Poppins', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-color); /* Default dark background */
    color: var(--text-color); /* Default light text */
    line-height: 1.6;
    font-size: 16px;
    /* Improve rendering performance for animations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Headings */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.3;
}
h1 { font-size: 3rem; font-weight: 700; color: var(--heading-color); margin-bottom: 1rem;}
h2 { font-size: 2.2rem; text-align: center; margin-bottom: 2.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.2rem; margin-bottom: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--highlight-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #ffffff;
}

/* Default Section Spacing */
.section-padding {
    padding: 80px 0;
}

/* --- Text Color Helpers --- */
.dark-text { color: var(--text-dark) !important; }
.light-text { color: var(--text-color) !important; }

/* Headings on light backgrounds */
.section-biomarker h2, .section-biomarker h3, .section-biomarker h4,
#consultancy h2.dark-text, #consultancy h3.dark-text, #consultancy h4.dark-text {
    color: var(--primary-color) !important;
}
/* Headings on dark backgrounds */
#publications h2, #contact h2, #publications h3, #contact h3 {
     color: var(--heading-color);
}


/* --- General Section Title Styling --- */
.section-title { /* Used by #contact h2 */
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
    text-align: center;
    color: var(--heading-color); /* Default for dark sections like contact */
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--highlight-color); /* Default underline */
}

/* --- Button Styles --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn-primary {
    background-color: var(--highlight-color);
    color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--heading-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}
.btn-secondary {
    background-color: var(--accent-color);
    color: var(--heading-color);
    margin-top: 20px;
}
.btn-secondary:hover {
    background-color: var(--primary-color);
}


/* --- Navigation Bar --- */
.navbar {
    background-color: rgba(11, 19, 43, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0; left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
}
.navbar .nav-logo img {
    height: 60px;     /* adjust as needed */
    width: auto;
}

.nav-logo:hover { color: var(--highlight-color); }
.nav-menu { list-style: none; display: flex; }
.nav-menu li { margin-left: 25px; }
.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}
.nav-menu a:hover { color: var(--highlight-color); }
.nav-menu a::after { /* Underline hover effect */
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: -2px; left: 0; background-color: var(--highlight-color);
    transition: width 0.3s ease;
}
.nav-menu a:hover::after { width: 100%; }


/* --- Hero Section --- */
.hero-section {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative; overflow: hidden; padding-top: 80px;
    background-color: var(--primary-color); /* Fallback */
}
.hero-video-container {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
}
#hero-video {
    width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay { /* Dark overlay for video */
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--overlay-dark);
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; }
.hero-section h1 {
    font-size: 3.5rem; margin-bottom: 1.5rem; color: var(--heading-color);
    min-height: calc(3.5rem * 1.3 * 2); /* Approx height for 2 lines */
    /* Removed flex props to fix centering */
}
.hero-section .subtitle {
    font-size: 1.2rem; max-width: 700px; margin: 0 auto 2.5rem auto; color: var(--text-color);
}
/* Typing Effect Styles */
.typing-text {
    font-weight: inherit; color: inherit; border-right: 3px solid var(--heading-color);
    padding-right: 5px; display: inline-block; vertical-align: bottom;
    min-height: 1.3em; /* Help prevent layout shift */
}
@keyframes blink { 0%, 100% { border-right-color: var(--heading-color); } 50% { border-right-color: transparent; } }
.typing-text.blinking-cursor { animation: blink 0.8s step-end infinite; }


/* --- Biomarker Analysis Section Styles --- */
.section-biomarker {
    background-color: #ffffff; /* PURE WHITE BACKGROUND */
}
.biomarker-content-wrapper {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 50px; align-items: center;
}
.biomarker-image {
    width: 100%;
    max-width: 100%; /* Prevent container growing beyond column */
    display: flex;
    justify-content: center;
    align-items: center;
}
.biomarker-image img {
    display: block;
    max-width: 100%;
    max-height: 500px; /* Adjust max height */
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
}
.section-title-biomarker {
    font-size: 2.2rem; font-weight: 700; margin-bottom: 25px; text-align: left;
    position: relative; padding-bottom: 10px; color: var(--primary-color) !important;
}
.section-title-biomarker::after {
   content: ''; position: absolute; bottom: 0; left: 0;
   width: 60px; height: 3px; background-color: var(--primary-color);
}
.biomarker-text p {
    font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem;
    color: var(--text-dark) !important;
}
.biomarker-text p:last-child { margin-bottom: 0; }


/* --- Consultancy Section Specific Styles --- */
#consultancy { /* Specific ID for background */
    position: relative;
    background-image: url('../images/beautiful1.png'); /* YOUR BACKGROUND IMAGE */
    background-size: cover; background-position: center center;
    background-repeat: no-repeat; background-attachment: scroll;
    z-index: 0;
    background-color: var(--background-light); /* Fallback */
}
#consultancy::before { /* Light overlay */
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--overlay-light);
    z-index: 1;
}
#consultancy .container { position: relative; z-index: 2; } /* Content above overlay */

#consultancy .section-title {
     color: var(--primary-color) !important; /* Use dark color */
     text-align: center;
}
#consultancy .section-title::after {
     background-color: var(--primary-color) !important; /* Dark underline */
     left: 50%; transform: translateX(-50%);
}

/* Consultancy Pillars on Overlay */
.consultancy-pillars {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; margin-top: 50px; margin-bottom: 60px;
}
.pillar-card {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px; border-radius: 8px; text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pillar-card:hover { transform: translateY(-8px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
.pillar-icon { margin-bottom: 20px; color: var(--primary-color); }
.pillar-icon svg { width: 50px; height: 50px; }
.pillar-card h3 { margin-bottom: 10px; font-size: 1.3rem; color: var(--primary-color) !important; }
.pillar-card p { font-size: 0.95rem; color: var(--text-dark) !important; }

/* Data Modality Showcase on Overlay */
.data-modality-showcase { margin-top: 60px; text-align: center; }
.section-subtitle { font-size: 1.6rem; font-weight: 600; margin-bottom: 40px; color: var(--primary-color) !important; }
.data-image-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 25px;
}
.data-image-item {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0, 0.07);
    transition: transform 0.3s ease;
}
.data-image-item:hover { transform: scale(1.03); }
.data-image-placeholder {
    height: 180px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.data-image-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.data-caption {
    padding: 10px 15px; font-size: 0.9rem; font-weight: 500; margin-bottom: 0;
    color: var(--text-dark) !important;
}


/* --- Affiliated Publications Section Styles --- */
.section-dark-bg {
    background-color: var(--secondary-color); /* Dark background */
}
#publications .section-title {
    color: var(--heading-color); /* Light text */
}
#publications .section-title::after {
    background-color: var(--highlight-color); /* Highlight underline */
}

.logo-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: 40px;
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,1) 90%, rgba(0,0,0,0) 100%);
    cursor: grab;
}
.logo-slider-container:active {
    cursor: grabbing;
}

.logo-slider-track {
    display: flex;
    width: max-content; /* Let content define initial width */
    will-change: transform; /* Optimize animation */
}
/* No CSS animation needed */

.logo-slide {
    height: 80px;
    width: 200px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    flex-shrink: 0;
    user-select: none;
}

.logo-slide img {
    max-height: 90%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    opacity: 1; /* REMOVED Dimming */
    /* REMOVED grayscale filter */
    /* filter: brightness(1.5) grayscale(100%); */
    transition: transform 0.3s ease; /* Optional: Add slight scale on hover */
    pointer-events: none;
}
/* Optional: Scale slightly on hover */
.logo-slide:hover img {
    /* filter: none; */ /* No filter to remove */
    /* opacity: 1; */ /* Already opaque */
    transform: scale(1.05);
}


/* --- Contact Section --- */
#contact {
     /* Keep existing background or change as needed */
     background-color: var(--primary-color);
}
.contact-intro {
    text-align: center; max-width: 600px; margin: 0 auto 30px auto;
    color: var(--text-color);
}
#contact .section-title {
    color: var(--heading-color);
}
#contact .section-title::after {
    background-color: var(--highlight-color);
}

.contact-form-container {
    max-width: 700px; margin: 0 auto; background-color: var(--secondary-color);
    padding: 40px; border-radius: 8px; border: 1px solid var(--accent-color);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--heading-color); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%; padding: 12px; border: 1px solid var(--accent-color); border-radius: 4px;
    background-color: var(--primary-color); color: var(--text-color);
    font-family: inherit; font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none; border-color: var(--highlight-color);
    box-shadow: 0 0 5px rgba(91, 192, 190, 0.5);
}
.form-group textarea { resize: vertical; min-height: 120px; }
#contact-form button[type="submit"] { width: 100%; margin-top: 10px; }
.contact-alt { text-align: center; margin-top: 30px; color: var(--text-color); }
.contact-alt a { font-weight: 600; color: var(--highlight-color); }



/* --- Footer --- */
.footer {
    background-color: var(--secondary-color); text-align: center;
    padding: 20px 0; margin-top: 80px; border-top: 1px solid var(--accent-color);
}
.footer p { margin-bottom: 0; font-size: 0.9rem; color: var(--text-color); }


/* --- Responsiveness --- */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    .hero-section h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    .section-title-biomarker { font-size: 2rem; }
    .biomarker-content-wrapper { gap: 30px; }
}

@media (max-width: 768px) {
    /* Navbar */
    .navbar .container { flex-direction: column; align-items: flex-start; }
    .nav-menu { margin-top: 10px; }
    .nav-menu li { margin-left: 0; margin-right: 15px; }
    /* Hero */
    .hero-section { min-height: 80vh; }
    .hero-section h1 { font-size: 2.5rem; min-height: 0; }
    .hero-section .subtitle { font-size: 1.1rem; }
    /* General */
    .section-padding { padding: 60px 0; }
    h2 { font-size: 1.8rem; }
    /* Biomarker Section Stack */
    .biomarker-content-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .biomarker-image { max-width: 90%; margin: 0 auto; order: 1; }
    .biomarker-text { order: 2; text-align: center; }
    .section-title-biomarker { text-align: center; }
    .section-title-biomarker::after { left: 50%; transform: translateX(-50%); }
    .biomarker-image img { max-height: 350px; }
    /* Logo Slider */
    .logo-slide { height: 60px; width: 150px; padding: 0 10px; }
    /* Consultancy Section */
    .pillar-card h3 { font-size: 1.2rem; }
    .section-subtitle { font-size: 1.4rem; }
    .data-image-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media (max-width: 576px) {
    body { font-size: 15px; }
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section .subtitle { font-size: 1rem; }
    .btn { padding: 10px 20px; font-size: 0.9rem;}
    .contact-form-container { padding: 25px; }
    .nav-menu { flex-direction: column; align-items: flex-start; }
    .nav-menu li { margin-bottom: 5px; }
}

/* Accessibility: Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .logo-slider-track {
    /* Stop JS animation if running */
    /* JS should ideally check this too, but pausing CSS helps */
  }
  /* Add other reduced motion preferences here */
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}