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

/* Global styles */
body {
    font-family: Arial, sans-serif;
    background-color: #E7F2F8;
    color: #2E2E2E;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Header styles */
header {
    background-color: #0d0d2b;
    color: #FFFFFF;
    padding: 0px 0;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

header .logo img {
    width: 200px;
    height: auto;
}

header .search-bar {
    text-align: center;
    flex: 1;
}

header .search-bar input[type="text"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

header .search-bar button {
    padding: 8px 16px;
    background-color: #5e5275;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

header .social {
    display: flex;
    align-items: center;
}

header .social a {
    margin-left: 10px;
}

header .social img {
    width: 30px;
    height: auto;
    filter: invert(100%);
}


nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #C0C0C0;
}

/* CSS styles for horizontal alignment of the navigation menu */
nav {
    text-align: center; /* Center the menu */
}

.nav-menu {
    list-style-type: none;
    display: inline-block; /* Make the menu items display horizontally */
     white-space: nowrap; /* Prevent menu items from wrapping */
}

.nav-menu li {
    display: inline-block; /* Display menu items horizontally */
    margin-right: 20px; /* Add spacing between menu items */
}

.nav-menu li:last-child {
    margin-right: 0; /* Remove right margin for the last menu item */
}

.nav-menu li a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #C0C0C0;
}


/* Banner styles */
.banner {
    background-color: #5e5275;
    color: #FFFFFF;
    text-align: center;
    padding: 100px 0;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 1000px;
    margin: 5px auto;
/* background-image: url('https://cctvhd.co.uk/images/');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;   */
}

.banner h2 {
    font-size: 24px;
    margin-bottom: 0px;
    font-weight: bold;
    text-decoration: none !important; /* Optional: Remove underline */
}

.banner p {
    font-size: 16px;
    margin-bottom: 10px;
    padding: 0px 50px 10px 50px;
}

.btn {
    display: inline-block;
    padding: 5px 10px;
    background-color: #FFFFFF;
    color: #5e5275;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.btn:hover {
    background-color: #0d0d2b;
    color: #FFFFFF;
}

/* Advert styles */
.adverts {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    border-radius: 10px 10px 0px 0px;
    background-color: #Ffffff;
    width: 1000px;
    margin: 0px auto;
}

.advert {
    flex: 0 1 30%;
    margin: 0 0px;
    border-radius: 10px;
    overflow: hidden;
}

.advert img {
     width: 300px;
    height: 250px;
    display: block;
    margin: 0 auto;
}

.banner-advert {
    background-color: #Ffffff;
    color: #FFFFFF;
    text-align: center;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 1000px;
    margin: 0px auto;
}

.banner-advert img {
    max-width: 100%;
    height: auto;
}

/* Benefits section styles */
.benefits {
    background-color: #FFFFFF;
    padding: 40px;
    border-radius: 0px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 1000px;
    margin: 0px auto;
}

.benefits h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #0AA9D6;
    font-weight: bold;
}

.benefits ul {
    list-style-type: none;
}

.benefits li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 16px;
    line-height: 1.6;
    color: #2E2E2E;
}

.benefits li:before {
    content: '\2022';
    position: absolute;
    left: 0;
    color: #0AA9D6;
}

/* Footer styles */
footer {
    background-color: #000000;
    color: #FFFFFF;
    text-align: center;
    padding: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 1000px) {
    .container {
        padding: 0 20px;
    }

    header .container, .adverts, .benefits, .banner-advert, .banner {
        width: auto;
        margin: 0 auto;
    }

    .banner {
        padding: 20px 20px;
        margin: 5px auto;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0px 0;
    }

    .adverts {
        flex-direction: column;
        align-items: center; /* Center the adverts vertically */
    }

    .advert {
        flex: 0 1 calc(30% - 20px); /* Adjust width to fit within the container with margins */
        margin-bottom: 20px;
    }
    
        .advert img {
        border-radius: 10px; /* Apply border radius directly to the images within adverts */
    }

    .benefits, .banner-advert {
        padding: 20px;
    }

    .benefits h2, .banner h2 {
        font-size: 20px;
    }

    .benefits li, .banner p {
        font-size: 14px;
    }
}

/* Ensure that these styles do not affect larger screens */

/* Styles for larger screens */
.search-bar input,
.search-bar button {
    display: inline-block; /* Or your current display values */
}

/* Hide search input and button, show magnifying glass on smaller screens */
@media screen and (max-width: 600px) {
    .search-bar input,
    .search-bar button {
        display: none !important;
        
    }
    
    .search-bar #magnifying-glass {
        display: block !important; /* Use block instead of inline-block and ensure it's important */
        cursor: pointer;
        width: 30px; /* Adjust as necessary */
        height: auto; /* Maintain aspect ratio */
        filter: invert(100%);
    }

    /* Overlay styles */
    .overlay {
        display: none;
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
        z-index: 2; /* Ensure it's above other content */
    }

    .overlay-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #fff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        width: 80%;
    max-width: 400px;
    }

    .overlay-content input[type="text"] {
        width: 100%;
        padding: 10px;
        margin-bottom: 10px;
        border: 1px solid #ccc;
        border-radius: 5px;
        box-sizing: border-box;
    }

    .overlay-content button {
        padding: 10px 20px;
        background-color: #5e5275;
        color: #FFFFFF;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }
    
    .button-container {
    display: flex;
}

#overlay-search-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 10px; /* Add margin to separate search bar and buttons */
}

    #overlay-search-button, #overlay-close-button {
    flex: 1;
    margin-right: 5px; /* Add margin between buttons */
    padding: 8px;
    border: none;
    border-radius: 5px;
    background-color: #5e5275;
    color: white;
    cursor: pointer;
}
#overlay-search-button:hover, #overlay-close-button:hover {
    background-color: #D6304A;
}
    /* Show the overlay when it has the 'show' class */
    .overlay.show {
        display: block;
    }
}

/* Update for the nav menu to move to the top of the banner */
.banner {
    position: relative; /* Ensure the banner is positioned relatively */
}

.nav-menu {
    position: absolute; /* Position the nav menu absolutely within the banner */
    top: 10px; /* Adjust the distance from the top of the banner */
    left: 50%; /* Center the nav menu horizontally */
    transform: translateX(-50%); /* Adjust to center the nav menu */
}

/* Ensure the nav menu items do not wrap */
.nav-menu li {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .adverts {
        flex-direction: row;
        flex-wrap: wrap; /* Allow adverts to wrap */
        justify-content: center; /* Center adverts horizontally */
    }

    .advert {
        flex: 0 1 calc(50% - 20px); /* Adjust width to fit 2 adverts in a row with margins */
        margin-bottom: 20px;
    }

    .advert:nth-child(3) {
        visibility: hidden; /* Hide the third advert */
        width: 0; /* Make its width zero so it doesn't occupy space */
        margin: 0; /* Remove margin to prevent spacing */
    }

    .advert img {
        border-radius: 10px; /* Apply border radius directly to the images within adverts */
    }
}

@media (max-width: 600px) {
    .advert {
        flex: 0 1 100%; /* Reset width to 100% for stacking vertically */
    }

    .advert:nth-child(3) {
        visibility: visible;
        width: auto;
        margin: 0 0px;
    }
    
    .banner {
   
/* background-image: url('https://cctvhd.co.uk/images/');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;   */
}
}

@media (min-width: 900px) and (max-width: 1000px) {
    .adverts {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .advert {
        flex-basis: calc(50% - 20px);
        margin-bottom: 20px;
    }

    .advert:nth-child(3) {
        display: none;
    }
}

@media (min-width: 600px) and (max-width: 900px) {
    .advert {
        flex: 0 1 calc(50% - 20px);
        margin-bottom: 20px;
    }

    .advert:nth-child(3) {
        display: none; /* Hide the third advert */
        visibility: hidden;
        width: auto;
        margin: 0 0px;
    }
}


.banner {
    position: relative; /* Ensure the banner is positioned relatively */
    padding: 100px 0; /* Adjust padding to create space for the button at the bottom */
}

.banner h2 {
    margin-bottom: 5px; /* Add margin to create space between heading and button */
    text-decoration: none !important; /* Optional: Remove underline */
}

.btn {
    position: absolute; /* Position the button absolutely within the banner */
    bottom: 20px; /* Adjust the distance from the bottom of the banner */
    left: 50%; /* Center the button horizontally */
    transform: translateX(-50%); /* Center the button horizontally */
}

.benefits-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.benefits-list-container {
    flex: 1 1 calc(50% - 20px); /* Set benefits to occupy 50% of the container */
    margin-right: 40px; /* Add space between benefits list and video */
}

.benefits-video-container {
    flex: 1 1 calc(50% - 20px); /* Set video to occupy 50% of the container */
}

.benefits-video {
    max-width: 100%; /* Ensure video stays within its container */
    height: auto; /* Maintain aspect ratio */
}

.video-link {
    display: block; /* Display the "Learn More" link as a block element */
    margin-top: 10px; /* Add some spacing between the video and the link */
}

@media (max-width: 600px) {
    .benefits-content {
        flex-direction: column; /* Stack benefits and video vertically on screens less than 600px */
    }

    .benefits-list-container,
    .benefits-video-container {
        margin-right: 0; /* Remove margin for vertical stacking */
        flex: 1 0 auto; /* Allow both elements to take full width */
    }
}
/* Overlay styles */
.overlay {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 2; /* Ensure it's above other content */
}

.overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 400px;
}

.overlay-content input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.overlay-content button {
    padding: 10px 20px;
    background-color: #5e5275;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.button-container {
    display: flex;
}

#overlay-search-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 10px; /* Add margin to separate search bar and buttons */
}

#overlay-search-button, #overlay-close-button {
    flex: 1;
    margin-right: 5px; /* Add margin between buttons */
    padding: 8px;
    border: none;
    border-radius: 5px;
    background-color: #5e5275;
    color: white;
    cursor: pointer;
}

#overlay-search-button:hover, #overlay-close-button:hover {
    background-color: #D6304A;
}

/* Show the overlay when it has the 'show' class */
.overlay.show {
    display: block;
    
}


/* Style dropdown menu */
.has-dropdown {
    position: relative;
}

.has-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}

.has-dropdown .dropdown-menu li {
    list-style: none;
    display: inline-block; /* Display menu items horizontally */
    margin-right: 10px; /* Adjust margin between items */
}

.has-dropdown .dropdown-menu li a {
    display: block; /* Ensure each link fills the menu width */
    text-decoration: none;
    color: #0d0d2b;
    padding: 5px 0px; /* Adjust padding if needed */
   
}

.has-dropdown .dropdown-menu li a:hover {
    color: #E8EA9B; /* Change text color on hover */
}



/* Search results Styling */

.search-result-title {
    font-size: 20px;
    font-weight: bold;
    color: #D7D7D6;
    margin-bottom: 5px;
    text-decoration: none; /* Optional: Remove underline */
}

.search-result-title:hover {
    color: #f0f0f0;
    
}

.search-result-content {
    font-size: 16px;
    color: #fff;
    margin-bottom: 15px;
}

/* Styling for Dropdown Menu */

    .has-dropdown .dropdown-menu li {
    list-style: none;
    display: inline-block; /* Display menu items horizontally */
    margin-right: 10px; /* Adjust margin between items */
}

.has-dropdown .dropdown-menu li:last-child {
    margin-right: 0; /* Remove margin for the last item */
}

.has-dropdown .dropdown-menu li a {
    font-size: 15px;
    display: block;
    text-decoration: none;
    color: #0d0d2b;
    padding: 2px 0px; /* Adjust padding if needed */
}


/* For screens below 600 pixels */
@media (max-width: 600px) {
 
     .has-dropdown:hover .dropdown-menu {
        display: block; /* Show the dropdown menu on hover */
    }

    .has-dropdown .dropdown-menu li {
        list-style: none;
        margin-bottom: 0px; /* Add margin between items */
    }

    .has-dropdown .dropdown-menu li a {
        padding: 2px 0px; /* Adjust padding if needed */
        text-decoration: none;
        color: #0d0d2b;
        display: block; /* Display menu items vertically */
    }
}



/* Banner Text Styling */

.banner-title {
    color: #D7D7D6;
    text-decoration: none !important; /* Optional: Remove underline */
}

.banner-title:hover {
    color: #E8EA9B;
    text-decoration: none !important; /* Optional: Remove underline */
}

.header-link {
    text-decoration: none; /* Remove underline from anchor elements with class header-link */
}

.banner-title-link {
    text-decoration: none; /* Remove underline from anchor elements with class header-link */
}


