body {
    background: linear-gradient(135deg, #E6F0FA 0%, #D4E4E3 100%);
    min-height: 100vh; /* Ensure the body takes up the full viewport height */
    display: flex;
    flex-direction: column;
}

/* Ensure the main content grows to push the footer down */
body > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure nested flex containers grow to fill the space */
body > div > div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure all sections have a minimum height to push the footer down */
section {
    flex: 1;
}

/* Specific sections with short content */
#teaching, #visiting, #editorial, #membership {
    min-height: calc(100vh - 8rem); /* Adjust for header and footer height */
}

/* Footer */
footer {
    flex-shrink: 0; /* Prevent footer from shrinking */
}

.content-bg {
    background: linear-gradient(to bottom right, #ffffff, #F5F5F5);
    box-shadow: none;
}

/* Updated Color Scheme */
:root {
    --primary-black: #1A1A1A; 
    --light-black: #333333;   
    --accent-gold: #D4A017;   
}

/* Sidebar Hover Effect */
.sidebar-item {
    transition: all 0.3s ease;
}

.sidebar-item:hover {
    background-color: var(--accent-gold);
    transform: scale(1.02);
}

/* Fancy Banner Styling */
#home .banner-container {
    position: relative;
    min-height: 18rem; 
    transition: all 0.3s ease;
}

#home .banner-container:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

#home .banner-title {
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: fadeInDown 1s ease-in-out;
}

#home .banner-subtitle {
    font-family: 'Arial', sans-serif;
    letter-spacing: 1px;
    animation: fadeInUp 1s ease-in-out 0.2s backwards;
}

#home .banner-text {
    font-size: 1rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease-in-out 0.4s backwards;
}

#home .banner-image {
    transition: transform 0.3s ease;
}

#home .banner-container:hover .banner-image {
    transform: scale(1.05) rotate(2deg);
}

@media (min-width: 768px) {
    #home .banner-container {
        min-height: 18rem; /* Adjusted for desktop */
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project Section - Responsive Images */
#projects .flex-wrap img {
    max-width: 100%; /* Ensure images don’t exceed container width */
    width: 100%; /* Make images responsive */
    height: auto; /* Maintain aspect ratio */
}

@media (min-width: 640px) {
    #projects .flex-wrap img {
        width: 12rem; /* Equivalent to w-48 */
        height: 16rem; /* Equivalent to h-64 */
    }
}

/* Video Container Styles */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    cursor: pointer;
    overflow: hidden;
}

.video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-container:hover .video-preview {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: rgba(33, 33, 33, 0.8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 10;
}

.play-button:hover {
    background-color: var(--accent-gold);
}

.play-button::after {
    content: '';
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent white;
}

.youtube-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.control-button {
    background-color: rgba(33, 33, 33, 0.8);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.control-button:hover {
    background-color: var(--accent-gold);
    transform: translateY(-2px);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container:hover .video-overlay {
    opacity: 1;
}