/************************************ General body styling ************************************/
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #FFFFFF; /* White background */
    display: flex;
    justify-content: center;
    color: #000000; /* Black text for better contrast */
}

/************************************ Container for all content to center it ************************************/
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

/************************************ Header styling ************************************/
/* Header styling with language dropdown */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    max-width: 200px;
    cursor: pointer;
}

/* Translate container styling */
.translate-container {
    display: flex;
    align-items: center;
    background-color: #E0E0E0; /* Light gray for the dropdown */
    border-radius: 20px;
    padding: 5px 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.translate-icon {
    cursor: pointer;
    margin-right: 10px;
    font-size: 24px;
}

.language-dropdown {
    padding: 5px 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    background-color: transparent;
    color: #000000; /* Black text color */
}

/************************************ Thick bar styling ************************************/
.thick-bar {
    height: 50px;
    background: #000000; /* Black background */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    font-size: 18px;
}

.navbar .nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 80px;
}

.navbar .nav-links li a {
    text-decoration: none;
    color: #FFFFFF; /* White text for links */
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar .nav-links li a:hover {
    color: #E0E0E0; /* Light gray color on hover for visibility */
}

/************************************ Main content styling ************************************/
.main-content {
    display: flex;
    align-items: flex-start; /* Aligns content to the top */
}

.left-content {
    width: 75%; /* 3/4 of the container width */
    padding-right: 10px; /* Adjust as needed for spacing */
}

/* Right content (ads) */
.right-content {
    width: 25%; /* Adjust the width as needed */
    padding-left: 10px; /* Spacing from the left content */
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 0; /* Distance from the top of the viewport */
    align-self: flex-start; /* Aligns to the top of the flex container */
}

/************************************ AV Blog Image Carousel Styling ************************************/
.carousel {
    position: relative;
    max-width: 400px; /* Adjust based on your needs */
    height: 600px; /* Set a fixed height */
    margin: 20px auto;
    overflow: hidden;
    border-radius: 10px; /* Rounded corners for a softer look */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Soft shadow for depth */
    border: 1px solid #e0e0e0; /* Lighter border */
}

.carousel-image {
    position: absolute;
    max-width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-images img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Adjusts images to fit without cropping, may add empty space */
    display: none;
    transition: opacity 1s ease; /* Smooth fade transition */
}

.carousel-image.active {
    opacity: 1;
}

.carousel-images img.active {
    display: block;
    opacity: 1;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px; /* Increased spacing from the bottom */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    padding: 5px; /* Added padding around dots for better touch interaction */
    background: rgba(255, 255, 255, 0.5); /* Semi-transparent background for better visibility */
    border-radius: 20px; /* Rounded corners for the indicators' container */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* Soft shadow for depth */
}

.dot {
    cursor: pointer;
    height: 12px; /* Slightly smaller for a more refined look */
    width: 12px; /* Matching width for perfect circles */
    margin: 0 6px; /* Increased spacing for better separation */
    background-color: #bbb; /* Default color for dots */
    border-radius: 50%; /* Ensures dots are perfectly circular */
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: #717171; /* Darker color for active or hovered dots */
    transform: scale(1.5); /* Enlarges dots to indicate active or hover state */
    outline: 2px solid #fff; /* Adds a subtle outline to the active dot for better visibility */
}

/************************************ Right Hand Side Ads Container ************************************/
.ads-container {
    width: 100%; /* Full width of the right-content container */
    padding: 0; /* Adjust padding as needed */
}

.ad {
    width: 100%; /* Full width of the ads-container */
    margin-bottom: 20px; /* Space between ads */
}

.ad, .carousel-item, .flex-item {
    border: 1px solid #D5D5D5; /* Light gray border for separation */
}

/************************************ Bottom Ads Carousel Format ************************************/
.carousel-wrapper {
    max-width: 100%;
    overflow: hidden;
    background-color: #002A64; /* Dark blue background */
    margin: auto;
}

.carousel-container2 {
    width: 100%;
    cursor: pointer;
}

.carousel-slide {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%; /* Each image takes up full width */
    max-height: 300px; /* Adjust height as needed */
    object-fit: contain; /* Ensures images fit without being cropped */
    margin: 0 auto; /* Centers the image */
}

/************************************ Latest Topic Need To View Format ************************************/
.flex-container {
    display: flex;
    justify-content: center; /* Centers flex items on the main axis */
    align-items: center; /* Centers flex items on the cross axis if needed */
    gap: 20px; /* Adjust the gap size as needed */
    padding: 20px;
    margin: 0 auto; /* Centers the container in the parent */
    width: 90%; /* Adjust the width as needed */
    max-width: 1200px; /* Maximum width of the container */
    box-sizing: border-box; /* Include padding and border in the width */
}

.flex-item {
    flex: 1; /* Each flex item will take up equal space */
    border: 1px solid #ccc; /* Border around the flex item if needed */
    padding: 10px;
    box-sizing: border-box;
    height: 400px; /* Fixed height for all flex items */
    background-color: #FFFFFF;
}

.flex-item img {
    width: 100%; /* Image takes full width of the container */
    height: 160px; /* Fixed height */
    object-fit: cover; /* Ensures the image covers the area without stretching */
}

.flex-item .description {
    margin-top: 10px; /* Space between image and description */
}

.description {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows the description to take up remaining space */
    font-family: Arial, sans-serif; /* Font family */
}

.description h2 {
    margin: 0;
    font-size: 1.1em; /* Larger text for the title */
    color: black; /* Color of the title text */
}

.description h2:hover {
    color: rgba(0, 0, 0, 0.6); /* Black with reduced opacity for a lighter effect */
}

.description a {
    text-decoration: none;
}

.description p {
    margin: 0;
    font-size: 0.9em; /* Larger text for the title */
    color: black; /* Color of the description text */
}

.title-with-border {
    background-color: black; /* Dark blue background */
    color: #FFFFFF; /* White text */
    font-weight: bold; /* Bold font weight */
    font-size: 18px; /* Adjust font size as needed */
    padding: 10px 5px; /* Adjust padding as needed */
    margin: -10px -15px 10px -15px; /* Extend outside the container bounds */
    text-align: center; /* Center text horizontally */
    border: 3px solid black; /* Dark blue border */
}

/************************************ Footer Styles ************************************/
.footer {
    padding: 100px; /* Adjust the padding as needed */
    color: #000000; /* Black text */
    background-color: #000000;
    text-align: center; /* Center the text inside the footer */
    font-size: 16px; /* Set the font size */
    /* Add more styling as per your requirement */
}

/************************************ Mobile View Styles ************************************/
@media only screen and (max-width: 768px) {
    /* Header adjustments */
    .header {
        justify-content: space-between; /* Maintains space between logo and translator */
        padding: 15px;
    }

    .logo {
        order: 0; /* Ensures logo stays on the left */
        margin: 0 auto; /* Center the logo */
        max-width: 150px; /* Slightly smaller logo for mobile */
    }

    /* Style adjustments for mobile view */
    .translate-container {
        order: 1; /* Places the translate container on the right */
        position: absolute; /* Absolute position */
        right: 25px; /* Positioned to the right */
        top: 1.1%; /* Aligns it vertically center */
        transform: translateY(-50%); /* Precise vertical center alignment */
    }

    .translate-icon {
        margin-right: 5px;
    }

    .language-dropdown {
        width: auto; /* Adjust width for mobile */
        font-size: 14px; /* Adjust font size for better readability on mobile */
    }

    /* Thick bar adjustments */
    .thick-bar {
        height: 40px; /* Match height with the topic bar */
        border-radius: 15px; /* Half of height for full radius */
    }

    .navbar .nav-links {
        align-items: center; /* Center links */
        gap: 20px; /* Reduce gap between links */
    }

    .navbar .nav-links li a {
        font-size: 14px; /* Adjust font size for smaller screens */
    }

    /* Carousel adjustments */
    .carousel-container, .carousel-container2 {
        overflow: hidden; /* Ensures that no horizontal scrollbar appears */
    }

    .carousel-slide {
        display: flex; /* Keep the flex display */
        flex-wrap: nowrap; /* Prevent wrapping of items */
        transition: transform 0.3s ease-in-out; /* Smooth transition for sliding effect */
    }

    .carousel-slide img {
        width: 100%; /* Each image takes up full width of the viewport */
        height: auto; /* Height is automatic to maintain aspect ratio */
        flex: 0 0 auto; /* Prevent flex items from growing or shrinking */
    }

    /* Adjustments for a single item in view */
    .carousel-wrapper, .carousel-container, .carousel-container2, .carousel-slide {
        width: 100%; /* Full width of the container */
    }

    .main-content {
        padding: 10px;
    }

    /* Hide the right content ads and make left content take full width */
    .right-content {
        display: none;
    }

    .left-content {
        width: 100%;
    }

    /* Flex container adjustments */
    .flex-container {
        flex-direction: column; /* Stack flex items vertically on mobile */
        align-items: center; /* Center-align the flex items */
    }

    .flex-item {
        width: 100%; /* Full width for mobile */
    }

    /* Bottom Ads Carousel adjustments */
    .carousel-wrapper {
        padding: 5px 0; /* Adjust padding for mobile layout */
    }

    .carousel-container2 {
        /* Optionally adjust width or max-width for smaller screens */
    }

    .carousel-slide {
        /* Keep the transition effect consistent with the PC version */
    }

    .carousel-item {
        max-height: 200px; /* Smaller height for mobile screens */
        object-fit: contain; /* Ensures images are fully visible on mobile */
    }

    /* Adjustments for the description box to ensure it doesn't overflow the width */
    .description {
        text-align: center; /* Center the description text */
        padding: 0 5px; /* Add padding to ensure text doesn't touch the edges */
    }

    /* Adjustments to the title with border for mobile */
    .title-with-border {
        font-size: 16px; /* Smaller font size for mobile */
        padding: 10px; /* Sufficient padding to make the text legible */
        border: 3px solid #002A64; /* Dark blue border */
        width: auto; /* Auto width to fit content */
        margin: 10px auto; /* Center the title with auto margins */
    }

    /* Footer adjustments */
    .footer {
        padding: 80px 10px; /* Adjust padding for a snugger footer */
        font-size: 12px; /* Smaller font size for a less obtrusive footer */
    }
}

/* Adjustments for mobile view, especially for smaller devices like iPhone */
@media only screen and (max-width: 480px) {
    .translate-container {
        border-radius: 10px; /* More reduced rounded corners */
        padding: 2px 5px; /* Significantly reduced padding */
        margin-top: 18px;
    }

    .translate-icon {
        margin-right: 3px;
        font-size: 18px; /* Further smaller icon size */
    }

    .language-dropdown {
        padding: 2px 5px; /* Significantly reduced padding */
        font-size: 12px; /* Further smaller text for the dropdown */
        border-radius: 5px; /* Smaller border-radius for dropdown */
    }
}

/* Additional styles for smooth transitions and user view enhancements can be added as needed */