/* GLOBAL STYLE SHEET: Mancini Lab */

:root {
    --miami-red: #a6192e;
    --text-main: #2c3e50;
    --border-color: #eaeaea;
}

body { 
    font-family: 'Roboto', sans-serif;
    color: var(--text-main);
    margin: 0; 
    padding: 0;
    line-height: 1.6;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* --- GLOBAL NAVIGATION --- */
#new-menu-area {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999999;
    background: white;
    box-shadow: 0 8px 15px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.05);
    
  
    /* Ensuring no other properties are interfering with the bottom edge */
    margin: 0;
    padding: 0;
}

.main-header {
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; 
}

.nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%; 
    padding: 0 40px; 
    gap: 20px;
}

.nav-item {
    text-decoration: none;
    text-align: center;
    color: #333;
    flex: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    padding-bottom: 5px;
}

.nav-item:hover {
    transform: translateY(-2px);
    color: var(--miami-red);
}

.nav-item img {
    width: 50px; 
    height: 50px;
    margin-bottom: 8px;
    transition: filter 0.3s ease;
}

.nav-item span {
    font-size: 0.85rem; 
    font-weight: bold;
    letter-spacing: 1.5px;
}

/* --- THE ACTIVE STATE --- */
/* Red drop-shadow glow applied to the current page icon */
.nav-item.active img {
    filter: drop-shadow(0 0 8px rgba(166, 25, 46, 0.8));
}

.nav-item.active span {
    color: var(--miami-red);
}

/* Red underline removed from here */
.nav-item.active {
    border-bottom: none;
}

/* --- SCROLLING HERO --- */
.lab-hero-scroll {
    position: relative;
    width: 100%; 
    height: 500px; 
    background-image: url('images/schlenk.jpg') !important;
    background-size: cover;
    background-position: center;
    margin-top: 135px; 
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lab-hero-scroll::before {
    content: "";
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.4); 
    z-index: 2;
}

.lab-hero-scroll::after {
    content: "";
    position: relative;
    background-image: url('images/ManciniGroup_Logo.svg') !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 80%; 
    max-width: 750px;
    height: 400px; 
    z-index: 3;
    pointer-events: none;
}

/* Layout Containers */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- PEOPLE PAGE SPECIFIC --- */
.page-title { margin: 2.5rem 0; text-align: center; font-size: 2.5rem; color: #1a1a1a; }
.people-section { margin-bottom: 4rem; }
.section-label { 
    font-size: 1.8rem; text-transform: capitalize; letter-spacing: 1px; color: var(--miami-red); 
    border-bottom: 2px solid var(--border-color); padding-bottom: 10px; margin-bottom: 30px; 
}

/* Link wrapper for cards */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    max-width: 700px;
}

.person-column { display: flex; flex-direction: column; align-items: center; gap: 35px; }
.person-card {
    width: 100%; max-width: 700px; display: flex; border: 1px solid #ddd; border-radius: 12px;
    overflow: hidden; text-align: left; background: white; transition: transform 0.4s ease, box-shadow 0.4s ease;
    padding: 25px; gap: 25px;
    cursor: pointer;
}
.person-card:hover { transform: translateY(-8px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.person-left { flex: 0 0 180px; display: flex; flex-direction: column; align-items: center; }
.person-left img { width: 100%; height: 180px; object-fit: contain; border-radius: 8px; margin-bottom: 15px; }
.person-info-text { text-align: center; }
.person-info-text h3 { margin: 0; font-size: 1.2rem; color: #000; }
.person-info-text .role { margin: 4px 0 0; font-size: 0.95rem; color: #666; }
.person-details-right { flex: 1; display: flex; flex-direction: column; gap: 15px; padding-left: 25px; border-left: 1px solid #eee; }
.detail-block h4 { margin: 0 0 4px 0; font-size: 1.05rem; color: #333; font-weight: 700; }
.detail-block p { margin: 0; font-size: 1.05rem; color: #444; line-height: 1.6; }

/* --- RESEARCH PAGE SPECIFIC --- */
.research-list { display: flex; flex-direction: column; align-items: center; gap: 40px; margin-top: 40px; }
.research-card { 
    width: 85%; background: #fff; border: 1px solid #dcdcdc; border-radius: 8px; padding: 40px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); scroll-margin-top: 150px; 
}
.research-card h2 { color: var(--miami-red); font-size: 1.8rem; border-bottom: 2px solid #f8f8f8; padding-bottom: 12px; margin-bottom: 20px; }
details summary { display: inline; cursor: pointer; color: var(--miami-red); font-weight: 700; outline: none; list-style: none; }
details summary::after { content: " [Read More]"; text-decoration: underline; }
details[open] summary::after { content: " [Show Less]"; }
.hypothesis-text { display: block; margin-top: 20px; padding: 25px; background-color: #f9f9f9; border-left: 4px solid var(--miami-red); border-radius: 4px; }
.research-gallery { display: flex; flex-wrap: wrap; gap: 25px; margin-bottom: 20px; justify-content: center; }
.research-image-wrapper { flex: 1; min-width: 300px; max-width: 100%; }
.research-image-wrapper img { width: 100%; height: auto; border-radius: 4px; border: 1px solid #eee; }
.image-caption { font-size: 0.95rem; color: #444; font-style: italic; margin-top: 15px; text-align: center; }

/* --- PUBLICATIONS PAGE SPECIFIC --- */
.pub-list { 
    display: flex; 
    flex-direction: column; 
    align-items: center; /* Centers the column of cards */
    gap: 30px; 
    margin-top: 40px; 
}

.pub-card { 
    display: flex; 
    gap: 20px; 
    padding: 15px; 
    border: 1px solid #ddd; 
    border-radius: 12px; 
    align-items: flex-start; 
    background: white; 
    
    /* 1. Snaps the card to whole pixels to stop the "fringing" */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%; 
    max-width: 950px; 
    box-sizing: border-box;
}

.pub-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); 
}

.pub-toc-container { 
    width: 275px;
    flex-shrink: 0;
    
    /* 2. Remove the internal border that is causing the vertical lines */
    border: none; 
    
    /* 3. Use an inset box-shadow instead of a border. 
       Shadows are rendered differently and don't "bleed" during transforms. */
    box-shadow: inset 0 0 0 1px #eee;
    
    border-radius: 6px; 
    overflow: hidden; 
    display: flex; 
    align-items: center; 
}

.pub-toc-img { 
    width: 100%; 
    height: auto; 
    display: block;
    /* 4. Ensure the image doesn't have its own sub-pixel bleed */
    image-rendering: -webkit-optimize-contrast;
}

.pub-info { 
    flex: 1;           /* Forces text to take up all remaining space in the card */
    min-width: 0;      /* Prevents long titles from pushing the card wider than 950px */
}
.pub-title { font-size: 1.3rem; font-weight: 700; color: var(--miami-red); text-decoration: none; display: block; margin-bottom: 12px; line-height: 1.4; }
.pub-authors { font-size: 1rem; color: #444; margin-bottom: 8px; }
.pub-journal { font-size: 0.95rem; color: #666; }

.patent-section { margin-top: 60px; }
.patent-link { font-size: 1.15rem; color: var(--miami-red); text-decoration: none; font-weight: bold; }

/* --- LINKS PAGE SPECIFIC --- */
.links-list-container { max-width: 800px; margin: 40px auto; display: flex; flex-direction: column; gap: 20px; }
.link-card {
    display: block; text-decoration: none; background: white; border: 1px solid #ddd; border-radius: 12px;
    padding: 25px; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.link-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); border-color: var(--miami-red); }
.link-card h3 { color: var(--miami-red); margin: 0 0 10px 0; font-size: 1.4rem; }
.link-card p { color: #555; margin: 0; line-height: 1.5; font-size: 1.05rem; }

/* --- HOME & SHARED --- */
.intro-title { color: #333; border-bottom: 2px solid #eee; display: inline-block; padding-bottom: 5px; }
.red-link { color: var(--miami-red); font-weight: bold; text-decoration: none; }
.home-grid { display: flex; gap: 30px; margin-top: 50px; flex-wrap: wrap; }
.sidebar-card { flex: 1; min-width: 300px; border: 1px solid #ddd; padding: 20px; border-radius: 8px; background: white; transition: all 0.4s ease; }
.sidebar-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.float-card { float: right; width: 450px; margin-left: 30px; margin-bottom: 20px; }

/* --- FOOTER --- */
.site-footer { text-align: center; padding: 3rem 0; margin-top: 4rem; border-top: 1px solid var(--border-color); background-color: #fcfcfc; font-size: 0.85rem; color: #999; }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 850px) {
    .pub-card, .person-card { flex-direction: column; align-items: center; text-align: center; }
    .person-details-right { border-left: none; padding-left: 0; border-top: 1px solid #eee; padding-top: 20px; }
    .float-card { float: none; width: 100%; margin-left: 0; }
    .pub-toc-container { width: 100%; margin-bottom: 20px; }
}

@media (max-width: 600px) {
    .nav-links { flex-wrap: wrap; justify-content: center; gap: 5px; padding: 0 10px; }
    .nav-item { flex: 0 0 30%; margin-bottom: 10px; }
    .nav-item img { width: 40px; height: 40px; }
    .nav-item span { font-size: 0.7rem; }
    .lab-hero-scroll { margin-top: 180px; height: 350px; }
    .lab-hero-scroll::after { width: 90%; height: 250px; }
}

/* Home Page Join Us Box Enhancement */
.alt-bg {
    box-shadow: 0 10px 25px rgba(166, 25, 46, 0.1) !important;
    transition: all 0.3s ease;
}

.alt-bg:hover {
    box-shadow: 0 15px 35px rgba(166, 25, 46, 0.15) !important;
    transform: translateY(-5px);
}

.lab-description p {
    font-size: 1.15rem; /* Adjust this number to get the perfect size */
}