/* ==========================================
   Fardgera.ir - Main Stylesheet
   Version: 2.1 - Card Redesign
   ========================================== */

/* ---------- FONT FACE ---------- */
@font-face {
    font-family: 'Sahel';
    src: url('../fonts/Sahel-VF.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: optional;
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---------- VARIABLES ---------- */
:root {
    --bg: #fafafa;
    --bg-alt: #f5f5f5;
    --bg-white: #ffffff;
    --text: #292929;
    --text-light: #6b6b6b;
    --text-muted: #555555;
    --accent: #8b3a3a;
    --accent-hover: #a85252;
    --accent-light: rgba(139, 58, 58, 0.06);
    --border: #e8e8e8;
    --radius-sm: 8px;
    --radius-full: 50px;
    --max-width: 740px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
    --bg: #1a1a1a;
    --bg-alt: #252525;
    --bg-white: #1e1e1e;
    --text: #e8e8e8;
    --text-light: #b0b0b0;
    --text-muted: #aaaaaa;
    --border: #333333;
    --accent-light: rgba(168, 82, 82, 0.12);
}

/* ---------- HTML & BODY ---------- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Sahel', Tahoma, system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 2.1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: color var(--transition);
    position: relative;
}

/* ---------- TYPOGRAPHY LINKS & BUTTONS ---------- */
a, button {
    color: inherit;
}

a {
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: transparent;
}

img {
    display: block;
    height: auto;
    max-width: 100%;
}

/* ---------- SKIP LINK (ACCESSIBILITY) ---------- */
.skip-link {
    position: absolute;
    top: -100px;
    right: 16px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 1000;
    transition: top var(--transition);
    text-decoration: none;
    background: var(--accent);
    color: #ffffff;
}

.skip-link:focus {
    top: 8px;
    outline: #ffffff solid 2px;
    outline-offset: 2px;
}

/* ---------- PROFILE HEADER ---------- */
.profile {
    text-align: center;
    padding: 56px 0 28px;
}

.profile-logo {
    width: 200px;
    height: 171px;
    max-width: 200px;
    border-radius: 0;
    object-fit: contain;
    margin: 0 auto 16px;
    background: transparent;
    padding: 0;
    box-shadow: none;
    display: block;
    transition: transform var(--transition);
}

.profile-logo:hover,
a:hover .profile-logo,
.post-hero-logo:hover img {
    transform: none;
}

.profile-subtitle {
    font-size: 14px;
    font-weight: 450;
    color: var(--text);
    margin-bottom: 18px;
    line-height: 1.9;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.2px;
}

/* ---------- SOCIAL ROW ---------- */
.social-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-alt);
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--accent);
    color: #ffffff;
}

/* ---------- TABS ---------- */
.tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    bottom: -1px;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text);
}

.tab[aria-selected="true"] {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 700;
}

/* ---------- SEARCH ---------- */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto 20px;
    border-radius: 12px;
    padding: 4px 16px;
    border: 2px solid transparent;
    background: var(--bg-alt);
    transition: all var(--transition);
}

.search-bar:focus-within {
    border-color: var(--accent);
    background: var(--bg);
}

.search-bar i {
    color: var(--text-muted);
    font-size: 14px;
}

.search-input {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    outline: 0;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    display: none;
}

.search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
    transition: all var(--transition);
}

.search-clear:hover {
    background: var(--accent);
    color: #ffffff;
}

/* ---------- FILTER BAR ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
}

.filter-chip {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-light);
    border: 1px solid transparent;
    background: var(--bg-alt);
    transition: all var(--transition);
}

.filter-chip:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.filter-chip.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

/* ---------- POSTS LIST ---------- */
.posts-list {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
}

.post-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    align-items: stretch;
}

.post-card:hover {
    box-shadow: 0 12px 32px rgba(139, 58, 58, 0.12), 0 0 0 2px var(--accent);
    transform: translateY(-4px);
    border-color: var(--accent);
}

body.dark .post-card {
    background: var(--bg-white);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

body.dark .post-card:hover {
    box-shadow: 0 12px 32px rgba(168, 82, 82, 0.25), 0 0 0 2px var(--accent);
}

.post-thumb {
    width: 100%;
    aspect-ratio: 3/2;
    max-height: 480px;
    overflow: hidden;
    background: var(--bg-alt);
    margin: 0;
    border-radius: 0;
    order: 1;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg-alt);
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumb img {
    transform: none;
}

.post-content {
    padding: 20px 22px 22px;
    flex: 1;
    min-width: 0;
    order: 2;
}

.post-meta {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
    margin-top: 0;
    gap: 6px;
}

.post-meta time,
.single-meta time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-meta .meta-sep,
.single-meta .meta-sep {
    color: var(--border);
}

.post-meta .meta-cat-chip {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition);
}

.post-meta .meta-cat-chip:hover {
    color: var(--accent);
}

.post-title-link {
    display: -webkit-box;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.7;
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark .post-title-link {
    color: var(--text);
}

.post-card:hover .post-title-link {
    color: var(--accent);
}

.post-card-subtitle {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.7;
    padding-right: 10px;
    border-right: 2px solid var(--accent);
}

.post-excerpt {
    font-size: 13.5px;
    color: var(--text);
    line-height: 2;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 450;
}

body.dark .post-excerpt {
    color: var(--text-light);
}

/* ---------- SINGLE POST ---------- */
.single-post {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px 48px;
}

.post-hero {
    text-align: center;
    padding: 56px 0 20px;
    margin-bottom: 8px;
}

.post-hero-logo {
    display: inline-block;
    margin-bottom: 16px;
    text-decoration: none;
}

.post-hero-logo img {
    width: 200px;
    height: auto;
    display: block;
    transition: transform var(--transition);
}

.post-hero-desc {
    font-size: 14px;
    font-weight: 450;
    color: var(--text);
    margin-bottom: 18px;
    line-height: 1.9;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.2px;
}

.post-hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.post-hero-rss,
.post-hero-theme {
    display: flex;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-alt);
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    font-family: inherit;
}

.post-hero-rss:hover,
.post-hero-theme:hover {
    background: var(--accent);
    color: #ffffff;
}

.post-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--transition);
    margin-bottom: 1rem;
}

.post-back-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.single-meta .meta-category {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: color var(--transition);
}

.single-meta .meta-category:hover {
    color: var(--accent);
}

.single-title {
    font-size: 30px;
    font-weight: 900;
    margin-top: 0.5rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.single-subtitle {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 32px;
    line-height: 2;
    padding-right: 14px;
    border-right: 3px solid var(--accent);
    color: var(--text-light);
}

.single-image {
    width: 100%;
    max-height: 600px;
    border-radius: 12px;
    margin-bottom: 28px;
    object-fit: contain;
    background: var(--bg-alt);
}

/* ---------- SINGLE BODY CONTENT ---------- */
.single-body {
    font-size: 17px;
    line-height: 2.1;
    color: var(--text);
}

.single-body p {
    margin-bottom: 1.5rem;
}

.single-body ul {
    list-style-type: disc;
    padding-right: 2rem;
    margin: 0 0 1.5rem 0;
}

.single-body ul li {
    margin-bottom: 0.5rem;
}

.single-body ol {
    list-style-type: persian;
    padding-right: 2rem;
    margin: 0 0 1.5rem 0;
}

.single-body ol li {
    margin-bottom: 0.5rem;
}

.single-body a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 800;
}

.single-body a:hover {
    color: var(--accent-hover);
}

.single-body strong,
.single-body b {
    font-weight: 800;
}

.single-body h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 1.2rem 0 0.6rem;
    color: var(--accent);
}

.single-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
}

.single-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0.8rem 0 0.4rem;
}

.single-body img {
    border-radius: 12px;
    margin: 1.5rem 0;
}

.single-body blockquote {
    border-right: 3px solid var(--accent);
    padding: 16px 18px;
    margin: 1.8rem 0;
    color: var(--accent);
    font-weight: 700;
    font-style: normal;
    background: var(--accent-light);
    border-radius: 8px;
}

/* ---------- SHARE ROW ---------- */
.single-share-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.single-share {
    display: flex;
    align-items: center;
}

.copy-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.copy-link-btn:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(139, 58, 58, 0.2);
}

.copy-link-btn i {
    font-size: 14px;
}

.copy-link-btn.copied {
    background: #27ae60;
    color: #ffffff;
    border-color: #27ae60;
}

/* ---------- SUPPORT CARD (SINGLE POST) ---------- */
.single-support {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.support-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-white);
    border-radius: 14px;
    border: 1px solid var(--accent-light);
    flex-wrap: wrap;
    text-align: right;
    box-shadow: 0 2px 12px rgba(139, 58, 58, 0.06);
}

.support-text {
    flex: 1;
    min-width: 200px;
}

.support-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 2px;
}

.support-text span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.support-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--accent);
    color: #ffffff;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(139, 58, 58, 0.2);
}

.support-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 58, 58, 0.25);
}

.support-btn i {
    font-size: 0.9rem;
}

/* ---------- SINGLE FOOTER / AUTHOR CARD ---------- */
.single-footer {
    margin-top: 2.5rem;
    padding: 1.5rem 0;
}

.single-author {
    margin: 0;
}

.single-author-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-alt), var(--bg-white));
    border-radius: 16px;
    border: 1px solid var(--accent-light);
    flex-wrap: wrap;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.single-author-img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-light);
    flex-shrink: 0;
}

.single-author-info {
    flex: 1;
    min-width: 140px;
}

.single-author-info strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.single-author-info span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
}

.single-author-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition);
}

.single-author-link:hover {
    background: var(--accent);
    color: #ffffff;
}

/* ---------- COMMENTS ---------- */
.comments-section {
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    padding: 2rem 20px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-title i {
    color: var(--accent);
}

.comments-count {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    outline: 0;
    transition: all var(--transition);
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 58, 58, 0.06);
    background: var(--bg-white);
}

.comment-form textarea {
    min-height: 100px;
}

.comment-form .btn-submit {
    padding: 10px 24px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    transition: all var(--transition);
}

.comment-form .btn-submit:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(139, 58, 58, 0.25);
}

.comment-form .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    background: var(--bg-alt);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.comment-item:hover {
    border-color: var(--accent);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-author {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-body {
    font-size: 0.9rem;
    line-height: 1.9;
    color: var(--text);
}

.comment-empty {
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.comment-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.comment-loading {
    padding: 2rem;
    color: var(--text-muted);
    text-align: center;
}

/* ---------- COMMENT REPLY ---------- */
.comment-reply {
    margin-right: 20px;
    border-right: 2px solid var(--accent-light);
}

.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-family: inherit;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--transition);
    padding: 4px 0;
}

.comment-reply-btn:hover {
    color: var(--accent);
}

.comment-reply-form {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.comment-reply-form input,
.comment-reply-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    background: var(--bg-white);
    color: var(--text);
    outline: 0;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.comment-reply-form input:focus,
.comment-reply-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 58, 58, 0.06);
}

.comment-reply-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.comment-reply-form .form-row input {
    margin-bottom: 0;
}

.comment-reply-to {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-reply-to i {
    color: var(--accent);
    font-size: 0.7rem;
}

.comment-reply-to strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------- COMMENT SUCCESS ---------- */
.comment-success {
    margin-top: 0.75rem;
    padding: 12px 16px;
    background: #edfaef;
    color: #1e4e2a;
    border-radius: 12px;
    border: 1px solid #c3e6cb;
    font-size: 0.85rem;
    display: none;
    align-items: center;
    gap: 8px;
}

.comment-success.visible {
    display: flex;
}

.comment-success i {
    color: #00a32a;
    font-size: 1rem;
}

/* ---------- ADMIN BADGE ---------- */
.admin-badge {
    background: var(--accent);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 6px;
}

/* ---------- COMMENT FORM FOOTER ---------- */
.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group {
    display: flex;
    gap: 6px;
}

.btn-sm {
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    background: var(--bg-white);
    color: var(--text);
    font-weight: 600;
    transition: all var(--transition);
}

.btn-sm:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    background: var(--bg-white);
    color: var(--text);
    font-weight: 600;
    transition: all var(--transition);
    cursor: pointer;
    font-family: inherit;
}

.btn-cancel:hover {
    background: #fee2e2;
    color: #b32d2e;
    border-color: #f5c6cb;
}

/* ---------- 404 PAGE ---------- */
.error-404 {
    text-align: center;
    padding: 80px 20px 60px;
}

.error-404-icon {
    display: inline-flex;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-light);
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 36px;
    color: var(--accent);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.error-404 h2 {
    font-size: 32px;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 12px;
}

.error-404 > p {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 14px;
}

.error-404-actions {
    margin-bottom: 40px;
}

.error-404-random {
    max-width: 420px;
    margin: 0 auto;
    text-align: right;
}

.error-404-random > p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: center;
}

.random-post-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 8px;
    background: var(--bg-alt);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    color: var(--text);
    text-decoration: none;
}

.random-post-card:hover {
    background: var(--bg);
    transform: translateX(-4px);
    border-color: var(--accent);
}

.random-post-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.random-post-category {
    font-size: 11px;
    color: var(--accent);
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

.random-post-card i {
    color: var(--text-muted);
    font-size: 13px;
    transition: all var(--transition);
}

.random-post-card:hover i {
    color: var(--accent);
    transform: translateX(-3px);
}

/* ---------- ABOUT PAGE ---------- */
.about-author {
    text-align: center;
    margin-bottom: 2rem;
}

.about-author-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 3px solid var(--accent-light);
}

.about-author h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.about-author-title {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.about-author-social {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.about-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-alt);
    transition: all var(--transition);
}

.about-social-link:hover {
    background: var(--accent);
    color: #ffffff;
}

.about-content {
    font-size: 15px;
    color: var(--text-light);
    line-height: 2.2;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-content h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.5rem 0 0.5rem;
}

.about-content a {
    color: var(--accent);
    font-weight: 600;
}

.about-content a:hover {
    text-decoration: underline;
}

/* ---------- CONTACT PAGE ---------- */
#contact-container p {
    margin-bottom: 1.5rem;
    font-size: 15px;
    color: var(--text-light);
    line-height: 2.2;
}

#contact-container {
    font-size: 15px;
    color: var(--text-light);
    line-height: 2.2;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 1.5rem 0;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    background: var(--bg-alt);
    color: var(--text);
    font-size: 14px;
    border: 1px solid transparent;
    text-decoration: none !important;
    transition: all var(--transition);
}

.contact-link-item:hover {
    background: var(--bg);
    transform: translateX(-4px);
    border-color: var(--accent);
}

.contact-icon-circle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--accent-light);
}

#contact-container .contact-icon-circle i {
    font-size: 17px;
    color: var(--accent);
}

.contact-link-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#contact-container .contact-link-text strong {
    font-size: 14px;
    color: var(--text);
}

#contact-container .contact-link-text small {
    font-size: 12px;
    color: var(--text-muted);
}

.contact-arrow {
    color: var(--text-muted);
    font-size: 13px;
    transition: all var(--transition);
}

.contact-link-item:hover .contact-arrow {
    color: var(--accent);
    transform: translateX(-3px);
}

/* ---------- NEWSLETTER ---------- */
.newsletter-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.newsletter-emoji {
    display: inline-flex;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-light);
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 28px;
    color: var(--accent);
}

.newsletter-hero h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.newsletter-hero p {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.9;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form-inline {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    padding: 11px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    color: var(--text);
    outline: 0;
    font-family: inherit;
    font-size: 13px;
    text-align: right;
    min-width: 0;
    transition: all var(--transition);
    order: 1;
}

.newsletter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 58, 58, 0.08);
}

.newsletter-input.error {
    border-color: #e74c3c;
}

.newsletter-btn {
    padding: 11px 20px;
    background: var(--accent);
    color: #ffffff;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
    order: 2;
    margin: 0 auto;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: var(--accent-hover);
}

.newsletter-error {
    font-size: 0.8rem;
    color: #e74c3c;
    margin-top: 0.5rem;
    text-align: right;
    display: none;
    width: 100%;
    order: 3;
}

.newsletter-footer-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

.newsletter-footer-note i {
    margin-left: 4px;
}

/* ---------- FOOTER ---------- */
.footer {
    padding: 40px 20px 28px;
    margin-top: auto;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 2;
}

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(139, 58, 58, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    cursor: pointer;
    transition: all var(--transition);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ---------- SUPPORT BTN (GENERAL) ---------- */
.btn-support {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #8b3a3a, #a85252);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(139, 58, 58, 0.25);
    transition: all var(--transition);
}

.btn-support:hover {
    box-shadow: 0 4px 16px rgba(139, 58, 58, 0.35);
    transform: translateY(-1px);
}

/* ---------- ACCESSIBILITY ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- ANIMATIONS ---------- */
.fade-in {
    animation: fadeIn 0.35s ease-out;
}

.fade-up {
    animation: fadeUp 0.45s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .fade-up {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
    * {
        transition-duration: 0s !important;
    }
}

/* ---------- FIX: iOS BACKGROUND-ATTACHMENT BUG ---------- */
@media (max-width: 1024px) {
    body {
        background-attachment: scroll;
    }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    .support-card {
        padding: 1rem;
        gap: 0.75rem;
        flex-direction: column;
        text-align: center;
    }

    .support-text {
        min-width: auto;
    }

    .support-text strong {
        font-size: 0.85rem;
    }

    .support-text span {
        font-size: 0.7rem;
    }

    .single-support .support-btn {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    .single-author-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .single-author-img {
        width: 60px;
        height: 60px;
    }

    .single-author-info strong {
        font-size: 0.8rem;
    }

    .single-author-info span {
        font-size: 0.7rem;
    }

    .single-author-link {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .footer {
        font-size: 10px;
        padding: 24px 14px 20px;
    }

    .profile-logo,
    .post-hero-logo img {
        width: 130px;
    }

    .profile-subtitle,
    .post-hero-desc {
        font-size: 12px;
        max-width: 95%;
        white-space: normal;
        overflow: visible;
        line-height: 1.8;
    }

    .tabs {
        gap: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: center;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        padding: 6px 9px;
        font-size: 10px;
        white-space: nowrap;
        flex-shrink: 0;
        bottom: -2px;
    }

    .search-bar {
        max-width: 100%;
    }

    .post-card {
        flex-direction: column;
    }

    .post-thumb {
    width: 100%;
    aspect-ratio: 3/2;
    max-height: 480px;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

    .post-content {
        order: 2;
    }

    .post-title-link {
        font-size: 16px;
    }

    .post-excerpt {
        font-size: 12px;
    }

    .single-title {
        font-size: 20px;
        line-height: 1.6;
    }

    .single-body {
        font-size: 15px;
    }

    .single-body h2 {
        font-size: 1.2rem;
    }

    .single-body h3 {
        font-size: 1rem;
    }

    .profile {
        padding-top: 32px;
    }

    .post-hero {
        padding: 32px 0 12px;
    }

    .scroll-top {
        bottom: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .single-post {
        padding: 0 14px 28px;
    }

    .newsletter-form-inline {
        flex-direction: column;
        align-items: center;
    }

    .comment-form .form-row {
        grid-template-columns: 1fr;
    }

    .contact-link-item {
        padding: 12px 14px;
    }

    .error-404 {
        padding: 50px 14px 32px;
    }

    .error-404 h2 {
        font-size: 24px;
    }

    .random-post-category {
        display: none;
    }

    .about-author-img {
        width: 90px;
        height: 90px;
    }

    .about-author h2 {
        font-size: 1.1rem;
    }

    .about-content {
        font-size: 14px;
    }

    .about-content h3 {
        font-size: 0.95rem;
    }

    .single-image {
        max-height: 400px;
        border-radius: 8px;
    }

    .single-meta,
    .single-meta .meta-category {
        font-size: 0.78rem;
    }

    .post-hero-desc {
        font-size: 11px;
    }

    blockquote {
        padding: 12px 14px !important;
        font-size: 0.95rem !important;
    }

    .support-btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }

    .comments-section {
        padding: 1.5rem 14px;
    }

    .single-author-card {
        padding: 1rem;
    }

    .single-author-img {
        width: 68px;
        height: 68px;
    }
}

/* ---------- UTILITY OVERRIDES ---------- */
.about-content .support-btn,
.about-content .support-btn:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}