/* General Body & Font Styles */
body {
/* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header & Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #9AA6B2;
    padding: 1rem 3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e7e7e7;
}

.nav-logo {
    font-size: 2rem;
    font-weight: bold;
    color: #0056b3;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-link {
    color: #F9F8F6;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #0056b3;
}

/* --- Main Content Area --- */
main {
    flex: 1;
}




/* --- MAIN TITLE: Plant Fusion Gene Predictor --- */
.main-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
    line-height: 1.2;
}

.letter-bold {
    font-weight: 900;
    color: #2e8b57; /* Deep green */
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Responsive: Smaller on mobile */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.2rem;
    }
    .letter-bold {
        font-size: 1.05em;
    }
}




















/* ================= HERO SECTION ================= */
/* ================= LAYOUT ================= */

/* This turns the split-layout into a vertical stack */
.split-layout {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;    /* Center children horizontally */
    width: 100%;
}

/* ================= WRITE UP (INFO SECTION) ================= */

.info-section {
    /* Limit text width for readability */
    #max-width: 1200px; 
    width: 100%;
    /* Add padding so text isn't touching the edges */
    padding: 20px;
    box-sizing: border-box; /* Ensures padding is included in the width */
}

/* This applies the justification you wanted */
.description {
    text-align: justify;
}


/* ================= SLIDESHOW (HERO SECTION) ================= */

/* ================= SLIDESHOW (HERO SECTION) ================= */

/* ================= SLIDESHOW (HERO SECTION) ================= */

.hero-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: #f4f4f4;
    padding: 20px 0; /* Add some vertical padding for spacing */
    
    /* FIX: Give the container a fixed height.
      You can change 500px to a 'vh' value like 60vh if you prefer.
      This is what stops the container from resizing.
    */
    height: 600px; /* Or adjust as needed */
}

.hero-text {
    /* This container will now be 500px tall (from parent) */
    height: 100%; 
    width: 100%;
    max-width: 900px; /* Matches your text section width */
    padding: 0 20px;
    display: grid;
    place-items: center;
    animation: fadeIn 1.5s ease-in-out;
}

.hero-text img {
    /* FIX: Tell the image to fill this fixed box.
    */
    width: 100% !important;
    height: 100% !important;
    transition: opacity 0.5s ease-in-out; /* 0.5 second fade */
    /* CRITICAL: This scales the image down to *fit inside* the 
      box without stretching or being cut off. This will
      create empty space on the sides or top/bottom, 
      but it will stop the container from jiggling.
    */
    object-fit: contain !important; 
    display: block;
}




// --- Automatic Slideshow ---
    (function() {
        // List your slide images here
        var images = [
            "img/ml1.png",
            "img/ml2.png"
            // Add more images here if you want
        ];
        
        var imgElement = document.getElementById("zoomable-image");
        var currentIndex = 0;
        
        // --- New settings for the fade ---
        var slideInterval = 3000; // 3 seconds (time image is visible)
        var fadeDuration = 500;   // 0.5 seconds (must match CSS transition)

        if (imgElement) {
            setInterval(function() {
                
                // 1. Fade the image out
                imgElement.style.opacity = 0;
                
                // 2. Wait for the fade-out to finish
                setTimeout(function() {
                    
                    // 3. Change the image source
                    currentIndex = (currentIndex + 1) % images.length;
                    imgElement.src = images[currentIndex];
                    
                    // 4. Fade the image back in (CSS handles the animation)
                    imgElement.style.opacity = 1;

                }, fadeDuration); // Wait 500ms (matching the fade)

            }, slideInterval); // Repeat the cycle every 3 seconds
        }
    })();
















/* ================= INFO SECTION ================= */


/* ================= INFO SECTION ================= */

/* ================= INFO SECTION ================= */
/* ================= INFO SECTION ================= */
.info-section {
    width: 100%;
    max-width: 1800px;        /* allow much wider layout */
    margin: 0 auto;
    padding: 2rem 6rem;       /* controls distance from margin */
    box-sizing: border-box;
    text-align: center;       /* centers h2 and children */
}

.info-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: #333;
    text-align: center;       /* ensure heading is centered */
}

/* Make the paragraph stretch wide but remain justified */
.info-section .description {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 1400px;        /* wider paragraph area */
    margin: 0 auto 2rem auto;
    color: #555;
    text-align: justify;
}

/* -------------------------------------------------
   BUTTON CONTAINER – INCREASED GAP BETWEEN BUTTONS
   ------------------------------------------------- */
.info-section .button-container {
    display: flex;
    justify-content: center;      /* keeps them centered */
    align-items: center;
    flex-wrap: wrap;              /* wraps on very small screens */
    gap: 3.5rem;                  /* ← CHANGE THIS VALUE TO MAKE THE GAP BIGGER */
    width: 100%;
    margin-top: 1.5rem;
}

/* Keep the old generic .button-container (used elsewhere) unchanged */
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Button styling – unchanged */
.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s, transform 0.3s;
}
.cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}

/* GitHub button (if you have one) – keep its own style */
.github-btn {
    background-color: #24292e !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    min-width: 200px;
}
.github-btn:hover {
    background-color: #2c3238 !important;
    transform: translateY(-3px);
}

/* -------------------------------------------------
   RESPONSIVE – stack on mobile, smaller gap
   ------------------------------------------------- */
@media (max-width: 768px) {
    .info-section .button-container {
        flex-direction: column;
        gap: 1.5rem;               /* smaller gap when stacked */
    }
    .info-section .button-container .cta-button,
    .info-section .button-container .github-btn {
        width: 80%;
        margin: 0 !important;
    }
}

/* Fix modal popup centering */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* --- Footer --- */
footer {
    background-color: #9AA6B2;
    color: #555;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e7e7e7;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#rotating-link-container {
    font-size: 0.9rem;
    transition: opacity 0.4s ease-in-out;
}

.cite-label {
    font-weight: 600;
}

#rotating-link-container a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

#rotating-link-container a:hover {
    text-decoration: underline;
}

.footer-static {
    font-size: 0.9rem;
    color: #0056b3;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Styles for Predict & Train Pages --- */
.predict-container, .results-container, .help-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem 4rem 2rem;
}

.predict-section, .results-section, .help-card {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    margin-bottom: 2.5rem;
}

.predict-section h2, .results-section h2, .help-card-header h2 {
    font-size: 2rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: center;
}
.help-card-header h2 {
     font-size: 1.5rem;
     font-weight: 600;
     text-align: left;
     margin-bottom: 0.25rem;
}


.predict-section p.description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1rem auto;
    line-height: 1.6;
    color: #555;
}

/* Interactive File Drop Area */
.drop-area-styled {
    border: 2px dashed #dce4f0;
    border-radius: 12px;
    padding: 2rem;
    transition: border-color 0.3s, background-color 0.3s;
    background-color: #f8f9fa;
    position: relative; /* Needed for positioning the hidden input */
}
.drop-area-styled.highlight {
    border-color: #007bff;
    background-color: #f0f6ff;
}
.drop-area-styled.file-selected {
    border-style: solid;
    background-color: #fff;
}

/* Hide the default file input visually but keep it accessible */
.drop-area-styled input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1; /* Ensure it's behind the label */
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    cursor: pointer;
    text-align: center;
}
.upload-icon svg {
    color: #007bff;
    margin-bottom: 1rem;
    transition: transform 0.3s;
}
.drop-area-styled.highlight .upload-icon svg { transform: scale(1.1); }
.upload-text strong { font-size: 1.2rem; color: #333; display: block; }
.upload-text span { color: #555; }
.file-limit { font-size: 0.9rem; color: #888; margin-top: 1rem; }

.file-display { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.file-icon { flex-shrink: 0; color: #495057; }
.file-details { flex-grow: 1; margin: 0 1.5rem; overflow: hidden; }
.file-name { display: block; font-weight: 500; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { display: block; font-size: 0.9rem; color: #888; }
.remove-file-btn { flex-shrink: 0; background: transparent; border: none; color: #adb5bd; cursor: pointer; padding: 0.5rem; border-radius: 50%; transition: color 0.3s, background-color 0.3s; }
.remove-file-btn:hover { color: #343a40; background-color: #f1f3f5; }

/* Preview Table */
.preview-wrapper p { font-weight: 500; margin-bottom: 1rem; color: #333; }
.table-container { max-height: 300px; overflow: auto; border: 1px solid #ddd; border-radius: 8px; }
#csv-preview-table { width: 100%; border-collapse: collapse; }
#csv-preview-table th, #csv-preview-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; white-space: nowrap; }
#csv-preview-table thead th { background-color: #f8f9fa; font-weight: 600; position: sticky; top: 0; }

/* Options Grid */
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; align-items: center; }
.option-item { display: flex; flex-direction: column; }
.option-item label { font-weight: 500; margin-bottom: 0.75rem; color: #333; }
.option-item select, .option-item input[type="range"] { width: 100%; padding: 0.75rem; border: 1px solid #ccc; border-radius: 8px; font-size: 1rem; background-color: #fff; }
.option-item input[type="range"] { padding: 0; }
#cutoff-value { font-weight: bold; color: #007bff; margin-top: 0.5rem; align-self: flex-end; }

/* Tooltip */
.tooltip-icon { display: inline-block; background-color: #777; color: white; width: 18px; height: 18px; border-radius: 50%; text-align: center; line-height: 18px; font-size: 12px; font-weight: bold; cursor: help; position: relative; }
.tooltip-icon::after { content: attr(data-tooltip); position: absolute; bottom: 125%; left: 50%; transform: translateX(-50%); background-color: #333; color: white; padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.3s; z-index: 10; width: max-content; max-width: 250px; }
.tooltip-icon:hover::after { opacity: 1; visibility: visible; }

/* Action Buttons */
.action-buttons { text-align: center; margin-top: 2.5rem; }
.reset-button { padding: 1rem 2.5rem; background-color: transparent; color: #6c757d; text-decoration: none; font-size: 1.2rem; font-weight: bold; border-radius: 8px; border: 2px solid #6c757d; margin-left: 1rem; cursor: pointer; transition: background-color 0.3s, color 0.3s; }
.reset-button:hover { background-color: #6c757d; color: white; }

/* Loading Overlay */
#loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(255, 255, 255, 0.9); display: flex; justify-content: center; align-items: center; z-index: 9999; flex-direction: column; }
.loading-content { text-align: center; padding: 2.5rem; border-radius: 12px; background-color: #fff; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }
.loading-content h2 { font-size: 2rem; color: #333; margin-top: 0; }
.loading-content p { color: #555; margin-bottom: 0; }

/* DNA Loading Animation */
.dna-loader { position: relative; width: 120px; height: 12px; margin: 50px auto; transform: scale(1.5); }
.nucleobase { position: absolute; width: 12px; height: 12px; border-radius: 6px; background-color: #007bff; animation: animate-nucleobase 1.5s infinite; }
.nucleobase:nth-child(1) { animation-delay: 0s; } .nucleobase:nth-child(2) { left: 12px; animation-delay: -0.1s; } .nucleobase:nth-child(3) { left: 24px; animation-delay: -0.2s; } .nucleobase:nth-child(4) { left: 36px; animation-delay: -0.3s; } .nucleobase:nth-child(5) { left: 48px; animation-delay: -0.4s; } .nucleobase:nth-child(6) { left: 60px; animation-delay: -0.5s; } .nucleobase:nth-child(7) { left: 72px; animation-delay: -0.6s; } .nucleobase:nth-child(8) { left: 84px; animation-delay: -0.7s; } .nucleobase:nth-child(9) { left: 96px; animation-delay: -0.8s; } .nucleobase:nth-child(10){ left: 108px; animation-delay: -0.9s; }
@keyframes animate-nucleobase { 0%, 100% { top: -25px; } 25% { top: 0px; background-color: #4dabf7; } 50% { top: 25px; } 75% { top: 0px; background-color: #adb5bd; } }

/* --- Styles for Results Pages --- */
.results-container h1 { text-align: center; font-size: 2.8rem; margin-bottom: 1rem; }
.results-container > p { text-align: center; font-size: 1.2rem; color: #555; margin-bottom: 3rem; }
.results-table { width: 100%; border-collapse: collapse; }
.results-table th, .results-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; }
.results-table thead th { background-color: #f8f9fa; font-weight: 600; }
.detailed-results { max-height: 500px; }
.download-area { text-align: center; margin-top: 2rem; }
.code-block { background-color: #f1f3f5; border: 1px solid #dee2e6; padding: 1rem; border-radius: 8px; white-space: pre-wrap; word-wrap: break-word; max-height: 200px; overflow-y: auto; }

/* --- Additions for Charts on Results Page --- */
.chart-container {
    position: relative;
    height: 450px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* --- Additions for Train Page --- */
.caution-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}
.field-notice {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}
.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.param-group {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}
.param-group h3 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: left; /* Ensure group titles are left-aligned */
}
.param-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.param-item label {
    margin-right: 1rem;
    font-size: 0.9rem;
}
.param-item select, .param-item input {
    width: 120px;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
}
/* Parameter Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1.5rem;
}
.tab-link {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    color: #495057;
    border-bottom: 3px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
}
.tab-link:hover {
    color: #007bff;
}
.tab-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 500;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
/* Sample Counts Display */
.sample-counts {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #495057;
}
.sample-counts .pos-count {
    font-weight: 500;
    color: #28a745; /* Green */
}
.sample-counts .neg-count {
    font-weight: 500;
    color: #dc3545; /* Red */
}

/* --- Corrected, Improved Styles for Help Page --- */
.help-container {
    max-width: 900px;
}
.help-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.help-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #212529;
}
.help-header p {
    font-size: 1.25rem;
    color: #6c757d;
}
.help-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.help-card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    padding: 0;
    overflow: hidden;
    border-radius: 12px; /* Ensure consistent border-radius */
    margin-bottom: 0; /* remove default margin */
}
.help-card-header {
    background-color: #f8f9fa;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}
/* Already defined above
.help-card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
} */
.help-card-header p {
    margin: 0.25rem 0 0;
    color: #6c757d;
    font-size: 1rem;
    text-align: left; /* Ensure text aligns left in header */
}
.help-card-content {
    padding: 2rem;
    line-height: 1.7;
    color: #495057;
}
.help-card-content p {
    margin-top: 0;
}
.help-card-content .mt-4 {
    margin-top: 1rem;
}
.contact-link {
    color: #F9F8F6;
    font-weight: 500;
    text-decoration: none;
}
.contact-link:hover {
    color: #F9F8F6;
    text-decoration: underline;
}
.feature-list {
    list-style-type: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}
.feature-list li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    display: inline-block;
    width: 1.2em;
    margin-left: -1.2em;
}

/* Corrected Accordion Styles */
.accordion {
    border-top: 1px solid #e9ecef;
}
.accordion-item {
    border-bottom: 1px solid #e9ecef;
}
.accordion-item:last-child {
    border-bottom: none;
}
.accordion-trigger {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 1.25rem 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: #343a40;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.accordion-item:first-child .accordion-trigger {
    padding-top: 1.25rem; /* Consistent padding */
}
.accordion-trigger:hover {
    color: #0056b3;
}
.accordion-trigger::after {
    content: '';
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-left: 1rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236c757d'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1rem;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}
.accordion-item.active .accordion-trigger::after {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.accordion-content p {
    padding: 0 0.5rem 1.25rem;
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

/* --- Additions for Team Page --- */
.page-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem 4rem 2rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.page-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #212529;
}

.page-header p {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem;
    justify-items: center;   /* ← THIS IS IMPORTANT */
    align-items: start;
}

.team-member-card {
    min-width: 260px;
    max-width: 320px;
    width: 100%;
    box-sizing: border-box;
}


.team-member-card img {
    width: 220px;             /* Go even larger – now there's room! */
    height: 220px;
    border-radius: 50%;
    margin: 0 auto 2rem auto; /* More bottom margin */
    object-fit: cover;
    object-position: center;  /* Or 'top' if faces get cut off */
    border: 6px solid #e9ecef; /* Thicker border for prominence */
    display: block;
}

.member-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #F9F8F6;
}

.member-info .role {
    font-size: 1rem;
    color: #F9F8F6; /* Highlight the role */
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.member-info .affiliation {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    .team-member-card img {
        width: 100px;
        height: 100px;
    }
     .team-member-card {
        padding: 1rem;
    }
     .member-info h3 {
        font-size: 1.1rem;
    }
     .member-info .role {
        font-size: 0.9rem;
    }
}
@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
}

/* --- Additions for Team Page Contact Section --- */
.contact-section {
    background-color: #9AA6B2; /* White background for the section */
    padding: 3rem 2.5rem; /* Add padding */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    margin-top: 3rem; /* Space above the contact section */
}

.contact-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-top: 0;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.contact-container {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    gap: 3rem; /* Space between left and right sections */
    align-items: flex-start; /* Align items to the top */
}

.contact-left {
    flex: 1 1 300px; /* Grow, shrink, base width */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items horizontally */
    text-align: center;
}

.contact-left img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%; /* Make image circular */
    margin-bottom: 1rem;
    border: 4px solid #dee2e6; /* Add a subtle border */
}

.contact-name {
    color:#0056b3; /* Use brand blue */
    font-weight: bold;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.contact-title {
    color: #F9F8F6;
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.contact-detail {
    color: #F9F8F6;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.contact-detail strong {
    color: #343a40;
}
.contact-detail a {
    color:#007bff; /* Standard link blue */
    text-decoration: none;
}
.contact-detail a:hover {
    text-decoration: underline;
}

.contact-right {
    flex: 2 1 400px; /* Allow form to take more space */
    max-width: 600px;
}

.contact-right label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem; /* Space below label */
    margin-top: 1rem; /* Space above label */
    color: #495057;
}

.contact-right input,
.contact-right textarea {
    width: 100%;
    padding: 0.75rem 1rem; /* Adjust padding */
    border: 1px solid #ced4da; /* Slightly lighter border */
    border-radius: 8px; /* Consistent border radius */
    font-size: 1rem;
    box-sizing: border-box; /* Include padding and border in width */
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-right input:focus,
.contact-right textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.contact-right textarea {
    resize: vertical; /* Allow vertical resize */
    min-height: 120px;
}

.contact-right button {
    /* Use existing cta-button styles and add margin */
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem; /* Slightly smaller button */
}

/* Red star for required fields */
.contact-right label.required::after {
    content: " *";
    color: #dc3545; /* Red color for asterisk */
}

/* Responsive adjustments for the contact section */
@media (max-width: 768px) {
    .contact-container {
        gap: 2rem;
    }
    .contact-left, .contact-right {
        flex-basis: 100%; /* Stack on smaller screens */
        max-width: none;
    }
    .contact-left {
        margin-bottom: 1rem; /* Add space when stacked */
    }
}
/* The Image Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 60px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}


/* Modal Content (The Image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%; /* Adjust as needed, e.g., 90% */
  max-width: 1200px; /* Max width for larger screens */
  height: auto; /* CRITICAL: Maintain aspect ratio */
  max-height: 85vh; /* Limit height to prevent it from going off-screen */
  object-fit: scale-down; /* NEW: Use scale-down to fit larger images without upscaling */
}

/* Close button */
.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}
