/* blog overlay */
#overlay-blog {
    right: auto;
    left: 50%;
    top: 50%;
    width: min(96%, 1200px);
    height: auto;
    transform: translate(-50%, -50%);
    align-items: flex-start;
    padding: 0;
}

#overlay-blog .section-content {
    width: 100%;
    max-height: 88vh;
    border-radius: 6px;
    border: 3px solid rgba(139, 111, 71, 0.18);
    background: rgba(243, 236, 222, 0.93);
    box-shadow:
        0 10px 50px rgba(74, 58, 40, 0.22),
        inset 0 0 50px rgba(255, 250, 240, 0.25);
    padding: 2.5rem 3rem;
}

#overlay-blog .section-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.06em;
    font-size: 1.8rem;
}

.blog-content {
    max-height: 88vh;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.blog-empty {
    font-size: 0.95rem;
    color: rgba(58, 42, 24, 0.5);
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
    grid-column: 1 / -1;
}

.blog-loading {
    font-size: 0.9rem;
    color: rgba(139, 111, 71, 0.5);
    text-align: center;
    padding: 2rem 0;
    grid-column: 1 / -1;
}

.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(255, 252, 245, 0.95);
    border: 1px solid rgba(139, 111, 71, 0.1);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 3px 10px rgba(74, 58, 40, 0.1);
    transform: rotate(var(--pin-angle, 0deg));
}

/* pin dot */
.blog-card::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e8c878, #8b6f47);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    z-index: 3;
}

.blog-card:hover {
    transform: scale(1.04) rotate(0deg);
    box-shadow: 4px 8px 24px rgba(74, 58, 40, 0.18);
    z-index: 2;
}

.blog-card-cover {
    width: 100%;
    height: 170px;
    background-size: cover;
    background-position: center;
    background-color: rgba(139, 111, 71, 0.08);
}

.blog-card-body {
    flex: 1;
    padding: 0.7rem 0.8rem 0.8rem;
    min-width: 0;
}

.blog-card-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #3a2a18 !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
    margin: 0 0 0.3rem 0 !important;
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 0.78rem !important;
    color: rgba(58, 42, 24, 0.55) !important;
    line-height: 1.45 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-read {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    color: rgba(139, 111, 71, 0.5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.blog-card:hover .blog-card-read {
    color: rgba(139, 111, 71, 0.9);
}

.blog-detail {
    margin-top: 0.5rem;
}

.blog-back-btn {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin-bottom: 1rem;
    background: rgba(139, 111, 71, 0.08);
    border: 1px solid rgba(139, 111, 71, 0.15);
    border-radius: 6px;
    color: #6b4f30;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.blog-back-btn:hover {
    background: rgba(139, 111, 71, 0.15);
    border-color: rgba(139, 111, 71, 0.3);
    transform: translateX(-3px);
}

#blog-article h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #3a2a18;
    margin-bottom: 1rem;
    line-height: 1.3;
}

#blog-article h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #3a2a18;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    text-transform: none;
    letter-spacing: 0;
}

#blog-article h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a3a28;
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

#blog-article p {
    font-size: 0.92rem;
    line-height: 1.75;
    color: rgba(58, 42, 24, 0.8);
    margin-bottom: 0.8rem;
}

#blog-article a {
    color: #6b4f30;
    text-decoration: none;
    border-bottom: 1px solid rgba(107, 79, 48, 0.3);
    transition: border-color 0.2s ease;
}

#blog-article a:hover {
    border-color: rgba(107, 79, 48, 0.7);
}

#blog-article ul,
#blog-article ol {
    margin: 0.8rem 0;
    padding-left: 1.2rem;
    list-style: disc;
}

#blog-article ul li::before {
    content: none;
}

#blog-article li {
    font-size: 0.9rem;
    color: rgba(58, 42, 24, 0.75);
    line-height: 1.6;
    margin-bottom: 0.3rem;
    padding: 0;
    border-bottom: none;
}

#blog-article blockquote {
    margin: 1rem 0;
    padding: 0.8rem 1rem;
    border-left: 3px solid rgba(139, 111, 71, 0.3);
    background: rgba(139, 111, 71, 0.04);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: rgba(58, 42, 24, 0.65);
}

#blog-article pre {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(58, 42, 24, 0.06);
    border: 1px solid rgba(139, 111, 71, 0.1);
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.5;
}

#blog-article code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    color: #5a3a1a;
    background: rgba(139, 111, 71, 0.06);
    padding: 0.15em 0.35em;
    border-radius: 3px;
}

#blog-article pre code {
    background: none;
    padding: 0;
    font-size: 1em;
}

#blog-article hr {
    border: none;
    border-top: 1px solid rgba(139, 111, 71, 0.15);
    margin: 1.5rem 0;
}

#blog-article img,
.blog-img {
    max-width: 100%;
    border-radius: 8px;
    margin: 0.8rem 0;
}

#blog-article strong {
    color: #3a2a18;
    font-weight: 600;
}

#blog-article em {
    font-style: italic;
    color: rgba(58, 42, 24, 0.7);
}

/* tablet */
@media (max-width: 900px) {
    #overlay-blog {
        width: 96%;
    }
    #overlay-blog .section-content {
        padding: 1.8rem 1.5rem;
        max-height: 86vh;
    }
    .blog-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.2rem;
    }
    .blog-card-cover {
        height: 140px;
    }
}

/* mobile */
@media (max-width: 540px) {
    #overlay-blog {
        width: 98%;
    }
    #overlay-blog .section-content {
        padding: 1.2rem 1rem;
        max-height: 90vh;
    }
    #overlay-blog .section-content h2 {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }
    .blog-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .blog-card-cover {
        height: 160px;
    }
}
