/**
 * Additional styles for iBase IT Theme
 *
 * @package iBase_IT_Theme
 * @since 1.0.0
 */

/* ==========================================================================
   Additional Component Styles
   ========================================================================== */

/* Author Bio */
.author-bio {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    margin: 2rem 0;
}

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

.author-bio .author-info h3 {
    margin-bottom: 0.5rem;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 2px solid var(--border-color);
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    max-width: 45%;
}

.post-navigation .nav-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: var(--text-dark);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    list-style: none;
    padding: 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    color: var(--text-dark);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Entry Content Styles */
.entry-content {
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1rem 0 1rem 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    background-color: var(--bg-light);
    font-style: italic;
}

.entry-content img {
    border-radius: 8px;
    margin: 2rem 0;
}

.entry-content pre {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.entry-content code {
    background-color: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

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

/* Page Links (for paginated posts) */
.page-links {
    margin: 2rem 0;
    padding: 1rem;
    background-color: var(--bg-light);
    border-radius: 4px;
}

.page-links a,
.page-links > span {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: var(--white);
    border-radius: 4px;
}

/* Entry Footer (Tags) */
.entry-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-light);
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

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

/* Comments */
.comments-area {
    margin-top: 3rem;
}

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

.comment-list .comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.comment-list .children {
    list-style: none;
    margin-left: 2rem;
    margin-top: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.comment-metadata {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.reply {
    margin-top: 1rem;
}

.reply a {
    font-size: 0.875rem;
    color: var(--primary-color);
}

.comment-form {
    margin-top: 2rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.comment-form .form-submit {
    margin-top: 1rem;
}

.comment-form .submit {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.comment-form .submit:hover {
    background-color: var(--secondary-color);
}

/* Archive & Page Header */
.page-header {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 3rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.page-title {
    margin-bottom: 1rem;
}

.archive-description {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
}

/* No Posts Found */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
}

.no-posts h2 {
    margin-bottom: 1rem;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility Improvements */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

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

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .back-to-top,
    .menu-toggle,
    .comment-form {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 999;
    cursor: pointer;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Scrolled Header Effect */
.site-header.scrolled {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Fade-in Animation for Cards */
.service-card,
.portfolio-item,
.blog-post {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.in-view,
.portfolio-item.in-view,
.blog-post.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Additional Responsive Adjustments */
@media (max-width: 768px) {
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .post-navigation a {
        max-width: 100%;
    }
    
    .comment-list .children {
        margin-left: 1rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: 1rem;
        right: 1rem;
    }
}