/* RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding-bottom: 80px; /* Spazio per la Sticky CTA */
}

/* HEADER STYLE */
.blog-header {
    border-bottom: 1px solid #e1e1e1;
    padding: 15px 20px;
    text-align: center;
    background: #fff;
}
.logo {
    font-family: 'Georgia', serif;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.logo span { color: #c0392b; } /* Rosso editoriale */

/* CONTAINER ARTICOLO */
.article-container {
    max-width: 600px; /* Larghezza ottimale lettura */
    margin: 0 auto;
    padding: 20px;
}

/* TYPOGRAPHY */
.headline {
    font-family: 'Georgia', serif;
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 15px;
    color: #111;
}
.author-line {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 12px;
    color: #777;
}
.author-pic {
    width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; background: #ddd;
}
.content-body p { margin-bottom: 20px; font-size: 18px; color: #444; }
.dropcap { font-size: 3.5em; float: left; line-height: 0.8; margin-right: 8px; font-family: 'Georgia', serif; }
h3 { margin-top: 30px; margin-bottom: 15px; font-size: 20px; }

/* MEDIA BLOCKS (ASPECT RATIOS) */
.media-block {
    position: relative;
    width: 100%;
    background-color: #f0f0f0; /* Colore mentre carica */
    margin-bottom: 10px;
    border-radius: 4px;
    overflow: hidden;
}

/* Classi per proporzioni specifiche */
.aspect-4-5 { aspect-ratio: 4 / 5; }
.aspect-1-1 { aspect-ratio: 1 / 1; }
.aspect-9-16 { aspect-ratio: 9 / 16; }

.media-content {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Riempie il contenitore senza deformarsi */
    display: block;
}

figcaption, .caption-text {
    font-size: 13px; color: #888; text-align: center; margin-bottom: 25px; display: block;
    font-style: italic;
}

.overlay-text {
    position: absolute; bottom: 10px; left: 10px;
    background: rgba(0,0,0,0.6); color: #fff;
    padding: 4px 8px; font-size: 10px; font-weight: bold; border-radius: 3px;
    text-transform: uppercase;
}

/* VIDEO RECENSIONE */
.video-wrapper-vertical {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
    border: 1px solid #eee;
}

/* CAPTCHA OVERLAY */
.captcha-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 16px;
    backdrop-filter: blur(2px);
}
.captcha-overlay.visible {
    display: flex;
}
.captcha-box {
    background: #fff;
    max-width: 420px;
    width: 100%;
    padding: 28px 28px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    text-align: left;
}
.captcha-box h4 {
    margin-bottom: 12px;
    font-size: 22px;
    line-height: 1.3;
    color: #111;
}
.captcha-box p {
    font-size: 16px;
    margin-bottom: 16px;
    line-height: 1.5;
    color: #444;
}
.captcha-label {
    display: block;
    font-size: 15px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #222;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 40px;
    margin-top: 8px;
}

.captcha-range {
    position: absolute;
    top: 14px;
    left: 0;
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 999px;
    background: #e5e5e5;
    outline: none;
    z-index: 2;
}

.slider-thumb-pulse {
    position: absolute;
    top: 4px;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #007bff;
    pointer-events: none;
    z-index: 3;
    animation: thumbPulse 1.2s infinite ease-in-out;
    transform: translateX(-16px);
}

@keyframes thumbPulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,123,255,0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(0,123,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,123,255,0); }
}

.captcha-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
}
.captcha-range::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
}
.captcha-range::-moz-range-track {
    height: 12px;
    border-radius: 999px;
    background: #e5e5e5;
}
.captcha-status {
    font-size: 15px;
    color: #555;
    margin-top: 14px;
    min-height: 44px;
    line-height: 1.4;
}
.captcha-status-ok {
    color: #27ae60;
    font-weight: 600;
}
.captcha-close {
    margin-top: 16px;
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
}

/* STICKY CTA BAR (MOBILE FIRST) */
.sticky-cta-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #ffffff;
    padding: 15px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: center;
}
.cta-content {
    width: 100%; max-width: 600px;
    display: flex; justify-content: space-between; align-items: center;
}
.cta-price {
    font-size: 12px; font-weight: bold; text-transform: uppercase; color: #c0392b;
}
.cta-button {
    background-color: #000;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s;
}
.cta-button:active { transform: scale(0.95); }

@media (max-width: 640px) {
    .cta-content {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .cta-price {
        font-size: 14px;
        text-align: center;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        border-radius: 10px;
        padding: 16px;
        font-size: 15px;
    }
}

/* FOOTER */
.legal-footer {
    text-align: center; font-size: 10px; color: #aaa; padding: 20px;
    background: #f9f9f9; border-top: 1px solid #eee;
}
.legal-footer a { color: #aaa; }

/* === CLOUDFLARE TURNSTILE CAPTCHA === */
.captcha-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    padding: 16px !important;
}
.captcha-overlay.visible {
    display: flex !important;
}

.cf-challenge-card {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    max-width: 360px !important;
    width: 100% !important;
    padding: 24px 20px !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    text-align: left !important;
}

.cf-card-header {
    margin-bottom: 16px !important;
}
.cf-site-domain {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    margin-bottom: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.cf-site-domain::before {
    content: "" !important;
    display: inline-block !important;
    width: 7px !important;
    height: 7px !border-radius: 50% !important;
    background: #10b981 !important;
}
.cf-card-title {
    font-size: 19px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    letter-spacing: -0.01em !important;
    margin-bottom: 4px !important;
}
.cf-card-desc {
    font-size: 13px !important;
    color: #6b7280 !important;
    line-height: 1.35 !important;
}

/* WIDGET TURNSTILE ESATTO 300x65 */
.cf-turnstile-box {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fafafa !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    height: 65px !important;
    padding: 0 12px !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    transition: background 0.15s ease, border-color 0.15s ease !important;
    box-sizing: border-box !important;
    margin: 16px 0 14px !important;
    width: 100% !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
.cf-turnstile-box:hover {
    background: #f4f4f5 !important;
    border-color: #9ca3af !important;
}

.cf-checkbox-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-grow: 1 !important;
}

.cf-checkbox {
    width: 26px !important;
    height: 26px !important;
    border: 2px solid #a1a1aa !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all 0.15s ease !important;
}
.cf-turnstile-box:hover .cf-checkbox {
    border-color: #71717a !important;
}

.cf-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid #e4e4e7;
    border-top-color: #f6821f;
    border-radius: 50%;
    animation: cfSpin 0.6s linear infinite;
}
@keyframes cfSpin {
    to { transform: rotate(360deg); }
}

.cf-check-icon {
    display: none;
}

/* Loading state */
.cf-turnstile-box.loading .cf-checkbox {
    border-color: #d4d4d8 !important;
}
.cf-turnstile-box.loading .cf-spinner {
    display: block !important;
}

/* Success state */
.cf-turnstile-box.success .cf-checkbox {
    border-color: #059669 !important;
    background: #ffffff !important;
}
.cf-turnstile-box.success .cf-spinner {
    display: none !important;
}
.cf-turnstile-box.success .cf-check-icon {
    display: block !important;
}

.cf-label {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #18181b !important;
    line-height: 1.2 !important;
}

/* Branding Cloudflare a destra */
.cf-branding {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    line-height: 1.15 !important;
    padding-left: 8px !important;
}
.cf-brand-top {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.cf-brand-name {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #3f3f46 !important;
    letter-spacing: -0.01em !important;
}
.cf-brand-links {
    font-size: 9px !important;
    color: #71717a !important;
    margin-top: 3px !important;
}
.cf-brand-links span {
    color: #71717a !important;
}

/* Footer card */
.cf-card-footer {
    border-top: 1px solid #f4f4f5 !important;
    padding-top: 12px !important;
    margin-top: 8px !important;
    text-align: center !important;
}
.cf-ray-id {
    font-size: 10px !important;
    color: #a1a1aa !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}
.cf-footer-note {
    font-size: 10px !important;
    color: #a1a1aa !important;
    margin-top: 2px !important;
}
.cf-close-btn {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    color: #9ca3af !important;
    font-size: 11px !important;
    padding: 6px 12px !important;
    margin-top: 8px !important;
    cursor: pointer !important;
    text-decoration: underline !important;
    transition: color 0.15s !important;
}
.cf-close-btn:hover {
    color: #4b5563 !important;
}
