/**
 * Call + WhatsApp CTA component — Mikal Germany
 *
 * Three variants of one markup block:
 *   .mikal-cta--band    full-width dark section (end of article / page)
 *   .mikal-cta--card    sticky sidebar card (blog listing)
 *   .mikal-cta--inline  compact light strip (inside article body)
 *
 * Plus the desktop floating call FAB that pairs with .floating-whatsapp.
 */

/* ═══════════════════════════════════════════════════
   SHARED
   ═══════════════════════════════════════════════════ */
.mikal-cta {
    --cta-wa: #25d366;
    --cta-wa-dark: #128c7e;
    font-family: var(--font-body, 'Cairo', sans-serif);
}

.mikal-cta__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 0.6rem;
}

.mikal-cta__eyebrow .material-symbols-outlined {
    font-size: 18px;
}

.mikal-cta__title {
    font-family: var(--font-display, 'Cairo', sans-serif);
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.mikal-cta__text {
    margin: 0;
    line-height: 1.75;
}

.mikal-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mikal-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.4rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    color: #fff;
    border: 1px solid transparent;
    transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms ease,
        background-color 220ms ease;
    -webkit-tap-highlight-color: transparent;
}

.mikal-cta__btn:hover,
.mikal-cta__btn:focus-visible {
    transform: translateY(-2px);
    color: #fff;
}

.mikal-cta__btn:active {
    transform: scale(0.97);
}

.mikal-cta__btn .material-symbols-outlined {
    font-size: 22px;
    flex-shrink: 0;
}

.mikal-cta__btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.mikal-cta__btn-label {
    font-size: 1rem;
    font-weight: 800;
}

.mikal-cta__btn-number {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.03em;
}

.mikal-cta__btn--call {
    background: linear-gradient(135deg, #0d6e1f, var(--clr-primary, #0a5c18));
    box-shadow: 0 6px 20px rgba(10, 92, 24, 0.32);
}

.mikal-cta__btn--call:hover {
    box-shadow: 0 10px 28px rgba(10, 92, 24, 0.42);
}

.mikal-cta__btn--wa {
    background: linear-gradient(135deg, var(--cta-wa, #25d366), var(--cta-wa-dark, #128c7e));
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.28);
}

.mikal-cta__btn--wa:hover {
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
}

/* ═══════════════════════════════════════════════════
   VARIANT — BAND
   ═══════════════════════════════════════════════════ */
.mikal-cta--band {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.75rem;
    padding: 2.75rem 1.5rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(10, 92, 24, 0.96), rgba(15, 26, 15, 0.98));
    color: #fff;
}

.mikal-cta--band::before {
    content: '';
    position: absolute;
    top: -60%;
    inset-inline-end: -15%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(136, 217, 130, 0.18), transparent 70%);
    pointer-events: none;
}

.mikal-cta--band .mikal-cta__body,
.mikal-cta--band .mikal-cta__actions {
    position: relative;
    z-index: 1;
}

.mikal-cta--band .mikal-cta__eyebrow {
    color: var(--clr-inverse-primary, #88d982);
}

.mikal-cta--band .mikal-cta__title {
    font-size: clamp(1.4rem, 3.4vw, 2rem);
    color: #fff;
}

.mikal-cta--band .mikal-cta__text {
    color: rgba(240, 245, 236, 0.85);
    font-size: 1.0625rem;
    max-width: 42rem;
}

.mikal-cta--band .mikal-cta__actions {
    justify-content: center;
}

@media (min-width: 900px) {
    .mikal-cta--band {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: start;
        padding: 3rem 3rem;
        gap: 2.5rem;
    }

    .mikal-cta--band .mikal-cta__actions {
        flex-shrink: 0;
    }
}

/* Full-bleed wrapper used at the end of listing/page templates */
.mikal-cta-section {
    padding: 3.5rem 1.25rem;
}

.mikal-cta-section > .mikal-cta--band {
    max-width: 1180px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════
   VARIANT — CARD (sidebar)
   ═══════════════════════════════════════════════════ */
.mikal-cta--card {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.5rem;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(10, 92, 24, 0.97), rgba(15, 26, 15, 0.99));
    color: #fff;
    box-shadow: 0 18px 40px -24px rgba(15, 26, 15, 0.7);
}

.mikal-cta--card .mikal-cta__eyebrow {
    color: var(--clr-inverse-primary, #88d982);
}

.mikal-cta--card .mikal-cta__title {
    font-size: 1.2rem;
    color: #fff;
}

.mikal-cta--card .mikal-cta__text {
    color: rgba(240, 245, 236, 0.8);
    font-size: 0.9rem;
}

.mikal-cta--card .mikal-cta__actions {
    flex-direction: column;
    gap: 0.6rem;
}

.mikal-cta--card .mikal-cta__btn {
    width: 100%;
    justify-content: flex-start;
    padding: 0.8rem 1rem;
}

/* ═══════════════════════════════════════════════════
   VARIANT — INLINE (inside article prose)
   ═══════════════════════════════════════════════════ */
.mikal-cta--inline {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    margin: 2.5rem 0;
    padding: 1.5rem;
    border-radius: 18px;
    background: var(--clr-primary-light, #e8f5e9);
    border: 1px solid rgba(10, 92, 24, 0.14);
    border-inline-start: 5px solid var(--clr-primary, #0a5c18);
}

.mikal-cta--inline .mikal-cta__eyebrow {
    color: var(--clr-primary, #0a5c18);
}

.mikal-cta--inline .mikal-cta__title {
    font-size: 1.15rem;
    color: var(--clr-text-primary, #1a1f1a);
}

.mikal-cta--inline .mikal-cta__text {
    font-size: 0.95rem;
    color: var(--clr-text-secondary, #4a5548);
}

.mikal-cta--inline .mikal-cta__btn {
    flex: 1 1 200px;
}

@media (min-width: 720px) {
    .mikal-cta--inline {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
    }

    .mikal-cta--inline .mikal-cta__actions {
        flex-shrink: 0;
    }

    .mikal-cta--inline .mikal-cta__btn {
        flex: 0 0 auto;
    }
}

/* Footer WhatsApp CTA shows the WhatsApp line, quieter than the button label */
.mikal-footer-cta-wa-number {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    opacity: 0.85;
}

/* Blog sidebar placement — the listing sidebar collapses under the feed at
   768px, where the band CTA at the end of <main> already covers the ask. */
.blog-sidebar-cta {
    margin-top: 1.75rem;
}

@media (max-width: 768px) {
    .blog-sidebar-cta {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════
   404 / small stacks
   ═══════════════════════════════════════════════════ */
.mikal-cta--bare {
    padding: 0;
    background: none;
    border: none;
    box-shadow: 0 8px 24px -18px rgba(15, 26, 15, 0.4);
}

/* ═══════════════════════════════════════════════════
   DESKTOP FLOATING CALL FAB (pairs with .floating-whatsapp)
   Mobile (<=1024px) already has the fixed bottom bar, so both FABs hide.
   ═══════════════════════════════════════════════════ */
.floating-call {
    position: fixed;
    /* Physical right/bottom on purpose: matches .floating-whatsapp, which sits
       directly below it and also uses physical offsets on this RTL layout. */
    right: 24px;
    bottom: 96px;
    z-index: 99;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;

    color: #fff;
    text-decoration: none;
    background: linear-gradient(180deg, #128a24, var(--clr-primary, #0a5c18));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px -20px rgba(18, 27, 21, 0.95);

    transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 250ms ease;
}

.floating-call .material-symbols-outlined {
    font-size: 26px;
}

.floating-call:hover,
.floating-call:focus-visible {
    color: #fff;
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 24px 46px -20px rgba(18, 27, 21, 0.78);
}

/* Pulsing ring so the call action reads as "live" */
.floating-call::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(136, 217, 130, 0.55);
    animation: floatingCallRing 2.6s ease-out infinite;
    pointer-events: none;
}

@keyframes floatingCallRing {
    0%   { opacity: 0.9; transform: scale(0.85); }
    70%  { opacity: 0;   transform: scale(1.35); }
    100% { opacity: 0;   transform: scale(1.35); }
}

@media (max-width: 1024px) {
    .floating-call {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .mikal-cta__btn,
    .floating-call {
        transition: none;
    }

    .mikal-cta__btn:hover,
    .floating-call:hover {
        transform: none;
    }

    .floating-call::after {
        animation: none;
        display: none;
    }
}
