/* ============================================
   Chelsea Insurance - Premium Blog v6
   CSS-only animations, wider layout
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- Fade-in keyframes --- */
@keyframes ciFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ciSlideRight {
    from { opacity: 0; transform: translateX(-15px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Container --- */
.ci-premium-blog {
    max-width: 1060px;
    margin: -20px auto 60px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.9;
    color: #3d4556;
}

/* --- Intro Block --- */
.ci-premium-blog .ci-intro {
    background: linear-gradient(135deg, #0e194f 0%, #1a3a7a 100%);
    color: #fff;
    padding: 48px 44px;
    border-radius: 16px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(14, 25, 79, 0.2);
    animation: ciFadeUp 0.8s ease-out both;
}

.ci-premium-blog .ci-intro::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.ci-premium-blog .ci-intro p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 1em;
    position: relative;
    z-index: 1;
}

.ci-premium-blog .ci-intro p:last-child { margin-bottom: 0; }

.ci-premium-blog .ci-intro a {
    color: #8cc4ff;
    border-bottom: 1px solid rgba(140, 196, 255, 0.4);
}
.ci-premium-blog .ci-intro a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* --- Body Text --- */
.ci-premium-blog p {
    margin-bottom: 1.5em;
    color: #3d4556;
}

.ci-premium-blog a {
    color: #1a5cb5;
    text-decoration: none;
    border-bottom: 1px solid rgba(26, 92, 181, 0.2);
    transition: all 0.25s ease;
}
.ci-premium-blog a:hover {
    color: #0e194f;
    border-bottom-color: #0e194f;
}

.ci-premium-blog strong {
    color: #1a2040;
    font-weight: 600;
}

/* --- Headings --- */
.ci-premium-blog h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.65em;
    font-weight: 800;
    color: #0e194f;
    margin-top: 3em;
    margin-bottom: 0.7em;
    letter-spacing: -0.03em;
    position: relative;
    padding-left: 20px;
    animation: ciFadeUp 0.6s ease-out both;
}

.ci-premium-blog h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    width: 4px;
    height: 80%;
    background: linear-gradient(180deg, #2563eb 0%, #0e194f 100%);
    border-radius: 4px;
}

.ci-premium-blog h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2em;
    font-weight: 700;
    color: #0e194f;
    margin-top: 2em;
    margin-bottom: 0.5em;
    letter-spacing: -0.01em;
}

/* --- Lists --- */
.ci-premium-blog ul,
.ci-premium-blog ol {
    margin-bottom: 1.5em;
    padding-left: 0;
    list-style: none;
}

.ci-premium-blog ul li,
.ci-premium-blog ol li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    color: #3d4556;
}

.ci-premium-blog ul li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 10px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #0e194f 100%);
    border-radius: 50%;
}

.ci-premium-blog ol { counter-reset: ci-counter; }
.ci-premium-blog ol li { counter-increment: ci-counter; }
.ci-premium-blog ol li::before {
    content: counter(ci-counter);
    position: absolute;
    left: 0; top: 0;
    width: 24px; height: 24px;
    background: linear-gradient(135deg, #0e194f 0%, #1a3a7a 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.ci-premium-blog li strong { color: #0e194f; }

/* --- Tables --- */
.ci-premium-blog table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5em 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(14, 25, 79, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(14, 25, 79, 0.06);
    animation: ciFadeUp 0.7s ease-out both;
}

.ci-premium-blog thead tr {
    background: linear-gradient(135deg, #0e194f 0%, #1a3a7a 100%) !important;
}

.ci-premium-blog thead th {
    padding: 18px 24px !important;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: none !important;
    text-align: left;
    background: transparent !important;
}

.ci-premium-blog tbody td {
    padding: 16px 24px !important;
    font-size: 15px;
    color: #3d4556 !important;
    border: none !important;
    border-bottom: 1px solid rgba(14, 25, 79, 0.05) !important;
    background: transparent !important;
    transition: background 0.25s ease;
}

.ci-premium-blog tbody tr {
    background: #ffffff !important;
    transition: background 0.25s ease;
}
.ci-premium-blog tbody tr:nth-child(even) { background: #f8f9fd !important; }
.ci-premium-blog tbody tr:hover { background: #eef2fb !important; }
.ci-premium-blog tbody tr:last-child td { border-bottom: none !important; }

/* --- Callout Box --- */
.ci-premium-blog .ci-callout {
    background: linear-gradient(135deg, #f4f7fc 0%, #eaf0f9 100%);
    border-radius: 16px;
    padding: 32px 36px;
    margin: 2.5em 0;
    position: relative;
    border: 1px solid rgba(14, 25, 79, 0.06);
    box-shadow: 0 2px 12px rgba(14, 25, 79, 0.04);
}

.ci-premium-blog .ci-callout::before {
    content: 'COMMERCIAL';
    position: absolute;
    top: -11px;
    left: 28px;
    background: linear-gradient(135deg, #0e194f 0%, #1a3a7a 100%);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 14px;
    border-radius: 20px;
}

.ci-premium-blog .ci-callout p { color: #3d4556; margin-bottom: 0.8em; }
.ci-premium-blog .ci-callout p:last-child { margin-bottom: 0; }

/* --- CTA Button --- */
.ci-premium-blog .ci-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0e194f 0%, #1a3a7a 100%);
    color: #ffffff !important;
    padding: 18px 40px;
    border-radius: 60px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    border: none !important;
    text-decoration: none !important;
    letter-spacing: 0.02em;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(14, 25, 79, 0.25);
    margin: 1em 0;
}
.ci-premium-blog .ci-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(14, 25, 79, 0.35);
    background: linear-gradient(135deg, #162566 0%, #2a50a0 100%);
    color: #ffffff !important;
    border: none !important;
}
.ci-premium-blog .ci-cta::after {
    content: '\2192';
    font-size: 18px;
    transition: transform 0.3s ease;
}
.ci-premium-blog .ci-cta:hover::after {
    transform: translateX(4px);
}

/* --- Series Links --- */
.ci-premium-blog .ci-series {
    background: #f8f9fd;
    border-radius: 16px;
    padding: 28px 32px;
    margin-top: 2.5em;
    border: 1px solid rgba(14, 25, 79, 0.06);
}
.ci-premium-blog .ci-series-title {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0e194f;
    margin-bottom: 12px;
}
.ci-premium-blog .ci-series ul { margin: 0; }
.ci-premium-blog .ci-series li::before {
    background: #2563eb;
    width: 6px; height: 6px;
    top: 12px;
}

/* --- Disclaimer --- */
.ci-premium-blog .ci-disclaimer {
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid rgba(14, 25, 79, 0.06);
    font-size: 13px;
    color: #8a94a6;
    font-style: italic;
}

/* --- Divider --- */
.ci-premium-blog hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(14, 25, 79, 0.12) 50%, transparent 100%);
    margin: 3em 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .ci-premium-blog { font-size: 16px; padding: 0 8px; }
    .ci-premium-blog .ci-intro { padding: 32px 24px; border-radius: 12px; }
    .ci-premium-blog h2 { font-size: 1.35em; margin-top: 2.2em; }
    .ci-premium-blog table { font-size: 14px; border-radius: 12px; }
    .ci-premium-blog thead th,
    .ci-premium-blog tbody td { padding: 12px 14px !important; }
    .ci-premium-blog .ci-cta { display: flex; justify-content: center; }
    .ci-premium-blog .ci-callout { padding: 28px 24px; border-radius: 12px; }
}


/* --- Hide default post meta on premium posts --- */
article:has(.ci-premium-blog) p.post-meta {
    display: none !important;
}

/* --- Full-width layout on premium posts (hide empty sidebar) --- */
@media (min-width: 981px) {
    body:has(.ci-premium-blog) #sidebar {
        display: none !important;
    }
    body:has(.ci-premium-blog) #left-area {
        width: 100% !important;
        padding-right: 0 !important;
        float: none !important;
    }
    body:has(.ci-premium-blog) #main-content .container:before {
        display: none !important;
    }
}

/* --- Sticky CTA Sidebar --- */
.ci-sticky-cta {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: ciFadeUp 0.8s ease-out 1s both;
}

.ci-sticky-cta a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.ci-sticky-cta a:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.ci-sticky-cta .ci-sticky-quote {
    background: linear-gradient(135deg, #0e194f 0%, #1a3a7a 100%);
    color: #ffffff !important;
}

.ci-sticky-cta .ci-sticky-call {
    background: #ffffff;
    color: #0e194f !important;
    border: 1px solid rgba(14, 25, 79, 0.1) !important;
}

.ci-sticky-cta .ci-sticky-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Hide sticky CTA on mobile/tablet */
@media (max-width: 1200px) {
    .ci-sticky-cta {
        display: none;
    }
}
