/**
 * HomeEdClub Ads - Frontend Styles
 */

/* Container for multiple ads */
.homeedclub-ads-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

/* Single ad wrapper */
.homeedclub-ad {
    display: block;
    position: relative;
    overflow: visible;
    border-radius: 8px;
    border: 2px solid #e0e0e0 !important;
    background: #fff;
    padding: 0;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.homeedclub-ad:hover {
    border-color: #bdbdbd !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Ad badge - Google style */
.homeedclub-ad-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: #202124;
    background-color: #fff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ad link */
.homeedclub-ad-link {
    display: block;
    text-decoration: none;
}

/* Ad image */
.homeedclub-ad-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Full width ads (single ad in container) */
.homeedclub-ads-container .homeedclub-ad:only-child {
    width: 100%;
}

/* Multiple ads - responsive grid */
.homeedclub-ads-container .homeedclub-ad {
    flex: 1 1 300px;
    max-width: 100%;
}

/* Location-specific styles */

/* Homepage - typically full width banners */
.homeedclub-ads-location-homepage .homeedclub-ad {
    flex: 1 1 100%;
}

/* Sidebar - stack vertically */
.homeedclub-ads-location-sidebar {
    flex-direction: column;
}

.homeedclub-ads-location-sidebar .homeedclub-ad {
    flex: none;
    width: 100%;
}

/* Footer - horizontal layout */
.homeedclub-ads-location-footer {
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .homeedclub-ads-container {
        flex-direction: column;
        gap: 15px;
    }

    .homeedclub-ads-container .homeedclub-ad {
        flex: none;
        width: 100%;
    }

    .homeedclub-ad {
        border-radius: 6px;
    }

    .homeedclub-ad-badge {
        top: 8px;
        left: 8px;
        font-size: 10px;
        padding: 2px 5px;
    }
}

/* Animation for ads appearing */
@keyframes homeedclub-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.homeedclub-ad {
    animation: homeedclub-fade-in 0.3s ease forwards;
}
