/**
 * Advertising Banner Styles
 *
 * @package Blog_Over
 */

/* =========================================
   Wrapper
   ========================================= */
.blog-over-ad-banner-wrapper {
    width: 100%;
    position: relative;
}

.blog-over-ad-banner-wrapper .blog-over-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================================
   Single Banner – Base
   ========================================= */
.blog-over-ad-banner {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    text-align: center;
    line-height: 0; /* Remove inline-block whitespace on img */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-over-ad-banner-link {
    display: block;
    text-decoration: none;
    line-height: 0;
}

.blog-over-ad-banner-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    display: block;
    margin: 0 auto;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-over-ad-banner-link:hover .blog-over-ad-banner-img {
    opacity: 0.95;
    transform: scale(1.02);
}

/* =========================================
   Desktop / Mobile Image Toggle
   ========================================= */
.blog-over-ad-mobile-only {
    display: none;
}

@media (max-width: 767px) {
    .blog-over-ad-desktop-only {
        display: none;
    }
    .blog-over-ad-mobile-only {
        display: block;
    }
}

/* =========================================
   CTA Button – Premium
   ========================================= */
.blog-over-ad-banner-btn-wrap {
    text-align: center;
    margin-top: 14px;
    line-height: 1.5;
}

.blog-over-ad-banner-btn {
    display: inline-block;
    padding: 11px 30px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--blog-over-primary, #3b82f6), var(--blog-over-secondary, #1e40af));
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--blog-over-primary, #3b82f6) 30%, transparent);
    position: relative;
    overflow: hidden;
}

.blog-over-ad-banner-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.blog-over-ad-banner-btn:hover::before {
    left: 100%;
}

.blog-over-ad-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px color-mix(in srgb, var(--blog-over-primary, #3b82f6) 45%, transparent);
    color: #fff;
    text-decoration: none;
}

.blog-over-ad-banner-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--blog-over-primary, #3b82f6) 25%, transparent);
}

/* =========================================
   Description Text
   ========================================= */
.blog-over-ad-description {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin: 6px 0 0 0;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* =========================================
   Badge Label
   ========================================= */
.blog-over-ad-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 15;
    display: inline-block;
    padding: 4px 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--blog-over-primary, #3b82f6), var(--blog-over-secondary, #1e40af));
    border-radius: 50px;
    line-height: 1.6;
    pointer-events: none;
    box-shadow: 0 3px 12px color-mix(in srgb, var(--blog-over-primary, #3b82f6) 40%, transparent);
}

/* =========================================
   Close / Dismiss Button
   ========================================= */
.blog-over-ad-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
    backdrop-filter: blur(4px);
}

.blog-over-ad-banner:hover .blog-over-ad-close {
    opacity: 1;
}

.blog-over-ad-close:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

/* =========================================
   Custom HTML (AdSense etc.)
   ========================================= */
.blog-over-ad-custom-html {
    line-height: 1;
    text-align: center;
    overflow: hidden;
}

.blog-over-ad-custom-html ins {
    text-decoration: none;
}


/* =========================================
   Layout: Classic – Premium
   ========================================= */
.blog-over-ad-banner.banner-classic {
    border-bottom: 3px solid color-mix(in srgb, var(--blog-over-primary, #3b82f6) 20%, transparent);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.blog-over-ad-banner.banner-classic:hover {
    border-bottom-color: var(--blog-over-primary, #3b82f6);
}

.blog-over-ad-banner.banner-classic .blog-over-ad-title {
    font-size: 14px;
    font-weight: 600;
    margin: 15px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #334155;
    transition: color 0.3s ease;
    line-height: 1.5;
}

.blog-over-ad-banner.banner-classic:hover .blog-over-ad-title {
    color: var(--blog-over-primary, #3b82f6);
}

.blog-over-ad-banner.banner-classic .blog-over-ad-description {
    margin-top: 8px;
}

/* Classic alignment */
.blog-over-ad-banner.banner-classic .ad-title-align-left {
    text-align: left;
}
.blog-over-ad-banner.banner-classic .ad-title-align-center {
    text-align: center;
}
.blog-over-ad-banner.banner-classic .ad-title-align-right {
    text-align: right;
}

/* =========================================
   Layout: Split – Premium
   ========================================= */
.blog-over-ad-banner.banner-split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 24px;
    border-radius: 12px;
    gap: 28px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.4s ease, border-color 0.3s ease;
}

.blog-over-ad-banner.banner-split:hover {
    border-color: color-mix(in srgb, var(--blog-over-primary, #3b82f6) 15%, transparent);
}

.blog-over-ad-banner.banner-split .blog-over-ad-media {
    flex: 1 1 50%;
    overflow: hidden;
    border-radius: 8px;
}



.blog-over-ad-banner.banner-split .blog-over-ad-content {
    flex: 1 1 40%;
    text-align: left;
    border-left: 3px solid color-mix(in srgb, var(--blog-over-primary, #3b82f6) 25%, transparent);
    padding-left: 24px;
    transition: border-color 0.3s ease;
}

.blog-over-ad-banner.banner-split:hover .blog-over-ad-content {
    border-left-color: var(--blog-over-primary, #3b82f6);
}

.blog-over-ad-banner.banner-split .blog-over-ad-title {
    font-size: 18px;
    margin: 0 0 10px 0;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.2px;
    line-height: 1.4;
}

.blog-over-ad-banner.banner-split .blog-over-ad-description {
    margin: 0 0 14px 0;
}

.blog-over-ad-banner.banner-split .blog-over-ad-banner-btn-wrap {
    text-align: left;
    margin-top: 0;
}

/* Split alignment utilities */
.blog-over-ad-banner.banner-split .blog-over-ad-content.ad-title-align-left {
    text-align: left;
    align-items: flex-start;
}
.blog-over-ad-banner.banner-split .blog-over-ad-content.ad-title-align-center {
    text-align: center;
    align-items: center;
}
.blog-over-ad-banner.banner-split .blog-over-ad-content.ad-title-align-right {
    text-align: right;
    align-items: flex-end;
}

/* Button alignment in Split */
.blog-over-ad-banner.banner-split .ad-btn-align-left .blog-over-ad-banner-btn-wrap {
    text-align: left;
}
.blog-over-ad-banner.banner-split .ad-btn-align-center .blog-over-ad-banner-btn-wrap {
    text-align: center;
}
.blog-over-ad-banner.banner-split .ad-btn-align-right .blog-over-ad-banner-btn-wrap {
    text-align: right;
}

@media (max-width: 767px) {
    .blog-over-ad-banner.banner-split {
        flex-direction: column;
        padding: 18px;
        gap: 18px;
    }
    .blog-over-ad-banner.banner-split .blog-over-ad-content {
        border-left: none;
        border-top: 3px solid color-mix(in srgb, var(--blog-over-primary, #3b82f6) 25%, transparent);
        padding-left: 0;
        padding-top: 18px;
        text-align: center;
        width: 100%;
    }
    .blog-over-ad-banner.banner-split .blog-over-ad-content,
    .blog-over-ad-banner.banner-split .blog-over-ad-banner-btn-wrap {
        text-align: center;
    }
}

/* =========================================
   Placement Spacing
   ========================================= */

/* Below Header */
.blog-over-ad-banner-wrapper.blog-over-ad-placement-below-header {
    padding: 22px 0;
}

/* Above Footer */
.blog-over-ad-banner-wrapper.blog-over-ad-placement-above-footer {
    padding: 22px 0;
}

/* =========================================
   Dark Mode
   ========================================= */
.blog-over-dark-mode .blog-over-ad-banner {
    border-radius: 8px;
}

.blog-over-dark-mode .blog-over-ad-banner.banner-classic {
    border-bottom-color: color-mix(in srgb, var(--blog-over-primary, #60a5fa) 30%, transparent);
}

.blog-over-dark-mode .blog-over-ad-banner.banner-classic:hover {
    border-bottom-color: var(--blog-over-primary, #60a5fa);
}

.blog-over-dark-mode .blog-over-ad-banner.banner-classic .blog-over-ad-title {
    color: #e2e8f0;
}

.blog-over-dark-mode .blog-over-ad-banner.banner-split {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.blog-over-dark-mode .blog-over-ad-banner.banner-split:hover {
    border-color: color-mix(in srgb, var(--blog-over-primary, #60a5fa) 20%, transparent);
}

.blog-over-dark-mode .blog-over-ad-banner.banner-split .blog-over-ad-title {
    color: #f1f5f9;
}

.blog-over-dark-mode .blog-over-ad-banner.banner-split .blog-over-ad-content {
    border-left-color: color-mix(in srgb, var(--blog-over-primary, #60a5fa) 30%, transparent);
}

.blog-over-dark-mode .blog-over-ad-description {
    color: #94a3b8;
}

.blog-over-dark-mode .blog-over-ad-banner-btn {
    background: linear-gradient(135deg, var(--blog-over-primary, #60a5fa), var(--blog-over-secondary, #3b82f6));
}

.blog-over-dark-mode .blog-over-ad-banner-btn:hover {
    box-shadow: 0 8px 25px color-mix(in srgb, var(--blog-over-primary, #60a5fa) 35%, transparent);
}

.blog-over-dark-mode .blog-over-ad-close {
    background: rgba(255, 255, 255, 0.1);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 767px) {
    .blog-over-ad-banner-wrapper {
        padding: 14px 0;
    }

    .blog-over-ad-banner-btn {
        padding: 9px 22px;
        font-size: 12px;
    }

    .blog-over-ad-badge {
        font-size: 9px;
        padding: 3px 10px;
        top: 8px;
        left: 8px;
    }
}

/* =========================================
   Customizer Preview Adjustments
   ========================================= */
.blog-over-ad-placement-below-header .customize-partial-edit-shortcut,
.blog-over-ad-placement-above-footer .customize-partial-edit-shortcut {
    left: 4% !important;
    top: 5px !important;
}
