
       :root {
    --background-light: #ffffff;
    --background-dark: #202124;
    --text-light: #000000;
    --text-dark: #e8eaed;
    --input-background-light: #f1f3f4;
    --input-background-dark: #303134;
    --input-border-light: #dcdcdc;
    --input-border-dark: #5f6368;
    --button-background-light: transparent;
    --button-background-dark: transparent;
    --button-text-light: #4285f4;
    --button-text-dark: #8ab4f8;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-light);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh; /* To push footer down */
    padding-bottom: 50px; /* Height of the footer */
    overflow-x: hidden; 
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

/* Search Header */
.search-header {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid #e0e0e0;
}

.dark-mode .search-header {
    border-bottom: 1px solid var(--input-border-dark);
}

/* Logo and Search Box Container */
.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 1000px;
    gap: 15px;
}
/* Right-side content (theme switcher + language switcher) */
.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

/* Logo */
.logo {
    width: 120px;
}
/* Container for search input and button */
.search-box-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 800px;
    min-width: 650px;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Search Input Container */
.search-box {
    position: relative;
    flex-grow: 1;
}

.search-box input {
    width: 100%;
    padding: 10px 45px;
    font-size: 16px;
    border-radius: 30px;
    border: 1px solid var(--input-border-light);
    color: var(--text-light);
    outline: none;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* Search icon inside input */
.search-box .bi-search {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888;
}

/* Search Button */
.search-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: var(--button-background-light);
    color: var(--button-text-light);
    border: 1px solid var(--button-text-light);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    margin-left: 10px;
}

.search-button:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.dark-mode .search-button .search-box input {
    color: var(--button-text-dark);
    border-color: var(--button-text-dark);
    background-color: var(--background-dark);
}

/* Dark Mode for Input */
body.dark-mode .search-box input {
    background-color: var(--input-background-dark);
    border: 1px solid var(--input-border-dark);
    color: var(--text-dark);
    box-shadow: 0 2px 3px rgba(255, 255, 255, 0.1); /* Lighter shadow for dark mode */
}

.dark-mode .search-button:hover {
    background-color: rgba(138, 180, 248, 0.1);
}


/* Menu Options */
.search-options {
    display: flex;
    justify-content: flex-start;
    gap: 25px;
    padding-left: 140px;
    width: 100%;
    max-width: 700px;
}

.search-options a {
    font-size: 15px;
    color: var(--button-text-light);
    text-decoration: none;
    padding: 10px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.search-options a:hover {
    color: #005a9e;
    border-bottom: 2px solid #0078d4;
}

.dark-mode .search-options a {
    color: var(--button-text-dark);
}

.dark-mode .search-options a:hover {
    color: #8ab4f8;
    border-bottom: 2px solid #8ab4f8;
}

/* Main Container with two columns */
.main-container {
    display: flex;
    justify-content: flex-start;
    padding: 25px;
    max-width: 1400px;
    margin: 0 auto;
    margin-left: 140px;
    gap: 50px;
    flex-wrap: wrap;
}

/* Search Results Column */
.search-container {
    width: 60%;
    padding-right: 20px;
}

/* Search Results Styling */
.search-results {
    list-style-type: none;
    padding: 0;
}

.search-result-item {
    padding: 18px 0;
    border-bottom: 1px solid #e0e0e0;
}

.dark-mode .search-result-item {
    border-bottom: 1px solid var(--input-border-dark);
}

.search-result-link {
    font-size: 22px;
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.search-result-link:hover {
    text-decoration: underline;
}

.dark-mode .search-result-link {
    color: #8ab4f8;
}

.search-result-url {
    font-size: 14px;
    color: #008744;
    margin-bottom: 7px;
    display: block;
}

.dark-mode .search-result-url {
    color: #80c1ff;
}

.search-result-description {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.5;
}

.dark-mode .search-result-description {
    color: var(--text-dark);
}

/* Flex container for main content and sidebar in desktop */
.content-wrapper {
    display: flex;
    justify-content: space-between; /* Creates space between main content and sidebar */
    gap: 20px; /* Adds space between main content and sidebar */
}

/* Main content width in desktop */
.main-container {
    width: 70%; /* Adjust as needed */
}

/* Sidebar width in desktop */
.sidebar-section {
    width: 30%; /* Sidebar is on the side in desktop mode */
}
/* Sidebar Column */
.sidebar {
    width: 40%;
}

/* Sidebar sections with white background and border */
.sidebar-section {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.dark-mode .sidebar-section {
    background-color: var(--background-dark);
    border-color: var(--input-border-dark);
    box-shadow: none;
}

/* Add margin between image and related search sections */
.sidebar-section + .sidebar-section {
    margin-top: 20px;
}

/* Image thumbnails styling */
.image-thumbnails img {
    width: 100px;
    height: 50px;
    object-fit: cover;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dark-mode .image-thumbnails img {
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.1);
}

/* Related Searches in the Sidebar */
.related-searches-sidebar {
    padding: 15px;
    background-color: var(--background-light);
    border-radius: 8px;
}

.dark-mode .related-searches-sidebar {
    background-color: var(--background-dark);
}

/* Styling related search buttons */
.related-search-item-sidebar {
    padding: 10px 20px;
    background-color: var(--input-background-light);
    border-radius: 24px;
    font-size: 14px;
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.related-search-item-sidebar i {
    font-size: 18px;
    color: #888;
}

.related-search-item-sidebar:hover {
    background-color: #e0e0e0;
}

.dark-mode .related-search-item-sidebar {
    background-color: var(--input-background-dark);
    color: var(--text-dark);
    box-shadow: none;
}

.dark-mode .related-search-item-sidebar:hover {
    background-color: #444444;
}

/* Related Searches Under Results */
.related-searches-results {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.related-searches-results h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.related-search-item {
    padding: 10px 20px;
    background-color: var(--input-background-light);
    border-radius: 24px;
    font-size: 14px;
    text-decoration: none;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.related-search-item i {
    font-size: 18px;
    color: #888;
}

.related-search-item:hover {
    background-color: #e0e0e0;
}

.dark-mode .related-search-item {
    background-color: var(--input-background-dark);
    color: var(--text-dark);
}

.dark-mode .related-search-item:hover {
    background-color: #444444;
}

/* Theme toggle button */
.theme-toggle {
    padding: 10px;
    border: none;
    background-color: transparent;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.dark-mode .theme-toggle {
    color: var(--text-dark);
}

/* Language switcher */
.language-switcher {
    font-size: 0.9em;
    color: var(--text-light);
    margin-left: 20px;
}

.dark-mode .language-switcher {
    color: var(--text-dark);
}

.language-switcher a {
    color: #1a73e8;
    text-decoration: none;
}

.language-switcher a:hover {
    text-decoration: underline;
}

.dark-mode .language-switcher a {
    color: #8ab4f8;
}
 .header-right {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Adjust the size and appearance of the theme toggle button */
.theme-toggle {
    font-size: 1.5em;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

/* Language switcher style */
.language-switcher {
    font-size: 0.9em;
    color: var(--text-light);
}

.language-switcher a {
    color: #1a73e8;
    text-decoration: none;
}

.language-switcher a:hover {
    text-decoration: underline;
}

.dark-mode .language-switcher a {
    color: #8ab4f8;
}

/* Modal container */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal content - adjusts based on light/dark mode */
.modal-content {
    background-color: var(--background-light);
    color: var(--text-light);
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    width: 250px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode adjustments */
.dark-mode .modal-content {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

/* Close button */
.close {
    color: #000;
    float: right;
    cursor: pointer;
    font-size: 20px;
}

.dark-mode .close {
    color: #fff;
}

.pagination {
    display: flex;
    justify-content: center; /* Center-align items */
    margin-top: 10px;
    margin-bottom: 50px;
    margin-left: 0; /* Remove left margin for centering */
    width: 100%; /* Full width for centering */
}

/* Light Mode (default) */
.pagination a, .pagination span {
    margin: 0 5px;
    padding: 10px 15px;
    background-color: #f1f1f1;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
}

.pagination a.active {
    background-color: #007bff;
    color: white;
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
}

.pagination a.prev, .pagination a.next {
    font-weight: bold;
}

/* Dark Mode */
.dark-mode .pagination a, 
.dark-mode .pagination span {
    background-color: #303134; /* Darker background */
    color: #e8eaed; /* Lighter text */
}

.dark-mode .pagination a.active {
    background-color: #4285f4; /* Use a dark blue shade for active */
    color: #ffffff; /* Keep white text for contrast */
}

.dark-mode .pagination a:hover {
    background-color: #4285f4; /* Hover effect similar to active */
    color: white;
}

.dark-mode .pagination a.prev, 
.dark-mode .pagination a.next {
    font-weight: bold;
}

  /* Modal styling */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
    }

    .modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: white;
        padding: 20px;
        text-align: center;
        border-radius: 5px;
    }

    .refresh-button {
        margin-top: 10px;
        padding: 8px 12px;
        cursor: pointer;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
    }

    .refresh-button:hover {
        background-color: #0056b3;
    }

    .close-modal {
        margin-top: 10px;
        padding: 8px 12px;
        cursor: pointer;
    }
    
/* Footer */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
    text-align: center;
    font-size: 0.9em;
    color: #5f6368;
    background-color: var(--background-light);
    border-top: 1px solid var(--input-border-light);
    padding: 10px 0;
}

.dark-mode footer {
    background-color: var(--background-dark);
    color: var(--text-dark);
    border-top: 1px solid var(--input-border-dark);
}

.footer-bar {
    height: 1px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 10px;
}

footer a {
    color: #5f6368;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.dark-mode footer a {
    color: var(--text-dark);
}

/* Responsive Styles */
@media only screen and (max-width: 800px) {
       /* Force elements to stay within the viewport */
    .main-container,
    .content-wrapper,
    .header-content,
    .search-box-container,
    .pagination {
        width: 100%; /* Full width for smaller screens */
        max-width: 100%; /* Prevent elements from exceeding viewport width */
        overflow-x: hidden; /* Ensure no horizontal overflow */
    }

    .logo {
        width: 50px;
    }

    .main-container {
        flex-direction: column;
        align-items: center;
        margin-left: 0;
    }

    .search-container {
        width: 100%;
        padding-left: 0;
        text-align: left;
        padding: 10px 20px;
    }

    .sidebar {
        display: none;
    }

    .search-box-container {
        display: flex;
        flex-direction: row; /* Align input and button in a row */
        justify-content: center; /* Center the container */
        align-items: center;
        width: 100%; /* Full width for mobile */
        gap: 10px; /* Space between input and button */
    }

    .search-box {
        flex-grow: 1; /* Allow the input to expand */
        display: flex;
        align-items: center;
        position: relative;
        max-width: 25%; /* Adjust width for a balanced look */
    }

    .search-box input {
        width: 100%; /* Full width inside container */
        padding: 10px 40px; /* Adjust padding */
        font-size: 14px;
        border-radius: 20px; /* Rounded input */
    }

    .search-button {
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap; /* Prevent button text from wrapping */
    }

    /* New styles to move the header-right under the menu */
    .header-right {
        position: static;
        margin-top: 15px;
        width: 100%;
        justify-content: center; /* Center them horizontally */
    }

    .theme-toggle,
    .language-switcher {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

.pagination {
    display: flex;
    justify-content: center; /* Center-align items */
    margin-top: 10px;
    margin-bottom: 50px;
    width: 100%; /* Full width for centering */
    gap: 0px; /* Space between pagination items */
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    background-color: #f1f1f1;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    font-size: 10px;
    min-width: 20px; /* Ensure uniform width */
}

.pagination a.active {
    background-color: #007bff;
    color: white;
}

.pagination a:hover {
    background-color: #007bff;
    color: white;
}

.pagination a.prev, .pagination a.next {
    font-weight: bold;
}

/* Dark Mode */
.dark-mode .pagination a, 
.dark-mode .pagination span {
    background-color: #303134;
    color: #e8eaed;
}

.dark-mode .pagination a.active {
    background-color: #4285f4;
    color: #ffffff;
}

.dark-mode .pagination a:hover {
    background-color: #4285f4;
    color: white;
}

.dark-mode .pagination a.prev, 
.dark-mode .pagination a.next {
    font-weight: bold;
}

   footer {
        position: relative; /* Keeps footer at bottom but non-fixed on mobile */
        padding: 15px 0;
    }

    .footer-content {
        flex-direction: column; /* Stack content vertically */
        align-items: center; /* Center align content */
        text-align: center; /* Center align text */
        gap: 10px; /* Space between elements */
    }

    .location-info {
        font-size: 1em;
        flex-grow: unset;
        text-align: center;
        order: 1; /* Order this item first */
    }

    .footer-links {
        font-size: 1em;
        flex-grow: unset;
        text-align: center;
        order: 2; /* Order this item second */
    }

    .footer-links a {
        display: inline-block;
        margin: 0 5px; /* Adds spacing between links */
        white-space: nowrap;
    }
    
    /* Modal styling */
    .modal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
    }

    .modal-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: white;
        padding: 20px;
        text-align: center;
        border-radius: 5px;
    }

    .refresh-button {
        margin-top: 10px;
        padding: 8px 12px;
        cursor: pointer;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 4px;
    }

    .refresh-button:hover {
        background-color: #0056b3;
    }

    .close-modal {
        margin-top: 10px;
        padding: 8px 12px;
        cursor: pointer;
    }
       /* Center the main content and sidebar section */
    .content-wrapper {
        display: flex;
        flex-direction: column; /* Stack main content and sidebar vertically */
        align-items: center; /* Center-align the items */
        gap: 20px; /* Maintain space between sections */
    }

    /* Make main container full-width with padding */
    .main-container {
        width: 100%; /* Full width for mobile */
        max-width: 1200px; /* Optional: limit max width to keep layout centered */
        padding: 0 20px; /* Add padding for consistent spacing */
    }

    /* Hide sidebar section on mobile */
    .sidebar-section {
        display: none; /* Hide the explore images section on mobile */
    }

    /* Adjust image thumbnail gallery to a single column if needed */
    .image-thumbnails {
        display: grid;
        grid-template-columns: 1fr; /* One column on mobile */
        gap: 10px; /* Gap between images */
    }

    /* Center-align text in the search container */
    .search-container, 
    .search-header {
        text-align: left; /* Center-align text content */
    }

    /* Optional: adjust font sizes for readability */
    .search-result-item a,
    .search-result-description {
        font-size: 1rem; /* Adjust font size for readability */
    }
}
