/**
 * NexiroTech Modern Blog - Additional CSS
 * Red & Black Color Scheme - Enhanced Edition
 */

/* ========== SEARCH FORM STYLING ========== */
.search-form {
    display: flex;
    gap: 8px;
    width: 100%;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border, #E8E8E8);
    border-radius: 30px;
    font-size: 14px;
    transition: var(--transition-normal, 0.3s ease);
    background: var(--white, #FFFFFF);
    color: var(--text, #1A1A1A);
    min-width: 0;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--primary, #8B1A1A);
    box-shadow: 0 0 0 3px var(--primary-glow, rgba(139,26,26,0.1));
}

.search-form .search-submit {
    background: var(--primary, #8B1A1A);
    color: var(--white, #FFFFFF);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal, 0.3s ease);
    flex-shrink: 0;
}

.search-form .search-submit:hover {
    background: var(--primary-dark, #5C1010);
    transform: translateY(-2px);
}

/* ========== PAGINATION ========== */
.pagination-wrapper {
    margin: 40px 0 60px;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    background: var(--white, #FFFFFF);
    border-radius: var(--radius-sm, 6px);
    color: var(--text, #1A1A1A);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-normal, 0.3s ease);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
}

.pagination .page-numbers:hover {
    background: var(--border, #E8E8E8);
    transform: translateY(-2px);
}

.pagination .page-numbers.current {
    background: var(--primary, #8B1A1A);
    color: var(--white, #FFFFFF);
}

.pagination .page-numbers.dots {
    background: none;
    box-shadow: none;
}

/* ========== COMMENTS ========== */
.comments-section {
    margin-top: 40px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .comment {
    background: var(--white, #FFFFFF);
    border-radius: var(--radius-md, 12px);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
    border-left: 3px solid var(--primary, #8B1A1A);
}

.comment-list .comment .comment-author {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.comment-list .comment .comment-author .avatar {
    border-radius: 50%;
}

.comment-list .comment .comment-author .fn {
    font-weight: 600;
    color: var(--text, #1A1A1A);
}

.comment-list .comment .comment-metadata {
    font-size: 12px;
    color: var(--text-light, #6B6B6B);
}

.comment-list .comment .comment-content {
    font-size: 14px;
    line-height: 1.7;
}

.comment-list .comment .reply {
    margin-top: 12px;
}

.comment-list .comment .reply a {
    color: var(--primary, #8B1A1A);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.comment-list .comment .reply a:hover {
    color: var(--primary-dark, #5C1010);
}

.comment-respond {
    margin-top: 32px;
    padding: 28px;
    background: var(--white, #FFFFFF);
    border-radius: var(--radius-md, 12px);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.04));
    border-top: 3px solid var(--primary, #8B1A1A);
}

.comment-respond .comment-reply-title {
    font-size: 1.2rem;
    margin-bottom: 18px;
    color: var(--text, #1A1A1A);
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
}

.comment-respond .comment-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-respond .comment-form input,
.comment-respond .comment-form textarea {
    padding: 12px 16px;
    border: 1px solid var(--border, #E8E8E8);
    border-radius: var(--radius-sm, 6px);
    font-size: 14px;
    width: 100%;
    background: var(--light-bg, #F8F8F8);
    color: var(--text, #1A1A1A);
    transition: var(--transition-normal, 0.3s ease);
}

.comment-respond .comment-form input:focus,
.comment-respond .comment-form textarea:focus {
    outline: none;
    border-color: var(--primary, #8B1A1A);
    box-shadow: 0 0 0 3px var(--primary-glow, rgba(139,26,26,0.08));
}

.comment-respond .comment-form textarea {
    min-height: 150px;
}

.comment-respond .comment-form .submit {
    background: var(--primary, #8B1A1A);
    color: var(--white, #FFFFFF);
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius-full, 9999px);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal, 0.3s ease);
    width: auto;
    align-self: flex-start;
}

.comment-respond .comment-form .submit:hover {
    background: var(--primary-dark, #5C1010);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--primary-glow, rgba(139,26,26,0.15));
}

/* ========== RESPONSIVE TWEAKS ========== */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr !important;
    }
    
    .latest-grid {
        grid-template-columns: 1fr !important;
    }
    
    .single-post-wrapper .post-title {
        font-size: 1.5rem !important;
    }
    
    .author-box {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr !important;
    }
    
    .search-result-content {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .search-result-img {
        width: 100% !important;
        height: auto !important;
    }
    
    .comment-respond .comment-form .submit {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px !important;
    }
    
    .post-content {
        font-size: 15px !important;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form .search-submit {
        width: 100%;
        justify-content: center;
    }
    
    .comment-list .comment {
        padding: 16px;
    }
    
    .comment-respond {
        padding: 16px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .site-header,
    .site-footer,
    .floating-middle-panel,
    .mobile-footer-menu,
    .footer-menu-toggle,
    .back-to-top,
    .post-navigation,
    .comments-section,
    .related-posts,
    .author-box,
    .sidebar,
    .search-overlay,
    .mobile-menu,
    .mobile-overlay {
        display: none !important;
    }
    
    .post-content,
    .post-content-single,
    .page-body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .featured-post {
        border: 1px solid #ddd !important;
    }
    
    .post-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

.ml-10 { margin-left: 10px; }
.ml-20 { margin-left: 20px; }
.mr-10 { margin-right: 10px; }
.mr-20 { margin-right: 20px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.pt-10 { padding-top: 10px; }
.pt-20 { padding-top: 20px; }
.pt-30 { padding-top: 30px; }

.pb-10 { padding-bottom: 10px; }
.pb-20 { padding-bottom: 20px; }
.pb-30 { padding-bottom: 30px; }

.hidden { display: none !important; }
.visible { display: block !important; }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

.flex { display: flex; }
.flex-center { 
    display: flex;
    align-items: center;
    justify-content: center;
}
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.flex-column { 
    display: flex;
    flex-direction: column;
}
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.gap-30 { gap: 30px; }

/* ========== DARK MODE OVERRIDES ========== */
body.dark-mode .search-form input[type="search"] {
    background: #1A1A1A;
    border-color: #2A2A2A;
    color: #E8E8E8;
}

body.dark-mode .search-form input[type="search"]:focus {
    border-color: var(--primary, #8B1A1A);
}

body.dark-mode .pagination .page-numbers {
    background: #1A1A1A;
    color: #E8E8E8;
}

body.dark-mode .pagination .page-numbers:hover {
    background: #2A2A2A;
}

body.dark-mode .pagination .page-numbers.current {
    background: var(--primary, #8B1A1A);
    color: #FFFFFF;
}

body.dark-mode .comment-list .comment {
    background: #1A1A1A;
}

body.dark-mode .comment-respond {
    background: #1A1A1A;
}

body.dark-mode .comment-respond .comment-form input,
body.dark-mode .comment-respond .comment-form textarea {
    background: #111111;
    border-color: #2A2A2A;
    color: #E8E8E8;
}

body.dark-mode .comment-list .comment .comment-author .fn {
    color: #E8E8E8;
}

body.dark-mode .comment-list .comment .comment-content {
    color: #B0B0B0;
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary, #8B1A1A);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary, #8B1A1A);
    color: var(--white, #FFFFFF);
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: 99999;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}