:root {
    --body: #f0f5ff;
    --bg: #ffffff;
    --bg-opacity: #ffffff7c;
    --bg-light: #dce4f1;
    --text-color: #50575e;
    --text-color-light: #50565b;
    --loading-bg: rgba(255, 255, 255, 0.8);
    --table-border: #dee2e6;
    --table-bg: #eeeeee;
    --link-color: #0b60e0;
    --border-color: #e1e8ed;
}

[data-bs-theme="dark"] {
    --body: #212529;
    --bg: #262b30;
    --bg-opacity: #262b307c;
    --bg-light: #33383d;
    --text-color: #d5dce3;
    --text-color-light: #a8b6c2;
    --loading-bg: rgba(0, 0, 0, 0.8);
    --table-border: #383838;
    --table-bg: #1d1d1d;
    --border-color: #565656;
}

body {
    background-color: var(--body);
    /* color: var(--text-color); */
    /* font-family: 'appfont', sans-serif !important; */
    overflow-x: hidden;
    scroll-behavior: smooth;
    /* display: flex; */
    /* min-height: 100vh; */
    flex-direction: column;

    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

a {
    color: var(--link-color);
}

/* #f0f5ff */
.inherit-color {
    color: inherit !important;
}

.editPostBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.table {
    overflow: scroll;
}

table {
    color: var(--text-color);
    border: 1px solid var(--table-border);
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
    border-collapse: collapse;
}

table th {
    background: var(--table-bg);
}

table td,
table th {
    padding: .75rem;
    vertical-align: top;
    border: 1px solid var(--table-border);
}


.text-start {
    text-align: start !important;
}

.main-wrapper {
    /* padding-top: 60px; */
}

.text-color-50 {
    color: var(--text-color-light);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.min-vh-90 {
    min-height: 90vh;
}

.notification {
    /* position: fixed; */
    /* bottom: 20px; */
    /* right: 20px; */
    background: var(--bg);
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
    max-width: 350px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.info {
    border-left: 4px solid #17a2b8;
}

.notification.warning {
    border-left: 4px solid #ffc107;
}

.notification.danger {
    border-left: 4px solid #dc3545;
}

.notification i {
    font-size: 1.2em;
}

.notification.success i {
    color: #28a745;
}

.notification.info i {
    color: #17a2b8;
}

.notification.warning i {
    color: #ffc107;
}

.notification.danger i {
    color: #dc3545;
}

.pjax-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--loading-bg);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.w-30 {
    width: 30%;
}

.w-30-flex {
    width: 30%;
    flex-basis: 30%;
    flex-grow: 0;
    flex-shrink: 0;
}

.pagination li a {
    padding: 10px;
    border-radius: 50%;
    color: var(--text-color-light);
}

.pagination li.active a {
    font-weight: bold;
    color: var(--text-color);
}

a {
    text-decoration: none;
}

.social-links {
    /* position: fixed;
    left: 0;
    top: 50%;             
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    padding: 10px; */
    display: flex;
    gap: 10px;
}

.social-links .btn {
    background: var(--bs-dark-bg-subtle);
}

@media (max-width: 768px) {
    .social-links {
        padding: 0;
        padding-top: 20px;
        position: relative;
        display: block;
    }
}

.rect {
    position: relative;
    width: 300px;
    height: 300px;
    flex-shrink: 0;
    background: #000;
    margin: 50px;
    overflow: unset;
}

.rect::before,
.rect::after {
    content: "";
    position: absolute;
    left: -6px;
    top: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    background: #333;
    background-image: linear-gradient(45deg, #ff3c41, #ff8a25, #ffe04f, #4fff88, #56ffef, #37b4ff, #c05aff, #ff3c41, #ff8a25, #ffe04f, #4fff88, #56ffef, #37b4ff, #c05aff);
    background-size: 500%;
    -webkit-animation: position 12s linear infinite alternate;
    animation: position 12s linear infinite alternate;
    z-index: -1;
}

.rect::after {
    filter: blur(10px);
}

@-webkit-keyframes position {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}

@keyframes position {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 400% 0;
    }

    100% {
        background-position: 0 0;
    }
}



.profile-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 40px 0;
}

.profile-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    position: relative;
    height: 200px;
    overflow: hidden;
}

.profile-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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.6;
}

.profile-avatar {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 6px solid white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: bold;
    z-index: 2;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-body {
    padding: 80px 40px 40px;
    text-align: center;
}

.profile-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-position {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 30px;
    font-weight: 500;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 15px;
    min-width: 120px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    margin-top: 5px;
    font-weight: 500;
}

.profile-bio {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.profile-bio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bio-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bio-title::before {
    content: '✨';
    font-size: 1.2rem;
}

.bio-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568;
    text-align: right;
    direction: rtl;
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.info-label {
    font-size: 0.85rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.info-value {
    font-size: 1.1rem;
    color: #2d3748;
    font-weight: 500;
}

.social-links {
    display: flex;
    /* justify-content: center; */
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    color: white;
}

.no-bio {
    color: #a0aec0;
    font-style: italic;
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 15px;
    border: 2px dashed #e2e8f0;
}

.no-bio::before {
    content: '📝';
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-container {
        padding: 20px 10px;
    }

    .profile-body {
        padding: 80px 20px 40px;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    .profile-stats {
        gap: 20px;
    }

    .stat-item {
        min-width: 100px;
        padding: 15px;
    }

    .profile-info {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-card {
    animation: fadeInUp 0.8s ease-out;
}

.profile-body>* {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.profile-name {
    animation-delay: 0.1s;
}

.profile-position {
    animation-delay: 0.2s;
}

.profile-stats {
    animation-delay: 0.3s;
}

.profile-bio {
    animation-delay: 0.4s;
}

.profile-info {
    animation-delay: 0.5s;
}

.social-links {
    animation-delay: 0.6s;
}

/* RTL Support */
[dir="rtl"] .bio-text {
    text-align: right;
}

[dir="ltr"] .bio-text {
    text-align: left;
    direction: ltr;
}

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

/* Header Search */
.header-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-form {
    position: relative;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    /* background: var(--bg); */
    /* border: 1px solid var(--border-color); */
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
}

.search-input-group:hover,
.search-input-group:focus-within {
    border-color: var(--link-color);
    box-shadow: 0 4px 20px rgba(11, 96, 224, 0.2);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 5px 12px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

.search-input::placeholder {
    color: #8b9ba8;
    font-weight: 400;
}

.search-btn {
    padding: 12px 18px;
    border: none;
    background: var(--link-color);
    color: white;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #0950c4;
    transform: scale(1.05);
}

.search-btn i {
    font-size: 16px;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border: 1px solid #e1e8ed;
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestions.show {
    display: block;
}

.search-suggestion-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f5f8fa;
}

.search-suggestion-item:hover {
    background: #f8fafc;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

/* Mobile Search Toggle */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    padding: 8px;
    margin-right: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.mobile-search-toggle:hover {
    background: var(--bg-light);
    color: var(--link-color);
}

/* Search Page Styles */
.search-page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding-bottom: 60px;
}

.search-hero-section {
    background: linear-gradient(135deg, var(--link-color) 0%, #4c6ef5 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.search-hero-section::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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.search-hero-content {
    position: relative;
    z-index: 2;
}

.search-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-icon {
    margin-right: 15px;
    color: #ffd700;
}

.search-form-container {
    max-width: 600px;
    margin: 0 auto 30px;
}

.main-search-form {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-input-wrapper:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.main-search-input {
    flex: 1;
    padding: 20px 25px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.main-search-input::placeholder {
    color: #999;
}

.main-search-btn {
    padding: 20px 30px;
    border: none;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
}

.main-search-btn:hover {
    background: linear-gradient(45deg, #ee5a24, #ff6b6b);
    transform: scale(1.05);
}

.search-query-info {
    margin-top: 20px;
    opacity: 0.9;
}

.search-query-label {
    font-size: 14px;
    opacity: 0.8;
}

.search-query-term {
    font-weight: 600;
    margin: 0 8px;
}

.search-results-count {
    font-size: 14px;
    opacity: 0.8;
}

/* Search Results Section */
.search-results-section {
    background: var(--body);
    padding: 60px 0;
}

/* Search Results Container */
.search-results-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Search Statistics Bar */
.search-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.search-stats-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.results-count-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.results-text {
    color: var(--text-color);
    font-weight: 600;
}

.search-time {
    color: var(--text-color-light);
    font-size: 14px;
}

.sort-dropdown {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-dropdown:hover {
    border-color: var(--link-color);
}

/* Search Content Layout */
.search-content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Search Filters Sidebar */
.search-filters-sidebar {
    background: var(--bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.filter-title,
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* border-bottom: 2px solid var(--border-color); */
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group-title {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
    transition: all 0.3s ease;
}

.filter-option:hover {
    color: var(--link-color);
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    accent-color: var(--link-color);
}

.filter-label {
    font-size: 14px;
    color: var(--text-color);
}

/* Popular Searches */
.popular-searches-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.popular-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-tag {
    background: var(--border-color);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.popular-tag:hover {
    background: var(--link-color);
    color: white;
    transform: translateY(-2px);
}

/* Search Results Grid */
.search-results-main {
    min-height: 500px;
}

.search-results-grid {
    display: grid;
    gap: 25px;
}

/* Search Result Card */
.search-result-card {
    background: var(--bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.search-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.search-card-container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 20px;
}

/* Card Image */
.search-card-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 140px;
}

.image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.search-result-card:hover .card-image {
    transform: scale(1.05);
}

.relevance-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    text-align: center;
}

.relevance-score {
    font-weight: 700;
    display: block;
}

.relevance-label {
    font-size: 8px;
    opacity: 0.9;
}

/* Card Content */
.search-card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 5px 0;
}

.card-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tag {
    background: var(--link-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.search-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.title-link {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.title-link:hover {
    color: var(--link-color);
}

.search-card-excerpt {
    color: var(--text-color-light);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Card Meta */
.search-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.meta-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.meta-right {
    display: flex;
    gap: 8px;
}

.post-date,
.reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-color-light);
    font-size: 12px;
}

.share-btn,
.bookmark-btn {
    background: none;
    border: none;
    color: var(--text-color-light);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.share-btn:hover,
.bookmark-btn:hover {
    background: var(--border-color);
    color: var(--link-color);
}

/* Keywords */
.search-keywords {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.keyword-tag {
    background: var(--border-color);
    color: var(--text-color-light);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

/* Hover Actions */
.card-hover-actions {
    position: absolute;
    top: 50%;
    right: -100px;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.search-result-card:hover .card-hover-actions {
    right: 20px;
    opacity: 1;
}

.quick-read-btn {
    background: var(--link-color);
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.quick-read-btn:hover {
    transform: scale(1.05);
}

/* Pagination */
.search-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg);
    padding: 15px 25px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pagination-btn {
    background: none;
    border: none;
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--link-color);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-number {
    background: none;
    border: none;
    color: var(--text-color);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination-number:hover {
    background: var(--border-color);
}

.pagination-number.active {
    background: var(--link-color);
    color: white;
}

.pagination-dots {
    color: var(--text-color-light);
    padding: 0 5px;
}

/* No Results Styles */
.no-results-container,
.empty-search-container {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.no-results-icon,
.empty-search-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 30px;
}

.no-results-title,
.empty-search-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
}

.no-results-message,
.empty-search-message {
    font-size: 1.1rem;
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 30px;
}

.search-suggestions-tips {
    background: var(--bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.search-suggestions-tips h4 {
    color: var(--link-color);
    margin-bottom: 15px;
    font-weight: 600;
}

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

.search-suggestions-tips li {
    padding: 8px 0;
    color: var(--text-color);
    position: relative;
    padding-left: 20px;
}

.search-suggestions-tips li::before {
    content: '•';
    color: var(--link-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-search-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .header-search-container.active {
        display: block;
    }

    .mobile-search-toggle {
        display: block;
    }

    .search-wrapper {
        max-width: none;
    }

    .search-page-title {
        font-size: 2rem;
    }

    .search-hero-section {
        padding: 60px 0 40px;
    }

    .main-search-input {
        padding: 15px 20px;
        font-size: 14px;
    }

    .main-search-btn {
        padding: 15px 20px;
        font-size: 14px;
    }

    .main-search-btn span {
        display: none;
    }

    /* Mobile Search Results */
    .search-content-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .search-filters-sidebar {
        position: static;
        order: 2;
        margin-top: 20px;
    }

    .search-results-main {
        order: 1;
    }

    .search-stats-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .search-card-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .search-card-image {
        height: 200px;
        order: -1;
    }

    .card-hover-actions {
        position: static;
        opacity: 1;
        transform: none;
        margin-top: 15px;
        display: none;
    }

    .pagination-nav {
        flex-direction: column;
        gap: 10px;
    }

    .pagination-numbers {
        order: -1;
    }

    /* Filter Toggles for Mobile */
    .filter-toggle {
        display: block;
        width: 100%;
        background: var(--link-color);
        color: white;
        padding: 12px 20px;
        border: none;
        border-radius: 10px;
        font-weight: 600;
        margin-bottom: 15px;
        cursor: pointer;
    }

    .filter-section {
        display: none;
    }

    .filter-section.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .search-hero-section {
        padding: 40px 0 30px;
    }

    .search-page-title {
        font-size: 1.5rem;
    }

    .search-input-wrapper {
        border-radius: 20px;
    }

    .main-search-input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .main-search-btn {
        padding: 12px 15px;
    }

    .search-result-card {
        margin: 0 -10px;
        border-radius: 10px;
    }

    .search-card-container {
        padding: 15px;
    }

    .search-card-title {
        font-size: 16px;
    }

    .search-card-excerpt {
        font-size: 13px;
    }

    .popular-search-tags {
        justify-content: center;
    }
}

.search-input-wrapper {
    margin: 0 10px;
}

@media (max-width: 480px) {
    .search-page-title {
        font-size: 1.5rem;
    }

    .search-icon {
        margin-right: 10px;
    }

    .no-results-container,
    .empty-search-container {
        padding: 60px 15px;
    }

    .no-results-icon,
    .empty-search-icon {
        font-size: 3rem;
    }

    .no-results-title,
    .empty-search-title {
        font-size: 1.4rem;
    }
}

.link {
    cursor: pointer;
}

.alert-dismissible {
    position: fixed !important;
    top: 20%;
    left: 10%;
    right: 10%;
    z-index: 10000;
}

/* Modern Popup Styles */
.main-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    animation: popupFadeIn 0.3s ease-out;
}

.main-popup.show {
    display: block;
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* background: white; */
    border-radius: 10px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: popupSlideIn 0.4s ease-out;
    max-width: 90vw;
    /* max-height: 90vh; */
}

.popup-body {
    position: relative;
    display: flex;
    flex-direction: column;
}

.popup-image-container {
    position: relative;
    overflow: hidden;
}

.popup-image {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    display: block;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.popup-close:hover {
    background: rgb(0, 0, 0);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.popup-close svg {
    color: #ffffff;
    transition: color 0.2s ease;
}

.popup-close:hover svg {
    color: #ffffff;
}

.popup-footer {
    padding: 20px;
    text-align: center;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: var(--bg);
}


.popup-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffa41d;
    color: #333;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.popup-button svg {
    transition: transform 0.2s ease;
}

.popup-button:hover svg {
    transform: translateX(2px);
}

/* Animations */
@keyframes popupFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile-First Responsive Design */
@media (max-width: 768px) {
    .main-popup {
        animation: popupFadeIn 0.3s ease-out;
    }

    .popup-content {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        border-radius: 15px;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
        overflow: hidden;
        animation: popupSlideIn 0.4s ease-out;
        max-width: 90vw;
        max-height: 80vh;
        width: 90vw;
        margin: 0;
        -webkit-overflow-scrolling: touch;
    }

    .popup-body {
        display: flex;
        flex-direction: column;
        max-height: 80vh;
        overflow: hidden;
    }

    .popup-image-container {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        max-height: 50vh;
    }

    .popup-image {
        width: 100%;
        height: auto;
        max-height: 50vh;
        object-fit: cover;
    }

    .popup-close {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
    }

    .popup-close svg {
        color: #666;
        width: 18px;
        height: 18px;
    }

    .popup-footer {
        padding: 15px;
        text-align: center;
        /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
        flex-shrink: 0;
    }

    .popup-button {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
        background: #ffa41d;
        color: #333;
        border-radius: 25px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .popup-button:hover {
        background: #f8f9fa;
        transform: translateY(-1px);
        text-decoration: none;
        color: #333;
    }

    .popup-button svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        max-width: 95vw;
        width: 95vw;
        max-height: 85vh;
    }

    .popup-close {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }

    .popup-close svg {
        width: 16px;
        height: 16px;
    }

    .popup-footer {
        padding: 12px;
    }

    .popup-button {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 20px;
    }

    .popup-button svg {
        width: 14px;
        height: 14px;
    }

    .popup-image-container {
        max-height: 45vh;
    }

    .popup-image {
        max-height: 45vh;
    }
}

@media (max-width: 360px) {
    .popup-content {
        max-width: 98vw;
        width: 98vw;
        max-height: 90vh;
        border-radius: 12px;
    }

    .popup-close {
        width: 30px;
        height: 30px;
        top: 6px;
        right: 6px;
    }

    .popup-close svg {
        width: 14px;
        height: 14px;
    }

    .popup-footer {
        padding: 10px;
    }

    .popup-button {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 18px;
    }

    .popup-button svg {
        width: 12px;
        height: 12px;
    }

    .popup-image-container {
        max-height: 40vh;
    }

    .popup-image {
        max-height: 40vh;
    }
}

@media (min-width: 992px) {
    .popup-content {
        max-width: 800px;
    }

    .popup-image {
        max-height: 70vh;
    }
}

@media (min-width: 1200px) {
    .popup-content {
        max-width: 900px;
    }
}

#float-holder-right-bottom {
    padding: 15px 10px;
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 10000;
    gap: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

html[dir="rtl"] #float-holder-right-bottom {
    align-items: flex-start !important;
}

.comment-float {
    background: var(--bg);
    padding: 14px 20px;
    border-radius: 4px;
    box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, .2);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
    max-width: 350px;
    align-items: center;
    gap: 10px;
    border-radius: 25px;
}
.comment-float .close-btn {
    /* position: absolute; */
    /* top: 5px;
    right: 10px; */
    padding: 5px;
    cursor: pointer;
}

.comment-float.show {
    transform: translateX(0);
}