/* Scroll Narrative Styles */
.page-content {
    position: relative;
    z-index: 1;
}
.scroll-narrative {
    position: relative;
    height: auto;
    /* Ensure enough height for all scroll sections but allow footer to flow naturally */
    min-height: 600vh;
    /* Reduced from 700vh to allow footer positioning */
    z-index: 1;
}

/* Prevent over-scrolling past footer */
body {
    overflow-x: hidden;
    /* Ensure body doesn't allow over-scrolling */
    overflow-y: auto;
}

/* Prevent scrolling beyond content */
html {
    height: 100%;
    overflow-x: hidden;
}

.narrative-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.narrative-section:first-child {
    opacity: 1;
    visibility: visible;
}

/* Introduction Section */
.intro-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    background: rgba(10, 15, 28, 0.9);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: white;
}

.intro-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: #64ffda;
    /* Fallback color */
    background: linear-gradient(135deg, #64ffda 0%, #4caf50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(100, 255, 218, 0.3);
}

.intro-text p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* Brain Animation Section */
#brain-animation-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 1;
    overflow: hidden;
}

/* Animation Section */
.fixed-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: transparent;
}

.fixed-animation-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 900px;
    height: 70%;
    background: rgba(255, 255, 255, 0.175);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    z-index: -1;
}

/* Problem Image Section Styles */
.problem-image-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    /* Transparent to show global background */
    overflow: hidden;
    /* Ensure we crop any edges outside the container */
    border-radius: 20px;
    /* Match rounded look while cropping */
}

/* Blurred background that matches the image colors to remove black edges */
.problem-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(20px);
    transform: scale(1.05);
    z-index: 0;
    opacity: 0.25;
}

.problem-image {
    position: relative;
    z-index: 1;
    /* Sit above the blurred background */
    width: auto;
    height: auto;
    max-width: 92%;
    max-height: 85%;
    object-fit: contain;
    /* Show full image content */
    object-position: center center;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.problem-image:hover {
    transform: scale(1.02);
}

/* Problem Section Styles */
.problem-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 50px;
    background: rgba(10, 15, 28, 0.95);
    border-radius: 25px;
    backdrop-filter: blur(15px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.problem-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: #ff6b6b;
    /* Fallback color */
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.3);
}

.problem-text p {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    letter-spacing: 0.5px;
}

/* Content Section */
.content-wrapper {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 80px 40px 120px 40px;
    /* Increase bottom padding to avoid overlap with footer */
    margin: 0;
    backdrop-filter: blur(5px);
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    /* Ensure content is above footer */
}

/* Background layers - fixed background */
.background-layers {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 0;
    /* Ensure it's at the bottom layer */
    background: #0a0f1c;
}

.bg-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.bg-main {
    z-index: 1;
    opacity: 0.4;
    /* Increase opacity to make background more visible */
}

.bg-dna {
    z-index: 2;
    opacity: 0.25;
    /* Increase opacity to make background more visible */
}

/* Synapse animation container */
.synapse-animation {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: none !important;
    outline: none !important;
}

/* Central neuron */
.central-neuron {
    position: relative;
    width: 600px;
    height: 600px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    outline: none !important;
}

.neuron-healthy,
.neuron-degraded {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: none !important;
    outline: none !important;
}

.neuron-healthy {
    opacity: 1;
    filter: drop-shadow(0 0 30px rgba(100, 255, 150, 0.6));
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1),
        filter 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.neuron-degraded {
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(150, 150, 150, 0.4));
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Synapses */
.synapse {
    position: absolute;
    width: 250px;
    height: 100px;
    display: flex;
    align-items: center;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
        filter 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
    border: none !important;
    outline: none !important;
}

.left-synapse {
    left: calc(50% - 550px);
    /* Adjust position to fit new neuron size */
    flex-direction: row;
}

.right-synapse {
    right: calc(50% - 550px);
    /* Adjust position to fit new neuron size */
    flex-direction: row-reverse;
}

.synapse-terminal {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #4CAF50 0%, #2E7D32 100%);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(76, 175, 80, 0.7);
    position: relative;
}

.synapse-connection {
    flex: 1;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50 0%, transparent 100%);
    position: relative;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.right-synapse .synapse-connection {
    background: linear-gradient(-90deg, #4CAF50 0%, transparent 100%);
}

/* Signals */
.signal {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.9),
        0 0 60px rgba(255, 215, 0, 0.5),
        0 0 90px rgba(255, 215, 0, 0.3);
    z-index: 25;
    transition: left 0.1s linear, right 0.1s linear, opacity 0.3s ease;
}

.left-signal {
    left: calc(50% - 550px);
    /* Adjust position to fit new neuron size */
    top: 50%;
    transform: translateY(-50%);
}

.right-signal {
    right: calc(50% - 550px);
    /* Adjust position to fit new neuron size */
    top: 50%;
    transform: translateY(-50%);
}

/* Animation overlay */
.animation-overlay {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #ffffff;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    padding: 0 20px;
}

.animation-title {
    font-size: 3.2rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(100, 255, 150, 0.4),
        0 0 60px rgba(100, 255, 150, 0.2);
}

.animation-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(100, 255, 150, 0.3);
}



/* CTA Container for button centering */
.cta-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 1rem;
}

/* Elegant button */
.btn-elegant {
    padding: 12px 35px;
    background: linear-gradient(135deg, #ff8a73 0%, #ff4d4d 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(255, 100, 100, 0.2);
    border: none;
}

.btn-elegant:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 100, 100, 0.3);
    color: white;
    text-decoration: none;
}

/* Signal Animation Keyframes */
@keyframes signalMove {
    0% {
        transform: translateX(0) translateY(-50%) scale(0.8);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translateX(50px) translateY(-50%) scale(1);
    }

    80% {
        opacity: 1;
        transform: translateX(150px) translateY(-50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(200px) translateY(-50%) scale(0.8);
    }
}

@keyframes neuronPulse {

    0%,
    100% {
        filter: drop-shadow(0 0 30px rgba(100, 255, 150, 0.6));
    }

    50% {
        filter: drop-shadow(0 0 50px rgba(100, 255, 150, 0.9));
    }
}

/* Enhanced neuron styles */
.neuron-healthy {
    animation: neuronPulse 3s ease-in-out infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .intro-title {
        font-size: 2.5rem;
        letter-spacing: 1px;
    }

    .intro-text p {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .intro-content {
        max-width: 90%;
        padding: 40px 30px;
    }

    .problem-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }

    .problem-text p {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .problem-content {
        max-width: 90%;
        padding: 50px 30px;
    }

    .problem-image {
        width: auto;
        height: auto;
        max-width: 95%;
        max-height: 80%;
        object-fit: contain;
        /* Keep full image on mobile */
        border-radius: 12px;
    }

    .content-wrapper {
        padding: 60px 20px 100px 20px;
        /* Also increase bottom padding on mobile */
        border-radius: 20px 20px 0 0;
    }

    .central-neuron {
        width: 80vw;
        /* Slightly larger on mobile */
        height: 80vw;
        max-width: 600px;
        max-height: 600px;
    }

    .synapse {
        width: 160px;
        /* Adjust synapse size */
        height: 60px;
    }

    .synapse-terminal {
        width: 45px;
        height: 45px;
    }

    .left-synapse {
        left: calc(50% - 220px);
        /* Adjust mobile position */
    }

    .right-synapse {
        right: calc(50% - 220px);
        /* Adjust mobile position */
    }

    .left-signal {
        left: calc(50% - 220px);
        /* Adjust mobile position */
    }

    .right-signal {
        right: calc(50% - 220px);
        /* Adjust mobile position */
    }

    .signal {
        width: 20px;
        height: 20px;
    }

    .animation-title {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }

    .animation-subtitle {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .btn-elegant {
        padding: 10px 28px;
        font-size: 0.95rem;
    }
}

/* Wide screens with short height - animation section optimization */
@media (min-aspect-ratio: 16/10) and (max-height: 800px) {
    .central-neuron {
        width: 450px;
        height: 450px;
        max-width: 450px;
        max-height: 450px;
    }
    
    .animation-overlay {
        top: 20%;
        padding: 0 40px;
    }
    
    .animation-title {
        font-size: 2.6rem;
        letter-spacing: 2px;
        margin-bottom: 0.3rem;
    }
    
    .animation-subtitle {
        font-size: 1rem;
        letter-spacing: 1px;
    }
    
    .left-synapse {
        left: calc(50% - 425px);
    }
    
    .right-synapse {
        right: calc(50% - 425px);
    }
    
    .left-signal {
        left: calc(50% - 425px);
    }
    
    .right-signal {
        right: calc(50% - 425px);
    }
    
    .synapse {
        width: 200px;
        height: 80px;
    }
    
    .synapse-terminal {
        width: 60px;
        height: 60px;
    }
}

/* Very wide screens with very short height - more aggressive animation optimization */
@media (min-aspect-ratio: 21/10) and (max-height: 600px) {
    .central-neuron {
        width: 350px;
        height: 350px;
        max-width: 350px;
        max-height: 350px;
    }
    
    .animation-overlay {
        top: 15%;
        padding: 0 60px;
    }
    
    .animation-title {
        font-size: 2.2rem;
        letter-spacing: 1.5px;
        margin-bottom: 0.2rem;
    }
    
    .animation-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.8px;
    }
    
    .left-synapse {
        left: calc(50% - 350px);
    }
    
    .right-synapse {
        right: calc(50% - 350px);
    }
    
    .left-signal {
        left: calc(50% - 350px);
    }
    
    .right-signal {
        right: calc(50% - 350px);
    }
    
    .synapse {
        width: 180px;
        height: 70px;
    }
    
    .synapse-terminal {
        width: 50px;
        height: 50px;
    }
    
    .signal {
        width: 25px;
        height: 25px;
    }
}

/* Section spacing */
.section-spacing {
    height: 30vh;
    /* 减少间隔高度 */
    background: transparent;
}

/* Section 4: Gene Solution Styles */
.gene-solution-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #2E7D32;
    overflow: hidden;
}

.mission-title {
    position: absolute;
    width: 100%;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: 2px;
    z-index: 4;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    text-align: center;
}

.gene-images-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Background dark image - bottom layer */
.gene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Gene neurons blue image - middle layer */
.gene-neurons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0.8;
}

/* Introduction green image - top layer, centered in gene neurons */
.gene-introduction {
    position: absolute;
    width: auto;
    height: auto;
    max-width: 65%;
    max-height: 65%;
    object-fit: contain;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
}

/* Responsive adjustments for Section 4 */
@media (max-width: 768px) {
    .mission-title {
        font-size: 2.5rem;
        top: 8%;
    }

    .gene-neurons {
        max-width: 95%;
        max-height: 95%;
    }

    .gene-introduction {
        max-width: 80%;
        max-height: 80%;
    }
}

/* Constrain sections 4 and 5 to the same width style as the project grid */
#gene-section,
#solution-section {
    width: 100%;
    max-width: calc(100% - 40px);
    margin: 20px auto;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    padding: 0;
}

/* Remove full-bleed behavior previously applied */
/* (old 100vw + negative margin removed) */

/* Section 5: Our Solution Styles */
#solution-section {
    height: auto;
    min-height: 100vh;
    background: #5F9EA0;
    /* 设置为蓝绿色背景 */
}

#solution-section * {
    opacity: 1 !important;
    visibility: visible !important;
}

.solution-container {
    position: relative;
    width: 100%;
    padding: 40px 20px 250px;
    /* Further increased bottom padding */
    background: #5F9EA0;
    /* 设置为蓝绿色背景，与section一致 */
    color: white;
    text-align: center;
    overflow: hidden;
}

.solution-complete-image-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 10px;
}

.solution-complete-image {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    /* 提高图片渲染质量 */
    image-rendering: crisp-edges;
}

/* Responsive adjustments for Section 5 */
@media (max-width: 768px) {
    .solution-images-wrapper {
        padding: 0 15px;
        gap: 20px;
    }
}

/*Project area section*/
.project-grid-section {
    background-color: #5f9ea5;
    /* Match background color */
    padding: 40px 20px;
    text-align: center;
    position: relative;
    z-index: 10;
    margin-top: 0;
    clear: both;
    width: 100%;
    /* Integrate with narrative-section system */
    height: 100vh !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    /* Add rounded corners and shadow effects */
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
    margin: 20px auto 0;
    /* Remove bottom margin to reduce blank space after section 6 */
    max-width: calc(100% - 40px);
}

/* Ensure project grid is properly styled when shown */
.project-grid-section.narrative-section {
    height: 100vh !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
}

.project-grid-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
    background-color: #c7ddea;
    /* Add rounded corners and shadow effects */
    border-radius: 20px;
}

.project-grid-row {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
}

.project-grid-item {
    flex: 0 0 auto;
    background-color: #0e6c69;
    /* Match card background color */
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 140px;
    height: 180px;
    /* Fixed height to ensure all items are the same size */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid #ffffff;
    /* Add white border */
    position: relative;
    overflow: hidden;
}

.project-grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgb(41, 142, 100) 0%, rgba(32, 127, 102, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.1s ease;
    border-radius: 12px;
    /* Slightly smaller radius to account for border */
    z-index: 1;
}

.project-grid-item:hover::before {
    animation: colorWaveDown 0.6s ease-out forwards;
}

.project-grid-item>* {
    position: relative;
    z-index: 2;
}

.project-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.project-grid-item img {
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    /* Rounded corners for images */
    padding: 10px;
    /* Add padding around images */
}

.project-grid-item img:not([src]),
.project-grid-item img[src=""] {
    display: none;
}

.project-grid-item h3 {
    color: white;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    padding: 0;
    text-align: center;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    word-wrap: break-word;
    hyphens: auto;
}


.project-grid-item:nth-child(5) img {
    height: 70px;
    margin-top: 20px;
    margin-bottom: 20px;
    transform: translate(-1.25px, 0);
}

.project-grid-item:nth-child(6) img {
    transform: translate(-4px, 0);
}

/* Responsive adjustments for project grid */
@media (max-width: 992px) and (min-width: 769px) {
    .project-grid-section {
        padding: 35px 20px;
    }

    .project-grid-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 20px;
        align-items: center;
        justify-items: center;
        max-width: 100%;
    }

    .project-grid-item {
        width: 100%;
        max-width: 180px;
        height: 200px;
    }

    .project-grid-item img {
        max-width: 110px;
        height: 110px;
    }

    .project-grid-item h3 {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .project-grid-section {
        padding: 30px 15px;
        /* Ensure mobile responsive integration with narrative system */
        height: 100vh !important;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        /* Maintain rounded corners and adjust shadow for mobile */
        border-radius: 15px;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25), 0 3px 12px rgba(0, 0, 0, 0.15);
        margin: 15px auto;
        max-width: calc(100% - 30px);
    }

    .project-grid-section.narrative-section {
        height: 100vh !important;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
    }

    .project-grid-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        align-items: center;
        justify-items: center;
        max-width: 100%;
        padding: 0 10px;
    }

    .project-grid-item {
        width: 100%;
        max-width: 145px;
        height: 160px;
        /* Reduced height for mobile grid */
        padding: 12px;
        position: relative;
        overflow: hidden;
    }

    .project-grid-item::before {
        border-radius: 12px;
    }

    .project-grid-item>* {
        position: relative;
        z-index: 2;
    }

    .project-grid-item img {
        max-width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .project-grid-item h3 {
        font-size: 12px;
        line-height: 1.1;
        margin: 0;
    }

    .project-grid-item:nth-child(1) img,
    .project-grid-item:nth-child(2) img,
    .project-grid-item:nth-child(4) img {
        transform: translate(0, 9px);
    }

    .project-grid-item:nth-child(3) img {
        transform: translate(0, 8px);
    }

    .project-grid-item:nth-child(5) img {
        height: 70px;
        margin-top: 20px;
        margin-bottom: 20px;
        transform: translate(0, 5px);
    }

    .project-grid-item:nth-child(6) img {
        transform: translate(0, 0);
    }
}

/* Additional mobile responsive breakpoints */
@media (max-width: 480px) {
    .project-grid-section {
        padding: 20px 10px;
        height: 100vh !important;
        min-height: 100vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        /* Smaller rounded corners and softer shadow for small mobile */
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 2px 10px rgba(0, 0, 0, 0.1);
        margin: 10px auto;
        max-width: calc(100% - 20px);
    }

    .project-grid-section h2 {
        font-size: 2rem !important;
        margin-bottom: 20px !important;
    }

    .project-grid-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: center;
        justify-items: center;
        max-width: 100%;
        padding: 0 5px;
    }

    .project-grid-item {
        max-width: 135px;
        height: 150px;
        padding: 10px;
    }

    .project-grid-item img {
        max-width: 70px;
        height: 70px;
        margin-bottom: 8px;
    }

    .project-grid-item h3 {
        font-size: 11px;
        line-height: 1.1;
        margin: 0;
    }
}

/* Additional mobile responsive breakpoints - Very small screens */
@media (max-width: 360px) {
    .project-grid-section {
        padding: 15px 5px;
        height: 100vh !important;
        min-height: 100vh !important;
        border-radius: 10px;
        margin: 8px auto;
        max-width: calc(100% - 16px);
    }

    .project-grid-section h2 {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }

    .project-grid-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        align-items: center;
        justify-items: center;
        max-width: 100%;
        padding: 0;
    }

    .project-grid-item {
        max-width: 120px;
        height: 140px;
        padding: 8px;
    }

    .project-grid-item img {
        max-width: 60px;
        height: 60px;
        margin-bottom: 8px;
    }

    .project-grid-item h3 {
        font-size: 10px;
        line-height: 1.1;
        margin: 0;
    }

    .project-grid-item:nth-child(1) img,
    .project-grid-item:nth-child(2) img,
    .project-grid-item:nth-child(4) img {
        transform: translate(0, 5px);
    }

    .project-grid-item:nth-child(3) img {
        transform: translate(0, 4px);
    }

    .project-grid-item:nth-child(5) img {
        height: 50px;
        margin-top: 10px;
        margin-bottom: 10px;
        transform: translate(0, 3px);
    }

    .project-grid-item:nth-child(6) img {
        transform: translate(0, 0);
    }
}

/* Section 7: Video Section Styles */
.video-section {
  background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
  padding: 60px 20px;
  color: white;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  margin: 20px auto;
  max-width: calc(100% - 40px);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.video-content-wrapper {
  text-align: center;
}

.video-title {
  font-size: 3.2rem;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  color: white;
}

.video-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 3rem;
  font-weight: 300;
  letter-spacing: 1px;
  color: white;
}

/* Responsive iframe container */
.video-iframe-wrapper {
  position: relative;
  max-width: 900px;
  margin: 0 auto 2rem;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  background: #000;
}

/* Make iframe responsive using aspect ratio technique */
.video-iframe-wrapper::before {
  content: '';
  display: block;
  padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
}

.video-content-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 15px;
}

/* Alternative method if the above doesn't work - direct iframe styling */
iframe[src*="video.igem.org"] {
  width: 100%;
  max-width: 900px;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 15px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
  margin: 0 auto 2rem;
  display: block;
}

.video-description {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.video-content-wrapper h2 {
    color: white;
}

.video-content-wrapper p {
    color: white;
}

.video-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
  color: white;
}

/* Responsive adjustments for video section */
@media (max-width: 768px) {
  .video-section {
    margin: 15px auto;
    max-width: calc(100% - 30px);
    border-radius: 15px;
    padding: 40px 15px;
    min-height: auto;
  }
  
  .video-title {
    font-size: 2.4rem;
    letter-spacing: 1px;
  }
  
  .video-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .video-content-wrapper iframe {
    border-radius: 10px;
    margin-bottom: 1.5rem;
  }
  
  iframe[src*="video.igem.org"] {
    border-radius: 10px;
    margin-bottom: 1.5rem;
    max-width: 100%;
  }
  
  .video-description p {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .video-container {
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .video-section {
    padding: 30px 10px;
    margin: 10px auto;
    max-width: calc(100% - 20px);
    border-radius: 12px;
  }
  
  .video-title {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }
  
  .video-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .video-content-wrapper iframe,
  iframe[src*="video.igem.org"] {
    border-radius: 8px;
    margin-bottom: 1rem;
  }
  
  .video-description p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  .video-container {
    padding: 0 5px;
  }
}

@media (max-width: 360px) {
  .video-section {
    padding: 25px 8px;
    margin: 8px auto;
    max-width: calc(100% - 16px);
    border-radius: 10px;
  }
  
  .video-title {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
  }
  
  .video-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
  }
  
  .video-iframe-wrapper {
    border-radius: 6px;
    margin-bottom: 0.8rem;
  }
  
  .video-content-wrapper iframe,
  iframe[src*="video.igem.org"] {
    border-radius: 6px;
  }
  
  .video-description p {
    font-size: 0.85rem;
    line-height: 1.3;
  }
}

/* Landscape mode optimizations for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .video-section {
    padding: 20px 15px;
    min-height: auto;
  }
  
  .video-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  .video-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .video-iframe-wrapper {
    margin-bottom: 1rem;
  }
}

/* Wide screens with short height - aspect ratio based optimization */
@media (min-aspect-ratio: 16/10) and (max-height: 800px) {
  .video-section {
    min-height: auto !important;
    padding: 40px 20px;
    margin: 15px auto;
  }
  
  .video-title {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
  }
  
  .video-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  .video-iframe-wrapper {
    margin-bottom: 1.5rem;
    max-width: 800px;
  }
  
  .video-description {
    margin-top: 1rem;
  }
  
  .video-description p {
    font-size: 1rem;
    line-height: 1.5;
  }
}

/* Very wide screens with very short height - more aggressive optimization */
@media (min-aspect-ratio: 21/10) and (max-height: 600px) {
  .video-section {
    min-height: auto !important;
    padding: 30px 20px;
    margin: 10px auto;
  }
  
  .video-title {
    font-size: 2.4rem;
    margin-bottom: 0.6rem;
  }
  
  .video-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .video-iframe-wrapper {
    margin-bottom: 1rem;
    max-width: 700px;
  }
  
  .video-description p {
    font-size: 0.95rem;
    line-height: 1.4;
  }
}

/* Tablet specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .video-section {
    padding: 50px 25px;
    max-width: calc(100% - 50px);
    margin: 25px auto;
  }
  
  .video-title {
    font-size: 2.8rem;
  }
  
  .video-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
  }
  
  .video-iframe-wrapper {
    max-width: 800px;
    border-radius: 12px;
  }
}