/* lime-blog - Additional Component Styles */

/* ===== Hero Section ===== */
.hero-section {
    padding: 60px 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px var(--main-shadow);
}

.hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    color: var(--key-color);
    line-height: 1.2;
}

.hero-greeting {
    font-size: 20px;
    color: var(--main-color);
    margin: 0;
}

.hero-bio {
    font-size: 16px;
    color: var(--muted-color);
    max-width: 500px;
    line-height: 1.8;
    margin: 0;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 100px;
}

.btn-primary {
    background: var(--theme-color);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--focus-shadow-color);
    opacity: 1;
}

.btn-secondary {
    background: var(--muted-bg-color);
    color: var(--main-color);
}

.btn-secondary:hover {
    background: var(--focus-shadow-color);
    color: var(--theme-color);
    transform: translateY(-2px);
}

/* ===== Section ===== */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--key-color);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-color);
    display: inline-block;
}

.section-content {
    font-size: 15px;
    line-height: 1.9;
    color: var(--main-color);
    max-width: 680px;
}

.about-section {
    padding: 50px 0;
}

/* ===== Posts Grid ===== */
.posts-list {
    padding: 40px 0;
}

.archive-header {
    margin-bottom: 30px;
}

.archive-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--key-color);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ===== Post Card ===== */
.post-card {
    background: var(--main-bg-color);
    border-radius: var(--main-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px var(--main-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--main-shadow);
}

.card-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

.post-card:hover .card-thumb img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: var(--key-color);
}

.card-title a:hover {
    color: var(--theme-color);
    opacity: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted-2-color);
    margin-bottom: 10px;
}

.card-cat {
    font-size: 12px;
    color: var(--muted-3-color);
}

.card-excerpt {
    font-size: 14px;
    color: var(--muted-color);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--main-color);
    border-radius: var(--main-radius);
    transition: background 0.2s, color 0.2s;
}

.pagination .page-numbers:hover {
    background: var(--focus-shadow-color);
    color: var(--theme-color);
}

.pagination .page-numbers.current {
    background: var(--theme-color);
    color: #fff;
}

.pagination .page-numbers.dots {
    background: transparent;
}

/* ===== Single Post ===== */
.post-article {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--key-color);
    line-height: 1.3;
    margin-bottom: 12px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted-2-color);
}

.post-featured-image {
    margin-bottom: 30px;
    border-radius: var(--main-radius);
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== Post Content ===== */
.post-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--main-color);
}

.post-content p {
    margin-bottom: 1.2em;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: var(--key-color);
    font-weight: 700;
    margin-top: 1.6em;
    margin-bottom: 0.8em;
    line-height: 1.4;
}

.post-content h1 { font-size: 1.8em; }
.post-content h2 { font-size: 1.5em; }
.post-content h3 { font-size: 1.3em; }
.post-content h4 { font-size: 1.1em; }

.post-content a {
    color: var(--theme-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    opacity: 0.8;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--main-radius);
    margin: 1em auto;
    display: block;
}

.post-content pre {
    background: var(--muted-bg-color);
    border-radius: var(--main-radius);
    padding: 16px 20px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1.2em;
    color: var(--main-color);
}

.post-content code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
    background: var(--muted-bg-color);
    padding: 2px 6px;
    border-radius: 4px;
}

.post-content pre code {
    background: transparent;
    padding: 0;
}

.post-content blockquote {
    border-left: 3px solid var(--theme-color);
    padding: 12px 20px;
    margin: 1.5em 0;
    color: var(--muted-color);
    background: var(--muted-bg-color);
    border-radius: 0 var(--main-radius) var(--main-radius) 0;
    font-size: 15px;
}

.post-content blockquote p {
    margin-bottom: 0;
}

.post-content ul,
.post-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.2em;
}

.post-content li {
    margin-bottom: 0.4em;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2em;
    font-size: 14px;
}

.post-content th,
.post-content td {
    border: 1px solid var(--main-border-color);
    padding: 10px 14px;
    text-align: left;
}

.post-content th {
    background: var(--muted-bg-color);
    font-weight: 600;
    color: var(--key-color);
}

.post-content .alignwide {
    width: 100%;
}

.post-content .aligncenter {
    margin: 0 auto;
}

/* ===== Tags ===== */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid var(--muted-border-color);
}

.post-tags .tag {
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 100px;
    background: var(--muted-bg-color);
    color: var(--muted-color);
    transition: background 0.2s, color 0.2s;
}

.post-tags .tag:hover {
    background: var(--focus-shadow-color);
    color: var(--theme-color);
}

.post-tags .tag a {
    color: inherit;
    text-decoration: none;
}

/* ===== Post Navigation ===== */
.post-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--muted-border-color);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.nav-link {
    display: block;
    font-size: 14px;
    color: var(--main-color);
    transition: color 0.2s;
    max-width: 40%;
}

.nav-link a {
    color: inherit;
}

.nav-link a:hover {
    color: var(--theme-color);
    opacity: 1;
}

.nav-link.disabled {
    color: var(--muted-3-color);
    cursor: default;
}

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

.nav-center a {
    font-size: 13px;
    color: var(--muted-2-color);
    text-decoration: none;
}

.nav-center a:hover {
    color: var(--theme-color);
}

/* ===== Comments ===== */
.comments-section {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .comment {
    padding: 20px 0;
    border-bottom: 1px solid var(--muted-border-color);
}

.comment-list .comment .avatar {
    float: left;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.comment-list .comment .comment-author,
.comment-list .comment .comment-metadata {
    display: inline;
}

.comment-list .comment .comment-author {
    font-weight: 600;
    font-size: 14px;
}

.comment-list .comment .comment-metadata {
    font-size: 13px;
    color: var(--muted-3-color);
}

.comment-list .comment .comment-content {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.8;
}

.comment-respond {
    margin-top: 40px;
}

.comment-respond h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--key-color);
    margin-bottom: 20px;
}

.comment-form p {
    margin-bottom: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--main-border-color);
    border-radius: var(--main-radius);
    background: var(--main-bg-color);
    color: var(--main-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px var(--focus-shadow-color);
}

.comment-form .submit {
    padding: 11px 28px;
    font-size: 15px;
    font-weight: 500;
    background: var(--theme-color);
    color: #fff;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-form .submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--focus-shadow-color);
}

.comment-lead,
.comments-closed {
    font-size: 14px;
    color: var(--muted-2-color);
    text-align: center;
    padding: 20px 0;
}

/* ===== 404 ===== */
.notfound-section {
    text-align: center;
    padding: 80px 0;
}

.notfound-title {
    font-size: 120px;
    font-weight: 800;
    color: var(--theme-color);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 10px;
}

.notfound-desc {
    font-size: 18px;
    color: var(--muted-color);
    margin-bottom: 24px;
}

/* ===== No Posts ===== */
.no-posts {
    text-align: center;
    padding: 80px 0;
}

.empty-title {
    font-size: 24px;
    color: var(--key-color);
    margin-bottom: 10px;
}

.empty-desc {
    font-size: 15px;
    color: var(--muted-2-color);
    margin-bottom: 24px;
}

/* ===== Screen Reader ===== */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===== Dark theme overrides ===== */
.dark-theme .post-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dark-theme .post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

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

    .post-article,
    .comments-section {
        max-width: 100%;
        padding: 20px 0;
    }

    .hero-section {
        padding: 40px 0;
    }

    .post-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .nav-link {
        max-width: 100%;
    }
}
