/**
 * Advertorial Landing Page Styles
 * Responsive stylesheet for section-based advertorial pages
 */

/* ===== Base Responsive Overrides ===== */

/* Prevent horizontal overflow on any element.
   overflow-x: hidden turns the element into a scroll container, which
   silently disables position:sticky descendants (the sidebar product
   card). clip clips the same way without that side effect; the hidden
   line stays first as a fallback for browsers without clip support. */
html, body {
    overflow-x: hidden;
    overflow-x: clip;
    width: 100%;
}

.advertorial-container {
    overflow-x: hidden;
    overflow-x: clip;
}

.advertorial-content {
    overflow-x: hidden;
    overflow-x: clip;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure all media fits within container */
.advertorial-content img,
.advertorial-content video,
.advertorial-content iframe,
.advertorial-content figure {
    max-width: 100%;
    height: auto;
}

.advertorial-content video {
    width: 100%;
    border-radius: 8px;
}

.advertorial-content figure {
    margin: 20px 0;
}

/* Video container for embeds */
.video-container {
    max-width: 100%;
}

/* ===== Tablet (max-width: 968px) ===== */
@media (max-width: 968px) {
    .advertorial-container {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 25px;
    }

    .sticky-sidebar {
        position: relative !important;
        top: 0 !important;
    }

    .advertorial-content {
        padding: 30px 25px;
    }

    h1.headline {
        font-size: 26px;
    }

    .content-section h2 {
        font-size: 22px;
    }
}

/* ===== Mobile (max-width: 640px) ===== */
@media (max-width: 640px) {
    .advertorial-header {
        font-size: 11px;
        padding: 6px 10px;
        line-height: 1.4;
    }

    .advertorial-container {
        padding: 10px;
        gap: 15px;
    }

    .advertorial-content {
        padding: 20px 16px;
        border-radius: 8px;
    }

    h1.headline {
        font-size: 22px;
        line-height: 1.35;
        margin-bottom: 15px;
    }

    .subheadline {
        font-size: 16px;
        line-height: 1.6;
        padding-left: 15px;
        margin-bottom: 20px;
    }

    .content-section {
        margin: 20px 0;
    }

    .content-section h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .content-section h4 {
        font-size: 16px;
    }

    .content-section p,
    .content-section div {
        font-size: 15px;
    }

    .hero-image {
        margin: 15px 0;
        border-radius: 6px;
    }

    /* Highlight boxes */
    .highlight-box {
        padding: 15px;
        margin: 20px 0;
    }

    /* Testimonials */
    .testimonial-block {
        padding: 18px;
    }

    .testimonial-block .quote {
        font-size: 15px;
    }

    .testimonial-block .author {
        flex-wrap: wrap;
        gap: 5px;
    }

    /* Bullet lists */
    .bullet-list li {
        padding: 8px 0 8px 30px;
        font-size: 15px;
    }

    /* CTA buttons */
    .cta-button {
        padding: 15px 20px;
        font-size: 16px;
        border-radius: 10px;
    }

    .inline-cta {
        padding: 12px 25px;
        font-size: 15px;
        display: block;
        text-align: center;
    }

    /* Product card in sidebar */
    .product-card {
        padding: 20px;
    }

    .product-card h3 {
        font-size: 18px;
    }

    /* Blockquote / Quote sections */
    blockquote {
        padding: 15px 20px !important;
        font-size: 16px !important;
        margin: 20px 0 !important;
    }

    /* FAQ sections */
    .faq-question {
        padding: 14px 15px;
        font-size: 15px;
    }

    .faq-answer {
        padding: 0 15px 15px 15px;
        font-size: 14px;
    }

    /* Promo banners */
    .promo-banner {
        padding: 20px 15px !important;
        border-radius: 8px !important;
    }

    .promo-banner h3 {
        font-size: 18px !important;
    }

    /* Tables in content */
    .advertorial-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Footer */
    .advertorial-footer {
        padding: 20px 15px;
    }
}

/* ===== Small Mobile (max-width: 400px) ===== */
@media (max-width: 400px) {
    .advertorial-container {
        padding: 6px;
    }

    .advertorial-content {
        padding: 16px 12px;
    }

    h1.headline {
        font-size: 20px;
    }

    .content-section h2 {
        font-size: 18px;
    }

    .cta-button {
        padding: 14px 16px;
        font-size: 15px;
    }
}
