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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

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

.logo-img {
    max-width: 750px;
    height: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

.search-link {
    background: #007bff;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
}

/* Hero Section */
.hero {
    background: #4CAF50;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    z-index: 1;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.filter-form select {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    min-width: 150px;
    background: #fff;
}

/* Ads Section */
.ads {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.ads h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

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

.ad-card:hover {
    transform: translateY(-5px);
}

.ad-card img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.ad-card h3 {
    margin: 15px 0;
    font-size: 1.5rem;
    color: #007bff;
}

.ad-card p {
    font-size: 1rem;
    color: #666;
}

.cta-button {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    margin-top: 10px;
    transition: background 0.3s;
    cursor: pointer;
}

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

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

.modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.modal-content h3 {
    font-size: 1.4rem;
    margin: 15px 0 10px;
}

.modal-content p {
    margin-bottom: 15px;
}

.modal-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-link {
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
}

.modal-link:hover {
    background: #0056b3;
}

/* Pagination */
.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination a {
    padding: 10px 15px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: background 0.3s;
}

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

.pagination a:hover {
    background: #e9ecef;
}

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

footer a {
    color: #007bff;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        height: 300px;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .navbar {
        flex-direction: column;
    }

    .modal-content {
        max-width: 90%;
    }
}

/* Insert Content */
.insert-content {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 15px;
}

.insert-form {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.insert-form .form-group {
    margin-bottom: 20px;
}

.insert-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    min-height: 100px;
}

.success {
    color: #28a745;
    margin-bottom: 20px;
}

.error {
    color: #dc3545;
    margin-bottom: 20px;
}

/* Approve Content */
.approve-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
}

.approve-button {
    background: #28a745;
    margin-right: 10px;
}

.approve-button:hover {
    background: #218838;
}

.reject-button {
    background: #dc3545;
}

.reject-button:hover {
    background: #c82333;
}

.detail-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Ad Details */
.ad-details {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 15px;
}

/* Form Table */
.form-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.form-table th, .form-table td {
    padding: 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #ccc;
}

.form-table th {
    width: 30%;
    font-weight: 500;
    color: #333;
}

.form-table td {
    width: 70%;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="password"],
.form-table input[type="number"],
.form-table input[type="url"],
.form-table select,
.form-table textarea,
.form-table input[type="file"] {
    width: 100%;
    padding: 8px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.form-table textarea {
    min-height: 100px;
    resize: vertical;
}

/* Responsive Design for Table */
@media (max-width: 768px) {
    .form-table th, .form-table td {
        display: block;
        width: 100%;
        text-align: left;
    }

    .form-table th {
        margin-top: 15px;
        font-size: 1.1rem;
    }

    .form-table td {
        padding-top: 5px;
    }
}