/* --- TECH / CLEAN DESIGN --- */
:root {
    --page-bg: #EFEFEF;
    --page-text: #334155;
    --page-heading: #0f172a;
    --page-accent: var(--c-primary);
    --page-surface: #ffffff;
    --page-border: #e2e8f0;
}

body {
    background-color: var(--page-bg);
    color: var(--page-text);
    font-family: var(--font-main);
}

.cms-page-wrapper {
    width: 100%;
    min-height: 80vh;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-section {
    position: relative;
    padding: 4rem 1.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.container-reading {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.container-wide {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* --- BLOCKS STYLING --- */

/* 1. HERO BLOCK */
.block-hero {
    padding: 6rem 1.5rem;
    background: var(--page-surface);
    border-bottom: 1px solid var(--page-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 2rem;
}
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--page-heading);
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--page-heading) 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* 2. TEXT BLOCK */
.block-text {
    color: var(--page-text);
    font-size: 1.1rem;
    line-height: 1.8;
}
.block-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--page-heading);
    letter-spacing: -0.02em;
}
.block-text h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--page-heading);
}
.block-text p {
    margin-bottom: 1.5rem;
}
.block-text ul, .block-text ol {
    margin-bottom: 1.5rem;
    padding-inline-start: 1.5rem;
}
.block-text li {
    margin-bottom: 0.5rem;
}
.block-text a {
    color: var(--page-accent);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s;
}
.block-text a:hover { opacity: 0.8; }
.block-text blockquote {
    border-inline-start: 4px solid var(--page-accent);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    font-style: italic;
    color: var(--page-heading);
    background: #fff;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
[dir="rtl"] .block-text blockquote {
    border-radius: 8px 0 0 8px;
}

/* 3. IMAGE BLOCK */
.block-image {
    text-align: center;
    padding: 2rem 1.5rem;
}
.img-card {
    background: var(--page-surface);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid var(--page-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    display: inline-block;
    max-width: 100%;
}
.img-card img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.img-caption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

/* 4. CTA BLOCK */
.block-cta {
    text-align: center;
    padding: 4rem 1.5rem;
}
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--page-heading);
    color: #fff;
    padding: 1.25rem 3.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cta-btn:hover {
    background: var(--page-accent);
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Draft Badge */
.draft-badge {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.5s ease-out;
}
@keyframes slideDown { from { transform: translate(-50%, -100%); } to { transform: translate(-50%, 0); } }

/* Empty State */
.empty-page {
    text-align: center;
    padding: 6rem 2rem;
    background: var(--page-surface);
    border: 2px dashed var(--page-border);
    border-radius: 16px;
    margin: 4rem auto;
    max-width: 600px;
}
