/* ============================================
   BLOG.CSS — Snoooze Blog Post Pages
   Shared across blog-morning-routine.html,
   blog-mattress-clean.html, blog-sleep-sanctuary.html
   ============================================ */

/* ------------------------------------------
   Page base override for blog pages
   (light background instead of site default)
   ------------------------------------------ */
body.blog-page {
    background-color: #ffffff;
    color: #222222;
}

/* --- Header / Nav overrides for blog pages --- */
body.blog-page header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent !important;
    box-shadow: none !important;
}

body.blog-page nav ul li a {
    color: rgba(255, 255, 255, 0.85);
}

body.blog-page nav ul li a:hover,
body.blog-page nav ul li a.active {
    color: #ffffff;
}

body.blog-page .btn-transparent {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

body.blog-page .btn-transparent:hover {
    background-color: #E1A624;
    border-color: #E1A624;
    color: #ffffff;
}

body.blog-page .menu-toggle i {
    color: #ffffff;
}

/* ------------------------------------------
   BLOG HERO
   ------------------------------------------ */
.blog-hero {
    padding: 140px 5% 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animated ghost watermark text */
.blog-hero::before {
    position: absolute;
    font-size: 17vw;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.045);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0.08em;
    line-height: 1;
    animation: ghostDrift 18s ease-in-out infinite alternate;
}

@keyframes ghostDrift {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        transform: translate(-48%, -52%) scale(1.04);
    }
}

/* Variant ghost words per page (set via data-ghost attribute handled by JS, or use page classes) */
.blog-hero.hero-morning::before {
    content: 'morning';
}

.blog-hero.hero-clean::before {
    content: 'clean';
}

.blog-hero.hero-sanctuary::before {
    content: 'sanctuary';
}

/* Hero colour themes */
.blog-hero.hero-morning {
    background: linear-gradient(135deg, #1a2a2a 0%, #2d4a4a 55%, #3d6060 100%);
}

.blog-hero.hero-clean {
    background: linear-gradient(135deg, #1c1a2e 0%, #2e2a4a 55%, #3d3860 100%);
}

.blog-hero.hero-sanctuary {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
}

/* Category badge */
.blog-meta {
    display: inline-block;
    color: #F8C340;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    background: rgba(248, 195, 64, 0.12);
    border: 1px solid rgba(248, 195, 64, 0.3);
    padding: 0.35rem 1.1rem;
    border-radius: 30px;
}

.blog-hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 3.2rem);
    color: #ffffff;
    font-weight: 800;
    line-height: 1.25;
    max-width: 780px;
    margin: 0 auto 1.6rem;
    letter-spacing: -0.01em;
}

.blog-author-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.blog-author-row span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.blog-author-row i {
    color: #F8C340;
}

/* Decorative divider wave under hero */
.blog-hero-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.blog-hero-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}

/* ------------------------------------------
   BLOG POST BODY
   ------------------------------------------ */
.blog-post-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 5% 100px;
}

/* Back button */
.blog-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #607C8B;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border: 2px solid #607C8B;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
}

.blog-back-btn:hover {
    background: #b5b5b5;
    color: #fff;
    transform: translateX(-3px);
}

.blog-back-btn i {
    transition: transform 0.3s;
}

.blog-back-btn:hover i {
    transform: translateX(-4px);
}

/* Featured image */
.blog-post-body .featured-img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 3.2rem;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.13);
    transition: transform 0.5s ease;
}

.blog-post-body .featured-img:hover {
    transform: scale(1.01);
}

/* Headings */
.blog-post-body h2 {
    font-size: 1.65rem;
    color: #1a2a2a;
    font-weight: 800;
    margin: 2.8rem 0 1rem;
    position: relative;
    padding-left: 1.1rem;
}

.blog-post-body h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: #F8C340;
    border-radius: 4px;
}

/* Body text */
.blog-post-body p {
    font-size: 1.06rem;
    color: #4a4a4a;
    line-height: 1.95;
    margin-bottom: 1.5rem;
}

/* Tip / highlight box */
.tip-box {
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 2rem;
    margin: 2.2rem 0;
    position: relative;
    overflow: hidden;
}

/* Colour variants tied to hero theme — handled via page-level class on body */
body.blog-page.morning .tip-box {
    background: linear-gradient(135deg, #f0f7f7, #e8f4f4);
    border-left: 4px solid #2d4a4a;
}

body.blog-page.morning .tip-box p {
    color: #2d4a4a;
}

body.blog-page.clean .tip-box {
    background: linear-gradient(135deg, #f4f0fa, #ede8f8);
    border-left: 4px solid #2e2a4a;
}

body.blog-page.clean .tip-box p {
    color: #2e2a4a;
}

body.blog-page.sanctuary .tip-box {
    background: linear-gradient(135deg, #eef4fb, #e4eef8);
    border-left: 4px solid #0f3460;
}

body.blog-page.sanctuary .tip-box p {
    color: #0f3460;
}

.tip-box p {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.7;
}

.tip-box p::before {
    content: '💡  ';
}

/* Bullet lists */
.blog-post-body ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem;
    border: 1px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
}

.blog-post-body ul li {
    padding: 0.9rem 1.2rem 0.9rem 2.6rem;
    position: relative;
    color: #4a4a4a;
    font-size: 1.02rem;
    line-height: 1.7;
    border-bottom: 1px solid #f4f4f4;
    transition: background 0.2s;
}

.blog-post-body ul li:last-child {
    border-bottom: none;
}

.blog-post-body ul li:hover {
    background: #fffdf5;
}

.blog-post-body ul li::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 9px;
    background: #F8C340;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(248, 195, 64, 0.2);
}

/* Tags */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 3.2rem 0 2.4rem;
}

.blog-tags span {
    background: #f4f4f4;
    color: #555;
    padding: 0.45rem 1.1rem;
    border-radius: 30px;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: default;
    transition: background 0.2s, color 0.2s;
}

.blog-tags span:hover {
    background: #F8C340;
    color: #222;
}

/* ------------------------------------------
   FEATURE GRIDS (steps, pillars)
   ------------------------------------------ */
.steps-grid,
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 1.2rem;
    margin: 2.2rem 0;
}

.step-card,
.pillar-card {
    border-radius: 16px;
    padding: 1.6rem 1.2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.step-card:hover,
.pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.09);
}

.step-card {
    background: #f8f9fb;
    border-color: #eef0f4;
}

.pillar-card {
    background: linear-gradient(135deg, #f8f9ff, #f0f3ff);
    border-color: #e4e8ff;
}

.step-card .step-icon,
.pillar-card .icon {
    font-size: 2.2rem;
    margin-bottom: 0.9rem;
    display: block;
}

.step-card h4,
.pillar-card h4 {
    color: #1a2a2a;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.step-card p,
.pillar-card p {
    font-size: 0.88rem;
    color: #777;
    margin: 0;
    line-height: 1.55;
}

/* ------------------------------------------
   SHARE ROW
   ------------------------------------------ */
.blog-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.8rem 2rem;
    background: #f8f8f8;
    border-radius: 14px;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.blog-share p {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
}

.blog-share-btns {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    color: #fff;
}

.share-btn:hover {
    opacity: 0.85;
    transform: translateY(-2px);
}

.share-btn.fb {
    background: #1877f2;
}

.share-btn.wa {
    background: #25d366;
}

.share-btn.ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* ------------------------------------------
   RELATED POSTS SECTION
   ------------------------------------------ */
.related-posts {
    background: #f4f5f7;
    padding: 80px 5%;
}

.related-posts h3 {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 800;
    color: #1a2a2a;
    margin-bottom: 2.8rem;
    position: relative;
}

.related-posts h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: #F8C340;
    border-radius: 3px;
    margin: 0.7rem auto 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 920px;
    margin: 0 auto;
}

.related-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.13);
}

.related-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover img {
    transform: scale(1.04);
}

.related-card-content {
    padding: 1.4rem 1.6rem 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-card-content span {
    font-size: 0.78rem;
    color: #F8C340;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.5rem;
}

.related-card-content h4 {
    color: #1a2a2a;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    flex: 1;
}

.related-card-content .rc-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #607C8B;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 1rem;
    transition: color 0.2s, gap 0.2s;
}

.related-card:hover .rc-link {
    color: #E1A624;
    gap: 0.7rem;
}

/* ------------------------------------------
   RESPONSIVE
   ------------------------------------------ */
@media (max-width: 1024px) {
    .blog-hero {
        padding: 120px 5% 70px;
        text-align: left;
    }

    .blog-hero h1 {
        text-align: left;
        margin: 0 0 1.6rem;
    }

    .blog-author-row {
        justify-content: flex-start;
    }

    .blog-post-body .featured-img {
        height: 240px;
    }

    .blog-post-body h2 {
        font-size: 1.35rem;
        text-align: left;
    }

    .blog-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.6rem;
        text-align: left;
    }

    .blog-post-body {
        padding: 50px 5% 70px;
    }

    .related-posts {
        padding: 60px 5%;
    }

    .steps-grid,
    .pillars-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}