/* Main Container Styling */
body {
    font-family: Arial, sans-serif;
    background: #f3f4f6; /* Light background for contrast */
    color: #333; /* Standard text color */
    margin: 0;
    padding: 0;
}

h1 {
    text-align: center;
    margin: 20px 0;
    color: #2475B3; /* Match navbar color */
}

/* Ads List Section */
#ads-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

/* Ad Item Styling */
.ad-item {
    width: 300px; /* Fixed width for consistent layout */
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.ad-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.ad-content {
    padding: 15px;
}

.ad-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.ad-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.ad-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.ad-actions button {
    background-color: #2475B3;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.ad-actions button:hover {
    background-color: #1A5D8E;
}

/* Add Ad Button */
#add-ad-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #2475B3;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#add-ad-button:hover {
    background-color: #1A5D8E;
}

/* Modal Styling */
#ad-form-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    width: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001; /* Ensure the modal is above the overlay */
    padding: 20px;
    pointer-events: auto; /* Allow interaction */
}

#ad-form-modal h2 {
    margin-bottom: 20px;
    font-size: 20px;
    text-align: center;
    color: #2475B3;
}

#ad-form-modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#ad-form-modal label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

#ad-form-modal input, #ad-form-modal textarea, #ad-form-modal select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    background-color: #fff; /* Ensure background is white */
}

#ad-form-modal button {
    background-color: #2475B3;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#ad-form-modal button:hover {
    background-color: #1A5D8E;
}

/* Modal Overlay */
#ad-form-modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Ensure the overlay is below the modal */
    pointer-events: none; /* Allow interaction with modal */
}

