/**
 * assets/css/ads.css
 * 
 * Styling for advertisement display across the site
 * Specialized styling for ads - consolidated duplicate classes
 */

/* ========== Ad Container ========== */
.ads-section {
    margin: 20px 0;
    padding: 10px 0;
}

/* ========== Text Ad ========== */
.ad-text {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    font-weight: bold;
    color: #b11226;
}

.ad-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.ad-text .ad-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.ad-text .ad-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ========== Image Ad ========== */
.ad-image {
    position: relative;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ad-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ad-image img:hover {
    transform: scale(1.02);
}

/* ========== Video Ad ========== */
.ad-video {
    position: relative;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ad-video video {
    width: 100%;
    height: auto;
    display: block;
    background: #000;
}

/* ========== JavaScript Ad ========== */
.ad-javascript {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* ========== HTML Ad ========== */
.ad-html {
    margin-bottom: 10px;
}

/* ========== Ad Badge ========== */
.ad-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
}

.ad-image .ad-badge,
.ad-video .ad-badge {
    bottom: 8px;
    right: 8px;
}

.ad-javascript .ad-badge {
    position: static;
    float: right;
    margin-bottom: 10px;
}

/* ========== Ad Card (Grid Display) ========== */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.ad-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ========== Ad Media ========== */
.ad-media {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* ========== Ad Placeholder ========== */
.ad-placeholder {
    font-style: italic;
    color: #888;
    text-align: center;
    margin-bottom: 10px;
}

/* ========== Ad Button Wrapper ========== */
.ad-button-wrapper {
    text-align: center;
    margin-top: auto;
}

/* ========== Ad Visit Button ========== */
.ad-visit-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #b11226;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
}

.ad-visit-btn:hover {
    background-color: #8a0e1a;
}

/* ========== Ad Grids (Responsive) ========== */
#main-ads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

#sidebar-ads {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .ads-section {
        margin: 15px 0;
        padding: 5px 0;
    }

    .ad-text {
        padding: 15px;
    }

    .ad-text .ad-title {
        font-size: 1rem;
    }

    .ad-text .ad-content {
        font-size: 0.9rem;
    }

    .ad-card {
        padding: 10px;
        margin-bottom: 15px;
    }

    .ad-visit-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .ads-grid,
    #main-ads {
        grid-template-columns: 1fr;
    }

    .ad-media {
        height: 150px;
    }
}

/* ========== Dark Mode Support ========== */
@media (prefers-color-scheme: dark) {
    .ad-text {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #444;
    }

    .ad-text .ad-title {
        color: #f0f0f0;
    }

    .ad-text .ad-content {
        color: #ccc;
    }

    .ad-javascript {
        background: #1f2937;
        border-color: #444;
    }

    .ad-badge {
        background: rgba(0, 0, 0, 0.5);
        color: #aaa;
    }

    .ad-card {
        background-color: #1e1e1e;
        border-color: #333;
    }
}
