/* Portfolio Page Specific Styles */

/* Portfolio Header */
.portfolio-header {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.portfolio-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.portfolio-header .container {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
}

.stat-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.stat-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
}

.portfolio-illustration {
    opacity: 0.7;
}

/* Portfolio Filter */
.portfolio-filter {
    background: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-tabs {
    gap: 0.75rem;
}

.filter-btn {
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.filter-btn:not(.btn-primary) {
    background: white;
    color: var(--primary-color);
}

.filter-btn:not(.btn-primary):hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-btn.btn-primary {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: white;
}

.filter-btn .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.filter-btn:not(.btn-primary) .badge {
    background: var(--primary-light) !important;
    color: var(--primary-color) !important;
}

/* Portfolio Grid */
.portfolio-grid {
    background: white;
}

.portfolio-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.portfolio-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(29, 78, 216, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
    visibility: visible;
}

.portfolio-actions {
    display: flex;
    gap: 1rem;
}

.portfolio-actions .btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.portfolio-actions .btn:hover {
    transform: scale(1.1);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
    line-height: 1.4;
}

.portfolio-card:hover .portfolio-title {
    color: var(--primary-color);
}

.technology-tags {
    min-height: 35px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.technology-tags .badge {
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.client-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: var(--radius);
    background: var(--bg-light);
    padding: 0.25rem;
}

.client-info {
    font-size: 0.875rem;
}

/* Portfolio Modal */
.modal-content {
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--bg-light);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-weight: 600;
    color: var(--text-dark);
}

.project-details {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.detail-item {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bg-light);
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item strong {
    color: var(--text-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta-section {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section .btn-light {
    background: white;
    color: var(--primary-color);
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.cta-section .btn-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Load More Button */
#loadMoreBtn {
    position: relative;
    overflow: hidden;
}

#loadMoreBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

#loadMoreBtn:hover::before {
    left: 100%;
}

/* Utility Classes */
.bg-primary-light {
    background-color: var(--primary-light) !important;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .portfolio-card {
        margin-bottom: 2rem;
    }
    
    .portfolio-image {
        height: 220px;
    }
}

@media (max-width: 991.98px) {
    .portfolio-header {
        text-align: center;
        padding: 3rem 0;
    }
    
    .portfolio-illustration {
        margin-top: 2rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .cta-section {
        text-align: center;
    }
    
    .cta-section .col-lg-4 {
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .portfolio-header {
        padding: 2rem 0;
    }
    
    .portfolio-header h1 {
        font-size: 2rem;
    }
    
    .portfolio-header p {
        font-size: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.75rem;
    }
    
    .portfolio-filter {
        position: static;
        padding: 1.5rem 0;
    }
    
    .filter-tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content {
        padding: 1rem;
    }
    
    .portfolio-actions {
        gap: 0.5rem;
    }
    
    .portfolio-actions .btn {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-body .row {
        flex-direction: column;
    }
    
    .modal-body .col-md-7,
    .modal-body .col-md-5 {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .cta-section h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .portfolio-header .container {
        padding: 0 1rem;
    }
    
    .breadcrumb {
        font-size: 0.875rem;
    }
    
    .portfolio-header h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .portfolio-card {
        margin-bottom: 1.5rem;
    }
    
    .technology-tags .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .client-info {
        font-size: 0.8rem;
    }
    
    .client-logo {
        width: 25px;
        height: 25px;
    }
    
    .portfolio-content .btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .portfolio-card {
        border: 2px solid #000000;
    }
    
    .portfolio-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .filter-btn {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .portfolio-card,
    .portfolio-image img,
    .portfolio-overlay,
    .portfolio-actions .btn,
    .filter-btn,
    .stat-card {
        transition: none;
    }
    
    .portfolio-card:hover {
        transform: none;
    }
    
    .portfolio-card:hover .portfolio-image img {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .portfolio-filter,
    .portfolio-overlay,
    .cta-section,
    .modal {
        display: none !important;
    }
    
    .portfolio-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 1rem !important;
    }
    
    .portfolio-image {
        height: auto !important;
    }
    
    .portfolio-content {
        padding: 0.5rem !important;
    }
}