/* Main CSS file for Systems Biology Lab Website */

/* Apply Inter font globally */
body {
    font-family: 'Inter', sans-serif;
}

/* Navigation Fix CSS - Force navigation visibility with highest specificity */
header nav #nav-menu {
    display: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 9999 !important;
}

@media (min-width: 768px) {
    header nav #nav-menu {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Force mobile menu button visibility */
header nav #mobile-menu-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
}

@media (min-width: 768px) {
    header nav #mobile-menu-btn {
        display: none !important;
    }
}

/* Force mobile navigation behavior */
header #mobile-nav.hidden {
    display: none !important;
}

header #mobile-nav:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 768px) {
    header #mobile-nav {
        display: none !important;
    }
}

/* Prevent any external styles from hiding navigation elements */
header nav ul li a {
    visibility: visible !important;
    opacity: 1 !important;
    display: inline !important;
}

/* Additional protection against BibBase interference */
body header,
body header nav,
body header nav #nav-menu,
body header nav #mobile-menu-btn {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (min-width: 768px) {
    body header nav #nav-menu {
        display: flex !important;
    }
}

/* Basic styling for placeholders if needed */
.hero-video-placeholder {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #e5e7eb; /* Tailwind gray-200 */
    border-radius: 0.5rem; /* Tailwind rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Tailwind shadow-xl */
    overflow: hidden;
}

.hero-video-placeholder img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.hero-video-placeholder .overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1.25rem; /* Tailwind text-xl */
    font-weight: 600; /* Tailwind font-semibold */
}

/* Topic Card Hover Effect (already handled by Tailwind in HTML but can be extended here) */
.topic-card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.topic-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for smaller screens if needed beyond Tailwind's utility classes */
@media (max-width: 768px) {
    header nav {
        flex-direction: column;
        align-items: flex-start;
    }

    header nav .flex-grow {
        width: 100%;
        text-align: center;
    }

    header nav ul {
        margin-top: 1rem;
        flex-direction: column;
        width: 100%;
        align-items: center;
        display: none; /* Hidden by default, can be toggled by JS for mobile menu */
    }

    header nav ul.active {
        display: flex;
    }
}

/* Staff member card hover effects */
a.staff-card {
    position: relative !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    transform: scale(1) !important;
}

a.staff-card:hover {
    transform: scale(1.02) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
}

/* Tooltip styles */
a.staff-card .tooltip {
    position: absolute !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    z-index: 1000 !important;
    margin-bottom: 8px !important;
    pointer-events: none !important;
}

a.staff-card .tooltip::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-left: 5px solid transparent !important;
    border-right: 5px solid transparent !important;
    border-top: 5px solid rgba(0, 0, 0, 0.9) !important;
}

a.staff-card:hover .tooltip {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Disable hover effects on mobile for better touch experience */
@media (max-width: 768px) {
    a.staff-card:hover {
        transform: none !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    }
    
    a.staff-card .tooltip {
        display: none !important;
    }
}

/* Lab Slideshow Styles */
#lab-slideshow {
    position: relative;
    overflow: hidden;
}

#slideshow-container {
    display: flex;
    transition: transform 1000ms ease-in-out;
}

.slideshow-slide {
    min-width: 100%;
    position: relative;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Slideshow description overlay */
.slideshow-description-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    color: white;
    padding: 1rem;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

#slideshow-description {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Fade animation for description changes */
.description-fade {
    animation: fadeInOut 0.5s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}
