/* Blog Styles - WiseMom */

:root {
    --primary-pink: #ec407a;
    --primary-pink-light: #f8bbd9;
    --primary-pink-dark: #c2185b;
    --accent-pink: #f06292;
    --bg-pink: #fef5f8;
    --bg-pink-light: #fff9fb;
    --white: #ffffff;
    --text-dark: #2d2d2d;
    --text-gray: #666666;
    --text-light: #888888;
    --font-primary: 'Poppins', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 50px;
    --shadow-sm: 0 2px 8px rgba(236, 64, 122, 0.1);
    --shadow-md: 0 4px 20px rgba(236, 64, 122, 0.15);
    --shadow-lg: 0 8px 40px rgba(236, 64, 122, 0.2);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: var(--bg-pink-light);
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul,
ol {
    padding-left: 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== Reading Progress Bar (1d) ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-pink), var(--accent-pink));
    width: 0%;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ===== Header ===== */
.blog-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-pink);
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
}

.nav-link {
    color: var(--text-gray);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-pink);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-pink);
}

/* ===== Hamburger Menu (1a) ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    margin: 5px 0;
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Breadcrumbs (1e) ===== */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--primary-pink);
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    opacity: 0.5;
}

.breadcrumb .current {
    color: var(--text-gray);
    font-weight: 500;
}

/* ===== Blog Hero (1b) ===== */
.blog-hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-pink-light) 0%, var(--bg-pink) 100%);
    position: relative;
    overflow: hidden;
}

.blog-hero::before,
.blog-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: heroFloat 6s ease-in-out infinite;
}

.blog-hero::before {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-pink), transparent 70%);
    top: -80px;
    right: -60px;
}

.blog-hero::after {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-pink), transparent 70%);
    bottom: -50px;
    left: -40px;
    animation-delay: -3s;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.blog-hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    position: relative;
}

.blog-hero p {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
    position: relative;
}

/* ===== Blog Index ===== */
.blog-list {
    padding: 4rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* ===== Post Cards (1c) ===== */
.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.post-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-pink-light);
}

.post-card-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-pink-light) 0%, var(--accent-pink) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
}

.post-card-image .post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.post-card-image .emoji-circle, 
.post-card-image .post-card-category-overlay {
    z-index: 1;
}

.post-card-image .emoji-circle {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.post-card-image .post-card-category-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--primary-pink-dark);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-pink-light);
    color: var(--primary-pink-dark);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
}

.post-card-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-card-content h2 a:hover {
    color: var(--primary-pink);
}

.post-card-excerpt {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ===== Single Post ===== */
.blog-post {
    padding-bottom: 4rem;
}

.post-header {
    padding: 4rem 0 2rem;
    background: linear-gradient(135deg, var(--bg-pink-light) 0%, var(--bg-pink) 100%);
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-category {
    background: var(--primary-pink-light);
    color: var(--primary-pink-dark);
    padding: 0.25rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
}

.post-date,
.post-reading-time {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.post-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--text-dark);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.post-description {
    font-size: 1.2rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.post-author {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--white);
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-pink) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.author-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.author-info span:first-child {
    font-weight: 600;
    font-size: 0.95rem;
}

.author-info span:last-child {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== Post Content Typography (1g) ===== */
.post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: -2rem;
    position: relative;
    line-height: 1.8;
}

.post-featured-img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2.5rem;
}

.post-content h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-dark);
    padding-left: 1rem;
    border-left: 4px solid var(--primary-pink);
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-dark);
}

.post-content p {
    margin-bottom: 1.5rem;
    color: var(--text-gray);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    color: var(--text-gray);
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: var(--primary-pink);
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-pink);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-gray);
    background: var(--bg-pink);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-content img {
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.post-content code {
    background: var(--bg-pink);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--text-dark);
    color: var(--bg-pink-light);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== Post Footer ===== */
.post-footer {
    padding: 2rem 0 0;
}

/* ===== Share Buttons (1f) ===== */
.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-pink);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--primary-pink);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.share-buttons a:hover {
    background: var(--primary-pink-dark);
    transform: translateY(-1px);
}

.share-buttons a svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===== Post Navigation ===== */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.nav-prev,
.nav-next {
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.nav-prev:hover,
.nav-next:hover {
    box-shadow: var(--shadow-md);
}

.nav-prev span,
.nav-next span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.nav-prev strong,
.nav-next strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--primary-pink);
}

.nav-next {
    text-align: right;
}

.back-to-blog {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary:hover {
    background: var(--text-dark);
    color: var(--white);
}

/* ===== Back to Top Button (1h) ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary-pink);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-pink-dark);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ===== Footer (1i) ===== */
.blog-footer {
    padding: 0;
    background: var(--text-dark);
    color: var(--white);
    position: relative;
}

.footer-gradient-divider {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-pink), var(--accent-pink), var(--primary-pink-light));
}

.footer-inner {
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--primary-pink);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    fill: var(--white);
}

.footer-links-section h4 {
    margin-bottom: 1rem;
}

.footer-links-section ul {
    list-style: none;
    padding: 0;
}

.footer-links-section li {
    margin-bottom: 0.5rem;
}

.footer-links-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links-section a:hover {
    color: var(--primary-pink-light);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.footer-legal a:hover {
    color: var(--primary-pink-light);
}

/* ===== Responsive (1j) ===== */

/* Tablet */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .nav-prev,
    .nav-next {
        text-align: center;
    }

    .nav-next {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Mobile menu */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        list-style: none;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--bg-pink);
        font-size: 1.1rem;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    .mobile-overlay.active {
        display: block;
    }
}
