/* ═══════════════════════════════════════════════════════
   PORTFOLIO SECTION - PREMIUM SHOWCASE
   ═══════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────
   1. BASE SECTION
   ───────────────────────────────────────────────────── */

.portfolio-section {
    position: relative;
    min-height: 100vh;
    padding: 140px 0 120px;
    background: #0a0a0a;
    overflow: hidden;
    isolation: isolate;
}

.portfolio-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

/* ─────────────────────────────────────────────────────
   2. ANIMATED BACKGROUND
   ───────────────────────────────────────────────────── */

.portfolio-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    animation: floatOrb 30s ease-in-out infinite;
}

.orb-portfolio-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, #FFD700 0%, #FF6B00 50%, transparent 70%);
    top: -10%;
    left: -15%;
    animation-delay: 0s;
}

.orb-portfolio-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #9333ea 0%, #ec4899 50%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation-delay: 10s;
}

.orb-portfolio-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #06b6d4 0%, #3b82f6 50%, transparent 70%);
    top: 50%;
    right: 30%;
    animation-delay: 20s;
}

.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 50%;
    opacity: 0;
    animation: floatParticle 15s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 25%; animation-delay: 3s; }
.particle:nth-child(3) { left: 40%; animation-delay: 6s; }
.particle:nth-child(4) { left: 55%; animation-delay: 9s; }
.particle:nth-child(5) { left: 70%; animation-delay: 2s; }
.particle:nth-child(6) { left: 85%; animation-delay: 5s; }
.particle:nth-child(7) { left: 15%; animation-delay: 8s; }
.particle:nth-child(8) { left: 60%; animation-delay: 11s; }

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* ─────────────────────────────────────────────────────
   3. SECTION HEADER
   ───────────────────────────────────────────────────── */

.portfolio-header {
    text-align: center;
    margin-bottom: 70px;
    animation: fadeInUp 1s ease-out;
}

.portfolio-title {
    font-size: 58px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, 
        #ffffff 0%, 
        #FFD700 50%, 
        #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -1.5px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
    }
    to {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.5));
    }
}

.portfolio-description {
    font-size: 19px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ─────────────────────────────────────────────────────
   4. FILTER TABS
   ───────────────────────────────────────────────────── */

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(20, 20, 25, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    overflow: hidden;
    font-family: IRANSansDN;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.6s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.filter-icon i {
    font-size: 13px;
    color: #FFD700;
}

.filter-text {
    transition: all 0.4s ease;
}

.filter-count {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(255, 215, 0, 0.15);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #FFD700;
    transition: all 0.4s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.15));
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 
        0 8px 24px rgba(255, 215, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.filter-btn:hover .filter-icon,
.filter-btn.active .filter-icon {
    background: rgba(255, 215, 0, 0.25);
    transform: rotate(360deg) scale(1.1);
}

.filter-btn:hover .filter-count,
.filter-btn.active .filter-count {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.1);
}

/* ─────────────────────────────────────────────────────
   5. PORTFOLIO GRID
   ───────────────────────────────────────────────────── */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 35px;
    margin-bottom: 80px;
}

.portfolio-item {
    opacity: 0;
    transform: translateY(40px);
    animation: itemFadeIn 0.8s ease-out forwards;
}

.portfolio-item:nth-child(1) { animation-delay: 0.5s; }
.portfolio-item:nth-child(2) { animation-delay: 0.6s; }
.portfolio-item:nth-child(3) { animation-delay: 0.7s; }
.portfolio-item:nth-child(4) { animation-delay: 0.8s; }
.portfolio-item:nth-child(5) { animation-delay: 0.9s; }
.portfolio-item:nth-child(6) { animation-delay: 1s; }

@keyframes itemFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item.hidden {
    display: none;
}

/* ─────────────────────────────────────────────────────
   6. PROJECT CARD
   ───────────────────────────────────────────────────── */

.project-card {
    position: relative;
    background: rgba(15, 15, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
    z-index: 10;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(20, 20, 25, 0.9);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(255, 215, 0, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.project-card:hover .card-shine {
    left: 100%;
}

/* ─────────────────────────────────────────────────────
   7. PROJECT IMAGE
   ───────────────────────────────────────────────────── */

.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image {
    transform: scale(1.1);
    filter: brightness(0.7);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(10, 10, 10, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-card:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    gap: 16px;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.project-card:hover .overlay-content {
    transform: translateY(0);
}

.quick-view-btn,
.external-link-btn {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 215, 0, 0.95);
    border: none;
    border-radius: 50%;
    color: #0a0a0a;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.quick-view-btn:hover,
.external-link-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.6);
    background: #FFD700;
}

.external-link-btn {
    background: rgba(255, 255, 255, 0.95);
}

.external-link-btn:hover {
    background: #ffffff;
}

/* Project Tags */
.project-tags {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.tag {
    padding: 8px 16px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #FFD700;
    transition: all 0.4s ease;
}

.project-card:hover .tag {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-3px);
}

/* ─────────────────────────────────────────────────────
   8. PROJECT CONTENT
   ───────────────────────────────────────────────────── */

.project-content {
    padding: 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 18px;
    transition: all 0.4s ease;
}

.project-category i {
    font-size: 13px;
    color: #FFD700;
}

.project-category span {
    font-size: 13px;
    font-weight: 600;
    color: #FFD700;
}

.project-card:hover .project-category {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateX(-5px);
}

.project-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
    line-height: 1.4;
    transition: all 0.4s ease;
}

.project-card:hover .project-title {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-description {
    font-size: 14.5px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 24px;
    flex-grow: 1;
}

/* ─────────────────────────────────────────────────────
   9. PROJECT STATS
   ───────────────────────────────────────────────────── */

.project-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.stat-item i {
    font-size: 14px;
    color: rgba(255, 215, 0, 0.6);
    transition: all 0.3s ease;
}

.project-card:hover .stat-item {
    color: rgba(255, 255, 255, 0.8);
}

.project-card:hover .stat-item i {
    color: #FFD700;
    transform: scale(1.15);
}

.stat-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
}

.project-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-right: auto;
}

.project-date i {
    font-size: 13px;
    color: rgba(255, 215, 0, 0.6);
}

/* ─────────────────────────────────────────────────────
   10. PORTFOLIO FOOTER
   ───────────────────────────────────────────────────── */

.portfolio-footer {
    text-align: center;
    animation: fadeInUp 1s ease-out 1.2s backwards;
}

.load-more-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 18px 48px;
    background: rgba(20, 20, 25, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;
    color: #FFD700;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    margin-bottom: 60px;
    font-family: IRANSansDN;
}

.btn-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 215, 0, 0.15);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.btn-icon i {
    font-size: 14px;
    transition: transform 0.4s ease;
}

.btn-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.4s ease;
}

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 215, 0, 0.3),
        transparent
    );
    transition: left 0.8s ease;
}

.load-more-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

.load-more-btn:hover .btn-shimmer {
    left: 100%;
}

.load-more-btn:hover .btn-icon {
    background: rgba(255, 215, 0, 0.25);
    transform: rotate(180deg);
}

.load-more-btn:hover .btn-arrow {
    transform: translateX(-5px);
}

/* Stats Footer */
.portfolio-stats-footer {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.stat-footer-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-label {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────
   11. RESPONSIVE
   ───────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
    }

    .portfolio-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .portfolio-section {
        padding: 100px 0 80px;
    }

    .portfolio-wrapper {
        padding: 0 20px;
    }

    .portfolio-title {
        font-size: 36px;
        letter-spacing: -1px;
    }

    .portfolio-description {
        font-size: 16px;
    }

    .portfolio-filters {
        gap: 12px;
    }

    .filter-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 60px;
    }

    .project-image-wrapper {
        height: 240px;
    }

    .quick-view-btn,
    .external-link-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .project-content {
        padding: 24px;
    }

    .project-title {
        font-size: 20px;
    }

    .project-description {
        font-size: 14px;
    }

    .load-more-btn {
        width: 100%;
        justify-content: center;
    }

    .portfolio-stats-footer {
        gap: 40px;
    }

    .stat-number {
        font-size: 38px;
    }

    .stat-label {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .portfolio-section {
        padding: 80px 0 60px;
    }

    .portfolio-wrapper {
        padding: 0 16px;
    }

    .portfolio-title {
        font-size: 28px;
    }

    .portfolio-description {
        font-size: 14px;
    }

    .portfolio-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .filter-icon {
        width: 24px;
        height: 24px;
    }

    .filter-icon i {
        font-size: 11px;
    }

    .filter-count {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .project-image-wrapper {
        height: 200px;
    }

    .project-tags {
        top: 12px;
        right: 12px;
        gap: 6px;
    }

    .tag {
        padding: 6px 12px;
        font-size: 11px;
    }

    .project-content {
        padding: 20px;
    }

    .project-category {
        padding: 6px 12px;
        font-size: 12px;
    }

    .project-title {
        font-size: 18px;
    }

    .project-description {
        font-size: 13px;
        line-height: 1.7;
    }

    .load-more-btn {
        padding: 14px 32px;
        font-size: 15px;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-label {
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════
   END OF CSS
   ═══════════════════════════════════════════════════════ */
