/* ============================================================
   Captwiki Text Block — Stylesheet
   2026 Edition | SEO-friendly | Zero extra DOM nodes
   All new styles use CSS custom properties + pseudo-elements
   only — no JavaScript, no extra markup.
   ============================================================ */

/* ── CSS Custom Properties (defaults) ───────────────────── */
.captwiki-adv-text {
    --ctb-accent:      #0073aa;   /* override via Elementor accent control */
    --ctb-radius:      10px;
    --ctb-transition:  0.28s ease;

    font-size: 16px;
    line-height: 1.75;
    transition: box-shadow var(--ctb-transition),
                transform  var(--ctb-transition),
                border-color var(--ctb-transition);

    /* Prevent content shift on pseudo-element hover */
    will-change: transform;

    /* Accessibility: readable text at all sizes */
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ============================================================
   ORIGINAL STYLES (1 – 4)  —  unchanged for back-compat
   ============================================================ */

/* Style 1 — Left Accent Border */
.captwiki-adv-text.style1 {
    border-left: 5px solid var(--ctb-accent, #0073aa);
    padding-left: 20px;
}

/* Style 2 — Center Card */
.captwiki-adv-text.style2 {
    text-align: center;
    background: #f5f5f5;
    border-radius: var(--ctb-radius);
}

/* Style 3 — Warm Italic Quote */
.captwiki-adv-text.style3 {
    font-style: italic;
    background: #fff8e1;
    border: 1px dashed #e0a800;
}

/* Style 4 — Dark Gradient */
.captwiki-adv-text.style4 {
    background: linear-gradient(to right, #4b6cb7, #182848);
    color: #fff;
    padding: 30px;
    border-radius: 6px;
}


/* ============================================================
   NEW 2026 STYLES (5 – 8)
   Philosophy:
     · No extra HTML wrappers — ::before / ::after for all fx
     · CSS-only animations — GPU-composited (transform/opacity)
     · Each style carries its own "semantic mood" for UX
   ============================================================ */

/* ──────────────────────────────────────────────────────────
   Style 5 — Glassmorphism 2.0
   Use case: hero sections, feature callouts on image/video bg
   2026 trend: frosted glass with subtle inner light edge
   ────────────────────────────────────────────────────────── */
.captwiki-adv-text.style5 {
    position: relative;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 28px 32px;
    color: inherit;
    overflow: hidden;
}

/* Inner top-edge highlight — zero extra DOM */
.captwiki-adv-text.style5::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.55) 40%,
        rgba(255,255,255,0.55) 60%,
        transparent 100%);
    pointer-events: none;
}

/* Subtle shimmer sweep on hover — GPU-only */
.captwiki-adv-text.style5::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 30%,
        rgba(255,255,255,0.06) 50%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.captwiki-adv-text.style5:hover::after {
    opacity: 1;
}

/* ──────────────────────────────────────────────────────────
   Style 6 — Editorial Serif
   Use case: blog intros, long-form articles, pull-quotes
   2026 trend: magazine-layout typography revival
   SEO benefit: distinct visual hierarchy aids reader dwell time
   ────────────────────────────────────────────────────────── */
.captwiki-adv-text.style6 {
    position: relative;
    padding: 32px 36px 32px 40px;
    border-left: 3px solid var(--ctb-accent, #1a1a2e);
    background: #fafaf8;
    border-radius: 0 10px 10px 0;
    font-size: 17px;
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: #1a1a1a;
}

/* Large decorative quotation mark — pure CSS, no img/icon */
.captwiki-adv-text.style6::before {
    content: '\201C'; /* Unicode left double quote */
    position: absolute;
    top: 4px;
    left: 12px;
    font-size: 72px;
    line-height: 1;
    color: var(--ctb-accent, #0073aa);
    opacity: 0.18;
    font-family: Georgia, 'Times New Roman', serif;
    pointer-events: none;
    user-select: none;
    aria-hidden: true; /* decorative — ignored by screen readers */
}

/* Hairline rule at bottom */
.captwiki-adv-text.style6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 40px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, var(--ctb-accent, #0073aa) 0%, transparent 100%);
    opacity: 0.25;
}

/* ──────────────────────────────────────────────────────────
   Style 7 — Neon Ink (Dark Mode Ready)
   Use case: tech / SaaS / AI product sites, dark sections
   2026 trend: "AI glow" aesthetic — neon accent on dark bg
   Accessible: WCAG AA contrast maintained at defaults
   ────────────────────────────────────────────────────────── */
.captwiki-adv-text.style7 {
    position: relative;
    background: #0d0f14;
    color: #e8eaf0;
    padding: 28px 32px;
    border-radius: 12px;
    border: 1px solid rgba(0, 200, 180, 0.20);
    overflow: hidden;
}

/* Glow top-left orb — no img, no JS */
.captwiki-adv-text.style7::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 200, 180, 0.22) 0%,
        transparent 70%);
    pointer-events: none;
}

/* Animated bottom accent line */
.captwiki-adv-text.style7::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--ctb-accent, #00c8b4) 30%,
        var(--ctb-accent, #00c8b4) 70%,
        transparent 100%);
    opacity: 0.7;
}

/* Hover: lift + glow intensify */
.captwiki-adv-text.style7:hover {
    box-shadow: 0 0 28px rgba(0, 200, 180, 0.15),
                0 8px 32px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 200, 180, 0.45);
    transform: translateY(-2px);
}

/* ──────────────────────────────────────────────────────────
   Style 8 — Minimal Luxury
   Use case: premium brands, landing pages, portfolio sites
   2026 trend: quiet luxury — refined spacing, thin gold lines
   SEO benefit: high readability → lower bounce rate
   ────────────────────────────────────────────────────────── */
.captwiki-adv-text.style8 {
    position: relative;
    padding: 36px 40px;
    background: #fff;
    color: #1c1c1c;
    font-size: 17px;
    line-height: 1.9;
    letter-spacing: 0.015em;
    border-top: 1.5px solid var(--ctb-accent, #b8960c);
    border-bottom: 1.5px solid var(--ctb-accent, #b8960c);
}

/* Left ornamental bracket */
.captwiki-adv-text.style8::before {
    content: '';
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        var(--ctb-accent, #b8960c) 0%,
        transparent 40%,
        transparent 60%,
        var(--ctb-accent, #b8960c) 100%
    );
}

/* Right ornamental bracket */
.captwiki-adv-text.style8::after {
    content: '';
    position: absolute;
    top: -1px;
    bottom: -1px;
    right: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        var(--ctb-accent, #b8960c) 0%,
        transparent 40%,
        transparent 60%,
        var(--ctb-accent, #b8960c) 100%
    );
}

/* ============================================================
   UTILITY MODIFIERS (legacy + new additions)
   These can stack with any style class above.
   e.g. class="captwiki-adv-text style2 readable hover-lift"
   ============================================================ */

/* Card shadow */
.captwiki-adv-text.card {
    border: 1px solid #eee;
    border-radius: var(--ctb-radius);
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* SEO highlight — trust signal for readers + crawlers */
.captwiki-adv-text.seo-highlight {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
}

/* Gradient border via outline trick (cross-browser safe) */
.captwiki-adv-text.gradient-border {
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}
.captwiki-adv-text.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(45deg, var(--ctb-accent, #0073aa), #00c6ff);
    z-index: -1;
}

/* Hover lift (GPU-composited, no layout shift) */
.captwiki-adv-text.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}

/* Readability clamp — max-width for long-form text */
.captwiki-adv-text.readable {
    max-width: 72ch; /* ch unit = width of "0" → reliable measure */
    margin-inline: auto;
    font-size: 17px;
    line-height: 1.85;
}

/* ── NEW 2026 Utility Modifiers ──────────────────────────── */

/* Frosted Tag — pill badge for callout text blocks */
.captwiki-adv-text.frosted-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* Attention Pulse — animated border for CTA text blocks */
.captwiki-adv-text.attention-pulse {
    border: 2px solid var(--ctb-accent, #0073aa);
    border-radius: var(--ctb-radius);
    animation: ctb-pulse 2.4s ease-in-out infinite;
}

@keyframes ctb-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.25); }
    50%       { box-shadow: 0 0 0 8px rgba(0, 115, 170, 0); }
}

/* Stripe accent — top color band (no border-top needed) */
.captwiki-adv-text.stripe-top {
    position: relative;
    padding-top: calc(var(--ctb-stripe-h, 4px) + 1em);
}
.captwiki-adv-text.stripe-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--ctb-stripe-h, 4px);
    background: var(--ctb-accent, #0073aa);
    border-radius: inherit;
}

/* SEO Trust Box — prominent source/data callout */
.captwiki-adv-text.trust-box {
    background: #f0f7ff;
    border: 1px solid #c8dff5;
    border-left: 4px solid var(--ctb-accent, #0073aa);
    border-radius: 6px;
    padding: 20px 24px;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
    .captwiki-adv-text {
        font-size: 15px;
        line-height: 1.65;
    }

    /* Reduce heavy padding on small screens */
    .captwiki-adv-text.style4,
    .captwiki-adv-text.style5,
    .captwiki-adv-text.style7,
    .captwiki-adv-text.style8 {
        padding: 20px;
    }

    .captwiki-adv-text.style6 {
        padding: 20px 20px 20px 24px;
        font-size: 15px;
    }

    .captwiki-adv-text.readable {
        max-width: 100%;
    }

    /* Disable shimmer/glow animations on low-power devices */
    @media (prefers-reduced-motion: reduce) {
        .captwiki-adv-text,
        .captwiki-adv-text::before,
        .captwiki-adv-text::after {
            animation: none !important;
            transition: none !important;
        }
    }
}

/* ── Respect system dark mode for Style 2 (auto-adapt) ──── */
@media (prefers-color-scheme: dark) {
    .captwiki-adv-text.style2 {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .captwiki-adv-text.style6 {
        background: #111;
        color: #e8e8e8;
    }

    .captwiki-adv-text.trust-box {
        background: #0d1a2a;
        border-color: #1e3a5a;
    }
}
