* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #239f40;
    --primary-light: #6366f1;
    --primary-dark: #0035ad;
    --accent: #7c3aed;
    --ai-color: #10b981;
    --ai-bg: rgba(16, 185, 129, 0.1);
    --light: #fafafa;
    --dark: #1f2937;
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    --border: #e5e7eb;
    --bg: #ffffff;
    --card-bg: #ffffff;
    --sidebar-bg: #f9fafb;
}

html {
    font-size: 16px;
}

body * {
    font-family: 'Yajo', sans-serif;
}

@media (min-width: 412px) {
    .sidebar-toggle.active {
        left: 350px;
    }
}

.sidebar-toggle.active {
    right: 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
}

.sidebar-toggle,
.sidebar-overlay,
.sidebar-close {
    display: none;
}

.sidebar-toggle {
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s, background-color 0.3s !important;
}

@media (max-width: 900px) {

    .sidebar-toggle {
        writing-mode: sideways-lr;
        text-orientation: mixed;
        font-size: 20px;
        letter-spacing: 2px;
        display: flex;
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 100px;
        background-color: var(--primary-color, #239f40);
        color: white;
        border: none;
        border-radius: 0 10px 10px 0;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        cursor: pointer;

    }

    .sidebar {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 85% !important;
        max-width: 350px !important;
        height: 100vh !important;
        background-color: #fafafa;
        z-index: 10001;
        overflow: hidden !important;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .son-sidbar {
        overflow-y: auto;
        height: 100%;
        width: 100%;
        margin-top: 150px;
        padding-right: 5px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .son-sidbar::-webkit-scrollbar {
        display: none;
    }

    .sidebar.active {
        left: 0;
        padding: 40px;
    }

}

@font-face {
    font-family: 'Yajo';
    src: url('../fonts/Yajo-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Yajo', sans-serif;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.97) 0%, rgba(243, 244, 246, 0.95) 100%);
    color: var(--dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.3;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg,
            rgba(79, 70, 229, 0.03) 0%,
            rgba(124, 58, 237, 0.02) 100%);
    filter: blur(60px);
}

.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 30px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.container:has(.empty-state-wrapper) {
    align-items: center;
    justify-content: center;
}

.header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    flex-direction: row-reverse;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-container {
    order: 2;
}

.logo {
    font-family: 'El Messiri', cursive;
    font-size: 2.8rem;
    font-weight: 700;
    color: transparent;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: -2px;
    display: inline-block;
    transition: transform 0.3s ease;
    line-height: 1;
    white-space: nowrap;
}

.logo img {
    width: 100%;
}

.search-container {
    order: 1;
    width: 500px;
    max-width: 100%;
}

.search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}


.search-input {
    width: 100%;
    padding: 12px 20px 14px 100px;
    font-size: 16px;
    line-height: 1.6;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    outline: none;
    background-color: white;
    transition: all 0.3s ease;
    color: var(--dark);
    font-family: 'Yajo', sans-serif;
    height: auto;
    min-height: 50px;
    display: flex;
    align-items: center;
    vertical-align: middle;
    border: 1.5px solid var(--border);
}

.search-input::placeholder {
    font-family: Helvetica, sans-serif !important;
}

.search-input::-webkit-input-placeholder {
    font-family: 'Amiri', serif;
    color: var(--gray);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 400;
    opacity: 0.8;
    border: 0 !important;
}

.search-input::-moz-placeholder {
    font-family: 'Amiri', serif;
    color: var(--gray);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 400;
    opacity: 0.8;
    border: 0 !important;
}

.search-input:-ms-input-placeholder {
    font-family: 'Amiri', serif;
    color: var(--gray);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 400;
    opacity: 0.8;
    border: 0 !important;
}

.search-buttons {
    position: absolute;
    left: clamp(12px, 3vw, 20px);
    display: flex;
    gap: clamp(6px, 2vw, 10px);
    align-items: center;
    height: 100%;
    z-index: 2;
}

.search-icon-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    cursor: pointer;
    padding: clamp(6px, 2vw, 8px);
    transition: all 0.2s ease;
    border-radius: 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.search-icon-btn:hover {
    background-color: var(--gray-light);
    color: var(--primary);
}

.search-icon-btn:active {
    transform: scale(0.95);
}

.ai-assistant {
    position: relative;
    overflow: hidden;
    max-height: 600px;
    transition: all 0.5s ease-in-out;
    background: linear-gradient(135deg, var(--ai-bg) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 30px;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.08);
    transition: opacity 0.5s ease, transform 0.5s ease, margin 0.5s ease;
}

.ai-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 5%;
    transition: all 0.2s ease;
    z-index: 5;
}

.ai-close-btn:hover {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--ai-color);
    transform: rotate(90deg);
}

.ai-assistant.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    border-width: 0;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.ai-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--ai-color), #34d399);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.ai-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ai-color);
}

.ai-message {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.ai-suggestion {
    background-color: white;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-suggestion:hover {
    background-color: var(--ai-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2);
}

.show-more-btn {
    display: none;
    width: 100%;
    background-color: white;
    border: 1px solid var(--ai-color);
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 0.95rem;
    color: var(--ai-color);
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    margin-top: 10px;
}

.results-layout {
    display: flex;
    gap: 30px;
    margin-top: 10px;
}

.main-results {
    flex: 2;
    min-width: 0;
}

.sidebar {
    flex: 1;
    min-width: 280px;
}

.results-stats {
    color: var(--gray);
    font-size: 0.85rem;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.results-stats .ai-reopen-mini {
    background: linear-gradient(135deg, var(--ai-color), #34d399);
    border: none;
    border-radius: 5%;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 15px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.results-stats .ai-reopen-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #0d9668, #10b981);
}

.ai-assistant.hidden+.results-stats .ai-reopen-mini {
    display: flex;
    animation: pulseBtn 2s infinite;
}

.result-content-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-top: 10px;
}

.result-text-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.result-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #1e1e2d;
}

@media (max-width: 768px) {
    .result-content-wrapper {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .result-image {
        width: 120px;
        height: 80px;
        margin-bottom: 0;
        flex-shrink: 0;
        object-fit: cover;
        border-radius: 8px;
    }

    .result-text-content {
        flex: 1;
        min-width: 0;
    }

    .result-title {
        margin: 0 0 8px 0;
        line-height: 1.5;
    }

    .result-desc {
        margin: 0;
        line-height: 1.7;
    }
}

.result-card {
    margin-bottom: 30px;
    padding: 5px 0;
}

.result-url {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0a8043;
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 4px;
}

.result-title {
    font-size: 1.05rem;
    color: var(--primary-dark);
    text-decoration: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-title:hover {
    text-decoration: underline;
    color: var(--primary);
}

.result-description {
    font-size: 0.9rem;
    color: var(--dark);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 5px;
}

.result-meta {
    display: flex;
    gap: 20px;
    font-size: 0.75rem;
    color: var(--gray);
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.result-tag {
    background-color: var(--gray-light);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-dark);
    display: inline-block;
    margin-right: 10px;
}

.tag-gov {
    background-color: #e8f5e9;
    color: #0d652d;
}

.tag-trusted {
    background-color: #e3f2fd;
    color: #0b5e87;
}

.tag-iran {
    background-color: #ffebee;
    color: #b31412;
}

.tag-popular {
    background-color: #fff8e1;
    color: #b45f06;
}

.info-card {
    background-color: var(--sidebar-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.info-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.image-item {
    border-radius: 12px;
    overflow: hidden;
    background-color: white;
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}

.image-item:hover {
    transform: scale(1.02);
}

.image-placeholder {
    height: 100px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2rem;
}

.image-item span {
    display: block;
    padding: 8px 10px;
    font-size: 0.8rem;
    color: var(--gray);
    text-align: center;
    background-color: white;
}

.quick-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.info-row i {
    width: 24px;
    color: var(--primary);
    font-size: 1.1rem;
}

.info-row span {
    color: var(--dark);
}

.suggested-links {
    list-style: none;
}

.suggested-links li {
    margin-bottom: 12px;
}

.suggested-links a {
    color: var(--primary-dark);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s ease;
}

.suggested-links a:hover {
    color: var(--primary);
}

.suggested-links i {
    width: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
    direction: ltr;
}

.page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    border-radius: 8px;
    background-color: white;
    border: 1px solid var(--border);
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    min-width: 40px;
    height: 40px;
    box-sizing: border-box;
}

.page-link:hover {
    background-color: #f1f5f9;
}

.page-link.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-link.disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.page-arrow {
    font-size: 1rem;
    padding: 8px 12px;
}

.page-dots {
    border: none;
    background: transparent;
    color: var(--gray);
    cursor: default;
    padding: 8px 4px;
}

.footer {
    position: relative;
    width: 100%;
    padding: 20px 30px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    margin-top: 40px;
    animation: fadeIn 1s 1s forwards;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer-links {
    display: flex;
    gap: clamp(16px, 3vw, 28px);
    flex-wrap: wrap;
    align-items: center;
}

.footer-link {
    color: var(--gray);
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
    padding: 4px 0;
    cursor: pointer;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

@media (max-width: 700px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

.copyright {
    color: var(--gray);
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .results-layout {
        flex-direction: column;
    }

    .sidebar {
        order: -1;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .pagination {
        gap: 5px;
        margin-top: 25px;
    }

    .page-link {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 0.8rem;
    }

    .container {
        padding: 20px 45px;
    }


    .page-link[data-page="first"],
    .page-link[data-page="last"],
    .page-link[data-page="prev"],
    .page-link[data-page="next"] {
        min-width: max-content;
        padding: 0 10px;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
    }

    .logo-container {
        order: 1;
        text-align: center;
    }

    .search-container {
        order: 2;
        width: 100%;
    }

    .ai-suggestions {
        flex-direction: column;
    }

    .ai-suggestions .ai-suggestion:not(:first-child) {
        display: none;
    }

    .show-more-btn {
        display: flex;
    }

    .ai-suggestions.expanded .ai-suggestion {
        display: flex !important;
    }

    .results-stats .ai-reopen-mini {
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        color: var(--ai-color);
        font-size: 0.85rem;
        font-weight: 600;
        transform: none !important;
    }

    .results-stats .ai-reopen-mini:hover {
        background: transparent;
        box-shadow: none;
        color: var(--primary);
    }

    .results-stats .ai-reopen-mini i {
        font-size: 1rem;
    }

    .results-stats .ai-reopen-mini span {
        position: relative;
    }

    .results-stats .ai-reopen-mini span::after {
        content: '';
        position: absolute;
        bottom: -2px;
        right: 0;
        width: 0;
        height: 1px;
        background-color: var(--ai-color);
        transition: width 0.3s ease;
    }

    .results-stats .ai-reopen-mini:hover span::after {
        width: 100%;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 20px 45px;
    }

    .logo {
        font-size: 2.2rem;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 4px;
    }

    .page-link {
        min-width: 30px;
        height: 30px;
        padding: 0 6px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .pagination {
        gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-link {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

@keyframes gentlePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

.notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background-color: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    max-width: 90%;
}


.empty-state-wrapper {
    text-align: center;
    max-width: 600px;
    width: 100%;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.user-message p {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.7;
}

.elegant-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    border: none;
    margin: 40px 0;
}

.webmaster-section {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(5px);
}

.webmaster-section h2 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.webmaster-section h2 i {
    color: var(--primary);
    font-size: 1.1rem;
}

.webmaster-section p {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 25px;
    line-height: 1.6;
}

#searchEngine {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hidden {
    display: none !important;
}

.article-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
    display: none;
    direction: rtl;
}

.article-container.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-header img {
    width: 16rem;
}

.article-header h1 {
    font-family: 'El Messiri', cursive;
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary, #34a853) 0%, var(--accent, #007bff) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-header .subhead {
    font-size: 1.2rem;
    color: var(--gray, #666);
    font-weight: 300;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border, #eee);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--dark, #333);
    text-align: justify;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-content p {
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
}

.article-content p:nth-child(1) {
    animation-delay: 0.1s;
}

.article-content p:nth-child(2) {
    animation-delay: 0.2s;
}

.article-content p:nth-child(3) {
    animation-delay: 0.3s;
}

.article-content p:nth-child(4) {
    animation-delay: 0.4s;
}

.article-content strong {
    color: var(--primary, #34a853);
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    margin-top: 10px;
}

.section-break {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light, #8ce0a3), transparent);
    margin: 40px auto;
    opacity: 0.2;
}

.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    color: white;
    border: 1px solid var(--border, #ccc);
    padding: 12px 24px;
    border-radius: 11px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgb(136 136 136 / 95%);
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    font-family: inherit;
}

.back-button.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-button:hover {
    background: var(--primary, #34a853);
    color: white;
    border-color: var(--primary, #34a853);
    transform: translateY(-2px);
}

@media (max-width: 700px) {
    .article-header h1 {
        font-size: 2.4rem;
    }

    .back-button {
        top: 20px;
        left: 20px;
        padding: 8px 18px;
        font-size: 0.9rem;
    }
}

[dir="rtl"] .back-button {
    left: 30px;
    right: auto;
}

[dir="rtl"] .back-button i {
    transform: rotate(180deg);
}

[dir="rtl"] .back-button:hover i {
    transform: rotate(180deg) translateX(-5px);
}

.apps-slider-wrapper {
    margin: 20px 0;
    padding: 20px;
    border-radius: 12px;
    direction: rtl;
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.apps-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.apps-slider-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slider-nav-buttons {
    display: flex;
    gap: 10px;
}

.slider-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.apps-slider-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;


    padding-top: 10px;
    padding-bottom: 5px;
    margin-top: -10px;

    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.apps-slider-container::-webkit-scrollbar {
    display: none;
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: var(--bg);
    border-color: var(--border);
    color: var(--gray);
    pointer-events: none;
}

.app-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    background: var(--bg);
    border-radius: 12px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.app-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.app-desc {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0 0 15px 0;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-props {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 15px;
    padding: 0 10px;
}

.app-btn {
    width: 100%;
    padding: 10px 0;
    background: rgba(35, 159, 64, 0.1);
    color: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    direction: ltr;
}

.app-btn:hover {
    background: var(--primary);
    color: white;
}

.view-more-card {
    justify-content: center;
    background-color: var(--bg-light);
    border: 2px dashed rgba(35, 159, 64, 0.4);
    text-decoration: none;
    cursor: pointer;
}

.view-more-card:hover {
    background-color: rgba(35, 159, 64, 0.05);
    border-color: var(--primary);
    box-shadow: none;
}

.view-more-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.view-more-card:hover .view-more-icon {
    transform: translateX(-8px);
}

.apps-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.apps-slider-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.2rem;
    display: flex;
    gap: 8px;
}

.slider-nav-buttons {
    display: flex;
    gap: 10px;
}

.slider-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.slider-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--bg);
    border-color: var(--border);
    color: var(--gray);
    pointer-events: none;
}

.apps-slider-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-top: 10px;
    padding-bottom: 20px;
    margin-top: -10px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.apps-slider-container::-webkit-scrollbar {
    display: none;
}

.app-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
    perspective: 1000px;
    background: transparent;
}

.app-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.app-card-inner:hover {
    transform: translateY(-5px);
}

.app-card-inner.is-flipped {
    transform: rotateY(180deg) !important;
}

.app-card-front, .app-card-back {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 10px var(--shadow);
}

.app-card-back {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transform: rotateY(180deg);
    justify-content: center;
}

.info-toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 1px solid var(--border);
    color: var(--gray);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
}

.info-toggle-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.app-title {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.app-desc {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0 0 15px 0;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-props {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 15px;
    padding: 0 10px;
}

.app-btn {
    width: 100%;
    padding: 10px 0;
    background: rgba(35, 159, 64, 0.1);
    color: var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    direction: ltr;
    margin-top: auto;
}

.app-btn:hover {
    background: var(--primary);
    color: white;
}

.app-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    text-align: right;
    width: 100%;
    font-size: 0.85rem;
    color: var(--gray);
    line-height: 1.8;
}

.app-details-list li {
    border-bottom: 1px dashed var(--border);
    padding: 5px 0;
}

.app-details-list li:last-child {
    border-bottom: none;
}

.app-details-list strong {
    color: var(--text-dark);
}

@media (max-width: 992px) {
    .app-card {
        flex: 0 0 220px;
    }
}

@media (max-width: 480px) {
    .app-card {
        flex: 0 0 160px;
    }

    .app-card-front, .app-card-back {
        padding: 15px 10px;
    }

    .app-icon {
        width: 50px;
        height: 50px;
        font-size: 0.9rem;
    }

    .app-title {
        font-size: 0.95rem;
    }

    .app-desc {
        font-size: 0.75rem;
    }

    .app-btn {
        font-size: 0.8rem;
        padding: 8px 0;
    }

    .info-toggle-btn {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
}

@media (max-width: 992px) {
    .app-card {
        flex: 0 0 220px;
    }
}

@media (max-width: 480px) {
    .app-card {
        flex: 0 0 160px;
        padding: 12px;
    }

    .app-icon {
        width: 50px;
        height: 50px;
        font-size: 0.9rem;
    }

    .app-title {
        font-size: 0.95rem;
    }

    .app-desc {
        font-size: 0.75rem;
    }

    .app-btn {
        font-size: 0.8rem;
        padding: 8px 0;
    }

    .view-more-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 500px) {
    .app-card {
        flex: 0 0 100%;
    }

    .app-card-front, .app-card-back {
        padding: 25px 20px;
    }

    .app-icon {
        width: 75px;
        height: 75px;
        font-size: 30px;
        margin-bottom: 20px;
    }

    .app-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .app-desc {
        font-size: 0.95rem;
    }

    .app-props {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .app-btn {
        font-size: 1.05rem;
        padding: 12px 0;
    }

    .info-toggle-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        top: 15px;
        left: 15px;
    }

    .app-details-list {
        font-size: 0.95rem;
        line-height: 2;
    }

    .view-more-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
}

.apps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

@media (max-width: 1105px) {
    .apps-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .apps-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 570px) {
    .apps-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 480px) {
    .apps-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

.os-filters-container {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.os-filters-container::-webkit-scrollbar {
    display: none;
}

.os-filter-btn {
    padding: 6px 18px;
    border-radius: 10px;
    border: 1px solid var(--border, #e5e7eb);
    background: var(--bg, #ffffff);
    color: var(--gray-dark, #4b5563);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.os-filter-btn:hover {
    border-color: var(--primary, #3b82f6);
    color: var(--primary, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

.os-filter-btn.active {
    background: var(--primary, #3b82f6);
    color: #ffffff;
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.custom-scroll-track {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: none;
}


.custom-scroll-thumb {
    height: 100%;
    background: #cbd5e1;
    border-radius: 10px;
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-scroll-thumb:hover {
    background: #94a3b8;
}

.custom-scroll-thumb:active {
    background: var(--primary, #3b82f6);
}

.main-nav {
    width: 100%;
}

.nav-layout {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
}

.nav-list {
    flex: 2;
    min-width: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #ebebeb;
    background: white;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.nav-sidebar-spacer {
    flex: 1;
    min-width: 280px;
}

.nav-list li {
    display: flex;
}

.nav-list li a {
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: #5f6368;
    padding: 14px 5px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-bottom 0.2s ease;
}

.nav-list li a:hover,
.nav-list li a.active {
    color: var(--primary, #239f40);
    border-bottom: 3px solid var(--primary, #239f40);
}

@media (max-width: 900px) {
    .nav-sidebar-spacer {
        display: none;
    }

    .nav-layout {
        padding: 0 45px;
    }

    .nav-list {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-list {
        gap: 15px;
    }

    .nav-list li a {
        font-size: 14px;
        padding: 12px 2px;
    }
}


.currency-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.currency-row:last-child {
    border-bottom: none;
}

.currency-row span:first-child {
    color: #1a8917;
    font-weight: 600;
}

.currency-row span:last-child {
    color: #444;
    font-weight: 700;
}

.currency-update {
    margin-top: 10px;
    font-size: 12px;
    color: #888;
    text-align: center;
}

.videos-container {
    margin-top: 30px;
    margin-bottom: 40px;
}

.videos-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 15px 40px;
    box-sizing: border-box;
}

.videos-track-wrapper {
    overflow: hidden;
}

.videos-track {
    display: flex;
    gap: 16px;
    transition: transform 0.35s ease;
    will-change: transform;
}

.video-thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.video-card:hover .video-thumb img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #f5f5f5;
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 4px;
}

.video-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.0) 0, rgba(0, 0, 0, 0.45) 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.video-card:hover .video-thumb::after {
    opacity: 1;
}

.video-thumb::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: all 0.25s ease;
}

.video-card:hover .video-thumb::before {
    opacity: 1;
    box-shadow: 0 0 0 10px transparent;
}

.video-details {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-details h3 {
    font-size: 13px;
    line-height: 1.5;
    height: 40px;
    overflow: hidden;
    color: #f7f7f7;
    margin: 0;
}

.video-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #f7f7f7;
    text-decoration: none;
    background: linear-gradient(135deg, rgba(0, 175, 230, 0.7), rgba(70, 0, 180, 0.8));
    cursor: pointer;
    transition: background 0.25s ease, transform 0.1s ease, box-shadow 0.25s ease;
}

.video-play-btn:hover {
    background: linear-gradient(135deg, rgba(0, 175, 230, 0.9), rgba(120, 20, 220, 0.95));
    box-shadow: 0 0 12px rgba(0, 175, 230, 0.7);
    transform: translateY(-1px);
}

.videos-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 15, 15, 0.75);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 20;
    transition: background 0.2s ease, transform 0.2s ease;
}

.videos-nav:hover {
    background: rgba(30, 30, 30, 0.95);
    transform: translateY(-50%) scale(1.05);
}

.videos-nav.prev {
    left: 8px;
}

.videos-nav.next {
    right: 8px;
}

.videos-slider.no-scroll .videos-nav {
    display: none;
}

@media (max-width: 900px) {
    .videos-slider {
        padding: 10px 28px;
    }

    .video-card {
        flex: 0 0 220px;
    }
}

@media (max-width: 600px) {
    .videos-slider {
        padding: 10px 20px;
    }

    .video-card {
        flex: 0 0 80%;
    }
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-modal.is-open {
    display: flex;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 15, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.video-modal-content {
    position: relative;
    z-index: 2;
    max-width: 960px;
    width: 95%;
    background: #050515;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
}

.video-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.12);
}


.video-modal-body {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    background: #000;
}

.video-modal-body iframe,
.video-modal-body video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-pip-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 60;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .25s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .4);
}

.video-pip-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.75);
}

.video-modal-content.mini-player {
    position: fixed;
    width: 340px;
    height: 190px;
    bottom: 20px;
    right: 20px;
    max-width: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .8);
    animation: miniplayer .25s ease;
}

@keyframes miniplayer {
    from {
        transform: scale(.7);
        opacity: .6;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.video-modal-content.mini-player .video-modal-close {
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    font-size: 16px;
}

.video-modal-content.mini-player .video-pip-btn {
    bottom: 6px;
    right: 6px;
}

.video-modal-content.mini-player .video-modal-body {
    padding-top: 0;
    height: 100%;
}

.result-box {
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    direction: rtl;
    animation: fadeIn 0.35s ease-in-out;
}

.result-box ul {
    padding-right: 20px;
}

.result-box li {
    margin-bottom: 6px;
}

.result-box a {
    color: #0d6efd;
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-install-container {
    margin-bottom: 1rem;
    text-align: center;
}

.pwa-install-button {
    display: flex;
    align-items: center;
    border: 1px solid #239f40 !important;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background-color: unset;
    color: #239f40;
    font-family: 'Yajo';
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    justify-content: center;
}

.pwa-install-button i {
    font-size: 0.95rem;
}

.pwa-install-button:hover {
    background-color: #d4edda;
    transform: translateY(-1px);
    color: #155724;
}

.pwa-install-button:active {
    transform: translateY(0);
    color: #155724;
}

.nxr-box {
    padding: 20px 22px;
    margin: 20px 0;
    direction: rtl;
    font-family: 'Yajo', sans-serif;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.nxr-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.nxr-title i {
    color: var(--primary);
    font-size: 1.1rem;
}

.nxr-box p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.8;
}

.nxr-list {
    margin-right: 18px;
    line-height: 2;
    color: var(--dark);
    font-size: 0.95rem;
}


.nxr-box a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.nxr-box a:hover {
    text-decoration: underline;
}

.nxr-btn-primary {
    display: inline-block;
    color: #34a853;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity .2s ease;
}

.nxr-btn-primary:hover {
    opacity: 0.9;
}

.videos-container {
    width: 100%;
    margin: 25px 0;
}

#videoLogo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 90px;
    z-index: 10;
    opacity: 0.85;
    pointer-events: none;
}

.videos-box-wrapper {
    margin: 20px 0;
    padding: 20px;
    border-radius: 12px;
    direction: rtl;
    background-color: var(--sidebar-bg, #ffffff);
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.videos-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    padding-bottom: 15px;
}

.videos-box-header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.videos-nav-buttons {
    display: flex;
    gap: 10px;
}

.videos-box-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border, #e5e7eb);
    background-color: #ffffff;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.videos-box-btn:hover {
    background-color: var(--primary, #239f40);
    color: white;
    border-color: var(--primary, #239f40);
}

.videos-box-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    margin-top: -5px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.videos-box-track::-webkit-scrollbar {
    display: none;
}

.video-card {
    min-width: 240px;
    max-width: 240px;
    flex: 0 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #e2e8f0;
}

.video-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


.video-source-logo {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 2;
}

.video-source-logo img {
    height: 14px;
    width: auto;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary, #239f40);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(35, 159, 64, 0.4);
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.1);
}

.video-card.loading .video-thumb {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

.video-card.loading .video-title {
    height: 18px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 4px;
    width: 85%;
    margin-bottom: 8px;
}

.video-card.loading .video-source {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    border-radius: 4px;
    width: 40%;
    display: inline-block;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.video-info {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.video-source {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 6px;
    align-self: flex-start;
}

@media (max-width: 768px) {
    .video-card {
        min-width: 200px;
        max-width: 200px;
    }

    .play-overlay {
        opacity: 1;
        background: transparent;
    }

    .play-button {
        width: 40px;
        height: 40px;
    }
}

.video-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
    z-index: 9999;
}

.video-popup.active {
    display: flex;
}

.popup-content {
    position: relative;
    width: 92%;
    max-width: 820px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .3);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: background 0.3s ease, transform 0.2s ease;
}

.close-popup:hover {
    background: rgba(220, 53, 69, 0.9);
    transform: scale(1.1);
}

.video-container,
.iframe-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.video-container .plyr {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px 12px 0 0 !important;
}

.source-btn {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
    border-top: 1px solid #d4d4d5;
    transition: .2s;
    font-family: 'YAJO';
}

.source-btn:hover {
    background: #e5e7eb;
}

.plyr {
    border-radius: 12px 12px 0 0 !important;
    --plyr-color-main: var(--primary, #239f40);
}

.video-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 90px;
    z-index: 10;
    opacity: 0.9;
    pointer-events: none;
}

video::-moz-picture-in-picture-toggle {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.video-popup.pip-mode,
.video-popup:has(video:picture-in-picture) {
    background: transparent !important;
    backdrop-filter: none !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

.video-popup.pip-mode .popup-content,
.video-popup:has(video:picture-in-picture) .popup-content {
    opacity: 0.001 !important;
    box-shadow: none !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
}

.videos-box-track {
    scroll-snap-type: x mandatory;
}

.video-card {
    scroll-snap-align: start;
}

.videos-box-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: transparent !important;
    border-color: var(--border, #e5e7eb) !important;
    color: #9ca3af !important;
    box-shadow: none;
}

.popup-video-title {
    padding: 15px 20px 10px 20px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    text-align: right;
    direction: rtl;
    background-color: #f3f4f6;
    line-height: 1.6;
    border-top: 1px solid #e5e7eb;
    display: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.videos-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 30px;
    padding-bottom: 20px;
}

.videos-grid .video-card {
    width: 100% !important;
    flex: unset !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .videos-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.masonry-container {
    column-count: 3;
    column-gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

@keyframes skeleton-pulse {
    0% {
        background-color: #f0f0f0;
    }

    50% {
        background-color: #d0d0d0;
    }

    100% {
        background-color: #f0f0f0;
    }
}

.pin {
    break-inside: avoid;
    margin-bottom: 20px;
    position: relative;
    cursor: pointer;
}


.pin-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #f0f0f0;
    animation: skeleton-pulse 1.2s infinite ease-in-out;
}

.pin.loaded .pin-image-wrapper {
    animation: none;
    background-color: transparent;
}

.pin-image-wrapper img {
    width: 100%;
    display: block;
    border-radius: 16px;
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.pin.loaded .pin-image-wrapper img {
    opacity: 1;
}

.pin:hover .pin-image-wrapper img {
    transform: scale(1.15);
}

.pin-caption {
    padding: 8px 4px 4px 4px;
    direction: rtl;
    text-align: right;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.pin.loaded .pin-caption {
    opacity: 1;
    visibility: visible;
}

.pin-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
}

.pin:hover .pin-title {
    color: #239f40;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    z-index: 2;
}

.pin.loaded:hover .overlay {
    opacity: 1;
    visibility: visible;
}

.open-btn {
    align-self: flex-end;
    background-color: #239f40 !important;
    color: white !important;
    border: none;
    padding: 6px 16px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.open-btn:hover {
    background-color: #1b7a31;
}

.bottom-actions {
    display: flex;
    justify-content: flex-start;
}

.download-btn {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #111 !important;
    border: none;
    padding: 4px 8px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: white;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 6px;
    width: 100%;
    max-width: 1000px;
    height: 85vh;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal:hover {
    background: #e0e0e0;
}

.modal-image-col {
    flex: 1.2;
    position: relative;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.zoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: zoom-in;
}

.zoom-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 50;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.prev-btn {
    right: 15px;
}

.next-btn {
    left: 15px;
}

.modal-info-col {
    flex: 0.8;
    padding: 40px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #eee;
}

.modal-top-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.action-group {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.icon-btn:hover {
    background: #e0e0e0;
}

.modal-title {
    font-size: 28px;
    margin-bottom: 10px;
    color: #111;
}

.modal-desc {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.image-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.source-link {
    display: flex;
    align-items: center;
    background-color: #efefef;
    padding: 12px 20px;
    border-radius: 5px;
    color: #111;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 30px;
    align-self: flex-start;
    transition: 0.2s;
}

.source-link span {
    color: #239f40;
    margin-left: 8px;
}

.source-link:hover {
    background-color: #e2e2e2;
}

.full-size-btn {
    width: 100%;
    margin-bottom: 10px;
    background-color: #239f40;
    color: white;
}

.full-size-btn:hover {
    background-color: #178531;
}

@media (max-width: 1200px) {

    .masonry-container {
        column-count: 3;
    }
}

@media (max-width: 992px) {

    .masonry-container {
        column-count: 2;
    }
}

@media (max-width: 768px) {

    .masonry-container {
        column-count: 2;
    }

    .modal-content {
        flex-direction: column;
        overflow-y: auto;
        height: 95vh;
    }

    .modal-image-col {
        min-height: 50vh;
        flex: none;
    }

    .modal-info-col {
        border-right: none;
        border-top: 1px solid #eee;
        flex: none;
    }
}

@media (max-width: 480px) {

    .masonry-container {
        column-count: 1;
    }
}

.modal-bottom-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-modal-btn {
    width: 100%;
    text-align: center;
    padding: 15px;
    background-color: #e0e0e0;
    color: #111;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.download-modal-btn:hover {
    background-color: #d0d0d0;
}

#videosLoaderOverlay,
#imagesLoaderOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(247 248 249 / 90%);
    z-index: 100;
}

#videosLoaderOverlay .yajo-loader-wrapper {
    position: sticky;
    top: 50vh;
    margin: 0 auto;
    width: fit-content;
    transform: translateY(-50%);
    z-index: 101;
}
#imagesLoaderOverlay .yajo-loader-wrapper {
    position: sticky;
    top: 25vh;
    margin: 0 auto;
    width: fit-content;
    transform: translateY(-50%);
    z-index: 101;
}

@media (max-width: 900px) {

    #videosLoaderOverlay .yajo-loader-wrapper {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;

    }
}

.yajo-loader-wrapper {
    width: 200px;
    height: 200px;
    position: relative;
    margin: 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.yajo-loader-ring {
    position: absolute;
    width: 130px;
    height: 130px;
    background: #f7f8f9;
    border: 8px solid #ddd;
    border-top: 8px solid #239f40;
    border-radius: 50%;
    animation: yajo-loader-spin 1.2s linear infinite;
}

@keyframes yajo-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.yajo-loader-imgbox {
    position: relative;
}

.yajo-loader-imgbox img {
    width: 70px;
    height: auto;
}

.yajo-loader-smoke {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    overflow: visible;
}

.yajo-loader-smoke span {
    position: absolute;
    bottom: 0;
    width: 12px;
    height: 6px;
    background: #239f40;
    border-radius: 50%;
    animation: yajo-loader-puff 0.3s linear infinite;
}

.yajo-loader-smoke span:nth-child(1) {
    left: -10px;
    animation-delay: 0s;
}

.yajo-loader-smoke span:nth-child(2) {
    left: 10px;
    animation-delay: 0.2s;
}

.yajo-loader-smoke span:nth-child(3) {
    left: 30px;
    animation-delay: 0.4s;
}

@keyframes yajo-loader-puff {
    0% {
        transform: translateX(0) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateX(-20px) scale(2);
        opacity: 0;
    }
}

.yajo-loader-imgbox.yajo-image-shine-wrapper {
    position: relative;
    display: inline-block;
    width: 70px !important;
    height: 70px !important;
    border-radius: 50%;
    overflow: hidden;
}

.yajo-loader-imgbox.yajo-image-shine-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
}

.yajo-loader-imgbox.yajo-image-shine-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.6) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: image-shine 3s infinite;
    z-index: 2;
}

@keyframes image-shine {
    0% {
        left: -150%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

#apiVideosContainer {
    position: relative;
    min-height: 500px;
    border-radius: 16px;
    overflow: hidden;
}