/**
 * Free Articles - Full-Width Editorial Feature Layout v3.0
 * Modern sectioned design with text hero (inspired by UK centres page)
 * Version: 3.0.0
 */

/* ============================================
   GLOBAL VARIABLES & RESET
============================================ */

:root {
    --primary: #ff9800;
    --primary-dark: #e68900;
    --primary-light: #ffa726;

    --dark-1: #0a0a0a;
    --dark-2: #1a1a1a;
    --dark-3: #2a2a2a;

    --light-1: #ffffff;
    --light-2: #f8f8f8;
    --light-3: #e8e8e8;

    --accent-warm: #fff9e8;

    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-tertiary: #7a7a7a;

    --section-dark: #1a1a1a;
    --section-medium: #2a2a2a;
    --section-light: #f5f5f5;
}

.free-article-layout * {
    box-sizing: border-box;
}

/* ============================================
   REMOVE DEFAULT WORDPRESS CONTAINERS
============================================ */

.free-article-layout .site-main,
.free-article-layout .content-area,
.free-article-layout .entry-content,
.free-article-layout .site-content,
.free-article-layout .content-wrapper,
.free-article-layout .main-content,
.free-article-layout #primary,
.free-article-layout .entry-wrapper,
.free-article-layout .post-content,
.free-article-layout article.post,
.free-article-layout article.hentry {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    width: 100% !important;
}

.free-article-layout article {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Reset WordPress default containers for full-width layout */
.free-article-layout .entry-content {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   READING PROGRESS BAR
============================================ */

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 99999;
}

.reading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.6);
}

/* ============================================
   TEXT HERO SECTION - UK Centres Style
============================================ */

.free-article-layout .article-hero {
    position: relative;
    width: 100%;
    min-height: 60vh;
    padding: 120px 60px 80px;
    margin: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Optional: Add subtle pattern overlay */
.free-article-layout .article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 152, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 152, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Hide any image in hero - we want text only */
.free-article-layout .article-hero img {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.free-article-layout .article-header {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

.free-article-layout .article-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(255, 152, 0, 0.15);
    backdrop-filter: blur(10px);
    padding: 12px 28px;
    border-radius: 30px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 152, 0, 0.3);
    transition: all 0.3s ease;
}

.free-article-layout .article-category:hover {
    background: rgba(255, 152, 0, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.3);
}

.free-article-layout .article-title {
    font-size: clamp(42px, 6vw, 68px);
    font-weight: 300;
    line-height: 1.15;
    color: var(--light-1);
    margin: 0 0 32px 0;
    letter-spacing: -0.02em;
}

.free-article-layout .article-standfirst {
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.01em;
}

/* ============================================
   THREE-COLUMN ROW - MATCHING CARDS
============================================ */

.free-article-layout .article-share,
.free-article-layout .article-share-section {
    width: 100%;
    padding: 32px 40px;
    background: var(--section-light);
}

/* WordPress block wrapper reset */
.free-article-layout .article-share-section.wp-block-columns {
    margin: 0;
    padding: 32px 40px;
}

/* Inner columns wrapper - creates the three-column layout */
.free-article-layout .article-share-section > .wp-block-column > .wp-block-columns {
    display: flex;
    gap: 24px;
    align-items: stretch;
    max-width: 1400px;
    margin: 0 auto;
}

/* Each of the three cards */
.free-article-layout .article-share-section .wp-block-column {
    background: var(--light-1);
    border-radius: 8px;
    padding: 20px 18px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.free-article-layout .article-share-section .wp-block-column:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* COLUMN WIDTH REBALANCING */
/* Left card (Share buttons) - narrower, secondary emphasis */
.free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(1) {
    flex: 0 0 22%;
    min-width: 200px;
}

/* Middle card (Magazine cover + CTA) - larger, primary emphasis */
.free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(2) {
    flex: 0 0 46%;
    min-width: 320px;
}

/* Right card (Featured image) - medium, balanced */
.free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(3) {
    flex: 0 0 32%;
    min-width: 240px;
}

/* CUSTOM SHARE BUTTONS */
.free-article-layout .custom-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.free-article-layout .custom-share-buttons .share-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.free-article-layout .custom-share-buttons .share-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 180px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
}

/* Smaller buttons on mobile */
@media (max-width: 768px) {
    .free-article-layout .custom-share-buttons .share-button {
        max-width: 100%;
        font-size: 14px;
        padding: 12px 20px;
    }
}

.free-article-layout .custom-share-buttons .share-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.free-article-layout .custom-share-buttons .share-button.facebook {
    background: #1877f2;
    color: #ffffff;
}

.free-article-layout .custom-share-buttons .share-button.facebook:hover {
    background: #1560d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.4);
}

.free-article-layout .custom-share-buttons .share-button.twitter {
    background: #000000;
    color: #ffffff;
}

.free-article-layout .custom-share-buttons .share-button.twitter:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.free-article-layout .custom-share-buttons .share-button.whatsapp {
    background: #25d366;
    color: #ffffff;
}

.free-article-layout .custom-share-buttons .share-button.whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.free-article-layout .custom-share-buttons .share-button.copy-link {
    background: var(--text-secondary);
    color: #ffffff;
}

.free-article-layout .custom-share-buttons .share-button.copy-link:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.free-article-layout .custom-share-buttons .share-button.copy-link.copied {
    background: #4caf50;
}

/* Middle Card - Magazine Cover & CTA */
.free-article-layout .article-share-section .wp-block-column .wp-block-heading {
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    color: var(--text-primary) !important;
    margin: 16px 0 16px 0 !important;
    text-align: center !important;
}

.free-article-layout .article-share-section .wp-block-column .wp-block-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.free-article-layout .article-share-section .wp-block-column .wp-block-button {
    width: 100%;
    max-width: 280px;
}

/* FIX: Order now button - orange style matching site buttons */
.free-article-layout .article-share-section .wp-block-column .wp-block-button__link {
    background-color: var(--primary) !important;
    color: var(--dark-1) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    padding: 14px 32px !important;
    border-radius: 12px !important;
    border: none !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    width: 100% !important;
    text-align: center !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4) !important;
}

.free-article-layout .article-share-section .wp-block-column .wp-block-button__link:hover {
    background-color: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.6) !important;
}

/* Paragraph above heading (issue text) */
.free-article-layout .article-share-section .wp-block-column > p {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: var(--text-secondary) !important;
    text-align: center !important;
    margin: 0 0 12px 0 !important;
}

/* Magazine cover image - prominent in middle card */
.free-article-layout .article-share-section .wp-block-image {
    margin: 20px auto !important;
    max-width: 200px;
}

.free-article-layout .article-share-section .wp-block-image img {
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.free-article-layout .article-share-section .wp-block-image:hover img {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Right Card - Featured Image */
.free-article-layout .article-share-section .wp-block-post-featured-image {
    margin: 0 !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.free-article-layout .article-share-section .wp-block-post-featured-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.free-article-layout .article-share-section .wp-block-post-featured-image:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Featured image in third column (when using the_post_thumbnail()) */
.free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(3) img {
    width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(3):hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Old print edition CTA - deprecated but keeping for backward compatibility */
.free-article-layout .print-edition-cta {
    max-width: 500px;
    margin: 0 auto;
    padding: 32px 40px;
    background: var(--light-1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.free-article-layout .print-edition-cta p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.free-article-layout .print-edition-cta strong {
    color: var(--text-primary);
    font-weight: 600;
}

.free-article-layout .print-edition-button {
    display: inline-block;
    padding: 14px 36px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--light-1);
    background: var(--text-primary);
    border: none;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.free-article-layout .print-edition-button:hover {
    background: var(--primary);
    color: var(--dark-1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

/* ============================================
   MAIN CONTENT SECTION
============================================ */

.free-article-layout .article-content,
.free-article-layout .article-content-section {
    width: 100%;
    padding: 100px 40px;
    background: var(--light-1);
    display: flex;
    justify-content: center;
}

/* WordPress block wrapper reset for content sections */
.free-article-layout .article-content-section.wp-block-group {
    margin: 0;
    max-width: none;
}

.free-article-layout .article-inner {
    max-width: 750px;
    width: 100%;
}

.free-article-layout .article-main {
    width: 100%;
}

/* CRITICAL FIX: Target actual Gutenberg block structure for paragraphs */
.free-article-layout .article-main > p,
.free-article-layout .article-inner > p,
.free-article-layout .article-content-section .wp-block-column > p,
.free-article-layout .article-content-section p {
    font-size: 20px !important;
    line-height: 1.8 !important;
    color: var(--text-primary) !important;
    margin: 0 0 32px 0 !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em !important;
    font-family: Georgia, 'Times New Roman', serif !important;
}

/* Drop cap for first paragraph */
.free-article-layout .article-main > p:first-of-type::first-letter,
.free-article-layout .article-inner > p:first-of-type::first-letter,
.free-article-layout .article-content-section .wp-block-column > p:first-of-type::first-letter {
    float: left;
    font-size: 72px;
    line-height: 0.9;
    font-weight: 400;
    margin: 8px 12px 0 0;
    color: var(--primary);
    font-family: Georgia, serif;
}

/* ============================================
   IMAGES - Premium Treatment
============================================ */

.free-article-layout .article-image,
.free-article-layout .article-content-section .wp-block-image {
    margin: 40px auto;
    position: relative;
    max-width: 450px;
}

.free-article-layout .article-image img,
.free-article-layout .article-content-section .wp-block-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.free-article-layout .article-image figcaption,
.free-article-layout .article-content-section .wp-block-image figcaption,
.free-article-layout .article-content-section .wp-block-image .wp-element-caption {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: var(--text-secondary) !important;
    font-style: italic;
    margin-top: 16px;
    padding-left: 20px;
    border-left: 3px solid var(--primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Image Variants */

.free-article-layout .article-image--right {
    float: right;
    max-width: 45%;
    margin: 8px 0 40px 40px;
}

.free-article-layout .article-image--left {
    float: left;
    max-width: 45%;
    margin: 8px 40px 40px 0;
}

/* Desktop: Two-column grid layout for sticky image */
@media (min-width: 1024px) {
    .free-article-layout .article-inner {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
        column-gap: 60px;
        align-items: flex-start;
    }

    .free-article-layout .article-main {
        grid-column: 1;
    }

    .free-article-layout .article-image--right {
        grid-column: 2;
        float: none;
        max-width: 100%;
        margin: 0;
        position: sticky;
        top: 100px;
        align-self: flex-start;
    }

    /* STICKY IMAGE LAYOUT FOR GUTENBERG TWO-COLUMN SECTIONS */
    .free-article-layout .article-content-section .wp-block-columns {
        display: flex;
        gap: 60px;
        align-items: flex-start;
    }

    /* Text column (66.66%) - scrolls normally with max-width for readability */
    .free-article-layout .article-content-section .wp-block-columns > .wp-block-column[style*="66.66"] {
        flex: 2;
        max-width: 680px;
    }

    /* Image column (33.33%) - sticky on desktop */
    .free-article-layout .article-content-section .wp-block-columns > .wp-block-column[style*="33.33"] {
        flex: 1;
        position: sticky;
        top: 100px;
        align-self: flex-start;
    }

    .free-article-layout .article-content-section .wp-block-columns > .wp-block-column[style*="33.33"] .wp-block-image {
        margin: 0;
    }
}

.free-article-layout .article-image--full {
    max-width: 100vw !important;
    margin: 80px calc(-50vw + 50%) !important;
    width: 100vw;
}

.free-article-layout .article-image--full img {
    max-height: 70vh;
    object-fit: cover;
    width: 100%;
    border-radius: 0;
}

.free-article-layout .article-image--full figcaption {
    max-width: 800px;
    margin: 20px auto 0;
    padding: 0 60px;
}

/* Image hover effects */
.free-article-layout .article-image:not(.article-image--full):hover img {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ============================================
   PULL QUOTES - Full Width Dark Section
============================================ */

/* WordPress block wrapper for quotes - HIGHEST SPECIFICITY */
.free-article-layout .article-quote-section,
.free-article-layout .wp-block-group.article-quote-section {
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.free-article-layout .article-quote-section.wp-block-group {
    max-width: 100vw !important;
}

/* Main blockquote styling - full-width background with contained text */
.free-article-layout .article-quote,
.free-article-layout .article-quote-section .wp-block-quote,
.free-article-layout .article-quote-section blockquote,
.free-article-layout .wp-block-group.article-quote-section .wp-block-quote,
.free-article-layout .wp-block-group.article-quote-section blockquote {
    max-width: 100vw !important;
    margin: 100px calc(-50vw + 50%) !important;
    padding: 80px 60px !important;
    background: var(--section-dark) !important;
    position: relative !important;
    clear: both !important;
    width: 100vw !important;
    border: none !important;
    border-left: none !important;
    border-radius: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Large decorative quote mark */
.free-article-layout .article-quote::before,
.free-article-layout .article-quote-section .wp-block-quote::before,
.free-article-layout .article-quote-section blockquote::before {
    content: '"' !important;
    position: absolute !important;
    top: 40px !important;
    left: 60px !important;
    font-size: 180px !important;
    font-family: Georgia, serif !important;
    color: var(--primary) !important;
    opacity: 0.1 !important;
    line-height: 0.8 !important;
}

/* Orange accent bar */
.free-article-layout .article-quote::after,
.free-article-layout .article-quote-section .wp-block-quote::after,
.free-article-layout .article-quote-section blockquote::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 5px !important;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark)) !important;
}

/* Quote text styling - larger pull quote style with contained width */
.free-article-layout .article-quote p,
.free-article-layout .article-quote-section .wp-block-quote p,
.free-article-layout .article-quote-section blockquote p,
.free-article-layout .wp-block-group.article-quote-section .wp-block-quote p,
.free-article-layout .wp-block-group.article-quote-section blockquote p {
    font-size: clamp(28px, 4.5vw, 42px) !important;
    line-height: 1.4 !important;
    color: var(--light-1) !important;
    font-weight: 400 !important;
    font-style: italic !important;
    margin: 0 auto !important;
    max-width: 800px !important;
    position: relative !important;
    z-index: 1 !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    letter-spacing: -0.02em !important;
    text-align: center !important;
    background: transparent !important;
    border: none !important;
    padding: 0 40px !important;
}

/* Remove any cite/footer elements from blockquotes */
.free-article-layout .article-quote-section .wp-block-quote cite,
.free-article-layout .article-quote-section blockquote cite,
.free-article-layout .article-quote-section .wp-block-quote footer,
.free-article-layout .article-quote-section blockquote footer {
    display: none !important;
}

/* ============================================
   SUBSCRIBE CTA - Full Width Dark Section
============================================ */

.free-article-layout .article-cta {
    width: 100%;
    padding: 120px 60px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    position: relative;
    overflow: hidden;
    margin: 0;
}

.free-article-layout .article-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 152, 0, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 152, 0, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.free-article-layout .article-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.free-article-layout .article-cta__content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.free-article-layout .article-cta__content h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 300;
    line-height: 1.3;
    color: var(--light-1);
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

.free-article-layout .article-cta__content p {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 50px 0;
    font-weight: 300;
}

.free-article-layout .article-cta__button {
    display: inline-block;
    padding: 22px 70px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--dark-1);
    background: var(--primary);
    border: none;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(255, 152, 0, 0.3);
    border-radius: 4px;
}

.free-article-layout .article-cta__button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.6s ease;
}

.free-article-layout .article-cta__button:hover {
    background: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: 0 15px 50px rgba(255, 152, 0, 0.5);
}

.free-article-layout .article-cta__button:hover::before {
    left: 100%;
}

/* ============================================
   SCROLL ANIMATIONS
============================================ */

[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

@media (max-width: 1024px) {
    .free-article-layout .article-hero {
        padding: 100px 40px 60px;
        min-height: 50vh;
    }

    .free-article-layout .article-content {
        padding: 80px 30px;
    }

    .free-article-layout .article-inner {
        display: block;
    }

    .free-article-layout .article-image--right {
        float: right;
        max-width: 50%;
        margin: 8px 0 30px 30px;
        position: relative;
        top: auto;
    }

    .free-article-layout .article-image--left {
        float: left;
        max-width: 50%;
        margin: 8px 30px 30px 0;
    }

    /* Three-column row - adjust for tablet */
    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns {
        gap: 20px;
    }

    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(1) {
        flex: 0 0 25%;
        min-width: 180px;
    }

    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(2) {
        flex: 0 0 42%;
        min-width: 280px;
    }

    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(3) {
        flex: 0 0 33%;
        min-width: 220px;
    }

    .free-article-layout .article-share-section .wp-block-post-featured-image img {
        height: 240px;
    }

    .free-article-layout .article-quote {
        padding: 80px 40px;
    }

    .free-article-layout .article-quote::before,
    .free-article-layout .article-quote-section .wp-block-quote::before,
    .free-article-layout .article-quote-section blockquote::before {
        font-size: 140px;
        left: 40px;
    }

    .free-article-layout .article-cta {
        padding: 100px 40px;
    }

    .free-article-layout .article-image--full figcaption {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .free-article-layout .article-hero {
        padding: 80px 24px 50px;
        min-height: auto;
    }

    .free-article-layout .article-category {
        font-size: 10px;
        padding: 10px 20px;
        letter-spacing: 2px;
    }

    .free-article-layout .article-content {
        padding: 60px 24px;
    }

    .free-article-layout .article-content > p {
        font-size: 18px;
        line-height: 1.75;
        margin-bottom: 28px;
    }

    .free-article-layout .article-content > p:first-of-type::first-letter {
        font-size: 56px;
        margin-right: 8px;
    }

    .free-article-layout .article-share,
    .free-article-layout .article-share-section {
        padding: 40px 24px;
    }

    /* Stack three-column cards vertically on mobile */
    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns {
        flex-direction: column;
        gap: 20px;
    }

    /* Reset column widths on mobile - all equal */
    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(1),
    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(2),
    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(3) {
        flex: 1 1 100%;
        min-width: auto;
    }

    .free-article-layout .article-share-section .wp-block-column {
        padding: 28px 24px;
    }

    /* Make middle card (magazine) visually prominent even when stacked */
    .free-article-layout .article-share-section > .wp-block-column > .wp-block-columns > .wp-block-column:nth-child(2) {
        order: -1; /* Move to top on mobile */
        padding: 36px 28px;
    }

    .free-article-layout .article-share-section .wp-block-post-featured-image img {
        height: 220px;
    }

    .free-article-layout .article-share-section .wp-block-image {
        max-width: 180px;
    }

    .free-article-layout .article-image--right,
    .free-article-layout .article-image--left {
        float: none;
        max-width: 100%;
        margin: 40px 0;
    }

    .free-article-layout .article-image--full {
        margin: 60px calc(-50vw + 50%) !important;
    }

    .free-article-layout .article-image--full figcaption {
        padding: 0 24px;
    }

    .free-article-layout .article-quote {
        padding: 60px 24px;
        margin: 80px calc(-50vw + 50%) !important;
    }

    .free-article-layout .article-quote::before {
        font-size: 100px;
        left: 24px;
    }

    .free-article-layout .article-cta {
        padding: 80px 24px;
    }

    .free-article-layout .article-cta__content p {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .free-article-layout .article-cta__button {
        padding: 18px 50px;
        font-size: 12px;
        width: 100%;
    }
}

/* ============================================
   PRINT STYLES
============================================ */

@media print {
    .reading-progress-bar,
    .free-article-layout .article-share,
    .free-article-layout .article-cta {
        display: none !important;
    }

    .free-article-layout .article-hero {
        background: #fff;
        padding: 20px 0;
        min-height: auto;
    }

    .free-article-layout .article-title,
    .free-article-layout .article-standfirst,
    .free-article-layout .article-category {
        color: #000;
    }

    .free-article-layout .article-content {
        background: #fff;
        padding: 20px 0;
    }

    .free-article-layout .article-content > p {
        font-size: 11pt;
        line-height: 1.6;
    }

    .free-article-layout .article-quote {
        background: #f5f5f5;
        page-break-inside: avoid;
    }
}

/* ============================================
   ACCESSIBILITY
============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

.free-article-layout .article-cta__button:focus,
.free-article-layout .article-category:focus {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}

/* ============================================
   ENSURE GOOD CONTRAST
============================================ */

.free-article-layout .article-content > p,
.free-article-layout .article-content > p strong {
    color: var(--text-primary) !important;
}

.free-article-layout .article-image figcaption {
    color: var(--text-secondary) !important;
}

.free-article-layout .article-hero .article-title {
    color: #ffffff !important;
}

.free-article-layout .article-hero .article-standfirst {
    color: rgba(255, 255, 255, 0.9) !important;
}
