/**
 * iHowz Ad Displays CSS
 *
 * Styles for all ad types: footer, sidebar, banner, embedded
 *
 * @package iHowz
 * @since 2.0.0
 */

/* ===================================
   Common Ad Styles
   =================================== */

.ihowz-ad-label {
    display: block;
    text-align: center;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

/* ===================================
   Footer Ads
   =================================== */

.ihowz-footer-ads {
    margin: 2rem 0;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.ihowz-footer-ads-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.ihowz-footer-ad-item {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    position: relative;
}

.ihowz-footer-ad-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.ihowz-footer-ad-logo {
    margin-bottom: 1rem;
}

.ihowz-footer-ad-logo img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.ihowz-footer-ad-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ihowz-footer-ad-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.ihowz-footer-ad-cta {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.ihowz-footer-ad-cta:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* ===================================
   Sidebar Ads
   =================================== */

.ihowz-sidebar-ad {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.ihowz-sidebar-ad .ihowz-ad-label {
    text-align: left;
    margin-bottom: 0.5rem;
}

.ihowz-sidebar-ad-content {
    overflow: hidden;
}

.ihowz-sidebar-ad-content img {
    max-width: 100%;
    height: auto;
}

.ihowz-sidebar-ad-content a {
    color: #0073aa;
    text-decoration: none;
}

.ihowz-sidebar-ad-content a:hover {
    text-decoration: underline;
}

/* ===================================
   Banner Ads
   =================================== */

.ihowz-banner-ad {
    margin: 2rem auto;
    text-align: center;
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    overflow: hidden;
    position: relative;
}

.ihowz-banner-ad .ihowz-ad-label {
    margin-bottom: 0.5rem;
}

.ihowz-banner-ad-content {
    overflow: hidden;
    margin: 0 auto;
}

.ihowz-banner-ad-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.ihowz-banner-ad-content a {
    display: inline-block;
}

/* ===================================
   Embedded Ads
   =================================== */

.ihowz-embedded-ad {
    margin: 2rem 0;
    padding: 2rem;
    background: #fafafa;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.ihowz-embedded-ad .ihowz-ad-label {
    text-align: left;
    font-size: 11px;
    margin-bottom: 1rem;
    color: #0073aa;
}

.ihowz-embedded-ad-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

.ihowz-embedded-ad-content h2,
.ihowz-embedded-ad-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.ihowz-embedded-ad-content p {
    margin-bottom: 1rem;
}

.ihowz-embedded-ad-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 4px;
}

.ihowz-embedded-ad-content a {
    color: #0073aa;
    text-decoration: underline;
}

.ihowz-embedded-ad-content a:hover {
    color: #005a87;
}

/* ===================================
   Widget-Specific Styles
   =================================== */

.widget .ihowz-footer-ads {
    padding: 1rem;
}

.widget .ihowz-sidebar-ad {
    margin: 0 0 1rem 0;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1200px) {
    .ihowz-footer-ads-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .ihowz-footer-ads-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .ihowz-footer-ads {
        padding: 1.5rem;
    }

    .ihowz-banner-ad {
        margin: 1.5rem auto;
    }

    .ihowz-embedded-ad {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .ihowz-footer-ads-grid {
        grid-template-columns: 1fr;
    }

    .ihowz-footer-ads {
        padding: 1rem;
    }

    .ihowz-footer-ad-item {
        padding: 1rem;
    }

    .ihowz-embedded-ad {
        padding: 1rem;
    }

    .ihowz-banner-ad {
        padding: 0.5rem;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .ihowz-footer-ads,
    .ihowz-sidebar-ad,
    .ihowz-banner-ad,
    .ihowz-embedded-ad {
        display: none;
    }
}