.home-toast {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 9999;
    min-width: 280px;
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: .28s ease;
}

.home-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.home-toast.success {
    border-color: rgba(25, 230, 209, 0.28);
}

.home-toast.error {
    border-color: rgba(255, 107, 107, 0.30);
}

.home-toast.warning {
    border-color: rgba(255, 209, 102, 0.34);
}

.home-toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    font-weight: 900;
}

.home-toast.success .home-toast-icon {
    background: rgba(25, 230, 209, 0.14);
    color: #08bfae;
}

.home-toast.error .home-toast-icon {
    background: rgba(255, 107, 107, 0.14);
    color: #e45b5b;
}

.home-toast.warning .home-toast-icon {
    background: rgba(255, 209, 102, 0.18);
    color: #c79200;
}

.home-toast-content {
    min-width: 0;
}

.home-toast-title {
    font-size: 14px;
    font-weight: 900;
    color: #0f1720;
    margin-bottom: 3px;
}

.home-toast-text {
    font-size: 13px;
    line-height: 1.7;
    color: #334155;
    word-break: break-word;
}

body:not(.light-mode) .home-toast {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

body:not(.light-mode) .home-toast .home-toast-title {
    color: #0f1720;
}

body:not(.light-mode) .home-toast .home-toast-text {
    color: #334155;
}

body.light-mode .home-toast {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(16, 32, 43, 0.10);
    box-shadow: 0 18px 40px rgba(16, 32, 43, 0.12);
}

body.light-mode .home-toast .home-toast-title {
    color: #0f1720;
}

body.light-mode .home-toast .home-toast-text {
    color: #425466;
}

.hero {
    position: relative;
    z-index: 1;
    padding: 28px 0 72px;
    display: flex;
    align-items: center;
    overflow: visible;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 35%, rgba(25, 230, 209, 0.10), transparent 25%),
        radial-gradient(circle at 80% 60%, rgba(25, 230, 209, 0.05), transparent 22%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    overflow: visible;
}

.hero-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 50;
    overflow: visible;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(25, 230, 209, 0.18);
    background: rgba(10, 28, 35, 0.72);
    color: var(--primary);
    padding: 9px 18px;
    border-radius: 999px;
    margin-bottom: 22px;
    font-weight: 700;
    font-size: 13px;
}

body.light-mode .hero-badge {
    background: rgba(255,255,255,0.75);
    border-color: rgba(17, 185, 168, 0.14);
}

.hero h1 {
    font-size: clamp(30px, 4.6vw, 62px);
    line-height: 1.24;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 18px;
}

.hero h1 .highlight {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(25, 230, 209, 0.18);
}

.hero p {
    max-width: 650px;
    margin: 0 auto 18px;
    color: var(--muted);
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.9;
    font-weight: 600;
}

.home-news-ticker {
    width: 100%;
    max-width: 760px;
    height: 48px;
    margin: 0 auto 22px;
    border-radius: 18px;
    border: 1px solid rgba(25, 230, 209, 0.16);
    background:
        linear-gradient(135deg, rgba(10, 28, 35, 0.82), rgba(8, 18, 25, 0.74));
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    direction: ltr;
}

.home-news-ticker--ar {
    flex-direction: row;
}

.home-news-ticker--en {
    flex-direction: row-reverse;
}

.home-news-ticker::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 50%, rgba(25, 230, 209, 0.13), transparent 34%),
        radial-gradient(circle at 90% 50%, rgba(25, 230, 209, 0.08), transparent 30%);
    pointer-events: none;
}

.home-news-label {
    position: relative;
    z-index: 3;
    height: 100%;
    flex: 0 0 auto;
    width: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(25, 230, 209, 0.12);
    color: var(--primary);
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.home-news-ticker--ar .home-news-label {
    border-left: 0;
    border-right: 1px solid rgba(25, 230, 209, 0.15);
}

.home-news-ticker--en .home-news-label {
    border-right: 0;
    border-left: 1px solid rgba(25, 230, 209, 0.15);
}

.home-news-label span {
    font-size: 15px;
    line-height: 1;
}

.home-news-marquee {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.home-news-track {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: max-content;
    will-change: transform;
}

.home-news-ticker--ar .home-news-track {
    animation: homeNewsTickerMoveAr 24s linear infinite;
}

.home-news-ticker--en .home-news-track {
    animation: homeNewsTickerMoveEn 24s linear infinite;
}

.home-news-ticker:hover .home-news-track {
    animation-play-state: paused;
}

.home-news-group {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 0 0 auto;
    min-width: max-content;
    padding-inline-end: 18px;
}

.home-news-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #dffcff;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    unicode-bidi: isolate;
}

.home-news-ticker--ar .home-news-item {
    direction: rtl;
}

.home-news-ticker--en .home-news-item {
    direction: ltr;
}

.home-news-item i {
    font-style: normal;
    font-size: 15px;
}

.home-news-item b {
    font-weight: 800;
}

.home-news-item::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 12px;
    border-radius: 999px;
    background: rgba(25, 230, 209, 0.55);
    box-shadow: 0 0 14px rgba(25, 230, 209, 0.35);
}

body.light-mode .home-news-ticker {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 251, 250, 0.90));
    border-color: rgba(16, 185, 168, 0.16);
    box-shadow: 0 14px 34px rgba(16, 32, 43, 0.10);
}

body.light-mode .home-news-label {
    background: rgba(16, 185, 168, 0.10);
    color: #079b8f;
}

body.light-mode .home-news-ticker--ar .home-news-label {
    border-right-color: rgba(16, 185, 168, 0.15);
}

body.light-mode .home-news-ticker--en .home-news-label {
    border-left-color: rgba(16, 185, 168, 0.15);
}

body.light-mode .home-news-item {
    color: #17313b;
}

body.light-mode .home-news-item::after {
    background: rgba(16, 185, 168, 0.50);
    box-shadow: 0 0 14px rgba(16, 185, 168, 0.22);
}

@keyframes homeNewsTickerMoveAr {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes homeNewsTickerMoveEn {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero-features {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-weight: 700;
    font-size: 14px;
}

.hero-features span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.hero-features i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(25, 230, 209, 0.12);
    color: #4dffb4;
    font-style: normal;
    font-size: 12px;
}

.home-search-wrap {
    max-width: 760px;
    margin: 0 auto 24px;
    position: relative;
    z-index: 100;
}

.home-search-box {
    position: relative;
    z-index: 100;
}

.home-search-icon {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--muted);
    pointer-events: none;
}

.home-search-input {
    width: 100%;
    height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(25, 230, 209, 0.14);
    background: rgba(12, 24, 32, 0.72);
    color: #fff;
    padding: 0 48px 0 16px;
    font-size: 15px;
    font-weight: 700;
    outline: none;
    transition: .2s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.home-search-input::placeholder {
    color: #9bb0bd;
}

.home-search-input:focus {
    border-color: rgba(25, 230, 209, 0.35);
    box-shadow: 0 0 0 4px rgba(25, 230, 209, 0.10);
}

body.light-mode .home-search-input {
    background: rgba(255, 255, 255, 0.96);
    color: #0f1720;
    border-color: rgba(16, 32, 43, 0.10);
}

body.light-mode .home-search-input::placeholder {
    color: #7b8b97;
}

.home-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    z-index: 9999;
    background: rgba(10, 18, 24, 0.98);
    border: 1px solid rgba(25, 230, 209, 0.12);
    border-radius: 18px;
    padding: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    display: none;
    max-height: 360px;
    overflow-y: auto;
    text-align: right;
}

.home-search-results.show {
    display: block;
}

body.light-mode .home-search-results {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(16, 32, 43, 0.10);
    box-shadow: 0 18px 40px rgba(16, 32, 43, 0.14);
}

.home-search-result-item {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    transition: .18s ease;
}

.home-search-result-item:hover {
    background: rgba(25, 230, 209, 0.10);
}

body.light-mode .home-search-result-item:hover {
    background: rgba(16, 185, 168, 0.08);
}

.home-search-result-title {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.6;
    margin-bottom: 2px;
}

body.light-mode .home-search-result-title {
    color: #0f1720;
}

.home-search-result-meta {
    display: block;
    color: #9eb1bc;
    font-size: 12px;
    line-height: 1.6;
}

body.light-mode .home-search-result-meta {
    color: #5e7180;
}

.home-search-empty {
    padding: 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
    display: none;
}

.home-search-empty.show {
    display: block;
}

.home-main-categories {
    width: 100%;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.home-main-categories .categories-grid {
    width: 100%;
}

.section {
    padding: 20px 0 90px;
}

.section-head {
    text-align: center;
    margin-bottom: 30px;
}

.section-head .mini {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.section-head h2 {
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 10px;
}

.section-head p {
    color: var(--muted);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 14px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    transition: 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 260px;
    display: block;
    backdrop-filter: blur(8px);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(25, 230, 209, 0.28);
    background: var(--card-hover);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.category-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(25, 230, 209, 0.12), transparent 35%),
        linear-gradient(135deg, rgba(9, 18, 26, 0.98), rgba(12, 28, 38, 0.96));
}

.category-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.14) 50%,
            rgba(255, 255, 255, 0.05) 80%,
            rgba(255, 255, 255, 0) 100%
        );
    transform: translateX(-100%);
    animation: categoryShimmer 1.8s infinite;
    z-index: 2;
    pointer-events: none;
}

.category-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(2, 7, 12, 0.22), rgba(2, 7, 12, 0.05));
    z-index: 1;
    pointer-events: none;
}

.category-image.is-loaded::before,
.category-image.is-loaded::after {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transform: scale(1.08);
    filter: blur(14px);
    transition:
        opacity 0.55s ease,
        transform 0.7s ease,
        filter 0.7s ease;
}

.category-image.is-loaded img {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

.category-card:hover .category-image.is-loaded img {
    transform: scale(1.06);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(2, 7, 12, 0.88) 0%,
            rgba(2, 7, 12, 0.68) 20%,
            rgba(2, 7, 12, 0.28) 38%,
            rgba(2, 7, 12, 0.08) 58%,
            rgba(2, 7, 12, 0.00) 78%
        );
}

body.light-mode .category-overlay {
    background:
        linear-gradient(
            to top,
            rgba(11, 20, 28, 0.62) 0%,
            rgba(11, 20, 28, 0.38) 20%,
            rgba(11, 20, 28, 0.14) 38%,
            rgba(11, 20, 28, 0.04) 58%,
            rgba(11, 20, 28, 0.00) 78%
        );
}

.category-content {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 3;
    padding: 18px 16px 16px;
}

.category-card h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.5;
    color: #fff;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.09);
    color: #eef7fb;
    font-size: 11px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.empty-box {
    text-align: center;
    padding: 30px;
    border: 1px dashed rgba(25, 230, 209, 0.2);
    border-radius: 18px;
    background: var(--card);
    color: var(--muted);
    font-size: 14px;
}

@keyframes categoryShimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-news-track {
        animation: none;
    }
}

@media (max-width: 1100px) {
    .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .home-toast {
        right: 14px;
        left: 14px;
        top: 14px;
        min-width: auto;
        max-width: none;
    }

    .hero {
        padding: 18px 0 56px;
    }

    .hero p {
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 14px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .home-news-ticker {
        height: 44px;
        border-radius: 16px;
        margin-bottom: 18px;
    }

    .home-news-label {
        width: 44px;
        font-size: 13px;
    }

    .home-news-label span {
        font-size: 13px;
    }

    .home-news-ticker--ar .home-news-track {
        animation-duration: 18s;
    }

    .home-news-ticker--en .home-news-track {
        animation-duration: 18s;
    }

    .home-news-group {
        gap: 14px;
        padding-inline-end: 14px;
    }

    .home-news-item {
        font-size: 12px;
        gap: 6px;
    }

    .home-news-item i {
        font-size: 13px;
    }

    .home-search-wrap {
        margin-bottom: 18px;
        z-index: 100;
    }

    .home-search-input {
        height: 50px;
        border-radius: 16px;
        font-size: 14px;
    }

    .home-search-results {
        z-index: 9999;
        border-radius: 16px;
    }

    .section-head h2 {
        font-size: 26px;
    }

    .categories-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .category-card {
        min-height: 150px;
        border-radius: 16px;
    }

    .category-content {
        padding: 10px;
    }

    .category-card h3 {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .category-badge {
        font-size: 10px;
        padding: 5px 8px;
    }
}