/* Base styles */
:root {
    --primary-color: #007BFF;
    --secondary-color: #28a745;
    --background-color: #f4f4f4;
    --text-color: #333;
    --border-color: #ddd;
    --link-hover-bg: #e7f0ff;
    --focus-outline-color: #0056b3;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-color);
}

p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #666;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    padding: 0.5rem;
    display: inline-block;
    border-radius: 4px;
}

a:hover {
    text-decoration: underline;
    background-color: var(--link-hover-bg);
}

a:focus {
    outline: 3px solid var(--focus-outline-color);
    outline-offset: 2px;
}

/* Ad boxes */
.ads-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.ad-box {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    width: calc(33.333% - 20px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
    margin-bottom: 1.25rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ad-box:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.ad-box h2 {
    margin: 0 0 0.75rem;
    font-size: 1.8rem;
    color: var(--text-color);
}

.ad-box p {
    margin: 0 0 0.75rem;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ad-box .price {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: bold;
}

.ad-box small {
    color: #999;
}

/* Image styling */
.ad-box img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .ad-box {
        width: 100%;
        margin: 0 0 1rem 0;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Footer styling */
footer {
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    text-align: center;
}

footer p {
    margin: 0.25rem 0;
}

footer a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
