/* ===================================
   Additional Custom Styles
   =================================== */

/* Scroll to Top Button Styles */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.scroll-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Single Post Styles */
.single-post {
    background: var(--white);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.post-categories {
    margin-bottom: 20px;
}

.post-category {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.post-category:hover {
    background: var(--accent-color);
    color: var(--white);
}

.single-post-thumbnail {
    margin: 30px 0;
    border-radius: 5px;
    overflow: hidden;
}

.thumbnail-caption {
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
    margin-top: 10px;
}

.single-post-content {
    font-size: 18px;
    line-height: 1.8;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post-content p {
    margin-bottom: 20px;
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.single-post-content li {
    margin-bottom: 10px;
}

.single-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    background: var(--bg-light);
    font-style: italic;
    font-size: 1.1em;
}

.single-post-content img {
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Post Tags */
.post-tags {
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

.post-tags a {
    display: inline-block;
    background: var(--bg-light);
    padding: 5px 12px;
    margin: 5px 5px 5px 0;
    font-size: 13px;
    color: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
}

.post-tags a:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.post-navigation a {
    display: block;
    padding: 20px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-navigation a:hover {
    background: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-subtitle {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
    font-weight: 600;
}

.nav-title {
    display: block;
    color: var(--secondary-color);
    font-size: 16px;
    font-weight: 600;
}

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

/* Author Bio */
.author-bio {
    display: flex;
    gap: 20px;
    background: var(--bg-light);
    padding: 30px;
    border-radius: 5px;
    margin: 40px 0;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    border-radius: 50%;
}

.author-name {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.author-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 3px solid var(--primary-color);
}

/* Comments */
.comments-area {
    background: var(--white);
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.comments-title {
    font-size: 1.75rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

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

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

.comment-author img {
    border-radius: 50%;
    float: left;
    margin-right: 15px;
}

.comment-metadata {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.comment-content {
    clear: both;
    padding-top: 10px;
}

.reply {
    margin-top: 10px;
}

.reply a {
    font-size: 13px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
}

/* Comment Form */
.comment-form {
    margin-top: 40px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 15px;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form input[type="submit"]:hover {
    background: var(--accent-color);
}

/* Archive Page */
.archive-header {
    background: var(--bg-light);
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
}

.archive-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.archive-description {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Search Form */
.search-form {
    display: flex;
    margin-bottom: 40px;
}

.search-form label {
    flex: 1;
    margin: 0;
}

.search-form .search-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 3px 0 0 3px;
    font-size: 15px;
}

.search-form .search-submit {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 0 3px 3px 0;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-form .search-submit:hover {
    background: var(--accent-color);
}

/* Loading Animation */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Print Styles */
@media print {

    .site-header,
    .main-navigation,
    .sidebar,
    .site-footer,
    .scroll-to-top,
    .post-navigation,
    .comments-area {
        display: none;
    }

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

    a {
        text-decoration: underline;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
}

.skip-link:focus {
    left: 0;
}

/* RTL Support */
[dir="rtl"] .article-category {
    left: auto;
    right: 15px;
}

[dir="rtl"] .post-tags a {
    margin: 5px 0 5px 5px;
}

[dir="rtl"] .comment-author img {
    float: right;
    margin-right: 0;
    margin-left: 15px;
}