/**
 * Advertisement Styles
 * Styles for the standard ad sizes and placeholders
 */

/* Common ad styles */
.advertisement {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    z-index: 10;
    width: auto;
    height: auto;
    max-width: 100%;
}

/* Ad label removed as per requirements */

.ad-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 7px;
 /*   padding: 10px;   */
	padding: 0px;
    text-align: center;
    font-weight: 600;
    color: #ffffff;
  /*   background-color: #4a80f0;*/
    background-color: white;	
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 1 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ad-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.ad-banner span {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
}

.ad-text, .ad-html, .ad-affiliate {
    padding: 15px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

/* Ad placeholder styles */
.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    color: #495057;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.ad-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a80f0, #9d50bb);
}

.ad-placeholder:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.ad-placeholder-text {
    font-weight: 600;
    font-size: 16px;
    margin: 15px 0 5px;
    color: #343a40;
}

.ad-placeholder-subtext {
    font-size: 13px;
    margin-bottom: 15px;
    color: #6c757d;
}

/* Standard ad sizes */
/* Large Rectangle (315x400) */
.advertisement[data-size="large_rectangle"],
.ad-placeholder[data-size="large_rectangle"] {
    width: 315px;
    height: 400px;
}

/* Large Skyscraper (300x600) */
.advertisement[data-size="large_skyscraper"],
.ad-placeholder[data-size="large_skyscraper"] {
    width: 380px;
    height: 400px;
}

/* Medium Rectangle (300x250) */
.advertisement[data-size="medium_rectangle"],
.ad-placeholder[data-size="medium_rectangle"] {
    width: 300px;
    height: 250px;
}

/* Leaderboard (728x90) */
.advertisement[data-size="leaderboard"],
.ad-placeholder[data-size="leaderboard"] {
    width: 728px;
    height: 90px;
    margin: 20px auto;
    max-width: 100%;
}

/* Special styling for hero section ad */
.hero-section .advertisement[data-size="leaderboard"] {
    margin: 20px auto;
    max-width: 100%;
    z-index: 10;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .advertisement[data-size="leaderboard"],
    .ad-placeholder[data-size="leaderboard"] {
        width: 100%;
        max-width: 728px;
        height: 90px;
    }

    .hero-section .advertisement[data-size="leaderboard"] {
        margin: 15px auto;
    }

    .advertisement img,
    .ad-banner {
        max-width: 100%;
        height: auto;
    }

    .advertisement[data-size="medium_rectangle"],
    .advertisement[data-size="large_rectangle"],
    .advertisement[data-size="large_skyscraper"] {
        width: 100%;
        max-width: 300px;
        height: 250px;
    }
}

@media (max-width: 576px) {
    .advertisement,
    .ad-placeholder {
        width: 100% !important;
    }
    
    .advertisement[data-size="large_rectangle"],
    .ad-placeholder[data-size="large_rectangle"],
    .advertisement[data-size="large_skyscraper"],
    .ad-placeholder[data-size="large_skyscraper"] {
        height: 300px;
    }
}

/* Ad containers */
.ad-row {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    width: 100%;
}

.sidebar-ad {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.native-ad-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Ad card styling for grid layout */
.ad-card {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-card .advertisement {
    margin: 0;
    height: 100%;
    width: 100%;
}

.ad-card .ad-placeholder {
    height: 100%;
    width: 100%;
    min-height: 250px;
}

/* Native ad styling to match network cards */
.ad-card .ad-placeholder[data-size="medium_rectangle"] {
    border-radius: var(--card-border-radius, 8px);
    box-shadow: var(--card-shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--gray-200, #e9ecef);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: transform 0.3s, box-shadow 0.3s;
}

.ad-card .ad-placeholder[data-size="medium_rectangle"]:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}