/* slideshows.css - Styles for Slideshow Section */

/* Slideshow Styles */
.w3-content { /* This is for the main top slideshow */
    position: relative;
    margin: auto;
    max-width: 100%; /* Ensures it's responsive */
    border-radius: 8px; /* Rounded corners for a modern look */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); /* Adds a cool shadow effect */
}

.mySlides { /* For main slideshow */
    display: none;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Smooth fade effect (Controls Speed of fade) */
}

.slide-text-mobile { /* For main slideshow */
    display: none; /* Hidden by default, shown in media query */
}

/* CSS for Main Slideshow Navigation Buttons */
.main-slideshow-nav {
    position: absolute;
    top: 50%;
    /* transform: translateY(-50%); -- W3.CSS handles this if w3-display-left/right are used */
    padding: 0;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    z-index: 20;
    transition: background-color 0.3s ease, transform 0.3s ease;
    line-height: 1;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.main-slideshow-nav:hover {
    background-color: rgba(255, 59, 48, 0.8); /* Opsters theme color on hover */
}
/* Apply transform relative to W3.CSS transform if w3-display-left/right are used */
.main-slideshow-nav.w3-display-left:hover,
.main-slideshow-nav.w3-display-right:hover {
    transform: translate(0%, -50%) scale(1.1); /* Combines W3's transform with scale */
}

/* Override W3.CSS default left/right:0% to give some spacing */
/* You might need !important if W3.CSS specificity is too high */
.main-slideshow-prev.w3-display-left {
    left: 15px;
}

.main-slideshow-next.w3-display-right {
    right: 15px;
}

/* Responsive adjustments for main slideshow navigation buttons */
@media screen and (max-width: 768px) {
    .main-slideshow-nav {
        font-size: 18px;
        width: 38px;
        height: 38px;
    }
    .main-slideshow-prev.w3-display-left {
        left: 10px;
    }
    .main-slideshow-next.w3-display-right {
        right: 10px;
    }
}


/* CSS for merchandise slideshow row and containers */
.slideshow-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Spacing between slideshow containers */
    padding: 20px;
    background-color: #000; /* Dark background for eSports theme */
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

.slideshow-container { /* For merchandise slideshows */
    flex: 1 1 400px; /* Allow items to grow and shrink, with a base size */
    max-width: 45%; /* On larger screens, max 2 items per row (approx) */
    min-width: 280px; /* Minimum width before wrapping to full width */
    margin: 10px; /* Fallback margin if gap isn't supported or for extra space */
    background-color: #111;
    border: 3px solid #ff3b30;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    position: relative; /* For prev/next buttons */
    box-sizing: border-box;
}

.slideshow-container:hover {
    transform: scale(1.03); /* Subtle hover effect */
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.8);
}

/* Styles for slides within merchandise slideshows */
/* Ensuring .mySlides3, .mySlides4 etc. are handled if they are direct children */
.slideshow-container .mySlides3,
.slideshow-container .mySlides4,
.slideshow-container .mySlides5 { /* Add other specific slide classes if needed */
    display: none; /* Handled by JS */
    width: 100%;
    text-align: center;
}

.slideshow-container .fade { /* This is for merchandise slideshows if used */
    animation-name: fade-merch; /* Renamed to avoid conflict if a global 'fade' is used elsewhere */
    animation-duration: 1.5s;
}

@keyframes fade-merch {
    from {opacity: .4}
    to {opacity: 1}
}

/* Responsive layout for merchandise slideshows */
@media screen and (max-width: 900px) { /* Adjust breakpoint as needed */
    .slideshow-container {
        max-width: 100%; /* Single column for smaller screens */
        flex-basis: 100%; /* Take full width */
    }
}

/* Responsive Adjustments for main slideshow text */
@media screen and (max-width: 768px) {
    /* .w3-display-container img { Main slideshow image - already handled by w3 defaults or inline styles } */
    /* border-radius: 8px; Ensure consistency - Already on .w3-display-container img */

    .slide-text { /* Main slideshow desktop text */
        display: none;
    }

    .slide-text-mobile { /* Main slideshow mobile text */
        display: block;
        padding: 10px; /* Reduced padding */
        background-color: rgba(0, 0, 0, 0.75);
        color: white;
        font-size: 0.9em; /* Adjusted font size */
        font-family: 'Orbitron', sans-serif; /* Keep original font */
        text-align: center;
        border-radius: 0 0 5px 5px; /* Attach to bottom of image */
        margin-top: 0; /* Remove margin if it's directly after image */
    }
}

/*
   The following animation rule for .w3-display-container.mySlides using @keyframes fadeIn
   was removed because the JavaScript now directly controls opacity and relies on the
   'transition: opacity 1s ease-in-out;' defined on '.mySlides' for the smooth fade.
   This avoids potential conflicts and simplifies the CSS.
*/
/*
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.w3-display-container.mySlides {
    animation: fadeIn 1s ease-in-out;
}
*/

/* Opsters eSports Color Scheme for main slideshow border */
.w3-display-container img { /* This targets images in main slideshow AND merchandise if they use w3-display-container */
    border-radius: 8px;
    border: 5px solid; /* Keep thickness */
    border-image-slice: 1;
    border-image-source: linear-gradient(to right, #00BFFF, #FF0000, #00BFFF);
    animation: borderAnimation 5s linear infinite alternate; /* Added alternate for smoother effect */
}

@keyframes borderAnimation {
    0% {
        border-image-source: linear-gradient(to right, #00BFFF, #FF0000, #00BFFF);
    }
    100% {
        border-image-source: linear-gradient(to right, #FF0000, #00BFFF, #FF0000);
    }
}

/* Text styling for main slideshow mobile text */
.slide-text-mobile { /* This rule was duplicated, ensuring it's only defined once */
    font-family: 'Roboto', sans-serif; /* Changed from Orbitron in the previous definition, keeping Roboto as it was the last one */
    font-weight: bold;
    letter-spacing: 1px; /* Reduced letter spacing */
}

/*
   The following styles were in Merchandise_Slideshow.css
   and seem to be related to how individual merchandise slides and their buttons are handled.
   Merging them here for coherence with .slideshow-container which is also for merchandise.
*/

/* Slide Images with glow effect (for merchandise slideshows) */
.slideshow-container .slide-image {
    width: 100%;
    max-width: 100%; /* Ensure it doesn't overflow */
    height: auto;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.6), 0 0 15px rgba(0, 0, 255, 0.6); /* Red and Blue glow - adjusted opacity */
    transition: transform 0.3s ease-in-out; /* Zoom effect */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    padding: 5px; /* Small padding around image if needed */
    /* Removing the animated border from merchandise slides specifically, if the .w3-display-container img rule applies to them too.
       If merchandise images are NOT in a .w3-display-container, this is not needed.
       If they ARE, and you DON'T want the animated border, uncomment the next few lines. */
    /*
    border: none !important;
    border-image-source: none !important;
    animation: none !important;
    */
}

.slideshow-container .slide-image:hover {
    transform: scale(1.03); /* Slight zoom effect */
}

/* Common Navigation Buttons (for merchandise slideshows) */
/* These target .prev3, .next3 classes as used in the HTML for merchandise slideshows */
.slideshow-container .prev3,
.slideshow-container .next3 {
    position: absolute;
    top: 50%;
    font-size: 18px;
    color: white;
    font-weight: bold;
    padding: 12px; /* Slightly reduced padding */
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10; /* Ensure above images */
    transform: translateY(-50%);
    /* display: block; Always display them if present, JS controls which slideshow they affect */
}

.slideshow-container .prev3 {
    left: 10px;
}

.slideshow-container .next3 {
    right: 10px;
}

.slideshow-container .prev3:hover,
.slideshow-container .next3:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333; /* Change text color on hover for better contrast */
    transform: translateY(-50%) scale(1.1); /* Keep translateY and add scale */
}

/* Adjust Buy Button Styles for merchandise slideshows */
.slideshow-container .buy-button {
    display: inline-block; /* Allows margin auto to work if parent is text-align:center */
    padding: 10px 20px; /* Adjusted padding */
    background-color: #ff6347; /* Tomato color */
    color: white;
    font-size: 1em; /* Adjusted font size */
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 25px; /* Adjusted border-radius */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
    margin-top: 15px; /* Adjusted margin */
    margin-bottom: 15px; /* Add bottom margin */
}

.slideshow-container .buy-button a { /* Style the link inside */
    color: white;
    text-decoration: none;
}

.slideshow-container .buy-button:hover {
    background-color: #ff4500; /* Darker tomato color */
    transform: scale(1.05); /* Adjusted scale */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.slideshow-container .buy-button:active {
    background-color: #e63946; /* Even darker red for active state */
    transform: scale(1.02);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.slideshow-container .buy-button:focus {
    outline: none;
}

/* Hide prev/next for merchandise on very small screens if they feel too intrusive */
@media only screen and (max-width: 480px) {
    .slideshow-container .prev3,
    .slideshow-container .next3 {
        font-size: 14px;
        padding: 8px;
    }
    .slideshow-container .buy-button {
        font-size: 0.9em;
        padding: 8px 15px;
    }
}