/* Global Styles */
body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 70px;
    height: 100%;
}

h1 {
    font-family: 'Playfair Display', serif;
}

h2 {
    font-family: 'Merriweather', serif;
}

h3 {
    font-family: 'Roboto', sans-serif;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 10px 16px;
    color: black;
    border-bottom: 1px solid #ddd;
    position: fixed; /* Make the header fixed */
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box; /* Ensure padding is included in the width */
    z-index: 1000; /* Ensure header is above other elements */
}

.header-left img {
    height: 35px;
    margin-right: 10px;
    cursor: pointer;
}

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

.header-right .nav-link {
    color: black;
    text-decoration: none;
    padding: 10px;
    margin-left: 10px;
}

.header-right .nav-link:hover {
    background-color: #f1f1f1;
}

.header-right .dropbtn {
    color: black;
    text-decoration: none;
    padding: 10px;
    border: none;
    background-color: white;
    cursor: pointer;
    margin-left: 10px;
}

.header-right .dropbtn:hover {
    background-color: #f1f1f1;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    background-color: #f1f1f1;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Media Queries */
.menu-toggle {
    display: none; /* Hide toggle button by default */
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show toggle button on mobile */
        background-color: transparent; /* Ensure the button is transparent */
        border: none;
        color: black;
        padding: 10px;
        font-size: 16px;
        cursor: pointer;
    }

    .menu-toggle:active,
    .menu-toggle:focus {
        background-color: transparent; /* Make background transparent on active/focus */
        outline: none; /* Remove outline */
    }

    .header-left img {
        height: 25px; /* Adjust logo size for mobile */
    }

    .header-right {
        display: none; /* Hide the right part of the header on mobile */
        flex-direction: column;
        align-items: flex-start;
        background-color: white;
        position: absolute;
        top: 50px;
        right: 0;
        width: 100%;
        padding: 10px;
        z-index: 1;
    }

    .header-right.active {
        display: flex;
    }

    .header-right .nav-link, .header-right .dropbtn {
        color: black;
        padding: 10px;
        text-decoration: none;
        width: 100%;
        display: block;
    }

    .header-right .dropdown-content {
        position: static;
        box-shadow: none;
        background-color: white;
        width: 100%;
    }
}
/* Main Section Styles */
main {
    padding: 40px 20px;
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-section {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.about-section h1, .about-section h2 {
    margin-top: 0;
    font-family: 'Playfair Display', serif;
}

.team {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
/* Background Image Section Styles */
.background-section {
    background-image: url('../images/welcome_image.jpg'); /* Use the correct path to your image */
    background-size: cover;
    background-position: center;
    padding: 60px 20px;
    text-align: center;
    color: white; /* Ensure text is readable */
}

.background-section .overlay {
    background: rgba(0, 0, 0, 0.5); /* Add an overlay for better text readability */
    padding: 60px 20px;
}

.background-section h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.background-section p {
    font-size: 1.5em;
    margin-bottom: 30px;
    font-family: 'Open Sans', sans-serif;
}
/* Welcome Section Styles */
.welcome-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.welcome-section h1 {
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
}

.welcome-section .grid {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.welcome-section .text-box {
    flex: 1;
    font-size: 1.2em;
    line-height: 1.6;
    color: #333;
}

.welcome-section .image-box {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    
}

.welcome-section .image-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 100%; /* Ensure the image fits within the parent container */
}

@media (max-width: 768px) {
    .welcome-section .container {
        flex-direction: column;
    }
    .image-box img{
        display: none;
    }

    .welcome-section .grid {
        flex-direction: column;
    }

    .welcome-section h1 {
        text-align: center;
    }
}

/* Explore Section Styles */
.explore-section {
    background-color: #f0f0f0; /* Grey background */
    padding: 40px 0;
}

.explore-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.explore-section .text-box {
    text-align: center;
    margin-bottom: 40px;
}

.explore-section .image-container {
    display: flex;
    justify-content: space-between; /* Ensure images are evenly spaced */
    gap: 10px; /* Reduce gap between boxes */
    flex-wrap: wrap;
}

.explore-section .explore-box {
    background-color: white;
    border-radius: 4px;
    padding: 20px;
    width: calc(20% - 10px); /* Four items per row with reduced gap */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center items horizontally */
    justify-content: space-between; /* Ensure the button is at the bottom */
}

.explore-section .explore-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.explore-section .explore-box h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.explore-section .explore-box p.service-description {
    font-size: 1em;
    color: #666;
    display: block; /* Show paragraphs by default on desktop */
}

.explore-section .read-more-link {
    color: black;
    cursor: pointer;
    display: none; /* Hide by default on desktop */
    margin-top: 10px;
    text-decoration: none;
    font-weight: bold;
}

.read-more-link::after {
    content: ' ➔';
}
/* Responsive Design */
@media (max-width: 768px) {
    .explore-section .image-container {
        justify-content: center;
    }

    .explore-section .explore-box {
        width: calc(90% - 10px); /* Make the boxes wider on mobile */
        margin-bottom: 20px; /* Add space between rows */
    }

    .explore-section .read-more-link {
        display: block; /* Show "Read more" link on mobile */
    }
}
/* "Why Choose Us" Section Styles */
.why-choose-us .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.why-choose-us .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.why-choose-us .info-box {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.why-choose-us .info-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
}

.why-choose-us .info-box h3 {
    margin-top: 15px;
    font-size: 1.5em;
}

.why-choose-us .info-box p {
    font-size: 1em;
    color: #666;
    margin-top: 10px;
}

/* Trust Signals Section Styles */
.trust-signals {
    background-color: #f4f4f4;
    padding: 40px 20px;
}

.trust-signals .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trust-signals .logos {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 20px;
}

.trust-signals .logos img {
    max-width: 100px;
    height: auto;
}

.trust-signals .testimonials {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trust-signals blockquote {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-style: italic;
    color: #333;
    text-align: center;
}

.trust-signals cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    color: #666;
}

/* Newsletter Signup Section Styles */
.newsletter-signup {
    max-width: 600px;
    margin: 20px auto;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.newsletter-signup h2 {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
    color: black;
}

.newsletter-signup p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #666;
}

.newsletter-signup .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.newsletter-signup input[type="email"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 70%;
    font-size: 16px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

.newsletter-signup input[type="email"]:focus {
    border-color: #333;
    outline: none;
}

.newsletter-signup button {
    padding: 10px 15px;
    border: none;
    background-color: gray;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    font-size: 16px;
}

.newsletter-signup button:hover {
    background-color: #333;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .newsletter-signup input[type="email"] {
        width: calc(100% - 20px);
    }

    .newsletter-signup button {
        width: 100%;
        margin-top: 10px;
    }
}


/* Information Section */
.info-section {
    padding: 50px 20px;
    background-color: white;
}

.info-section .container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .info-section .container {
        grid-template-columns: 1fr;
    }
}

.info-box {
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.info-box h2 {
    margin-top: 0;
}

/* Footer Styles */
footer {
    background-color: rgb(25, 27, 27);
    color: gray;
    padding: 20px 0;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
}
.footer-section h4 {
    margin-top: 0;
    color: white; /* Set h4 color to white */
}

.footer-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.footer-section {
    flex: 1;
    padding: 0 10px;
}

.footer-section h4 {
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color:gray;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section .socials a {
    color: gray;
    margin-right: 10px;
    font-size: 20px;
    transition: color 0.3s;
}

.footer-section .socials a:hover {
    color: #ddd;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 20px;
    }
}
/* Form Section Styles */
.form-section {
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 400px;
    text-align: center;
}

.form-section h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

button {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
}

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

p {
    font-size: 1em;
    color: #666;
}

p a {
    color: #007BFF;
    text-decoration: none;
}

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

/* Footer Styles */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* Social Login */
.social-login {
    margin-top: 20px;
    text-align: center;
}

.social-login p {
    margin-bottom: 10px;
}

.social-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.social-button.google {
    background-color: #dd4b39;
}

.social-button.google:hover {
    background-color: #c23321;
}
/* Community Styling */
.community-section {
    background: url('../images/community_pic.jpg') no-repeat center center fixed;
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    z-index: -1; /* Ensure it stays behind the content */
}

/* Chat container styling to keep messages legible against the background */
#chat-container {
    position: relative;
    max-width: 67rem;
    margin: 0 auto;
    padding-top: 60px; /* Adjust this value based on the height of your header */
    height: calc(100vh - 60px); /* Adjust the height to fill the screen */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-bottom: 80px; /* Add padding to the bottom */
    width: 100%; /* Ensure it takes the full width */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.message {
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border-radius: 10px;
}

.message.sent {
    justify-content: flex-start;
    background-color: #e0e0e0;
}

.message.received {
    justify-content: flex-end;
    background-color: #d1ffd1;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

#message-form {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 10px;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

#message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    margin-right: 5px; /* Ensure there's a small gap between input and button */
}

#message-form button {
    padding: 10px;
    border: none;
    background: #333;
    color: white;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

#message-form button:hover {
    background: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
    }

    .header-right .nav-link {
        font-size: 14px;
    }

    #chat-container {
        padding: 10px;
        padding-top: 60px; /* Adjust this value based on the height of your header */
        height: calc(100vh - 60px); /* Adjust the height to fill the screen */
    }

    #message-form {
        flex-direction: row; /* Change to row to keep the button on the right side */
        padding: 5px;
    }

    #message-input {
        flex: 1;
        border-radius: 4px 0 0 4px;
        margin-right: 5px; /* Ensure there's a small gap between input and button */
    }

    #message-form button {
        border-radius: 0 4px 4px 0;
        margin: 0; /* Ensure no margin for the button */
    }
}
/*Shop page*/
/* Search Container Styles */
.search-container {
    max-width: 600px;
    margin: 20px auto;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.search-container h1 {
    margin-bottom: 20px;
    color: black;
}

.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-box input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    width: 70%;
    font-size: 16px;
}

.search-box button {
    padding: 10px 15px;
    border: none;
    background-color: gray;
    color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 16px;
}

.search-box button:hover {
    background-color: #333;
}
/* Category Icons Section */
.category-section {
    padding: 20px 0;
    background-color: #f9f9f9;
}

.category-header {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
}

.category-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three icons per row on desktop */
    gap: 20px; /* Space between boxes */
    justify-items: center;
}

.category-icon {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.category-icon img {
    height: 60px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.category-icon img:hover {
    transform: scale(1.1); /* Slightly zoom in on hover */
}

.category-icon p {
    font-size: 1em;
    margin: 0;
}

.category-icon a {
    text-decoration: none;
    color: black;
}

/* Responsive Design */
@media (max-width: 768px) {
     .category-icon {
        flex-basis: calc(33.333% - 10px); /* Still three icons per row, smaller gap */
    }

    .category-icon img {
        height: 30px; /* Adjust icon size for mobile */
    }
}
/* Trending Ads Section */
.trending-section {
    padding: 20px 0;
    background-color: #f9f9f9;
}

.trending-section .container {
    text-align: center;
}

.trending-section h2 {
    margin-bottom: 20px;
    font-size: 2em;
}

.trending-ads {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three ads per row on desktop */
    gap: 20px; /* Space between ads */
}

.ad {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.ad:hover {
    transform: scale(1.05); /* Slight zoom on hover */
}

.ad-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ad-details {
    text-align: left;
    margin-top: 10px;
}

.ad-details p {
    margin: 5px 0;
    font-size: 0.9em;
}

.product-name {
    font-weight: bold;
    font-size: 1em;
}

.product-location, .product-price, .product-condition {
    font-size: 0.85em;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .trending-ads {
        grid-template-columns: repeat(2, 1fr); /* Two ads per row on mobile */
    }

    .ad {
        padding: 10px;
    }

    .product-name {
        font-size: 0.9em;
    }

    .product-location, .product-price, .product-condition {
        font-size: 0.75em;
    }
}
/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white; /* Semi-transparent background */
    color: white;
    display: flex;
    justify-content: space-around;
    padding: 5px 0; /* Reduced padding */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.mobile-nav-icon {
    text-align: center;
}

.mobile-nav-icon img {
    height: 30px;
    margin-bottom: 2px; /* Reduced margin */
}

.mobile-nav-icon p {
    margin: 0;
    font-size: 0.75em;
    color: black; /* Text color black */
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-right .profile-icon {
        display: block;
    }

    .mobile-nav {
        display: flex;
    }
}

@media (min-width: 769px) {
    .header-right .profile-icon {
        display: none;
    }

    .mobile-nav {
        display: none;
    }
}
