/*!
 * Developer.css - Enhanced Search Page Styles
 * MFRT Blog Theme
 * Version: 1.0.0
 */

:root {
    /* Theme Color Variables */
    --mfrt-primary: #007cba;
    --mfrt-secondary: #333333;
    --mfrt-accent: #f8f9fa;
    --mfrt-danger: #dc3545;
    --mfrt-success: #198754;
    --mfrt-warning: #ffc107;
    --mfrt-info: #0dcaf0;
    
    /* Extended Color Palette */
    --mfrt-primary-light: #3395d3;
    --mfrt-primary-dark: #005a8b;
    --mfrt-text-muted: #6c757d;
    --mfrt-border-light: #dee2e6;
    --mfrt-bg-light: #f8f9fa;
    --mfrt-bg-dark: #212529;
    
    /* Gradient Variables */
    --mfrt-gradient-primary: linear-gradient(135deg, #007cba 0%, #3395d3 100%);
    --mfrt-gradient-accent: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    
    /* Shadow Variables */
    --mfrt-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --mfrt-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --mfrt-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Border Radius */
    --mfrt-border-radius: 0.375rem;
    --mfrt-border-radius-lg: 0.5rem;
    
    /* Transitions */
    --mfrt-transition: all 0.3s ease;
}

/* =========================================
   SEARCH RESULTS AREA ENHANCEMENTS
   ========================================= */

.search-results-area {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    min-height: 60vh;
}

/* =========================================
   SEARCH HEADER STYLES
   ========================================= */

.page-header {
    background: var(--mfrt-gradient-primary);
    padding: 3rem 2rem;
    border-radius: var(--mfrt-border-radius-lg);
    margin-bottom: 2rem;
    color: white;
    box-shadow: var(--mfrt-shadow-lg);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
    pointer-events: none;
}

.search-header {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.6s ease;
}

.search-term {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: var(--mfrt-border-radius);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
}

.search-count {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* =========================================
   SEARCH FORM ENHANCEMENTS
   ========================================= */

.search-form-container {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.search-form-container .search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--mfrt-shadow);
}

.search-form-container .input-group {
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--mfrt-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-form-container input[type="search"],
.search-form-container .search-field {
    flex: 1;
    border: none !important;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: var(--mfrt-secondary);
}

.search-form-container input[type="search"]::placeholder,
.search-form-container .search-field::placeholder {
    color: var(--mfrt-text-muted);
    opacity: 0.7;
}

.search-form-container .search-submit,
.search-form-container button[type="submit"] {
    background: var(--mfrt-gradient-primary) !important;
    color: white !important;
    border: none !important;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: var(--mfrt-transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0 var(--mfrt-border-radius-lg) var(--mfrt-border-radius-lg) 0 !important;
}

.search-form-container .search-submit:hover,
.search-form-container button[type="submit"]:hover {
    background: var(--mfrt-primary-dark) !important;
    transform: translateY(-1px);
    color: white !important;
}

.search-form-container .search-submit:focus,
.search-form-container button[type="submit"]:focus {
    background: var(--mfrt-primary-dark) !important;
    color: white !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.25) !important;
}

/* =========================================
   BLOG GRID LAYOUT FIXES
   ========================================= */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-grid .column {
    display: contents; /* This allows the article to be a direct grid child */
}

.search-result-item {
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--mfrt-shadow-sm);
    transition: var(--mfrt-transition);
    position: relative;
    border: 1px solid var(--mfrt-border-light);
    display: flex;
    flex-direction: column;
}

.search-result-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--mfrt-shadow-lg);
}

/* Ensure cards have equal height */
.search-result-item .body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.5rem;
}

.search-result-item .desc {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.search-result-item .meta-info {
    margin-top: auto;
}

.search-result-item .thum {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.search-result-item .thum img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--mfrt-transition);
}

.search-result-item:hover .thum img {
    transform: scale(1.05);
}

.search-result-item .thum::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mfrt-gradient-primary);
    opacity: 0;
    transition: var(--mfrt-transition);
}

.search-result-item:hover .thum::after {
    opacity: 0.1;
}

/* =========================================
   SEARCH RESULTS GRID CONTINUED
   ========================================= */

.search-results {
    animation: fadeIn 0.8s ease;
}

.search-result-item .thum {
    position: relative;
    overflow: hidden;
    height: 200px;
    flex-shrink: 0;
}

.search-result-item .thum img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--mfrt-transition);
}

.search-result-item:hover .thum img {
    transform: scale(1.05);
}

/* =========================================
   SEARCH RESULT CONTENT
   ========================================= */

.post-type-badge {
    background: var(--mfrt-gradient-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--mfrt-border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: var(--mfrt-shadow-sm);
}

.search-result-item .date {
    color: var(--mfrt-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-result-item .date::before {
    content: '\F1EC';
    font-family: 'bootstrap-icons';
    color: var(--mfrt-primary);
}

.search-result-item h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.search-result-item h4 a {
    color: var(--mfrt-secondary);
    text-decoration: none;
    transition: var(--mfrt-transition);
}

.search-result-item h4 a:hover {
    color: var(--mfrt-primary);
}

.search-result-item .desc {
    color: var(--mfrt-text-muted);
    line-height: 1.6;
}

.search-result-item .desc mark {
    background: linear-gradient(120deg, #ffc107 0%, #ffeb3b 100%);
    color: var(--mfrt-secondary);
    padding: 0.125rem 0.25rem;
    border-radius: 2px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(255, 193, 7, 0.3);
}

.search-result-item .categories {
    margin-bottom: 1rem;
}

.search-result-item .categories a {
    background: var(--mfrt-bg-light);
    color: var(--mfrt-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--mfrt-border-radius);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--mfrt-transition);
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.search-result-item .categories a:hover {
    background: var(--mfrt-primary);
    color: white;
    transform: translateY(-1px);
}

/* =========================================
   META INFORMATION
   ========================================= */

.meta-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--mfrt-border-light);
    flex-wrap: wrap;
}

.meta-info span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--mfrt-text-muted);
}

.meta-info span i {
    color: var(--mfrt-primary);
    font-size: 1rem;
}

.meta-info a {
    color: var(--mfrt-text-muted);
    text-decoration: none;
    transition: var(--mfrt-transition);
}

.meta-info a:hover {
    color: var(--mfrt-primary);
}

/* =========================================
   READ MORE BUTTON
   ========================================= */

.read-more .btn {
    background: var(--mfrt-gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--mfrt-border-radius);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--mfrt-transition);
    border: none;
    box-shadow: var(--mfrt-shadow-sm);
}

.read-more .btn:hover {
    background: var(--mfrt-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--mfrt-shadow);
    color: white;
}

.read-more .btn i {
    transition: var(--mfrt-transition);
}

.read-more .btn:hover i {
    transform: translateX(3px);
}

/* =========================================
   NO RESULTS SECTION
   ========================================= */

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    box-shadow: var(--mfrt-shadow);
    margin-top: 2rem;
}

.no-results-content {
    max-width: 600px;
    margin: 0 auto;
}

.no-results h3 {
    color: var(--mfrt-secondary);
    font-size: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.no-results h3::before {
    content: '\F341';
    font-family: 'bootstrap-icons';
    color: var(--mfrt-text-muted);
    font-size: 3rem;
}

.no-results > p {
    color: var(--mfrt-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* =========================================
   SEARCH SUGGESTIONS
   ========================================= */

.search-suggestions {
    background: var(--mfrt-bg-light);
    padding: 2rem;
    border-radius: var(--mfrt-border-radius);
    margin-bottom: 2rem;
    border-left: 4px solid var(--mfrt-info);
}

.search-suggestions h4 {
    color: var(--mfrt-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-suggestions h4::before {
    content: '\F4A4';
    font-family: 'bootstrap-icons';
    color: var(--mfrt-info);
}

.search-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-suggestions li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--mfrt-text-muted);
}

.search-suggestions li::before {
    content: '\F285';
    font-family: 'bootstrap-icons';
    color: var(--mfrt-success);
    font-size: 0.875rem;
}

/* =========================================
   POPULAR CATEGORIES
   ========================================= */

.popular-categories {
    text-align: left;
}

.popular-categories h4 {
    color: var(--mfrt-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-categories h4::before {
    content: '\F4A3';
    font-family: 'bootstrap-icons';
    color: var(--mfrt-warning);
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-tag {
    background: white;
    color: var(--mfrt-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--mfrt-border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--mfrt-transition);
    border: 2px solid var(--mfrt-border-light);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.category-tag:hover {
    background: var(--mfrt-primary);
    color: white;
    border-color: var(--mfrt-primary);
    transform: translateY(-2px);
    box-shadow: var(--mfrt-shadow-sm);
}

.category-tag .count {
    background: var(--mfrt-bg-light);
    color: var(--mfrt-text-muted);
    padding: 0.125rem 0.5rem;
    border-radius: var(--mfrt-border-radius);
    font-size: 0.75rem;
    font-weight: 600;
}

.category-tag:hover .count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* =========================================
   PAGINATION ENHANCEMENTS
   ========================================= */

.pagination-wrapper {
    margin: 3rem 0;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: var(--mfrt-border-radius-lg);
    box-shadow: var(--mfrt-shadow);
}

.pagination-wrapper .nav-links a,
.pagination-wrapper .nav-links .current {
    padding: 0.75rem 1rem;
    border-radius: var(--mfrt-border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--mfrt-transition);
    border: 1px solid var(--mfrt-border-light);
    min-width: 44px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-wrapper .nav-links a {
    background: white;
    color: var(--mfrt-primary);
}

.pagination-wrapper .nav-links a:hover {
    background: var(--mfrt-primary);
    color: white;
    border-color: var(--mfrt-primary);
    transform: translateY(-1px);
}

.pagination-wrapper .nav-links .current {
    background: var(--mfrt-gradient-primary);
    color: white;
    border-color: var(--mfrt-primary);
}

.pagination-wrapper .nav-links .prev,
.pagination-wrapper .nav-links .next {
    background: var(--mfrt-bg-light);
    border-color: var(--mfrt-border-light);
    padding: 0.75rem 1.25rem;
}

.pagination-wrapper .nav-links .prev:hover,
.pagination-wrapper .nav-links .next:hover {
    background: var(--mfrt-primary);
    color: white;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */

/* Sidebar Integration */
@media (min-width: 992px) {
    .search-results-area .col-lg-4 {
        padding-left: 2rem;
    }
    
    .search-results-area .col-lg-8 {
        padding-right: 1rem;
    }
}

@media (max-width: 991.98px) {
    .search-results-area .col-lg-4 {
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    .search-results-area {
        padding: 1rem 0;
    }
    
    .page-header {
        padding: 2rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .search-count {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .search-form-container .search-form,
    .search-form-container .input-group {
        flex-direction: column;
        max-width: 100%;
    }
    
    .search-form-container input[type="search"],
    .search-form-container .search-field {
        border-bottom: 1px solid var(--mfrt-border-light) !important;
        border-radius: var(--mfrt-border-radius-lg) var(--mfrt-border-radius-lg) 0 0 !important;
    }
    
    .search-form-container .search-submit,
    .search-form-container button[type="submit"] {
        border-radius: 0 0 var(--mfrt-border-radius-lg) var(--mfrt-border-radius-lg) !important;
        padding: 1rem;
    }
    
    .meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .meta-info .row {
        width: 100%;
    }
    
    .category-links {
        justify-content: center;
    }
    
    .pagination-wrapper .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.75rem;
        gap: 0.375rem;
    }
    
    .pagination-wrapper .nav-links a,
    .pagination-wrapper .nav-links .current {
        padding: 0.5rem 0.75rem;
        min-width: 38px;
        font-size: 0.875rem;
    }
    
    .pagination-wrapper .nav-links .prev,
    .pagination-wrapper .nav-links .next {
        padding: 0.5rem 1rem;
    }
    
    /* Card adjustments for mobile */
    .search-result-item .thum {
        height: 180px;
    }
    
    .search-result-item .body {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .search-results-area {
        padding: 0.5rem 0;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .search-result-item .body {
        padding: 1rem;
    }
    
    .no-results {
        padding: 2rem 1rem;
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .search-suggestions,
    .popular-categories {
        padding: 1rem;
        text-align: center;
    }
    
    .page-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .search-term {
        display: block;
        margin-top: 0.5rem;
    }
    
    .search-result-item .thum {
        height: 160px;
    }
    
    .read-more .btn {
        width: 100%;
        justify-content: center;
    }
    
    .category-links .category-tag {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 2.5rem;
    }
    
    .search-results-area {
        padding: 3rem 0;
    }
    
    .page-header {
        padding: 4rem 3rem;
    }
    
    .page-title {
        font-size: 3rem;
    }
}

/* =========================================
   ANIMATIONS
   ========================================= */

/* =========================================
   ANIMATIONS & MICRO-INTERACTIONS
   ========================================= */

/* Loading state for search results */
.search-results.loading {
    opacity: 0.7;
    pointer-events: none;
}

.search-results.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 3px solid var(--mfrt-border-light);
    border-top-color: var(--mfrt-primary);
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
    transform: translate(-50%, -50%);
}

/* Stagger animation for search results */
.search-result-item {
    animation: fadeInUp 0.6s ease both;
}

.search-result-item:nth-child(1) { animation-delay: 0.1s; }
.search-result-item:nth-child(2) { animation-delay: 0.2s; }
.search-result-item:nth-child(3) { animation-delay: 0.3s; }
.search-result-item:nth-child(4) { animation-delay: 0.4s; }
.search-result-item:nth-child(5) { animation-delay: 0.5s; }
.search-result-item:nth-child(6) { animation-delay: 0.6s; }

/* Search form focus states */
.search-form-container input[type="search"]:focus,
.search-form-container .search-field:focus {
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1) !important;
    outline: none !important;
}

/* Interactive elements */
.category-tag,
.read-more .btn,
.pagination-wrapper .nav-links a {
    transform-origin: center;
}

.category-tag:active,
.read-more .btn:active {
    transform: scale(0.98);
}

/* Hover effects for images */
.search-result-item .thum {
    position: relative;
    overflow: hidden;
}

.search-result-item .thum::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mfrt-gradient-primary);
    opacity: 0;
    transition: var(--mfrt-transition);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-result-item .thum::after {
    content: '\F1C5';
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: var(--mfrt-transition);
    z-index: 2;
}

.search-result-item:hover .thum::before,
.search-result-item:hover .thum::after {
    opacity: 0.9;
}

.search-result-item:hover .thum::after {
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* =========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
.search-form-container input[type="search"]:focus,
.search-form-container .search-submit:focus,
.read-more .btn:focus,
.category-tag:focus,
.pagination-wrapper .nav-links a:focus {
    outline: 2px solid var(--mfrt-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --mfrt-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
        --mfrt-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
        --mfrt-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.5);
    }
    
    .search-result-item {
        border-width: 2px;
    }
    
    .search-result-item .desc mark {
        background: #ffff00;
        color: #000000;
    }
}

/* Dark mode support (for future use) */
@media (prefers-color-scheme: dark) {
    .search-results-area {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    }
    
    .search-result-item {
        background: #2d2d2d;
        border-color: #404040;
        color: #e9ecef;
    }
    
    .search-result-item h4 a {
        color: #e9ecef;
    }
    
    .no-results {
        background: #2d2d2d;
        color: #e9ecef;
    }
    
    .search-suggestions {
        background: #1a1a1a;
    }
    
    .category-tag {
        background: #1a1a1a;
        border-color: #404040;
        color: #e9ecef;
    }
    
    .pagination-wrapper .nav-links {
        background: #2d2d2d;
    }
    
    .pagination-wrapper .nav-links a {
        background: #1a1a1a;
        border-color: #404040;
        color: #e9ecef;
    }
}

/* Print styles */
@media print {
    .search-form-container,
    .pagination-wrapper,
    .read-more {
        display: none;
    }
    
    .search-result-item {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .page-header {
        background: none;
        color: #000;
    }
}

/* =========================================
   SINGLE POST PAGE ENHANCEMENTS
   ========================================= */

/* Ensure proper page scrolling */
html, body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

/* Reset any problematic positioning */
.wp-site-blocks, 
.site-content, 
.content-area,
.container,
.row {
    position: relative;
    z-index: 1;
    height: auto;
    overflow: visible;
}

/* Ensure Bootstrap containers don't restrict height */
.container-fluid,
.container {
    min-height: auto;
    height: auto;
}

/* Single Post Container */
.single-post-area {
    padding: 2rem 0;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    min-height: auto;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Ensure proper body scrolling */
body.single-post {
    overflow-y: auto !important;
    height: auto !important;
}

html {
    overflow-y: auto !important;
    scroll-behavior: smooth;
}

/* Article Container */
.single-post {
    background: #ffffff;
    border-radius: var(--mfrt-border-radius-lg);
    box-shadow: var(--mfrt-shadow-lg);
    overflow: visible;
    margin-bottom: 2rem;
    position: relative;
}

/* Post Header Styles */
.entry-header {
    position: relative;
    margin-bottom: 2rem;
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: var(--mfrt-border-radius-lg) var(--mfrt-border-radius-lg) 0 0;
    margin: 0;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Post Meta Styles */
.post-meta {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.95) 100%);
    position: relative;
}

.post-categories {
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-block;
    background: var(--mfrt-gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: var(--mfrt-transition);
    position: relative;
    overflow: hidden;
}

.category-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.category-badge:hover::before {
    left: 100%;
}

.category-badge a {
    color: inherit;
    text-decoration: none;
}

/* Post Title */
.entry-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--mfrt-secondary);
    margin-bottom: 1.5rem;
    position: relative;
}

.entry-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--mfrt-gradient-primary);
    border-radius: 2px;
}

/* Post Info Section */
.post-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(248, 249, 250, 0.8);
    border-radius: var(--mfrt-border-radius);
    border: 1px solid var(--mfrt-border-light);
}

/* Author Info */
.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    position: relative;
}

.author-avatar img {
    border-radius: 50%;
    border: 3px solid var(--mfrt-primary);
    transition: var(--mfrt-transition);
}

.author-avatar:hover img {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3);
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name a {
    font-weight: 600;
    color: var(--mfrt-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--mfrt-transition);
}

.author-name a:hover {
    color: var(--mfrt-primary);
}

.post-date {
    color: var(--mfrt-text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Post Stats */
.post-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.post-stats > span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mfrt-text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 2rem;
    border: 1px solid var(--mfrt-border-light);
    transition: var(--mfrt-transition);
}

.post-stats > span:hover {
    background: var(--mfrt-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--mfrt-shadow);
}

.post-stats i {
    font-size: 1rem;
}

.comments-count a,
.post-views {
    color: inherit;
    text-decoration: none;
}

/* Entry Content */
.entry-content {
    padding: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    margin: 2rem 0 1rem 0;
    color: var(--mfrt-secondary);
    font-weight: 700;
    position: relative;
    scroll-margin-top: 100px;
}

.entry-content h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--mfrt-border-light);
    padding-bottom: 0.5rem;
}

.entry-content h3 {
    font-size: 1.5rem;
}

.entry-content h4 {
    font-size: 1.25rem;
}

.entry-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--mfrt-bg-light);
    border-left: 5px solid var(--mfrt-primary);
    border-radius: 0 var(--mfrt-border-radius) var(--mfrt-border-radius) 0;
    font-style: italic;
    font-size: 1.15rem;
    position: relative;
    box-shadow: var(--mfrt-shadow-sm);
}

.entry-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: var(--mfrt-primary);
    position: absolute;
    top: -10px;
    left: 20px;
    opacity: 0.3;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

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

.entry-content a {
    color: var(--mfrt-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: var(--mfrt-transition);
}

.entry-content a:hover {
    border-bottom-color: var(--mfrt-primary);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--mfrt-border-radius);
    box-shadow: var(--mfrt-shadow);
    margin: 1.5rem 0;
}

.entry-content pre,
.entry-content code {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--mfrt-border-radius);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.entry-content pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.entry-content code {
    padding: 0.25rem 0.5rem;
    font-size: 0.9em;
}

/* Entry Footer */
.entry-footer {
    padding: 2rem;
    background: var(--mfrt-bg-light);
    border-top: 1px solid var(--mfrt-border-light);
}

/* Post Tags */
.post-tags {
    margin-bottom: 2rem;
}

.post-tags h5 {
    color: var(--mfrt-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--mfrt-text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--mfrt-border-light);
    font-size: 0.85rem;
    transition: var(--mfrt-transition);
}

.tag-link:hover {
    background: var(--mfrt-primary);
    color: white;
    border-color: var(--mfrt-primary);
    transform: translateY(-2px);
    box-shadow: var(--mfrt-shadow-sm);
}

/* Social Share */
.social-share {
    margin-top: 2rem;
}

.social-share h5 {
    color: var(--mfrt-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--mfrt-border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--mfrt-transition);
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn.facebook {
    background: #3b5998;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.email {
    background: #34495e;
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--mfrt-shadow);
}

/* Enhanced Social Share Buttons */
.share-btn {
    position: relative;
    font-size: 0.9rem;
    border: 2px solid transparent;
    backdrop-filter: blur(10px);
}

.share-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.share-btn:hover i {
    transform: scale(1.2) rotate(10deg);
}

.share-btn.facebook:hover {
    background: #4267b2;
    border-color: #365899;
}

.share-btn.twitter:hover {
    background: #1da1f2;
    border-color: #0c85d0;
}

.share-btn.linkedin:hover {
    background: #0077b5;
    border-color: #005885;
}

.share-btn.email:hover {
    background: #2c3e50;
    border-color: #1a252f;
}

/* Floating Social Share */
.social-share-floating {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--mfrt-transition);
}

.social-share-floating.visible {
    opacity: 1;
    visibility: visible;
}

.social-share-floating .share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    min-width: auto;
}

.social-share-floating .share-btn span {
    display: none;
}

.social-share-floating .share-btn:hover {
    transform: translateY(-2px) scale(1.1);
}

/* Copy Link Button */
.copy-link-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.copy-link-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.copy-link-btn.copied {
    background: var(--mfrt-success);
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* WhatsApp Button */
.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn.whatsapp:hover {
    background: #128c7e;
    border-color: #075e54;
}

/* Telegram Button */
.share-btn.telegram {
    background: #0088cc;
    color: white;
}

.share-btn.telegram:hover {
    background: #006bb3;
    border-color: #0056b3;
}

@media (max-width: 1024px) {
    .social-share-floating {
        display: none;
    }
}

@media (max-width: 768px) {
    .share-buttons {
        gap: 0.75rem;
    }
    
    .share-btn {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.25rem;
        min-width: auto;
    }
    
    .share-btn span {
        font-size: 0.75rem;
    }
}

/* =========================================
   ADVANCED CONTENT FEATURES
   ========================================= */

/* Print and Bookmark Buttons */
.content-actions {
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    box-shadow: var(--mfrt-shadow-sm);
    padding: 1.5rem;
    margin: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.content-actions-left,
.content-actions-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--mfrt-border-light);
    border-radius: var(--mfrt-border-radius);
    background: white;
    color: var(--mfrt-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--mfrt-transition);
}

.action-btn:hover {
    border-color: var(--mfrt-primary);
    color: var(--mfrt-primary);
    transform: translateY(-2px);
    box-shadow: var(--mfrt-shadow-sm);
}

.action-btn.active {
    background: var(--mfrt-primary);
    border-color: var(--mfrt-primary);
    color: white;
}

.action-btn i {
    font-size: 1rem;
}

/* Font Size Controls */
.font-size-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--mfrt-bg-light);
    border-radius: var(--mfrt-border-radius);
    padding: 0.25rem;
}

.font-size-btn {
    background: none;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--mfrt-border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--mfrt-text-muted);
    transition: var(--mfrt-transition);
}

.font-size-btn:hover {
    background: white;
    color: var(--mfrt-primary);
}

.font-size-btn.active {
    background: var(--mfrt-primary);
    color: white;
}

/* Content Stats */
.content-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--mfrt-text-muted);
    font-size: 0.85rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--mfrt-bg-light);
    border-radius: 2rem;
    border: 1px solid var(--mfrt-border-light);
}

.stat-item i {
    color: var(--mfrt-primary);
}

/* Bookmark Modal */
.bookmark-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--mfrt-transition);
}

.bookmark-modal.visible {
    opacity: 1;
    visibility: visible;
}

.bookmark-modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--mfrt-border-radius-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.bookmark-modal.visible .bookmark-modal-content {
    transform: scale(1);
}

.bookmark-modal h3 {
    margin-bottom: 1rem;
    color: var(--mfrt-secondary);
}

.bookmark-modal p {
    margin-bottom: 1.5rem;
    color: var(--mfrt-text-muted);
    line-height: 1.5;
}

.bookmark-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.bookmark-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--mfrt-border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--mfrt-transition);
}

.bookmark-actions .btn-primary {
    background: var(--mfrt-primary);
    color: white;
}

.bookmark-actions .btn-secondary {
    background: var(--mfrt-bg-light);
    color: var(--mfrt-text-muted);
}

.bookmark-actions button:hover {
    transform: translateY(-2px);
    box-shadow: var(--mfrt-shadow-sm);
}

/* Print Styles */
@media print {
    .reading-progress,
    .reading-stats,
    .social-share-floating,
    .toc-floating,
    .content-actions,
    .social-share,
    .related-posts,
    .post-navigation,
    .author-bio,
    .comments-area {
        display: none !important;
    }
    
    .single-post {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .entry-content {
        padding: 0;
        max-width: 100%;
    }
    
    .entry-title {
        page-break-after: avoid;
    }
    
    .entry-content h2,
    .entry-content h3,
    .entry-content h4 {
        page-break-after: avoid;
    }
    
    .post-meta {
        padding: 1rem 0;
        background: none;
    }
    
    .category-badge {
        background: #f0f0f0 !important;
        color: #333 !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .action-btn {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .action-btn:hover {
        border-color: var(--mfrt-primary-light);
        color: var(--mfrt-primary-light);
    }
    
    .bookmark-modal-content {
        background: #2d3748;
        color: #e2e8f0;
    }
}

@media (max-width: 768px) {
    .content-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .content-actions-left,
    .content-actions-right {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .content-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Author Bio */
.author-bio {
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    box-shadow: var(--mfrt-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

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

.author-bio .author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--mfrt-primary);
}

.author-bio .author-info h4 {
    color: var(--mfrt-secondary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.author-bio .author-info p {
    color: var(--mfrt-text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.view-all-posts {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--mfrt-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--mfrt-transition);
}

.view-all-posts:hover {
    color: var(--mfrt-primary-dark);
}

.view-all-posts i {
    transition: transform 0.3s ease;
}

.view-all-posts:hover i {
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .single-post-area {
        padding: 1rem 0;
    }
    
    .post-meta {
        padding: 1.5rem;
    }
    
    .entry-title {
        font-size: 2rem;
    }
    
    .post-info {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .post-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .entry-content {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        flex: 1;
        justify-content: center;
        min-width: calc(50% - 0.5rem);
    }
}

/* =========================================
   READING PROGRESS INDICATOR
   ========================================= */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 124, 186, 0.1);
    z-index: 9999;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    background: var(--mfrt-gradient-primary);
    width: 0;
    transition: width 0.1s ease;
    position: relative;
}

.reading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-20px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(20px); opacity: 0; }
}

/* Hide progress bar when at top */
.reading-progress.hidden {
    opacity: 0;
}

/* Floating Reading Stats */
.reading-stats {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: var(--mfrt-shadow-lg);
    border: 1px solid var(--mfrt-border-light);
    z-index: 1000;
    transition: var(--mfrt-transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--mfrt-text-muted);
    pointer-events: auto;
}

.reading-stats:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.reading-stats .progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(var(--mfrt-primary) var(--progress, 0%), #e9ecef 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.reading-stats .progress-circle::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
}

.reading-stats .progress-text {
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--mfrt-primary);
}

.reading-stats .stats-info {
    display: flex;
    flex-direction: column;
}

.reading-stats .time-remaining {
    font-weight: 500;
    color: var(--mfrt-secondary);
}

.reading-stats .words-read {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .reading-stats {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .reading-stats .progress-circle {
        width: 35px;
        height: 35px;
    }
    
    .reading-stats .progress-circle::before {
        width: 25px;
        height: 25px;
    }
}

/* =========================================
   POST NAVIGATION ENHANCEMENT
   ========================================= */

.post-navigation {
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    box-shadow: var(--mfrt-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
}

.post-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mfrt-gradient-primary);
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-previous,
.nav-next {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--mfrt-text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: var(--mfrt-border-radius);
    border: 2px solid var(--mfrt-border-light);
    transition: var(--mfrt-transition);
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--mfrt-shadow-sm);
    border-color: var(--mfrt-primary);
    color: var(--mfrt-primary);
    background: rgba(0, 124, 186, 0.05);
}

.nav-subtitle {
    font-size: 0.9rem;
    color: inherit;
    font-weight: 500;
}

.nav-title {
    display: none;
}

/* Simple arrow indicators */
.nav-previous .nav-subtitle::before {
    content: 'â† ';
    color: inherit;
    font-size: 1rem;
}

.nav-next .nav-subtitle::after {
    content: ' â†’';
    color: inherit;
    font-size: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .post-navigation {
        padding: 1rem;
    }
    
    .nav-links {
        justify-content: space-between;
        gap: 0.75rem;
    }
    
    .nav-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .nav-previous .nav-subtitle::before,
    .nav-next .nav-subtitle::after {
        font-size: 0.9rem;
    }
}

/* =========================================
   RELATED POSTS ENHANCEMENT
   ========================================= */

.related-posts {
    background: white;
    border-radius: var(--mfrt-border-radius-lg);
    box-shadow: var(--mfrt-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.related-posts h3 {
    color: var(--mfrt-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.related-posts h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--mfrt-gradient-primary);
    border-radius: 2px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-post-item {
    border: 1px solid var(--mfrt-border-light);
    border-radius: var(--mfrt-border-radius);
    overflow: hidden;
    transition: var(--mfrt-transition);
    background: white;
}

.related-post-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--mfrt-shadow-lg);
    border-color: var(--mfrt-primary);
}

.related-post-thumb {
    height: 150px;
    overflow: hidden;
    background: var(--mfrt-bg-light);
}

.related-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-thumb img {
    transform: scale(1.1);
}

.related-post-content {
    padding: 1.25rem;
}

.related-post-content h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.related-post-content h4 a {
    color: var(--mfrt-secondary);
    text-decoration: none;
    transition: var(--mfrt-transition);
}

.related-post-content h4 a:hover {
    color: var(--mfrt-primary);
}

.related-post-date {
    color: var(--mfrt-text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-post-date::before {
    content: 'ðŸ“…';
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .related-posts {
        padding: 1.5rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   TABLE OF CONTENTS
   ========================================= */

.table-of-contents {
    background: white;
    border: 1px solid var(--mfrt-border-light);
    border-radius: var(--mfrt-border-radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--mfrt-shadow-sm);
    position: relative;
    overflow: hidden;
}

.table-of-contents::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--mfrt-gradient-primary);
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--mfrt-border-light);
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mfrt-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-title::before {
    content: 'ðŸ“‹';
    font-size: 1rem;
}

.toc-toggle {
    background: none;
    border: none;
    color: var(--mfrt-primary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: var(--mfrt-border-radius);
    transition: var(--mfrt-transition);
}

.toc-toggle:hover {
    background: var(--mfrt-bg-light);
    transform: scale(1.1);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: var(--mfrt-transition);
}

.toc-list.collapsed {
    display: none;
}

.toc-item {
    margin-bottom: 0.5rem;
    position: relative;
}

.toc-link {
    display: block;
    color: var(--mfrt-text-muted);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--mfrt-border-radius);
    transition: var(--mfrt-transition);
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 3px solid transparent;
    position: relative;
}

.toc-link:hover {
    color: var(--mfrt-primary);
    background: var(--mfrt-bg-light);
    border-left-color: var(--mfrt-primary);
    transform: translateX(5px);
}

.toc-link.active {
    color: var(--mfrt-primary);
    background: rgba(0, 124, 186, 0.1);
    border-left-color: var(--mfrt-primary);
    font-weight: 500;
}

/* Different levels styling */
.toc-item[data-level="1"] .toc-link {
    font-weight: 600;
    font-size: 1rem;
    padding-left: 0.75rem;
}

.toc-item[data-level="2"] .toc-link {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.toc-item[data-level="3"] .toc-link {
    padding-left: 2.25rem;
    font-size: 0.85rem;
}

.toc-item[data-level="4"] .toc-link {
    padding-left: 3rem;
    font-size: 0.8rem;
}

/* Sticky TOC for larger screens */
@media (min-width: 1200px) {
    .table-of-contents.sticky {
        position: sticky;
        top: 2rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .table-of-contents {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .toc-title {
        font-size: 1rem;
    }
    
    .toc-item[data-level="2"] .toc-link,
    .toc-item[data-level="3"] .toc-link,
    .toc-item[data-level="4"] .toc-link {
        padding-left: 1rem;
    }
}

/* Floating TOC Button for Mobile */
.toc-floating {
    position: fixed;
    bottom: 6rem;
    left: 2rem;
    background: white;
    border: 1px solid var(--mfrt-border-light);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--mfrt-shadow-lg);
    cursor: pointer;
    transition: var(--mfrt-transition);
    z-index: 1000;
    color: var(--mfrt-primary);
    font-size: 1.2rem;
}

.toc-floating:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.toc-floating.active {
    background: var(--mfrt-primary);
    color: white;
}

@media (min-width: 769px) {
    .toc-floating {
        display: none;
    }
}
 

/* =========================================
   PREMIUM FOOTER
   ========================================= */

.site-footer-premium {
    background:
        radial-gradient(circle at top left, rgba(220, 53, 69, 0.18), transparent 32rem),
        linear-gradient(135deg, #101820 0%, #17212b 48%, #0f151c 100%);
    color: #ffffff;
    padding: 4.5rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

.site-footer-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.site-footer-premium .container {
    display: block;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(140px, 0.72fr)) minmax(260px, 1.25fr);
    gap: 2rem;
    align-items: start;
}

.footer-column {
    min-width: 0;
}

.footer-title {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
    margin: 0 0 1.15rem;
    letter-spacing: 0;
}

.footer-brand-title {
    font-size: 1.18rem;
}

.footer-brand-intro,
.footer-newsletter-description {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.75;
    margin: 0;
}

.footer-brand-intro {
    max-width: 24rem;
    margin-bottom: 1.35rem;
}

.footer-social .social-link {
    justify-content: flex-start;
    gap: 0.55rem;
}

.footer-social .social-link a {
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
}

.footer-social .social-link a:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #ffffff;
    transform: translateY(-2px);
}

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

.footer-links li {
    margin: 0 0 0.68rem;
    padding: 0;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.94rem;
    line-height: 1.35;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a::before {
    content: '';
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 50%;
    background: #dc3545;
    opacity: 0.75;
    flex: 0 0 auto;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

.footer-newsletter-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 1.35rem;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.18);
}

.footer-newsletter-description {
    margin-bottom: 1rem;
}

.footer-newsletter-form {
    display: grid;
    gap: 0.72rem;
}

.footer-newsletter-form .form-control {
    width: 100%;
    min-height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #101820;
    padding: 0.8rem 0.95rem;
    font-size: 0.95rem;
}

.footer-newsletter-form .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.22);
}

.footer-newsletter-submit {
    min-height: 3rem;
    border: 0;
    border-radius: 6px;
    background: #dc3545;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-newsletter-submit:hover {
    background: #c92f40;
    box-shadow: 0 0.75rem 1.5rem rgba(220, 53, 69, 0.26);
    transform: translateY(-1px);
}

.footer-newsletter-submit:disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
}

.site-footer-premium #newsletter-message.alert {
    box-shadow: none;
    margin-bottom: 0;
    min-height: auto;
    padding: 0.85rem 1rem;
}

@media (max-width: 1199px) {
    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }

    .footer-brand-column,
    .footer-newsletter-column {
        grid-column: span 3;
    }
}

@media (max-width: 767px) {
    .site-footer-premium {
        padding: 3rem 0 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-brand-column,
    .footer-newsletter-column {
        grid-column: auto;
    }

    .footer-brand-intro {
        max-width: none;
    }
}

/* =========================================
   FOOTER BOTTOM SECTION
   ========================================= */

.footer-bottom {
    background: #0b1016;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    margin-top: 0;
}

/* =========================================
   NEWSLETTER SUBSCRIPTION MESSAGES
   ========================================= */

/* Alert/Message base styles */
.alert {
    padding: 15px 20px;
    margin: 15px 0;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success message styling */
.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #b8dacc;
    color: #155724;
    position: relative;
}

.alert-success::before {
    content: 'âœ“';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Error message styling */
.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1b0b7 100%);
    border-color: #f5c2c7;
    color: #721c24;
    position: relative;
}

.alert-danger::before {
    content: '!';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Newsletter specific message styling */
#newsletter-message,
#sidebar-newsletter-message {
    border-radius: 10px;
    margin-top: 15px !important;
    min-height: 55px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#newsletter-message.alert,
#sidebar-newsletter-message.alert {
    padding: 18px 22px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Enhanced styling for footer newsletter messages */
.footer .alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer .alert-success::before {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 2px solid white;
}

.footer .alert-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e55353 100%);
    color: white;
    border-color: #dc3545;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer .alert-danger::before {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 2px solid white;
}

/* Sidebar newsletter message styling */
#sidebar-newsletter-message.alert-success {
    background: linear-gradient(135deg, #e8f5e8 0%, #d1f2d1 100%);
    border-left: 4px solid #28a745;
    color: #155724;
}

#sidebar-newsletter-message.alert-danger {
    background: linear-gradient(135deg, #fde8e8 0%, #f8d1d1 100%);
    border-left: 4px solid #dc3545;
    color: #721c24;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 12px 16px;
        font-size: 13px;
        min-height: 45px;
        margin: 10px 0;
    }
    
    #newsletter-message,
    #sidebar-newsletter-message {
        min-height: 50px;
    }
    
    #newsletter-message.alert,
    #sidebar-newsletter-message.alert {
        padding: 15px 18px;
        font-size: 14px;
    }
}

/* Newsletter form enhancements */
.newsletter-form {
    position: relative;
}

.newsletter-form .form-control {
    padding-right: 60px;
}

.newsletter-form button[type="submit"] {
    transition: all 0.3s ease;
}

.newsletter-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spin animation for loading state */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

.footer-bottom-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    text-align: center;
}

.copyright-text,
.developer-credit {
    margin: 0;
}

.copyright-text p,
.developer-credit p {
    margin: 0;
    font-size: 0.9rem;
    color: #bdc3c7;
    line-height: 1.4;
}

.copyright-text a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--mfrt-transition);
}

.copyright-text a:hover {
    color: #dc3545;
    text-decoration: underline;
}

.developer-link {
    color: #e74c3c !important;
    text-decoration: none;
    font-weight: 600;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--mfrt-transition);
    position: relative;
}

.developer-link:hover {
    background: linear-gradient(45deg, #c0392b, #d68910);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateY(-1px);
}

.developer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #e74c3c, #f39c12);
    transition: width 0.3s ease;
}

.developer-link:hover::after {
    width: 100%;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .copyright-text p,
    .developer-credit p {
        font-size: 0.85rem;
    }
}