/**
 * DigitalDuniya - Portfolio CSS
 * Styles for portfolio listing and portfolio detail pages
 */

/* =====================================================
   PORTFOLIO PAGE HEADER
   ===================================================== */
.portfolio-header {
    background: var(--gradient-primary);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
}

.portfolio-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-header-title {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin: 24px 0 16px;
    line-height: 1.2;
}

.portfolio-header-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* =====================================================
   PORTFOLIO FILTER
   ===================================================== */
.portfolio-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 48px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--gray-700);
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
    background: var(--primary-50);
}

.filter-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

.filter-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 12px;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* =====================================================
   PORTFOLIO GRID
   ===================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.portfolio-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.portfolio-card-image {
    position: relative;
    display: block;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--gray-200);
}

.portfolio-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.portfolio-card:hover .portfolio-card-image img {
    transform: scale(1.05);
}

.portfolio-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
}

.portfolio-card-placeholder i {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.5);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 165, 233, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: white;
}

.portfolio-overlay-content i {
    font-size: 48px;
}

.portfolio-overlay-content span {
    font-size: 16px;
    font-weight: 600;
}

.portfolio-featured-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    background: var(--gradient-accent);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.portfolio-category-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-900);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    backdrop-filter: blur(10px);
    z-index: 2;
}

.portfolio-card-content {
    padding: 24px;
}

.portfolio-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.portfolio-card-title a {
    color: var(--gray-900);
    transition: color var(--transition-fast);
}

.portfolio-card-title a:hover {
    color: var(--primary-600);
}

.portfolio-client {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--primary-600);
    font-weight: 600;
    margin-bottom: 12px;
}

.portfolio-client i {
    font-size: 12px;
}

.portfolio-card-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.portfolio-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tech-tag {
    padding: 4px 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
}

.tech-tag-more {
    padding: 4px 12px;
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.portfolio-view-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-600);
    font-weight: 600;
    font-size: 14px;
    transition: gap var(--transition-fast);
}

.portfolio-view-link:hover {
    gap: 10px;
}

/* =====================================================
   NO PORTFOLIO
   ===================================================== */
.no-portfolio {
    text-align: center;
    padding: 80px 20px;
}

.no-portfolio i {
    font-size: 64px;
    color: var(--gray-300);
    margin-bottom: 24px;
}

.no-portfolio h3 {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.no-portfolio p {
    color: var(--gray-600);
    margin-bottom: 32px;
}

/* =====================================================
   STATS SECTION
   ===================================================== */
.portfolio-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.stat-card {
    text-align: center;
    padding: 40px 24px;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--gray-100);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-200);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2);
}

.stat-icon i {
    font-size: 28px;
    color: white;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 16px;
    color: var(--gray-600);
    font-weight: 500;
}

/* =====================================================
   PORTFOLIO DETAIL PAGE
   ===================================================== */
.portfolio-detail-header {
    background: var(--gradient-primary);
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-detail-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
}

.portfolio-detail-header-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.project-category-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.project-title {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin: 24px 0 16px;
    line-height: 1.2;
}

.project-client {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

.project-client i {
    margin-right: 8px;
}

.project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.project-meta-item i {
    font-size: 14px;
}

.project-link {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* =====================================================
   PROJECT LAYOUT
   ===================================================== */
.project-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 48px;
    align-items: start;
}

.project-main {
    min-width: 0;
}

.project-featured-image {
    margin-bottom: 48px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.project-featured-image img {
    width: 100%;
    height: auto;
}

.project-overview h2,
.project-gallery h2,
.project-technologies h2,
.project-highlights h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 24px;
}

.project-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-700);
    margin-bottom: 48px;
}

/* =====================================================
   PROJECT GALLERY
   ===================================================== */
.project-gallery {
    margin-bottom: 48px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* =====================================================
   TECHNOLOGIES
   ===================================================== */
.project-technologies {
    margin-bottom: 48px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 15px;
    color: var(--gray-700);
    transition: all var(--transition-fast);
}

.tech-item:hover {
    background: white;
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
}

.tech-item i {
    color: var(--accent-green);
    font-size: 18px;
}

/* =====================================================
   PROJECT HIGHLIGHTS
   ===================================================== */
.project-highlights {
    margin-bottom: 48px;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.highlight-card {
    text-align: center;
    padding: 32px 24px;
    background: white;
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.highlight-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-200);
    box-shadow: var(--shadow-lg);
}

.highlight-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.2);
}

.highlight-icon i {
    font-size: 28px;
    color: white;
}

.highlight-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.highlight-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-600);
    margin: 0;
}

/* =====================================================
   PROJECT NAVIGATION
   ===================================================== */
.project-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 48px 0;
}

.project-nav-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
    align-items: center;
}

.project-nav-item:hover {
    border-color: var(--primary-500);
    box-shadow: var(--shadow-md);
}

.project-nav-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-200);
}

.project-nav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-nav-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.project-nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
}

.project-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.project-nav-next {
    text-align: right;
}

/* =====================================================
   PROJECT SIDEBAR
   ===================================================== */
.project-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: white;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
}

.sidebar-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.project-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.project-info-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.project-info-list li:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 14px;
}

.info-value {
    text-align: right;
    color: var(--gray-900);
    font-size: 14px;
}

.status-badge {
    padding: 4px 12px;
    background: #d1fae5;
    color: #065f46;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.cta-card {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.cta-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    backdrop-filter: blur(10px);
}

.cta-icon i {
    font-size: 28px;
    color: white;
}

.cta-card h3 {
    color: white;
    margin-bottom: 12px;
}

.cta-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 24px;
}

.share-card h3 {
    margin-bottom: 16px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.share-btn {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: white;
    font-size: 18px;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-linkedin { background: #0077b5; }
.share-copy { background: var(--gray-700); }

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =====================================================
   RELATED PROJECTS
   ===================================================== */
.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
}

.related-project-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
}

.related-project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.related-project-image {
    position: relative;
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--gray-200);
}

.related-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.related-project-card:hover .related-project-image img {
    transform: scale(1.05);
}

.related-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 165, 233, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.related-project-card:hover .related-overlay {
    opacity: 1;
}

.related-overlay i {
    font-size: 36px;
    color: white;
}

.related-project-content {
    padding: 24px;
}

.related-category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-100);
    color: var(--primary-700);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.related-project-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.related-project-content h3 a {
    color: var(--gray-900);
    transition: color var(--transition-fast);
}

.related-project-content h3 a:hover {
    color: var(--primary-600);
}

.related-client {
    font-size: 14px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.related-client i {
    font-size: 12px;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .project-layout {
        grid-template-columns: 1fr;
    }

    .project-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .portfolio-header,
    .portfolio-detail-header {
        padding: 100px 0 60px;
    }

    .portfolio-header-title,
    .project-title {
        font-size: 36px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-filter {
        justify-content: flex-start;
    }

    .gallery-grid,
    .tech-grid,
    .highlights-grid,
    .related-projects-grid {
        grid-template-columns: 1fr;
    }

    .project-navigation {
        grid-template-columns: 1fr;
    }

    .project-nav-item {
        flex-direction: column;
        text-align: center;
    }

    .project-nav-next {
        text-align: center;
    }

    .portfolio-stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
