/* ------------------- CSS Variables & Reset ------------------- */
:root {
    --primary-green: #3cae71;
    --primary-green-hover: #2e8b57;
    --bg-black: #050505;
    --text-white: #ffffff;
    --text-gray: #c6c6c6;
    --card-border: #349b64;
    --transition-speed: 0.4s;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

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

@keyframes shine {
    100% {
        left: 125%;
    }
}

/* Scroll Reveal Class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------- Header ------------------- */
header {
    background-color: rgba(0, 0, 0, 0.9);
    height: 80px;
    width: 100%;
    position: fixed; /* Sticky header */
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(60, 174, 113, 0.2);
}

header h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.logo-container {
    position: relative;
    overflow: hidden;
    display: block;
}

header img.logo {
    height: 50px;
    width: auto;
    display: block;
}

/* Logo Shine Effect */
.logo-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 100%);
    transform: skewX(-25deg);
    transition: 0.5s; 
    z-index: 2;
    pointer-events: none;
}

.logo-container:hover::after {
    animation: shine 0.75s;
}

header nav ul {
    display: flex;
    gap: 30px;
}

header nav a {
    font-size: 16px;
    font-weight: 600;
    position: relative;
    padding: 5px 0;
    color: var(--text-white); /* Ensure visible color */
}

/* Nav underline animation */
header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-green);
    transition: width 0.3s ease;
}

header nav a:hover {
    color: var(--primary-green);
}

header nav a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* ------------------- Hero Section ------------------- */
.homeBanner {
    position: relative;
    height: 100vh; /* Full viewport height */
    min-height: 600px;
    background-image: url('/staticFiles/assets/Anthonie_van_Leeuwenhoek_profile.png');
    background-repeat: no-repeat;
    background-size: cover; 
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 0;
}

/* Dark overlay for better text readability */
.homeBanner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.homeBanner blockquote {
    z-index: 2;
    color: white;
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 2.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
    text-align: center;
    max-width: 800px;
    padding: 20px;
    /* Initial Animation */
    animation: fadeInUp 1.2s ease-out forwards;
}

.homeBanner blockquote .author {
    display: block;
    margin-top: 20px;
    font-size: 1.5rem;
    color: var(--primary-green);
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
}

/* ------------------- Lab Intro ------------------- */
.labIntro {
    padding: 100px 10vw;
    display: flex;
    justify-content: center;
    background-color: #0a0a0a;
}

.labIntro blockquote {
    color: white;
    font-family: 'Helvetica', sans-serif;
    font-weight: 300;
    font-size: 1.4rem;
    line-height: 1.8;
    text-align: center;
    max-width: 900px;
    border-left: 3px solid var(--primary-green);
    padding-left: 20px;
}

/* ------------------- News Section ------------------- */
.homeNews {
    padding: 50px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--text-white);
    display: inline-block;
    position: relative;
    padding: 0 15px;
    z-index: 1;
    background-color: var(--bg-black); /* Masks the line */
}

.section-header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: var(--primary-green);
    z-index: 0;
    opacity: 0.5;
}

.gallery-wrap {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 50px; /* Space for buttons */
}

.gallery {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 30px;
    padding: 20px 5px; /* Padding for hover shadows */
}

/* Hide scrollbar */
.gallery::-webkit-scrollbar {
    display: none;
}
.gallery {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-item {
    flex: 0 0 320px; /* Fixed width cards */
    background-color: #111;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Hover Effect for Cards */
.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(60, 174, 113, 0.2);
    border-color: var(--primary-green);
}

.gallery-item .img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .tag {
    background-color: var(--primary-green);
    color: white;
    padding: 5px 15px;
    font-size: 0.85rem;
    font-weight: bold;
    width: fit-content;
    margin-top: -15px;
    margin-left: 15px;
    position: relative;
    z-index: 2;
}

.gallery-item .detail {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-item .title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-white);
    font-weight: 700;
}

.gallery-item .content {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.gallery-item a {
    color: var(--primary-green);
    text-decoration: underline;
}

/* Navigation Buttons for Gallery */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: 1px solid var(--primary-green);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background-color: var(--primary-green);
    color: black;
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

/* ------------------- Footer ------------------- */
footer {
    background-color: #000;
    padding: 50px 0 20px;
    border-top: 1px solid #222;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Changed to center to group items closer */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    gap: 60px; /* Increased gap */
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    color: white;
}

.social-links {
    display: flex;
    gap: 40px;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Fixed: Made icons round with border */
.social-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid white;
    transition: transform 0.3s, border-color 0.3s;
    background-color: black; /* Ensure transparent pngs look good */
}

.social-item:hover img {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--primary-green);
}

.social-item p {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Fun Progress Bar */
.progress-bar-container {
    width: 100%;
    max-width: 750px;
    height: 4px;
    background: #222;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), #ffdb3a, var(--primary-green));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Fixed: Footer Bottom Layout with Logo */
.footer-bottom {
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0 20px;
    gap: 20px;
}

.uni-info img {
    width: 200px; /* Adjusted size */
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.uni-info img:hover {
    opacity: 1;
}

.copyright {
    text-align: right;
    color: #636363;
    font-size: 0.9rem;
}

/* ------------------- Responsive ------------------- */
@media (max-width: 768px) {
    header {
        padding: 0 20px;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    header nav ul {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        background-color: rgba(0,0,0,0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    header nav ul.active {
        transform: translateX(0);
    }

    .homeBanner blockquote {
        font-size: 1.8rem;
    }
    
    .gallery-wrap {
        padding: 0 20px;
    }
    
    .nav-btn {
        display: none; /* Hide scroll buttons on mobile, rely on swipe */
    }
    
    .social-links {
        flex-direction: column;
        gap: 20px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .copyright {
        text-align: center;
    }
}

