﻿/* =========================================================
   MY DOWNLOADS
   Premium / Modern / Responsive
   ========================================================= */

.downloads-page {
    direction: rtl;
    min-height: 100vh;
    padding: 35px 0 70px;
    background: radial-gradient(circle at 10% 10%, rgba(37, 99, 235, .07), transparent 30%), radial-gradient(circle at 90% 20%, rgba(124, 58, 237, .06), transparent 30%), #f7f9fc;
}


.downloads-container {
    width: min(1320px, calc(100% - 30px));
    margin: 0 auto;
}


/* =========================================================
   HERO
   ========================================================= */

.downloads-hero {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 30px 35px;
    margin-bottom: 25px;
    border-radius: 28px;
    background: linear-gradient( 135deg, #2563eb 0%, #4f46e5 48%, #7c3aed 100% );
    color: #fff;
    box-shadow: 0 20px 45px rgba(37, 99, 235, .20), 0 5px 15px rgba(31, 41, 55, .08);
}


    .downloads-hero::before {
        content: "";
        position: absolute;
        width: 320px;
        height: 320px;
        left: -130px;
        top: -180px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .09);
    }


    .downloads-hero::after {
        content: "";
        position: absolute;
        width: 240px;
        height: 240px;
        right: -110px;
        bottom: -150px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .08);
    }


.downloads-hero-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    top: -130px;
    right: 35%;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    filter: blur(5px);
}


.downloads-hero-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08);
}


.circle-one {
    width: 130px;
    height: 130px;
    right: 20%;
    bottom: -80px;
}


.circle-two {
    width: 75px;
    height: 75px;
    left: 20%;
    top: 20px;
}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.downloads-hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 20px;
}


.downloads-hero-icon {
    position: relative;
    width: 78px;
    height: 78px;
    min-width: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 23px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 34px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 12px 30px rgba(0,0,0,.10);
}


.hero-sparkle {
    position: absolute;
    width: 23px;
    height: 23px;
    top: -7px;
    left: -7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f59e0b;
    border: 2px solid #fff;
    font-size: 10px;
    box-shadow: 0 5px 12px rgba(245,158,11,.35);
}


.downloads-hero-text {
    min-width: 0;
}


.downloads-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    padding: 5px 11px;
    border-radius: 50px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.9);
    font-size: 11px;
    font-weight: 700;
}


.downloads-hero-text h1 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.6;
}


.downloads-hero-text p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 14px;
    line-height: 2;
}


/* =========================================================
   HERO ACTIONS
   ========================================================= */

.downloads-hero-actions {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}


.download-count-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 15px;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
}


.download-count-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255,255,255,.16);
    font-size: 15px;
}


.download-count-box span {
    display: block;
    color: rgba(255,255,255,.7);
    font-size: 9px;
}


.download-count-box strong {
    display: block;
    margin-top: 1px;
    color: #fff;
    font-size: 15px;
}


.downloads-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 17px;
    border-radius: 13px;
    background: #fff;
    color: #334155;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(0,0,0,.10);
    transition: .25s ease;
}


    .downloads-back-button:hover {
        color: #2563eb;
        transform: translateY(-2px);
        box-shadow: 0 12px 25px rgba(0,0,0,.15);
    }


/* =========================================================
   SUMMARY
   ========================================================= */

.downloads-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}


.summary-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    background: rgba(255,255,255,.92);
    border: 1px solid #edf0f5;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(31,41,55,.045);
}


.summary-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 18px;
}


    .summary-icon.blue {
        background: rgba(37,99,235,.09);
        color: #2563eb;
    }


    .summary-icon.purple {
        background: rgba(124,58,237,.09);
        color: #7c3aed;
    }


    .summary-icon.green {
        background: rgba(16,185,129,.09);
        color: #10b981;
    }


.summary-item span {
    display: block;
    color: #8b95a5;
    font-size: 10px;
    margin-bottom: 3px;
}


.summary-item strong {
    color: #202733;
    font-size: 18px;
    font-weight: 900;
}


/* =========================================================
   PROJECT GRID
   ========================================================= */

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}


/* =========================================================
   PROJECT CARD
   ========================================================= */

.download-project-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 23px;
    box-shadow: 0 12px 35px rgba(31,41,55,.055), 0 3px 10px rgba(31,41,55,.025);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}


    .download-project-card:hover {
        transform: translateY(-7px);
        border-color: rgba(37,99,235,.12);
        box-shadow: 0 20px 45px rgba(37,99,235,.11), 0 7px 18px rgba(31,41,55,.05);
    }


/* =========================================================
   IMAGE
   ========================================================= */

.download-project-image {
    position: relative;
    height: 175px;
    overflow: hidden;
    background: #eef2f7;
}


    .download-project-image img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform .5s ease;
    }


.download-project-card:hover
.download-project-image img {
    transform: scale(1.045);
}


.project-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( to top, rgba(15,23,42,.55), rgba(15,23,42,0) 65% );
}


.download-project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #94a3b8;
    background: radial-gradient(circle at center, #fff, #eef2f7);
}


    .download-project-placeholder i {
        font-size: 38px;
    }


    .download-project-placeholder span {
        font-size: 10px;
    }


/* =========================================================
   IMAGE BADGES
   ========================================================= */

.project-category {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 50px;
    color: #fff;
    background: rgba(15,23,42,.58);
    border: 1px solid rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    font-size: 9px;
    font-weight: 700;
}


.project-download-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 50px;
    color: #fff;
    background: rgba(37,99,235,.88);
    font-size: 9px;
    font-weight: 800;
    box-shadow: 0 5px 12px rgba(37,99,235,.25);
}


/* =========================================================
   BODY
   ========================================================= */

.download-project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}


/* =========================================================
   TITLE
   ========================================================= */

.project-title-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 9px;
}


.project-title-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #2563eb;
    background: linear-gradient( 135deg, rgba(37,99,235,.10), rgba(124,58,237,.08) );
    font-size: 17px;
}


.project-title-row h2 {
    min-width: 0;
    margin: 0;
    color: #202733;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.8;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.project-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 15px;
    color: #000;
    font-size: 14px;
    line-height: 2;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}


/* =========================================================
   INFO BOX
   ========================================================= */

.project-info-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
}


.project-info-item {
    display: flex;
    align-items: center;
    gap: 9px;
}


.info-icon {
    width: 31px;
    height: 31px;
    min-width: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #fff;
    color: #2563eb;
    box-shadow: 0 3px 8px rgba(31,41,55,.05);
}


.project-info-item span {
    display: block;
    color: #9aa3af;
    font-size: 8px;
}


.project-info-item strong {
    display: block;
    margin-top: 1px;
    color: #475569;
    font-size: 10px;
}


/* =========================================================
   FILE SECTION
   ========================================================= */

.project-files-section {
    margin-top: auto;
}


.section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
}


.section-title-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #7c3aed;
    background: rgba(124,58,237,.08);
    font-size: 14px;
}


.section-title strong {
    display: block;
    color: #374151;
    font-size: 11px;
}


.section-title span {
    display: block;
    margin-top: 1px;
    color: #9aa3af;
    font-size: 8px;
}


/* =========================================================
   FILE LIST
   ========================================================= */

.project-files-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.download-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: #fff;
    transition: .25s ease;
}


    .download-file-item:hover {
        border-color: rgba(37,99,235,.15);
        background: #f9fbff;
        transform: translateX(-2px);
    }


.download-file-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}


.download-file-icon {
    width: 31px;
    height: 31px;
    min-width: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #2563eb;
    background: rgba(37,99,235,.08);
    font-size: 14px;
}


.download-file-info {
    min-width: 0;
}


    .download-file-info strong {
        display: block;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #475569;
        font-size: 9px;
    }


.download-file-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 3px;
}


    .download-file-meta span {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        color: #9aa3af;
        font-size: 7px;
    }


.download-file-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    padding: 5px 9px;
    border-radius: 9px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    text-decoration: none;
    font-size: 8px;
    font-weight: 700;
    box-shadow: 0 5px 12px rgba(37,99,235,.16);
    transition: .25s ease;
}


    .download-file-button:hover {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(37,99,235,.24);
    }


/* =========================================================
   PROJECT ACTION
   ========================================================= */

.project-actions {
    margin-top: 12px;
}


.project-view-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 40px;
    border-radius: 11px;
    border: 1px solid #e5eaf1;
    background: #fff;
    color: #64748b;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    transition: .25s ease;
}


    .project-view-button:hover {
        color: #2563eb;
        border-color: rgba(37,99,235,.18);
        background: rgba(37,99,235,.035);
    }


/* =========================================================
   EMPTY STATE
   ========================================================= */

.downloads-empty {
    position: relative;
    overflow: hidden;
    padding: 55px 25px;
    text-align: center;
    background: rgba(255,255,255,.92);
    border: 1px solid #edf0f5;
    border-radius: 28px;
    box-shadow: 0 15px 40px rgba(31,41,55,.055);
}


    .downloads-empty::before {
        content: "";
        position: absolute;
        width: 260px;
        height: 260px;
        top: -150px;
        right: -100px;
        border-radius: 50%;
        background: rgba(37,99,235,.05);
    }


.empty-icon {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 27px;
    color: #2563eb;
    background: linear-gradient( 135deg, rgba(37,99,235,.10), rgba(124,58,237,.09) );
    font-size: 38px;
}


    .empty-icon > span {
        position: absolute;
        top: -5px;
        left: -5px;
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: #fff;
        background: #f59e0b;
        border: 3px solid #fff;
        font-size: 10px;
    }


.downloads-empty h2 {
    position: relative;
    margin: 0 0 8px;
    color: #202733;
    font-size: 22px;
    font-weight: 900;
}


.downloads-empty p {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    color: #8993a1;
    font-size: 12px;
    line-height: 2.1;
}


.empty-actions {
    position: relative;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}


.empty-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 17px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    transition: .25s ease;
}


    .empty-button:hover {
        color: #fff;
        transform: translateY(-3px);
    }


    .empty-button.python {
        background: linear-gradient(135deg, #2563eb, #4f46e5);
        box-shadow: 0 8px 18px rgba(37,99,235,.20);
    }


    .empty-button.ai {
        background: linear-gradient(135deg, #10b981, #059669);
        box-shadow: 0 8px 18px rgba(16,185,129,.18);
    }


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .downloads-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .downloads-page {
        padding: 20px 0 45px;
    }


    .downloads-container {
        width: calc(100% - 22px);
    }


    .downloads-hero {
        padding: 23px 18px;
        border-radius: 21px;
        margin-bottom: 18px;
    }


    .downloads-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }


    .downloads-hero-icon {
        width: 62px;
        height: 62px;
        min-width: 62px;
        border-radius: 19px;
        font-size: 27px;
    }


    .hero-sparkle {
        width: 19px;
        height: 19px;
        font-size: 8px;
    }


    .downloads-eyebrow {
        font-size: 8px;
    }


    .downloads-hero-text h1 {
        font-size: 22px;
    }


    .downloads-hero-text p {
        font-size: 10px;
        line-height: 2;
    }


    .downloads-hero-actions {
        flex-direction: column;
        align-items: stretch;
        margin-top: 18px;
    }


    .download-count-box {
        justify-content: center;
    }


    .downloads-back-button {
        justify-content: center;
        width: 100%;
    }


    .downloads-summary {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 18px;
    }


    .summary-item {
        padding: 12px;
        border-radius: 15px;
    }


    .summary-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 15px;
    }


    .summary-item strong {
        font-size: 16px;
    }


    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }


    .download-project-card {
        border-radius: 19px;
    }


    .download-project-image {
        height: 145px;
    }


    .download-project-body {
        padding: 14px;
    }


    .project-title-row h2 {
        font-size: 15px;
    }


    .project-description {
        font-size: 10px;
    }


    .download-file-item {
        align-items: flex-start;
        flex-direction: column;
    }


    .download-file-main {
        width: 100%;
    }


    .download-file-button {
        width: 100%;
        min-height: 36px;
        font-size: 9px;
    }


    .download-file-info {
        max-width: calc(100% - 40px);
    }


        .download-file-info strong {
            max-width: 100%;
        }


    .project-view-button {
        min-height: 38px;
    }


    .downloads-empty {
        padding: 40px 18px;
        border-radius: 21px;
    }


    .empty-icon {
        width: 75px;
        height: 75px;
        font-size: 30px;
    }


    .downloads-empty h2 {
        font-size: 18px;
    }


    .downloads-empty p {
        font-size: 10px;
    }


    .empty-actions {
        flex-direction: column;
    }


    .empty-button {
        justify-content: center;
        width: 100%;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .downloads-container {
        width: calc(100% - 16px);
    }


    .downloads-hero {
        padding: 20px 13px;
    }


    .downloads-hero-text h1 {
        font-size: 19px;
    }


    .downloads-hero-text p {
        font-size: 9px;
    }


    .project-title-row h2 {
        font-size: 14px;
    }


    .download-project-image {
        height: 135px;
    }


    .project-info-item strong {
        font-size: 9px;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.downloads-page a:focus-visible {
    outline: 3px solid rgba(37,99,235,.25);
    outline-offset: 3px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .downloads-page *,
    .downloads-page *::before,
    .downloads-page *::after {
        transition: none !important;
        animation: none !important;
    }
}
