/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

/* Fixed Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    text-align: center; /*Centers the banner ad*/
}

/* Banner Ad */
#banner-ad {
    display: flex; /*Flexbox for centering*/
    justify-content: center; /*Centers horizontally*/
    align-items: center; /*Centers vertically*/
    transition: opacity 0.5s ease-in-out;
    max-width: 100%;
    min-height: 90px;
}

#banner-ad.fade-out {
    opacity: 0;
}

#banner-ad.fade-in {
    opacity: 1;
}

#banner-ad img {
    width: 100%; /*Scales with containe width*/
    max-width: 728px; /*Caps at original width*/
    height: auto; /*Scales with container height Maintains aspect ratio*/
    display:block; /*Prevents any unwanted spacing*/
}


    

/* Menu */
#menu {
    background-color: #0078d4; /* CNET-like blue */
}

#menu ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    display: flex;
    justify-content: space-around;
}

#menu ul li {
    position: relative;
}

#menu ul li a {
    color: #fff;
    text-decoration: none;
    padding: 10px;
    display: block;
}

#menu ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0078d4;
    min-width: 150px;
}

#menu ul li:hover ul {
    display: block;
}

#menu form {
    display: flex;
}

#menu input[type="text"] {
    padding: 5px;
}

#menu button {
    padding: 5px 10px;
    background-color: #005ea2;
    color: #fff;
    border: none;
    cursor: pointer;
}

#hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
    padding: 10px;
}
/* Hide Login/Register link until implementation */
.login-register {
    display: none;
}

/* Logo */
#logo {
    text-align: center;
    padding: 10px 0;
    max-height: 90px;
    overflow: hidden;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0; /* Optional: Adds separation from content below */
}

#logo h1 {
    margin: 0;
    font-size: 24px;
    color: #0078d4;
}

#logo p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    #menu ul {
        display: none;
        flex-direction: column;
        background-color: #0078d4;
    }
    #menu.active ul {
        display: flex;
    }
    #menu ul li ul {
        position: static;
        background-color: #005ea2;
    }
    #hamburger {
        display: block;
    }
}

/* Additional CSS for Home Page */
/* Featured Review */
.featured-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    max-width: 100%;
}

.image-slider {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 400px; /* Fixed height for wide screens */
    background: #f5f5f5;
    overflow: hidden; /* Prevent overflow */
}

.image-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: block; /* Ensure visibility */
}

.image-slider img.active {
    opacity: 1;
}

.text-box {
    flex: 0 0 300px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .featured-container {
        flex-direction: column;
        gap: 10px;
    }
    .image-slider {
        height: 200px; /* Explicit height for narrow screens */
        flex: none; /* Prevent flex shrinkage */
        width: 100%; /* Ensure full width */
    }
    .text-box {
        flex: 1;
        padding: 10px;
        width: 100%; /* Ensure full width */
    }
}

.text-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    z-index: 10; /* Ensures it stays above the images */
    max-width: 90%; /* Prevents overflow on smaller screens */
}

#secondary-reviews {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
}

/* Rest of the home page CSS remains unchanged */

#secondary-reviews {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 20px;
}

.review {
    width: 18%;
    margin-bottom: 20px;
}

.review img {
    width: 100%;
    height: auto;
}

.review h3 {
    font-size: 16px;
    margin: 5px 0;
    color: #0078d4;
}

.review p {
    font-size: 14px;
    color: #666;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    main {
        padding: 10px;
    }
    #logo {
        padding: 5px 0;
        margin-bottom: 5px;
    }
    .featured-container {
        flex-direction: column; /* Stack text below image */
        gap: 10px;
    }
    .image-slider {
        height: 200px; /* Smaller height on mobile */
    }
    .text-box {
        flex: 1; /* Full width below image */
        padding: 10px;
    }
    .review {
        width: 45%;
    }
}

/* Additional CSS for Category Pages */
main {
    padding: 20px;
}

h1 {
    color: #0078d4;
    margin-bottom: 20px;
}

#reviews-list {
    width: 100%;
    border-collapse: collapse;
}

#reviews-list th, #reviews-list td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

#reviews-list th {
    background-color: #f5f5f5;
    text-align: left;
}

#reviews-list td img {
    width: 100px;
    height: auto;
}

#reviews-list a {
    color: #0078d4;
    text-decoration: none;
}

@media (max-width: 768px) {
    #reviews-list td img {
        width: 50px;
    }
    #reviews-list th, #reviews-list td {
        font-size: 14px;
    }
}

/* Existing styles from previous responses assumed to be present */



/* Review Page Specific Styles */
#review-body {
    margin-top: 0px; /* Matches your current CSS */
    margin-left: -10px; /* Reduces main’s 20px padding to 5px effective margin */
    margin-right: -10px; /* Reduces main’s 20px padding to 5px effective margin */
    padding: 0;
    max-width: 100%; /* Prevents overflow beyond viewport */
    box-sizing: border-box; /* Includes padding in width */
    overflow-x: hidden; /* Safeguard against overflow */
}

#review-body iframe {
    width: 100%;
    max-width: 100%; /* Ensures iframe stays within container */
    height: 500px;
    border: none;
    display: block;
    box-sizing: border-box; /* Includes any borders/padding in width */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    main {
        padding: 10px;
    }
    #logo {
        padding: 5px 0; /* Tighter on mobile */
        margin-bottom: 5px;
    }
    main h1 {
        margin-bottom: 3px;
    }
    main p {
        margin-bottom: 5px;
    }
    #review-body {
        padding: 0; /* Flush edges on mobile */
    }
    #review-body iframe {
        height: 300px;
    }
}

/* Existing styles assumed present */

/* Additional CSS for Category Pages */
main {
    padding: 10px;
    box-sizing: border-box; /* Ensures padding is included in width */
    margin-top: 140px; /*initial offset; may need to adjust*/
}


h1 {
    color: #0078d4;
    margin-bottom: 20px;
}

#reviews-list {
    width: 100%;
    border-collapse: collapse;
}

#reviews-list th, #reviews-list td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

#reviews-list th {
    background-color: #f5f5f5;
    text-align: left;
}

#reviews-list td img {
    width: 100px;
    height: auto;
}

#reviews-list a {
    color: #0078d4;
    text-decoration: none;
}

/* Pagination Styles */
#pagination {
    margin-top: 20px;
    text-align: center;
}

#pagination label {
    margin-right: 10px;
    font-size: 14px;
    color: #333;
}

#pagination select {
    padding: 5px;
    margin-right: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

#pagination button {
    padding: 5px 10px;
    margin: 0 5px;
    background-color: #0078d4;
    color: #fff;
    border: none;
    cursor: pointer;
}

#pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#pagination button.active {
    background-color: #005ea2;
    font-weight: bold;
}

#pagination span {
    margin: 0 10px;
}

@media (max-width: 768px) {
    #pagination {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    #pagination label, #pagination select {
        margin-right: 10px;
    }
    #pagination button {
        padding: 3px 6px;
        margin: 0 2px;
        font-size: 14px;
    }
}

/* Existing styles assumed present for header, #banner-ad, #menu, main, #logo */

/* About Us Content */
/* Existing styles assumed present for header, #banner-ad, #menu, main, #logo */

/* About Us Content */
#about-content {
    max-width: 800px; /* Readable width */
    margin: 0 auto; /* Center content */
}

#about-content h2 {
    color: #0078d4; /* CNET-like blue */
    margin: 20px 0 10px;
    font-size: 24px;
}

#about-content p {
    line-height: 1.6;
    margin: 0 0 15px;
    font-size: 16px;
}

#about-content a {
    color: #0078d4;
    text-decoration: none;
}

#about-content a:hover {
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #about-content {
        max-width: 100%;
    }
    #about-content h2 {
        margin: 15px 0 5px;
        font-size: 20px;
    }
    #about-content p {
        margin: 0 0 10px;
        font-size: 14px;
    }
}

/* Existing styles assumed present for header, #banner-ad, #menu, main, #logo */

/* Login Content */
#login-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh; /* Ensure it takes up significant vertical space */
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #login-content {
        min-height: 40vh; /* Slightly smaller on mobile */
    }
    .coming-soon {
        font-size: 36px; /* Adjusted for mobile readability */
    }
}