/* ===================================
   Projects Page - Additional Styles
   Optimized for Performance
   =================================== */

/* Page Header */
.page-header {
    position: relative;
    padding: 12rem 0 6rem;
    background: linear-gradient(135deg, rgba(7, 1, 4, 0.95), rgba(0, 0, 0, 0.9));
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(205, 153, 27, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(254, 0, 0, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.projects-header {
    background: linear-gradient(135deg, rgba(7, 1, 4, 0.9), rgba(0, 0, 0, 0.8)),
                url('../images/projects-header.jpg') center/cover no-repeat;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(7, 1, 4, 0.3), rgba(7, 1, 4, 0.8));
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--gold);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.5);
}

/* Project Stats */
.project-stats {
    padding: 4rem 0;
    background: var(--midnight);
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-box {
    background: linear-gradient(135deg, rgba(205, 153, 27, 0.05), rgba(254, 0, 0, 0.05));
    border: 1px solid rgba(205, 153, 27, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-10px);
    border-color: var(--gold);
    box-shadow: 0 20px 50px rgba(205, 153, 27, 0.3);
}

.stat-count {
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-box p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Project Intro */
.project-intro {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(7, 1, 4, 0.98), rgba(0, 0, 0, 0.98));
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.intro-text {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-top: 1.5rem;
}

/* Quick Contact in Intro */
.intro-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.intro-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
    font-weight: 500;
    padding: 0.8rem 1.5rem;
    background: rgba(205, 153, 27, 0.1);
    border: 1px solid rgba(205, 153, 27, 0.3);
    border-radius: 50px;
    transition: var(--transition);
}

.intro-contact-item:hover {
    background: rgba(205, 153, 27, 0.2);
    transform: translateY(-2px);
}

.intro-contact-item i {
    font-size: 1rem;
}

/* Filter Section */
.filter-section {
    padding: 3rem 0;
    background: var(--midnight);
    border-bottom: 1px solid rgba(205, 153, 27, 0.1);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: rgba(205, 153, 27, 0.05);
    border: 1px solid rgba(205, 153, 27, 0.2);
    border-radius: 50px;
    color: var(--white);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    font-family: inherit;
}

.filter-btn:hover {
    background: rgba(205, 153, 27, 0.1);
    border-color: var(--gold);
    transform: translateY(-3px);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--red));
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(205, 153, 27, 0.4);
}

.filter-btn i {
    font-size: 1.2rem;
}

/* Projects Grid */
.projects-grid-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(7, 1, 4, 0.98), rgba(0, 0, 0, 0.98));
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-card {
    background: rgba(205, 153, 27, 0.05);
    border: 1px solid rgba(205, 153, 27, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.project-card.hidden {
    display: none;
}

.project-card.featured {
    border: 2px solid var(--gold);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(205, 153, 27, 0.3);
}

.project-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--gold), var(--red));
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    z-index: 2;
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* Project Image Placeholder */
.project-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(205, 153, 27, 0.1), rgba(254, 0, 0, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.project-image-placeholder i {
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.3;
    transition: var(--transition);
}

.project-card:hover .project-image-placeholder {
    background: linear-gradient(135deg, rgba(205, 153, 27, 0.15), rgba(254, 0, 0, 0.1));
}

.project-card:hover .project-image-placeholder i {
    opacity: 0.5;
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 1, 4, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.view-project-btn {
    background: linear-gradient(135deg, var(--gold), var(--red));
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
    font-size: 1rem;
    font-family: inherit;
}

.view-project-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(205, 153, 27, 0.4);
}

.project-content {
    padding: 2rem;
}

.project-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(205, 153, 27, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.project-content h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-content > p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tags span {
    padding: 0.4rem 1rem;
    background: rgba(205, 153, 27, 0.1);
    border: 1px solid rgba(205, 153, 27, 0.3);
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--white);
    transition: var(--transition);
}

.project-tags span:hover {
    background: rgba(205, 153, 27, 0.2);
    border-color: var(--gold);
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(205, 153, 27, 0.2);
}

.project-client,
.project-duration {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.project-client i,
.project-duration i {
    color: var(--gold);
}

/* Testimonial Section */
.testimonial-section {
    padding: 6rem 0;
    background: var(--midnight);
}

.testimonial-slider {
    margin-top: 3rem;
    overflow: hidden;
}

.testimonial-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: rgba(205, 153, 27, 0.05);
    border: 1px solid rgba(205, 153, 27, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--transition);
}

.testimonial-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(205, 153, 27, 0.2);
}

.testimonial-rating {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.testimonial-rating i {
    color: var(--gold);
    font-size: 1.2rem;
}

.testimonial-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img,
.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.author-avatar {
    background: linear-gradient(135deg, rgba(205, 153, 27, 0.2), rgba(254, 0, 0, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-avatar i {
    font-size: 1.5rem;
    color: var(--gold);
}

.testimonial-author h4 {
    color: var(--white);
    margin-bottom: 0.3rem;
}

.testimonial-author p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.project-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--midnight);
    border: 1px solid rgba(205, 153, 27, 0.3);
    border-radius: 20px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 45px;
    height: 45px;
    background: rgba(205, 153, 27, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gold);
    transform: rotate(90deg);
}

.modal-content {
    padding: 3rem;
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.modal-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(205, 153, 27, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    color: var(--gold);
    font-weight: 600;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.modal-image {
    border-radius: 15px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Modal Image Placeholder */
.modal-image-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(205, 153, 27, 0.1), rgba(254, 0, 0, 0.05));
    border: 2px solid rgba(205, 153, 27, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-placeholder i {
    font-size: 5rem;
    color: var(--gold);
    opacity: 0.3;
}

.modal-details h3 {
    color: var(--gold);
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
}

.modal-details h3:first-child {
    margin-top: 0;
}

.modal-details p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.modal-details ul {
    list-style: none;
    padding: 0;
}

.modal-details li {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.modal-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
}

.modal-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tech-tags span {
    padding: 0.5rem 1.2rem;
    background: rgba(205, 153, 27, 0.1);
    border: 1px solid rgba(205, 153, 27, 0.3);
    border-radius: 15px;
    color: var(--white);
    font-size: 0.9rem;
}

.modal-meta {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(205, 153, 27, 0.2);
}

.meta-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    color: rgba(255, 255, 255, 0.8);
}

.meta-row strong {
    color: var(--gold);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-track {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .modal-body {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 10rem 0 4rem;
    }
    
    .project-stats,
    .project-intro,
    .filter-section,
    .projects-grid-section,
    .testimonial-section {
        padding: 4rem 0;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-controls {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .filter-btn span {
        display: none;
    }
    
    .filter-btn i {
        font-size: 1.4rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-track {
        grid-template-columns: 1fr;
    }
    
    .intro-contact {
        flex-direction: column;
        gap: 1rem;
    }
    
    .intro-contact-item {
        justify-content: center;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .stat-count {
        font-size: 2.5rem;
    }
    
    .project-content {
        padding: 1.5rem;
    }
    
    .project-content h3 {
        font-size: 1.2rem;
    }
    
    .project-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .modal-container {
        width: 95%;
    }
}

/* ===================================
   Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .project-card,
    .testimonial-card,
    .stat-box,
    .project-image img {
        transition: none;
    }
    
    .modal-overlay,
    .modal-container {
        animation: none;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .project-modal,
    .scroll-top,
    .filter-section,
    .view-project-btn,
    .project-overlay {
        display: none !important;
    }
    
    .project-card {
        break-inside: avoid;
    }
}
