/* ===== General Styles ===== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 60px; /* Adjust this based on the navbar height */
}

/* Fix All Form-Based Pages (Login, Register, Forgot Password, Edit Profile) */
.auth-container, .edit-profile-container {
    max-width: 400px;
    width: 100%;
    margin: 50px auto;
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}
/* Ensure Edit Profile page is properly structured */
.edit-profile-container {
    max-width: 500px;
    margin: auto;
    padding: 20px;
    text-align: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

/* Center and space profile picture */
.profile-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
    display: block;
    margin: auto;
}

/* Align input fields and add spacing */
.edit-profile-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Input groups (labels + fields) should be aligned properly */
.edit-profile-container .input-group {
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
    text-align: left;
}

/* Ensure labels are properly aligned */
.edit-profile-container .input-group label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

/* Ensure input fields and buttons are aligned correctly */
.edit-profile-container .input-group input,
.edit-profile-container .input-group select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Add some spacing below the upload field */
.edit-profile-container .input-group input[type="file"] {
    margin-top: 5px;
}

/* Ensure update button is spaced */
.edit-profile-container button {
    width: 100%;
    max-width: 200px;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 15px;
}

.edit-profile-container button:hover {
    background-color: #0056b3;
}


/* Fix Home Page Centering */
.home-container {
    max-width: 1200px;
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

/* Sidebar should stay on the right */
.sidebar {
    flex: 1;
    max-width: 300px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
}

/* Main Content Centering */
.main-content {
    flex: 2;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

/* Center Headings Properly */
h2, h3 {
    color: #007bff;
    text-align: center;
}

/* Fix Listings Page Alignment */
.listings-content {
    max-width: 1200px;
    width: 90%;
    margin: 20px auto;
    text-align: center;
}

/* Ensure All Listings Stay Centered */
/* Listings Page - Ensure 3 Items per Row */
.listing-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* ✅ Ensures all listings stay centered */
    align-items: flex-start;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Fix Listings Title Alignment */
.listings-content h2 {
    text-align: center;
    width: 100%;
}

/* Fix My Profile Image Alignment */
.profile-container {
    max-width: 600px;
    margin: auto;
    text-align: center;
}

/* Ensure Profile Picture is Centered */
.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
    display: block;
    margin: 0 auto 15px auto; /* Ensures proper centering */
}

/* Fix My Listings Layout */
.my-listings {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

/* Buttons */
button, .button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    text-align: center;
    display: inline-block;
}

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

/* Center the Footer */
footer {
    text-align: center;
    padding: 10px;
    background-color: #f8f9fa;
    width: 100%;
    position: relative;
    bottom: 0;
}

/* Fix Admin Panel Layout */
.admin-container {
    max-width: 900px;
    margin: auto;
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

/* Fix Admin Panel Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
    text-align: center;
    padding: 10px;
}

/* Fix Admin Buttons */
.disable-btn { background-color: #ffc107; }
.enable-btn { background-color: #28a745; }
.delete-btn { background-color: #dc3545; }
button:hover { opacity: 0.8; }

/* Ensure Listings Appear in 3 Rows */
.listing-item {
    width: 30%;  /* ✅ Ensures 3 items per row */
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}
/* Ensure Listing Images Scale Correctly */
.listing-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}
@media screen and (max-width: 500px) {
    .listing-item {
        width: 100%; /* 1 per row on mobile */
    }
}
/* Fix Register Page Fields (One Line per Field) */
.form-container {
    max-width: 400px;
    margin: auto;
    text-align: center;
}

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

/* Ensure input groups align properly */
.form-container .input-group {
    text-align: left;
    width: 100%;
    max-width: 350px;
    margin-bottom: 15px;  /* ✅ Added spacing between fields */
}

.form-container label {
    display: block;
    text-align: left;
    font-weight: bold;
    margin-top: 10px;
}

.form-container input, .form-container select {
    width: 100%;
    padding: 10px; /* ✅ Increased padding for better spacing */
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
/* ✅ Ensure Post Item Page Stays Properly Sized & Centered */
.post-container {
    max-width: 750px; /* ✅ Increased width */
    width: 90%; /* Ensures responsiveness */
    margin: 30px auto;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* ✅ Ensure Form Fields Stay Spacious */
.post-container form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ✅ Keep Input Fields Consistent */
.post-container .input-group {
    width: 100%;
    max-width: 600px; /* ✅ Adjusted to match full size */
    text-align: left;
    margin-bottom: 15px;
}

/* ✅ Form Inputs & Textarea */
.post-container input, 
.post-container select, 
.post-container textarea {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ✅ Ensure Buttons are Consistent */
.post-container button {
    width: 100%;
    max-width: 300px;
    padding: 12px;
    font-size: 16px;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
}

.post-container button:hover {
    background-color: #0056b3;
}
.pagination {
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
}

.site-logo {
  height: 60px;  /* Tweak size as needed */
  margin-right: 15px;
  vertical-align: middle;
}

.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: auto;
}

.read-more {
  color: #007bff;
  text-decoration: underline;
  font-weight: bold;
}
.read-more:hover {
  color: #0056b3;
}

.read-more {
  color: #007bff;
  font-weight: bold;
  text-decoration: underline;
}
.read-more:hover {
  color: #0056b3;
}

.contact-button {
    display: inline-block;
    padding: 10px 15px;
    color: white;
    font-weight: bold; /* Make text bold */
    text-align: center;
    text-decoration: none;
    background-color: #007BFF; /* Blue background (or match other links' colors) */
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

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

/* Ensure the icon appears inline with the text */
.contact-button i {
    margin-right: 5px; /* Space between icon and text */
}

/* Navbar item style */
.nav-link {
    color: white;
    text-decoration: none;
    margin: 8px 15px;
    padding: 10px;
    font-size: 16px;
    font-weight: bold; /* Bold text for nav items */
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: #555;
}

.listing-edited {
  font-size: 13px;
  color: #dc3545;
  font-style: italic;
  margin-top: 5px;
}
