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

/* Scale content dynamically based on viewport width */
html {
    font-size: calc(16px + (1vw - 3.5px) * 0.5); /* Scale font size dynamically */
}

/* Dynamically scale content based on viewport width */
body {
    font-family: 'Barlow', sans-serif;
    background-color: #E37424;
    overflow-x: hidden;
    text-align: center;
    color: black;
    transform: scale(calc(1 + (100vw - 1000px) / 5000)); /* Scale dynamically */
    transform-origin: top center; /* Scale from the top center */
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out; /* Smooth scaling transition */
}

/* Ensure minimum font size for mobile */
@media (max-width: 480px) {
    html {
        font-size: 14px; /* Minimum font size for mobile */
    }
}

/* Ensure maximum scaling for large screens */
@media (min-width: 1440px) {
    html {
        font-size: 20px; /* Maximum font size for large screens */
    }
}

/* Ensure images resize properly */
img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Header */
header {
    padding: 10px 0;
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.header-logo {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 10px 0;
    position: relative;
    left: 0;
}

.header-logo img {
    height: auto;
    max-height: 140px;
    max-width: 100%;
}

/* Navigation */
.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 18px;
    padding-bottom: 20px;
}

.navbar a {
    color: #FF776B;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
    -webkit-text-stroke: 3px black;
    paint-order: stroke fill;
}

.navbar a:hover, .navbar a.active {
    color: #DA1515;
}

/* Main Content */
main {
    padding: 20px;
}

/* Headings */
h1 {
    font-size: 22px;
    font-weight: bold;
}

h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    color: #DA1515;
    font-size: 28px;
    text-shadow: -4px 0 0 black;
    -webkit-text-stroke: 3px black;
    paint-order: stroke fill;
}

h3, h4 {
    font-size: 20px;
    color: black;
    font-weight: bold;
}

/* Video Section */
.home-page-yt {
    position: relative;
    width: 100%;
    max-width: 960px; /* Increase maximum width */
    margin: 20px auto;
    aspect-ratio: 16 / 9;
    border: 5px solid black;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 840px;
    margin: 20px auto;
    aspect-ratio: 16 / 9;
    border: 5px solid black;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Ensure content fits perfectly within the container */
}

#video-frame {
    width: 100%;
    height: 100%;
}

.video-frame {
    display: block; /* Remove any inline spacing issues */
    width: 100%;
    max-width: 960px; /* Increase maximum width */
    height: auto; /* Ensure the video fills the container */
    border: none; /* Remove any default iframe border */
}

/* Main container styling for all sections */
.yt-section, .aquaplane-container, .me-section {
    display: flex;
    justify-content: center; /* Center the container horizontally */
    align-items: center; /* Center the container vertically */
    margin: 20px auto; /* Center the container on the page and add vertical spacing */
    max-width: 1200px; /* Limit the container width */
    padding: 30px 60px; /* Increase left and right padding */
    gap: 50px; /* Increase spacing between content containers */
    position: relative; /* Ensure proper positioning */
    border: 2px solid rgba(0, 0, 0, 0.2); /* Add a subtle border */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8); /* Add shadow for depth */
}

/* Specific adjustments for aquaplane-container with three columns */
.aquaplane-container {
    flex-wrap: nowrap; /* Prevent wrapping for three columns */
    justify-content: space-between; /* Space between the three columns */
    gap: 30px; /* Slightly increase spacing between columns */
    padding: 30px 50px; /* Add more padding to the left and right */
}

/* Column styling for aquaplane-container */
.aquaplane-text-container, .aquaplane-image-container, .aquaplane-spotify-container {
    flex: 1 1 30%; /* Each column takes up 30% of the width */
    max-width: 400px; /* Limit maximum width */
    text-align: center; /* Center content inside */
    padding: 10px; /* Maintain padding */
}

.aquaplane-text-container {
    text-align: left; /* Align text to the left */
    font-size: 18px;
    line-height: 1.4; /* Reduce spacing between lines */
}

.aquaplane-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Ensure the image scales properly */
}

.aquaplane-spotify-container iframe {
    width: 100%;
    max-width: 500px; /* Increase maximum width for Spotify embeds */
    height: 400px; /* Increase height */
    border: none;
}

.yt-video-container, .yt-text-container, .me-image-container, .me-text-container {
    flex: 1 1 auto; /* Allow flexible sizing */
    max-width: 600px; /* Limit the width of content containers */
    margin: 0; /* Remove auto margins to avoid overriding centering */
    text-align: left; /* Keep text alignment as is */
}

.yt-video-container, .me-image-container {
    width: 48%; /* Take up half the width for two columns */
    max-width: 600px;
    margin: 0; /* Remove auto margin to align properly */
    display: flex;
    justify-content: center; /* Center the content inside the container */
    align-items: center;
}

.yt-text-container, .me-text-container {
    width: 48%; /* Take up half the width for two columns */
    max-width: 600px;
    text-align: left; /* Align text to the left */
    padding: 10px;
    font-size: 18px;
    display: block; /* Ensure text layers vertically */
    line-height: 1.6; /* Add spacing between lines for readability */
}

.ytvid-section {
    width: 100%;
    max-width: 960px; /* Increase maximum width */
    aspect-ratio: 16 / 9;
    border: 5px solid black;
}

/* General Styling for slideshow */
.me-slideshow-container {
    position: relative;
    width: 80%;  /* Container width */
    margin: 0 auto;  /* Centering the slideshow */
    overflow: hidden;
    height: 500px; /* Max height for the slideshow */
    display: flex;
    justify-content: center;
    align-items: center;
}

.me-slideshow-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Smooth slide transition */
}

.me-slide {
    width: 50%;  /* Two items at a time, so 50% width each */
    margin-right: 10px;  /* Adds gap between slides */
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 100%;
    position: relative;
}

/* Ensures that each image/video is centered and scaled properly */
.me-slide img,
.me-slide video {
    width: 100%;  /* Fill the width */
    height: 100%;  /* Fill the height */
    object-fit: contain; /* Preserve aspect ratio */
}

/* Button Styling */
button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 30px;
    z-index: 2;
}

.me-prev { left: 10px; }
.me-next { right: 10px; }

/* Arrow visibility */
.arrow {
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

.arrow.visible {
    opacity: 1; /* Show arrows when visible class is added */
}

/* Footer */
footer {
    padding: 10px;
    background: #E37424;
    text-align: center;
}

.social-media-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-icon {
    font-size: 50px;
    color: black;
    transition: 0.3s;
}

.social-icon:hover {
    transform: scale(1.1);
    color: #DA1515;
}

.copyright {
    padding: 20px;
}

/* Enhanced View Styles */
.enhanced-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.enhanced-content {
    position: relative;
    max-width: 95vw;  /* Max width */
    max-height: 95vh; /* Max height */
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Enhanced View Navigation Arrows */
.enhanced-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
}

.enhanced-nav-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 30px;
    cursor: pointer;
}

.enhanced-nav-btn:first-of-type {
    left: 0;
}

.enhanced-nav-btn:last-of-type {
    right: 0;
}

/* Ensuring slides take maximum space based on aspect ratio */
#fullscreen-media img,
#fullscreen-media video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Arrow Navigation Buttons */
.arrow {
    position: absolute;
    top: 50%; /* Center vertically */
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 30px;
    z-index: 2;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

.arrow-left {
    left: 10px; /* Position on the left */
}

.arrow-right {
    right: 10px; /* Position on the right */
}

/* Show arrows on hover */
.video-container:hover .arrow {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-logo img {
        max-height: 100px;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .yt-section, .aquaplane-container, .me-section {
        flex-direction: column;
        text-align: center;
        padding: 10px; /* Restore padding */
        margin: 10px; /* Restore margin */
        align-items: stretch; /* Ensure items take full width */
    }

    .aquaplane-image-container, .aquaplane-spotify-container {
        width: 100%; /* Use full width on smaller screens */
        max-width: none; /* Remove max-width restriction */
        padding: 5px; /* Restore padding inside columns */
    }
    
    .aquaplane-text-container {
        text-align: center;
        font-size: 16px; /* Slightly increase text size */
        line-height: 1.5; /* Adjust line spacing */
        padding: 5px; /* Restore padding */
        width: 100%; /* Ensure full width for all containers */
        max-width: none; /* Remove width restrictions */
    }
    .yt-video-container, .me-image-container {
        width: 100%; /* Ensure videos take full width */
        max-width: 100%; /* Prevent videos from getting too small */
    }

    .yt-text-container, .me-text-container {
        text-align: center;
        font-size: 16px; /* Slightly increase text size */
        line-height: 1.5; /* Adjust line spacing */
        padding: 5px; /* Restore padding */
        width: 100%; /* Ensure full width for all containers */
        max-width: none; /* Remove width restrictions */
    }

    .me-slideshow-container {
        width: 100%;
    }

    .me-slideshow-wrapper {
        flex-wrap: nowrap;
    }

    .me-slide {
        width: 100%; /* Display one image per slide */
        margin-right: 0; /* Remove gap between slides */
    }

    iframe {
        max-width: 100%; /* Prevent iframes from shrinking too much */
        height: auto; /* Maintain aspect ratio */
    }
}

@media (max-width: 480px) {
    h1, h2 {
        font-size: 22px; /* Slightly increase heading size */
    }

    .header-logo img {
        max-height: 80px;
    }

    .navbar a {
        font-size: 16px; /* Ensure consistent navbar link size */
    }

    .yt-section, .aquaplane-container, .me-section {
        padding: 10px; /* Restore padding */
        margin: 10px; /* Restore margin */
        flex-direction: column; /* Stack items vertically */
        align-items: stretch; /* Ensure items take full width */
        text-align: center; /* Center text for better readability */
    }

    .aquaplane-text-container, .aquaplane-image-container, .aquaplane-spotify-container {
        padding: 5px; /* Restore padding inside columns */
        width: 100%; /* Make each column take full width */
        max-width: none; /* Remove width restrictions */
    }

    .yt-text-container, .me-text-container {
        font-size: 14px; /* Slightly increase text size */
        padding: 5px; /* Restore padding */
        width: 100%; /* Ensure full width for all containers */
        max-width: none; /* Remove width restrictions */
    }

    iframe {
        max-width: 100%; /* Ensure iframes fit within the container */
        height: auto; /* Maintain aspect ratio */
    }
}

@media (max-width: 480px) {
    h1, h2 {
        font-size: 24px;
    }

    .header-logo img {
        max-height: 80px;
    }

    .navbar a {
        font-size: 16px;
    }

    .yt-text-container, .me-text-container {
        font-size: 14px;
    }
}
