/* ==========================================================================
   css/blog.css — Shared styles for all Dwelco blog posts
   Loaded by: your-home-is-your-most-valuable-asset.html,
              from-home-chaos-to-digital-control.html
   (and any future blog posts)
   ========================================================================== */

/* ── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
    --slate-900: #f8fafc;
    --slate-800: #ffffff;
    --slate-700: #e2e8f0;
    --slate-400: #64748b;
    --slate-300: #334155;
    --sky-500: #0284c7;
    --sky-400: #0ea5e9;
    --sky-300: #38bdf8;
    --cyan-400: #06b6d4;
    --emerald-400: #10b981;
    --white: #0f172a;
}

/* ── RESET & BASE ────────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--slate-900);
    color: var(--slate-300);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--white);
}

/* ── READING PROGRESS BAR ────────────────────────────────────────────────── */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sky-500), var(--cyan-400));
    width: 0%;
    z-index: 2000;
    transition: width 0.1s linear;
}

/* ── SKIP LINK ───────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute; top: -100%; left: 1rem;
    background: var(--sky-500); color: #fff;
    padding: .75rem 1.5rem; border-radius: 0 0 12px 12px;
    font-weight: 700; font-size: .95rem; text-decoration: none;
    z-index: 9999; transition: top .2s;
}
.skip-link:focus { top: 0; outline: 3px solid var(--sky-400); outline-offset: 2px; }

/* ── NAVIGATION ──────────────────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 3px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.1);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
}
.nav-logo img { height: 38px; border-radius: 8px; }
.nav-logo span { font-family: 'Outfit', sans-serif; font-size: 1.55rem; font-weight: 800; color: var(--white); }

.nav-links {
    display: flex;
    gap: 2.25rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--slate-300);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--sky-500); }
.nav-links a.active { color: var(--sky-500); }

.nav-cta { display: flex; gap: .75rem; align-items: center; }

.btn {
    display: inline-flex; align-items: center; gap: .6rem;
    padding: .9rem 2rem; border-radius: 14px;
    font-weight: 700; font-size: 1rem;
    cursor: pointer; transition: all .25s ease;
    border: none; text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--sky-500), var(--sky-400));
    color: #fff;
    box-shadow: 0 4px 18px rgba(2, 132, 199, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(2, 132, 199, 0.45); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: var(--slate-300);
    border-radius: 2px;
    transition: all .3s;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Mobile nav close button */
.nav-close-item { display: none; }

.nav-links-close {
    width: 44px; height: 44px;
    background: rgba(14, 165, 233, 0.1);
    border: 1.5px solid rgba(2, 132, 199, 0.2);
    border-radius: 50%;
    font-size: 1.5rem; line-height: 1;
    cursor: pointer; color: var(--sky-500);
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.nav-links-close:hover { background: rgba(2, 132, 199, 0.15); }

/* ── BLOG HERO ───────────────────────────────────────────────────────────── */
.blog-hero {
    padding: 9rem 2rem 4rem;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    text-align: center;
}

.blog-category-badge {
    display: inline-block;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--sky-500);
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    max-width: 900px;
    margin: 0 auto 2rem;
    line-height: 1.15;
    background: linear-gradient(135deg, var(--white), var(--sky-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.blog-author-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--sky-300);
}

.blog-meta-text { text-align: left; }

.blog-author {
    display: block;
    font-weight: 700;
    color: var(--white);
    font-size: 1rem;
}

.blog-date {
    display: block;
    color: var(--slate-400);
    font-size: 0.875rem;
}

/* ── HERO IMAGE ──────────────────────────────────────────────────────────── */
.blog-hero-image {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-hero-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

/* ── ARTICLE LAYOUT ──────────────────────────────────────────────────────── */
article.blog-article {
    max-width: 760px;
    margin: 3rem auto;
    padding: 0 2rem 4rem;
}

.blog-intro {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--slate-300);
    margin-bottom: 2.5rem;
    border-left: 4px solid var(--sky-500);
    padding-left: 1.5rem;
}

article p {
    font-size: 1.1rem;
    line-height: 1.85;
    margin-bottom: 1.5rem;
    color: var(--slate-300);
}

article h2 {
    font-size: 1.9rem;
    margin: 3rem 0 1rem;
    color: var(--white);
}

article h3 {
    font-size: 1.4rem;
    margin: 2rem 0 0.75rem;
    color: var(--sky-500);
}

/* ── PULL QUOTE ──────────────────────────────────────────────────────────── */
.pull-quote {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 5px solid var(--sky-500);
    border-radius: 0 16px 16px 0;
    padding: 1.75rem 2rem;
    margin: 2.5rem 0;
}

.pull-quote p {
    font-family: 'Lora', serif;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--sky-500);
    margin: 0;
    line-height: 1.6;
}

.pull-quote cite {
    display: block;
    font-size: 0.875rem;
    color: var(--slate-400);
    font-style: normal;
    margin-top: 0.75rem;
    font-weight: 600;
}

/* ── STAT CALLOUT ────────────────────────────────────────────────────────── */
.stat-callout {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--slate-800);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: 20px;
    padding: 1.75rem 2rem;
    margin: 2.5rem 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--sky-500);
    line-height: 1;
    white-space: nowrap;
}

.stat-label {
    font-size: 1rem;
    color: var(--slate-300);
    line-height: 1.5;
}

.stat-label strong { color: var(--white); }

/* ── IMAGE BREAK ─────────────────────────────────────────────────────────── */
.image-break {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* picture is inline by default — make it a block so it fills its container */
picture {
    display: block;
    width: 100%;
}

.image-break img {
    width: 100%;
    height: auto; /* override HTML height attr — prevents stretching on mobile */
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    display: block;
}

.image-caption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--slate-400);
    margin-top: 0.75rem;
    font-style: italic;
}

/* ── HIGHLIGHT BOX ───────────────────────────────────────────────────────── */
.highlight-box {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #e2e8f0;
    border-radius: 24px;
    padding: 2.5rem;
    margin: 3rem 0;
    text-align: center;
}

.highlight-box h3 {
    color: var(--sky-300);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.highlight-box p {
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto 1.5rem;
}

/* ── CTA BUTTON ──────────────────────────────────────────────────────────── */
.blog-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    color: #ffffff;
    padding: 1.1rem 2.25rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

.blog-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
}

/* ── SECTION DIVIDER ─────────────────────────────────────────────────────── */
.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sky-300), transparent);
    margin: 3rem 0;
    opacity: 0.4;
}

/* ── BACK LINK ───────────────────────────────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sky-500);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    transition: gap 0.2s ease;
}

.back-link:hover { gap: 0.75rem; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 4rem 2rem 2rem;
    font-size: 0.9rem;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto 3rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer-brand h4 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand p { max-width: 300px; margin-bottom: 1.5rem; }

.footer-col h5 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #94a3b8; text-decoration: none; transition: color 0.2s ease; }
.footer-links a:hover { color: white; }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ── STICKY BOTTOM CTA BAR ───────────────────────────────────────────────── */
#sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: #0f172a;
    border-top: 1px solid rgba(14, 165, 233, 0.25);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

#sticky-cta.visible {
    transform: translateY(0);
}

.sticky-cta-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.sticky-cta-logo {
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
}

.sticky-cta-copy {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-cta-copy strong {
    color: #e2e8f0;
    font-weight: 600;
}

.sticky-cta-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sticky-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.35);
}

.sticky-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.5);
}

.sticky-cta-dismiss {
    background: none;
    border: none;
    color: #475569;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

.sticky-cta-dismiss:hover { color: #94a3b8; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-inner { padding: 1rem 1.5rem; }
    .menu-toggle { display: flex; padding: 10px; }
    .nav-cta { display: none; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }

    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.4rem; font-weight: 700; color: var(--white); }

    .nav-close-item {
        display: block;
        list-style: none;
        position: absolute;
        top: 1.1rem;
        right: 1.25rem;
    }

    .blog-hero { padding: 7rem 1.5rem 3rem; }
    .blog-hero-image { padding: 0 1.25rem; }
    .blog-hero-image img { height: 220px; object-fit: cover; border-radius: 16px; }
    .image-break { padding: 0 0; }
    article.blog-article { padding: 0 1.25rem 3rem; }

    .stat-callout { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

    #sticky-cta { padding: 0.75rem 1.25rem; gap: 0.75rem; }
    .sticky-cta-copy { display: none; }
    .sticky-cta-logo { height: 28px; }
}
