/**
 * OCD.app Blog/Resources Page Styles
 * Apple-style design for blog archive and single posts
 */

/* ===== BLOG ARCHIVE PAGE ===== */
.blog .wp-site-blocks,
.archive .wp-site-blocks,
.category .wp-site-blocks,
.tag .wp-site-blocks {
    background: #f5f5f7 !important;
    padding-top: 100px !important;
}

/* Category/Archive page header spacing */
.category .wp-site-blocks > header:first-of-type,
.archive .wp-site-blocks > header:first-of-type,
.category .wp-site-blocks > .wp-block-group:first-of-type:not(.alignfull),
.archive .wp-site-blocks > .wp-block-group:first-of-type:not(.alignfull) {
    padding-top: 40px !important;
}

/* Page title styling */
.blog .wp-block-query-title,
.archive .wp-block-query-title,
.blog h1.wp-block-heading,
.archive h1.wp-block-heading {
    font-size: clamp(32px, 5vw, 48px) !important;
    font-weight: 700 !important;
    text-align: center !important;
    color: #1d1d1f !important;
    margin-bottom: 40px !important;
    letter-spacing: -0.02em !important;
}

/* Post grid container */
.wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
    gap: 32px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
}

/* Individual post card */
.wp-block-post {
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
}

.wp-block-post:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

/* Featured image */
.wp-block-post-featured-image {
    margin: 0 !important;
    aspect-ratio: 16/10 !important;
    overflow: hidden !important;
}

.wp-block-post-featured-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    transition: transform 0.4s ease !important;
}

.wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.05) !important;
}

/* Post content area */
.wp-block-post > .wp-block-group,
.wp-block-post > div:not(.wp-block-post-featured-image) {
    padding: 24px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Post title */
.wp-block-post-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #1d1d1f !important;
    margin: 0 0 12px 0 !important;
    letter-spacing: -0.01em !important;
}

.wp-block-post-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.wp-block-post-title a:hover {
    color: #0071e3 !important;
}

/* Post excerpt - limit to 3 lines */
.wp-block-post-excerpt,
.wp-block-post-excerpt__excerpt {
    font-size: 15px !important;
    line-height: 1.6 !important;
    color: #6e6e73 !important;
    margin: 0 0 16px 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wp-block-post-excerpt {
    flex: unset !important;
}

/* Post date */
.wp-block-post-date {
    font-size: 13px !important;
    color: #86868b !important;
    margin: 0 !important;
}

/* Read more link */
.wp-block-post-excerpt__more-link,
.wp-block-read-more {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0071e3 !important;
    text-decoration: none !important;
    margin-top: 12px !important;
    padding: 8px 0 !important;
}

.wp-block-post-excerpt__more-link::after,
.wp-block-read-more::after {
    content: '→' !important;
    transition: transform 0.2s ease !important;
}

.wp-block-post-excerpt__more-link:hover,
.wp-block-read-more:hover {
    text-decoration: none !important;
}

.wp-block-post-excerpt__more-link:hover::after,
.wp-block-read-more:hover::after {
    transform: translateX(4px) !important;
}

/* Categories/Tags */
.wp-block-post-terms {
    font-size: 12px !important;
    color: #86868b !important;
    margin-bottom: 8px !important;
}

.wp-block-post-terms a {
    color: #0071e3 !important;
    text-decoration: none !important;
}

/* Pagination */
.wp-block-query-pagination {
    margin-top: 48px !important;
    justify-content: center !important;
    gap: 8px !important;
}

.wp-block-query-pagination-numbers .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #1d1d1f !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.wp-block-query-pagination-numbers .page-numbers:hover {
    background: #0071e3 !important;
    color: #ffffff !important;
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background: #0071e3 !important;
    color: #ffffff !important;
}

/* ===== SINGLE POST PAGE ===== */
.single-post .wp-site-blocks {
    background: #ffffff !important;
}

.single-post .wp-block-post-featured-image {
    margin: 0 auto 40px !important;
    max-width: 900px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.single-post .wp-block-post-featured-image img {
    border-radius: 20px !important;
}

.single-post .entry-content,
.single-post .wp-block-post-content {
    max-width: 720px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
}

.single-post .entry-content p,
.single-post .wp-block-post-content p {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #1d1d1f !important;
    margin-bottom: 1.5em !important;
}

.single-post .entry-content h2,
.single-post .wp-block-post-content h2 {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    margin: 48px 0 24px !important;
    letter-spacing: -0.02em !important;
}

.single-post .entry-content h3,
.single-post .wp-block-post-content h3 {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    margin: 40px 0 20px !important;
}

.single-post .entry-content img,
.single-post .wp-block-post-content img {
    border-radius: 12px !important;
}

.single-post .entry-content blockquote,
.single-post .wp-block-post-content blockquote {
    border-left: 4px solid #0071e3 !important;
    padding-left: 24px !important;
    margin: 32px 0 !important;
    font-style: italic !important;
    color: #6e6e73 !important;
}

.single-post .entry-content ul,
.single-post .entry-content ol,
.single-post .wp-block-post-content ul,
.single-post .wp-block-post-content ol {
    padding-left: 24px !important;
    margin-bottom: 1.5em !important;
}

.single-post .entry-content li,
.single-post .wp-block-post-content li {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: #1d1d1f !important;
    margin-bottom: 8px !important;
}

/* ===== GLOBAL IMAGE STYLES ===== */
.wp-block-image img,
article img,
.entry-content img {
    border-radius: 12px !important;
}

.wp-block-gallery img {
    border-radius: 8px !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .wp-block-post-template {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 0 16px !important;
    }

    .wp-block-post > .wp-block-group,
    .wp-block-post > div:not(.wp-block-post-featured-image) {
        padding: 20px !important;
    }

    .wp-block-post-title {
        font-size: 18px !important;
    }

    .single-post .entry-content p,
    .single-post .wp-block-post-content p {
        font-size: 16px !important;
    }
}
