html, body {
    margin: 0; /* Ensure no margin */
    padding: 0; /* Ensure no padding */
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: 'Roboto', sans-serif; /* Changed to Roboto */
    position: relative;
    min-height: 100vh;
}

.landing-page {
    text-align: center;
    position: relative;
    color: white;
    height: 100vh; /* Full viewport height */
    overflow: hidden; /* Hide overflow for parallax effect */
}

.banner-image {
    position: fixed; /* Fixed for parallax effect */
    top: 0;
    left: 0;
    width: 100vw; /* Ensure it spans the full viewport width */
    height: 100vh; /* Ensure it spans the full viewport height */
    object-fit: cover; /* Ensure the image covers the viewport */
    z-index: -2; /* Place behind other elements */
}

.landing-page h1 {
    position: relative; /* Changed from absolute to relative */
    top: 50%;
    transform: translateY(-50%); /* Center vertically within the box */
    font-size: 2.5rem;
    padding: 10px 10px;
    padding-bottom: 15px;
    border-radius: 5px;
    color: black;
    white-space: nowrap;
    opacity: 0; /* Start invisible */
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 1s; /* Start after box animation completes */
}

.hamburger {
    position: absolute; /* Changed from fixed to absolute */
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 100;
    padding: 10px;
    background: none; /* Remove black rectangle */
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px 0;
    background-color: white;
    transition: 0.4s;
}

.hamburger.active {
    background-color: #5a3aa6; /* Match the darker purple background */
    border-radius: 5px; /* Add rounded corners to the box */
    padding: 10px; /* Ensure consistent padding */
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: white;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: white;
}

.menu {
    position: absolute; /* Changed from fixed to absolute */
    top: 0;
    right: 0;
    padding: 60px 20px 20px;
    z-index: 99;
    border-radius: 0 0 0 10px;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    display: block;
    padding: 10px 0;
}

.menu a:hover {
    color: #6b46c1;
}

.menu ul.collapsed {
    display: none;
}

.menu ul.expanded {
    display: block;
    padding: 20px;
    border-radius: 10px 0 10px 10px; /* Rounded bottom-right corner */
    background-color: #5a3aa6; /* Darker purple background */
}

.animated-box {
    position: absolute;
    background-color: white;
    width: 0;
    height: 80px; /* Increased height to fit text */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: expandBox 1s ease-out forwards;
}

.animated-box::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 4px solid white;
    z-index: -1;
    animation: expandBorder 1s ease-out forwards;
}

@keyframes expandBox {
    0% {
        width: 0;
    }
    100% {
        width: 300px;
    }
}

@keyframes expandBorder {
    0% {
        width: 40px;  /* Initial width accounts for left and right offset */
    }
    100% {
        width: 315px;  /* Final box width (300px) + left and right offset (15px) */
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.header-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    height: 80px; /* Match the height of the white box */
    display: flex;
    align-items: center; /* Center content vertically */
    justify-content: center; /* Center content horizontally */
}

.timeline-section {
    background-color: #6b46c1;
    padding: 4rem 0;
    position: relative;
    overflow-x: hidden;
    width: 100vw; /* Changed from implicit width to 100vw */
}

.timeline-section:nth-of-type(2) {
    background-color: #7c5cd6; /* Slightly lighter purple */
}

.timeline-section.may-day-rally {
    background-color: #4a2a8a; /* Darker purple specific to May Day Rally section */
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Add padding for mobile */
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px; /* Increased from 2px */
    background-color: white;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px; /* Adjusted to account for new width */
    border-radius: 2px; /* Added to round the ends */
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: white;
    border-radius: 50%;
    top: 50%; /* Changed from fixed 15px */
    transform: translateY(-50%); /* Added to center the dot */
    z-index: 1;
}

.timeline-item.right .timeline-dot {
    left: -8px;
    right: auto;
}

.timeline-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
}

.timeline-content h3 {
    margin: 0 0 10px 0;
}

.timeline-content p {
    margin: 0;
    font-size: 1.2em;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    margin-top: -40px; /* Reduced space above the header */
    font-size: 5em; /* Increased font size */
    color: white;
}

.subsection-title {
    text-align: center;
    margin-bottom: 30px;
    margin-top: 15px;
    font-size: 3.5em;
    color: white;
}

.gpa-text {
    padding-top: 10px;
    font-size: 1.0em;
}

.contact-section {
    min-height: 100vh;
    padding: 4rem 0;
    overflow-x: hidden;
    width: 100%; /* Changed from 100vw to 100% since it's inside purple-background */
}

.contact-container {
    max-width: 800px;
    margin: 50px auto;
    text-align: center;
    padding: 20px;
    margin-bottom: 4rem; /* Add some bottom padding */
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    margin-top: 30px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: white;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.icon-circle:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 2.5rem;
    color: white;
}

.contact-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: white;
}

.contact-link {
    color: white;
    text-decoration: underline;
    font-size: 1rem;
    transition: opacity 0.3s ease;
}

contact-link:hover {
    opacity: 0.8;
}

.purple-background {
    background-color: #6b46c1;
    min-height: 100vh;
    width: 100vw;
    position: relative; /* Changed from absolute to relative */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Add this new rule */
body:has(.purple-background) {
    background-color: #6b46c1; /* Matches purple-background color */
    min-height: 100vh;
    overflow-x: hidden;
}

.video-container {
    position: relative;
    width: 80%;
    max-width: 1200px; /* Increased from 800px */
    margin: 0 auto;
    padding-bottom: 45%; /* Changed from 56.25% to make it more horizontal */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.video-section {
    background-color: #6b46c1; /* Changed from #5a3aa6 to match main background */
    padding: 2rem 0;
    text-align: center;
}

/* Add this new rule */
.video-title {
    color: white;
    font-size: 2em;
    margin: 20px 0;
    text-align: center;  /* Add this line */
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 60px; /* Increased padding to create space for arrows */
    overflow: visible; /* Changed from default to allow arrows to show */
}

.carousel {
    display: flex;
    overflow-x: scroll; /* Changed from hidden to scroll */
    scroll-behavior: smooth;
    gap: 20px;
    padding: 20px 0;
    max-width: calc(100% - 120px); /* Adjusted width to account for container padding */
    margin: 0 auto; /* Center the carousel */
    -ms-overflow-style: none;  /* Hide scrollbar IE and Edge */
    scrollbar-width: none;  /* Hide scrollbar Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.carousel::-webkit-scrollbar {
    display: none;
}

/* For news items, keep original styling */
.news-item {
    min-width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    color: white;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 450px;
}

/* New class for image-only tiles */
.image-tile {
    min-width: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.3s ease;
    aspect-ratio: 4/3; /* Maintain consistent aspect ratio */
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-tile img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure image fits without distortion */
    border-radius: 4px;
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.news-item h3 {
    margin: 10px 0;
    font-size: 1.2em;
}

.news-item p {
    margin: 10px 0;
    font-size: 0.9em;
    flex-grow: 1; /* Allow paragraph to expand and push button down */
}

.read-more {
    align-self: flex-start; /* Align button to the left */
    margin-top: auto; /* Push button to bottom */
    display: inline-block;
    color: white;
    text-decoration: none;
    margin-top: 10px;
    padding: 5px 10px;
    border: 1px solid white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    padding: 20px 10px; /* Reduced padding for better responsiveness */
    cursor: pointer;
    font-size: 40px;
    font-weight: bold;
    transition: opacity 0.3s ease;
    line-height: 0; /* Ensure the button height is controlled by padding */
}

.carousel-button.prev {
    left: 10px; /* Adjusted to stay within the viewport */
}

.carousel-button.next {
    right: 10px; /* Adjusted to stay within the viewport */
}

.newspaper-image {
    width: 50%;
    display: block;
    margin: 0 auto 100px; /* Increased bottom margin for padding */
}

.about-me-section {
    text-align: center;
    padding: 4rem 0;
    background-color: #5a3aa6; /* Distinct darker purple */
    color: white;
}

.about-me-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 20px; /* Add padding for mobile */
}

.profile-image-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
}

.profile-image-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-me-text {
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 800px; /* Increased from 600px to make the textbox wider */
    text-align: center;
}

/* Add this new rule */
.carousel-section {
    background-color: #4a2a8a; /* Darker purple background */
    padding: 2rem 0;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .about-me-text {
        max-width: 100%; /* Full width on mobile */
        padding: 0 20px; /* Add padding on sides */
    }

    .timeline-section {
        width: 100%; /* Ensure full width */
        padding: 4rem 0;
    }

    .section-title {
        font-size: 3em; /* Smaller font size on mobile */
        padding: 0 20px; /* Add padding on sides */
    }

    .contact-section .section-title {
        font-size: 2.5em; /* Smaller font size specifically for Contact Me section */
    }

    .timeline::after {
        left: 30px; /* Adjusted to align with dots */
    }

    .timeline-item {
        width: 100%; /* Full width on mobile */
        padding-left: 50px; /* Slightly reduced to account for new positioning */
        padding-right: 20px; /* Right padding */
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0; /* Reset positioning */
    }

    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 2px; /* Adjusted to align with line (30px - half of dot width) */
        right: auto;
    }

    .newspaper-image {
        width: 90%; /* Increased from 50% to 90% for mobile */
        margin: 0 auto 40px; /* Reduced bottom margin from 100px to 40px */
    }

    .carousel-container {
        padding: 0 50px; /* Slightly increased padding for more space */
    }

    .carousel {
        gap: 20px; /* Reduced gap between images on mobile */
        padding: 20px 20px;
        max-width: calc(100vw - 100px); /* Adjusted width to create more space */
        overflow-x: scroll; /* Ensure scrolling works on mobile */
    }

    .news-item {
        min-width: calc(100vw - 170px); /* Adjusted width accounting for container padding and gaps */
        height: auto; /* Allow height to adjust based on content */
        max-height: 80vh; /* Prevent item from being taller than viewport */
    }

    .news-item img {
        height: 150px; /* Slightly smaller image height on mobile */
    }

    .image-tile {
        min-width: calc(100vw - 170px);
        aspect-ratio: 4/3; /* Maintain aspect ratio on mobile */
    }

    .carousel-button {
        padding: 15px 8px; /* Further reduce padding on smaller screens */
        font-size: 30px; /* Smaller font size for buttons */
    }

    .carousel-button.prev {
        left: 5px; /* Keep buttons closer to the carousel */
    }

    .carousel-button.next {
        right: 5px; /* Keep buttons closer to the carousel */
    }

    .banner-image {
        left: 0; /* Reset the left position */
        object-position: 65% center; /* Show more of the right side of the image */
    }
}
