﻿/* =========================================================
   PROJECT DETAILS
   PREMIUM UI
   Python + AI
   ========================================================= */

.project-details-page {
    direction: rtl;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --purple: #7c3aed;
    --text: #172033;
    --muted: #788397;
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e9edf4;
    width: 100%;
    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% ), var(--bg);
    color: var(--text);
}


    /* =========================================================
   GLOBAL
   ========================================================= */

    .project-details-page *,
    .project-details-page *::before,
    .project-details-page *::after {
        box-sizing: border-box;
    }

    .project-details-page a {
        text-decoration: none;
    }


/* =========================================================
   HERO
   ========================================================= */

.project-hero {
    position: relative;
    width: min(1180px, calc(100% - 30px));
    margin: 0 auto 30px;
    min-height: 230px;
    padding: 38px 45px;
    overflow: hidden;
    border-radius: 30px;
    color: #fff;
    box-shadow: 0 25px 60px rgba(37,99,235,.18);
}


.python-theme {
    background: linear-gradient( 135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100% );
}


.project-hero::before {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    left: -120px;
    top: -170px;
    border-radius: 50%;
    background: rgba(255,255,255,.10);
}


.project-hero::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -100px;
    bottom: -130px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}


.project-hero-content {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 24px;
}


/* =========================================================
   HERO ICON
   ========================================================= */

.project-hero-icon {
    position: relative;
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px rgba(255,255,255,.35), 0 15px 35px rgba(0,0,0,.15);
    font-size: 42px;
    color: #fff;
}


    .project-hero-icon::after {
        content: "";
        position: absolute;
        inset: 7px;
        border-radius: 19px;
        border: 1px solid rgba(255,255,255,.18);
    }


    .project-hero-icon i {
        position: relative;
        z-index: 2;
    }


/* =========================================================
   HERO TEXT
   ========================================================= */

.project-hero-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    margin-bottom: 8px;
    border-radius: 50px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.16);
    font-size: 11px;
    font-weight: 800;
}


.project-hero h1 {
    margin: 0 0 8px;
    color: #fff !important;
    font-size: 31px;
    font-weight: 900;
    line-height: 1.6;
}


.project-hero p {
    margin: 0;
    color: rgba(255,255,255,.86);
    font-size: 15px;
    line-height: 2;
}


/* =========================================================
   FLOATING ICONS
   ========================================================= */

.hero-floating-icon {
    position: absolute;
    z-index: 2;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,.10);
    color: rgba(255,255,255,.8);
    font-size: 21px;
    backdrop-filter: blur(8px);
    animation: floatingIcon 4s ease-in-out infinite;
}


.hero-icon-1 {
    left: 22%;
    top: 25px;
}


.hero-icon-2 {
    left: 9%;
    bottom: 25px;
    animation-delay: 1s;
}


@keyframes floatingIcon {

    0%, 100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-9px) rotate(4deg);
    }
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.project-layout {
    width: min(1180px, calc(100% - 30px));
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 25px;
    align-items: start;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.project-main {
    min-width: 0;
}


/* =========================================================
   IMAGE
   ========================================================= */

.project-image-box {
    position: relative;
    width: 100%;
    height: 210px;
    margin-bottom: 25px;
    overflow: hidden;
    border-radius: 25px;
    background: linear-gradient( 135deg, #e0e7ff, #f8fafc );
    box-shadow: 0 18px 45px rgba(15,23,42,.10);
}


.project-main-image {
    display: block;
    width: 100%;
    height: 210px;
    max-height: 210px;
    object-fit: cover;
    object-position: center;
    transition: transform .5s ease, filter .5s ease;
}


.project-image-box:hover .project-main-image {
    transform: scale(1.035);
    filter: saturate(1.08);
}


/* =========================================================
   IMAGE OVERLAY
   ========================================================= */

.project-image-box::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient( 180deg, transparent 50%, rgba(15,23,42,.28) );
}


.project-image-badge {
    position: absolute;
    z-index: 4;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 50px;
    color: #fff;
    background: rgba(15,23,42,.65);
    backdrop-filter: blur(10px);
    font-size: 11px;
    font-weight: 800;
}


/* =========================================================
   CARDS
   ========================================================= */

.project-card {
    position: relative;
    margin-bottom: 22px;
    padding: 27px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 10px 30px rgba(15,23,42,.055);
    transition: transform .3s ease, box-shadow .3s ease;
}


    .project-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 42px rgba(15,23,42,.09);
    }


/* =========================================================
   SECTION TITLE
   ========================================================= */

.section-title {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}


.section-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: var(--primary);
    background: linear-gradient( 135deg, #eff6ff, #eef2ff );
    font-size: 18px;
}


.section-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
}


.section-title span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}


/* =========================================================
   DESCRIPTION
   ========================================================= */

.project-description {
    margin: 0;
    color: #667085;
    font-size: 15px;
    line-height: 2.3;
}


/* =========================================================
   FEATURES
   ========================================================= */

.project-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
}


.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #edf0f5;
    border-radius: 16px;
    background: #fbfcfe;
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}


    .feature-item:hover {
        transform: translateY(-3px);
        background: #fff;
        border-color: #dce5ff;
    }


.feature-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    font-size: 17px;
}


    .feature-icon.blue {
        color: #2563eb;
        background: #eff6ff;
    }


    .feature-icon.green {
        color: #059669;
        background: #ecfdf5;
    }


    .feature-icon.purple {
        color: #7c3aed;
        background: #f5f3ff;
    }


    .feature-icon.orange {
        color: #ea580c;
        background: #fff7ed;
    }


.feature-item strong {
    display: block;
    color: #273142;
    font-size: 12px;
    margin-bottom: 4px;
}


.feature-item span {
    color: black;
    font-size: 13px;
}


/* =========================================================
   TECHNOLOGY
   ========================================================= */

.technology-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}


    .technology-list span {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 9px 13px;
        border-radius: 50px;
        color: #475467;
        background: #f6f8fc;
        border: 1px solid #e9edf4;
        font-size: 11px;
        font-weight: 700;
        transition: .25s ease;
    }


        .technology-list span:hover {
            color: var(--primary);
            border-color: #cbd9ff;
            background: #eff6ff;
            transform: translateY(-2px);
        }


    .technology-list i {
        color: var(--primary);
        font-size: 14px;
    }


/* =========================================================
   SIDEBAR
   ========================================================= */

.project-sidebar {
    position: sticky;
    top: 25px;
}


/* =========================================================
   DOWNLOAD
   ========================================================= */

.download-card {
    position: relative;
    overflow: hidden;
    padding: 27px;
    margin-bottom: 18px;
    border-radius: 25px;
    color: #fff;
    background: linear-gradient( 145deg, #2563eb, #4f46e5, #7c3aed );
    box-shadow: 0 20px 45px rgba(79,70,229,.23);
}


    .download-card::before {
        content: "";
        position: absolute;
        width: 170px;
        height: 170px;
        left: -80px;
        top: -90px;
        border-radius: 50%;
        background: rgba(255,255,255,.09);
    }


    .download-card h3,
    .download-card p,
    .download-button,
    .download-security,
    .download-icon {
        position: relative;
        z-index: 2;
    }


.download-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 17px;
    color: #fff;
    background: rgba(255,255,255,.15);
    font-size: 24px;
}


.download-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}


.download-card p {
    margin: 0 0 20px;
    color: rgba(255,255,255,.78);
    font-size: 12px;
    line-height: 2;
}


/* =========================================================
   DOWNLOAD BUTTON
   ========================================================= */

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    color: #3730a3;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
    transition: transform .25s ease, box-shadow .25s ease;
}


    .download-button:hover {
        color: #3730a3;
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,0,0,.16);
    }


.download-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
    color: rgba(255,255,255,.7);
    font-size: 9px;
}


/* =========================================================
   SIDE INFO
   ========================================================= */

.side-info-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15,23,42,.05);
}


.side-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 17px;
    color: #273142;
    font-size: 14px;
    font-weight: 900;
}


    .side-title i {
        color: #f59e0b;
        font-size: 17px;
    }


.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px dashed #e7ebf2;
}


    .info-row:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }


    .info-row span {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #8993a4;
        font-size: 11px;
    }


        .info-row span i {
            color: #2563eb;
            font-size: 14px;
        }


    .info-row strong {
        color: #374151;
        font-size: 11px;
    }


/* =========================================================
   BOTTOM CTA
   ========================================================= */

.project-bottom-cta {
    position: relative;
    overflow: hidden;
    width: min(1180px, calc(100% - 30px));
    margin: 25px auto 0;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 17px;
    border-radius: 24px;
    color: #fff;
    box-shadow: 0 20px 45px rgba(37,99,235,.16);
}


.cta-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,.14);
    font-size: 23px;
}


.project-bottom-cta h2 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}


.project-bottom-cta p {
    margin: 0;
    color: rgba(255,255,255,.75);
    font-size: 11px;
}


.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-right: auto;
    padding: 11px 18px;
    border-radius: 13px;
    color: #3730a3;
    background: #fff;
    font-size: 11px;
    font-weight: 900;
    transition: .25s ease;
}


    .cta-button:hover {
        color: #3730a3;
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,0,0,.15);
    }


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .project-layout {
        grid-template-columns: 1fr;
    }

    .project-sidebar {
        position: static;
    }

    .download-card {
        max-width: 100%;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .project-details-page {
        padding-top: 18px;
    }


    .project-hero {
        width: calc(100% - 20px);
        min-height: auto;
        padding: 25px 20px;
        border-radius: 22px;
    }


    .project-hero-content {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }


    .project-hero-icon {
        width: 65px;
        height: 65px;
        border-radius: 19px;
        font-size: 30px;
    }


    .project-hero h1 {
        font-size: 23px;
        line-height: 1.7;
    }


    .project-hero p {
        font-size: 11px;
        line-height: 2;
    }


    .project-hero-label {
        font-size: 8px;
    }


    .hero-floating-icon {
        display: none;
    }


    .project-layout {
        width: calc(100% - 20px);
        gap: 15px;
    }


    /* عکس کوتاه */

    .project-image-box {
        height: 135px;
        border-radius: 18px;
        margin-bottom: 17px;
    }


    .project-main-image {
        height: 135px;
        max-height: 135px;
    }


    .project-image-badge {
        top: 10px;
        right: 10px;
        padding: 6px 9px;
        font-size: 8px;
    }


    .project-card {
        padding: 19px;
        border-radius: 19px;
        margin-bottom: 15px;
    }


    .section-title {
        gap: 10px;
        margin-bottom: 15px;
    }


    .section-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 15px;
    }


    .section-title h2 {
        font-size: 15px;
    }


    .section-title span {
        font-size: 8px;
    }


    .project-description {
        font-size: 12px;
        line-height: 2.25;
    }


    .project-features {
        grid-template-columns: 1fr;
        gap: 9px;
    }


    .feature-item {
        padding: 11px;
        border-radius: 13px;
    }


    .feature-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 15px;
    }


    .feature-item strong {
        font-size: 11px;
    }


    .feature-item span {
        font-size: 9px;
    }


    .technology-list {
        gap: 6px;
    }


        .technology-list span {
            padding: 7px 10px;
            font-size: 9px;
        }


    .download-card {
        padding: 21px;
        border-radius: 20px;
    }


    .download-icon {
        width: 47px;
        height: 47px;
        border-radius: 14px;
        font-size: 20px;
    }


    .download-card h3 {
        font-size: 17px;
    }


    .download-card p {
        font-size: 10px;
    }


    .side-info-card {
        padding: 18px;
        border-radius: 18px;
    }


    .project-bottom-cta {
        width: calc(100% - 20px);
        padding: 20px;
        border-radius: 19px;
        flex-wrap: wrap;
    }


    .cta-icon {
        width: 43px;
        height: 43px;
        border-radius: 13px;
        font-size: 19px;
    }


    .project-bottom-cta h2 {
        font-size: 14px;
    }


    .project-bottom-cta p {
        font-size: 9px;
    }


    .cta-button {
        width: 100%;
        margin: 5px 0 0;
        padding: 11px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .project-hero h1 {
        font-size: 20px;
    }


    .project-hero p {
        font-size: 10px;
    }


    .project-image-box,
    .project-main-image {
        height: 115px;
        max-height: 115px;
    }


    .project-card {
        padding: 16px;
    }


    .section-title h2 {
        font-size: 14px;
    }
}
/* =========================================================
   VIEW FILES BUTTON
   ========================================================= */

.view-files-button {
    position: relative;
    width: 100%;
    min-height: 54px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 18px;
    border-radius: 15px;
    text-decoration: none !important;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 800;
    transition: transform .25s ease, color .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}


    /* Icon */

    .view-files-button > i:first-child {
        font-size: 18px;
        transition: transform .25s ease;
    }


/* Arrow */

.view-files-arrow {
    font-size: 20px !important;
    margin-right: auto;
    opacity: .65;
    transition: transform .25s ease, opacity .25s ease;
}


/* Hover */

.view-files-button:hover {
    color: #2563eb;
    background: #eff6ff;
    border-color: rgba(37, 99, 235, .25);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, .10);
}


    .view-files-button:hover > i:first-child {
        transform: scale(1.12);
    }


    .view-files-button:hover .view-files-arrow {
        opacity: 1;
        transform: translateY(4px);
    }


/* Active */

.view-files-button:active {
    transform: translateY(0);
}


/* =========================================================
   FILES SECTION
   ========================================================= */

.project-files-section {
    scroll-margin-top: 100px;
}


    /* وقتی کاربر به بخش فایل‌ها می‌رسد */

    .project-files-section:target {
        animation: filesTarget .8s ease;
    }


@keyframes filesTarget {

    0% {
        transform: translateY(10px);
        box-shadow: 0 0 0 5px rgba(37, 99, 235, .10), 0 20px 60px rgba(15, 23, 42, .08);
    }

    100% {
        transform: translateY(0);
    }
}


/* =========================================================
   SMOOTH SCROLL
   ========================================================= */

html {
    scroll-behavior: smooth;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .project-files-section {
        scroll-margin-top: 75px;
    }

    .view-files-button {
        min-height: 50px;
        padding: 11px 14px;
        border-radius: 13px;
        font-size: 13px;
    }

        .view-files-button > i:first-child {
            font-size: 17px;
        }

    .view-files-arrow {
        font-size: 19px !important;
    }
}