/* =============== PROJECTS PAGE STYLES =============== */
.projects-page {
    background-color: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =============== PAGE HEADER =============== */
.page-header {
    background: linear-gradient(rgba(30, 30, 30, 0.9), rgba(30, 30, 30, 0.8)), 
                url('../images/projects-bg.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    animation: fadeInDown 0.8s ease;
}

.page-description {
    font-size: 1.3rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* =============== PROJECTS OVERVIEW =============== */
.projects-overview {
    padding: 6rem 0;
    background-color: var(--white);
}

.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.overview-text {
    animation: fadeInLeft 0.8s ease;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
}

/* الكلمة اللي تحتها الخط */
.section-title .title-word {
    position: relative;
    display: inline-block;
    padding-bottom: 0.6rem;
}

.section-title .title-word::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary) 0%,
        #a81217 100%
    );
    border-radius: 2px;
}

.overview-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.overview-text strong {
    color: var(--primary);
}

.overview-features {
    display: grid;
    gap: 1.5rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--background);
    border-radius: var(--radius);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-weight: 500;
    color: var(--secondary);
}

.overview-image {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    animation: fadeInRight 0.8s ease;
}

.overview-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.overview-image:hover img {
    transform: scale(1.05);
}

/* =============== PROJECT CATEGORIES =============== */
.project-categories {
    padding: 6rem 0;
    background-color: var(--background);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

/* Card colors for different project types */
.project-card.municipal {
    border-top: 4px solid #51B848; /* Green - Municipal */
}

.project-card.plastic {
    border-top: 4px solid #2F5D8C; /* Blue - Plastic */
}

.project-card.industrial {
    border-top: 4px solid #FF922B; /* Orange - Industrial */
}

.project-card.production {
    border-top: 4px solid #7950F2; /* Purple - Production */
}

.project-card.operation {
    border-top: 4px solid #20C997; /* Teal - Operation */
}

.project-card.custom {
    border-top: 4px solid #C4161C; /* Red - Custom */
}

.project-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(81, 184, 72, 0.05) 0%, rgba(47, 93, 140, 0.05) 100%);
    position: relative;
}

.project-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.1);
}

.project-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--primary);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-body {
    padding: 2rem;
    flex: 1;
}

.project-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.project-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.project-features li {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    padding-right: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.project-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--primary);
    font-weight: bold;
}

.project-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    background-color: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-stats {
    display: flex;
    gap: 1.5rem;
}

.project-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-stats .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.project-stats .stat-value {
    color: var(--secondary);
    font-weight: 600;
    font-size: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.project-link:hover {
    color: #a81217;
    transform: translateX(-5px);
}

.link-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.project-link:hover .link-icon {
    transform: translateX(5px);
}

/* =============== PROJECT GALLERY =============== */
.project-gallery {
    padding: 6rem 0;
    background-color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 250px;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(transparent, rgba(30, 30, 30, 0.9));
    color: var(--white);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.gallery-overlay p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* =============== PROJECT PROCESS =============== */
.project-process {
    padding: 6rem 0;
    background-color: var(--background);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.step:hover .step-icon {
    transform: scale(1.1);
}

.step-content h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* =============== SUCCESS STORIES =============== */
.success-stories {
    padding: 6rem 0;
    background-color: var(--white);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.story-card {
    background-color: var(--background);
    border-radius: var(--radius);
    padding: 2.5rem;
    transition: var(--transition);
    animation: fadeInUp 0.6s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.story-header h3 {
    color: var(--secondary);
    font-size: 1.4rem;
    margin: 0;
}

.story-year {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.story-body p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.story-results {
    display: flex;
    gap: 2rem;
}

.result {
    text-align: center;
}

.result-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =============== CTA SECTION =============== */
.projects-cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--secondary) 0%, rgba(30, 30, 30, 0.95) 100%);
    color: var(--white);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.cta-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
}

.cta-btn.primary {
    background-color: var(--primary);
    color: var(--white);
}

.cta-btn.primary:hover {
    background-color: #a81217;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(196, 22, 28, 0.3);
}

.cta-btn.secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.cta-btn.secondary:hover {
    background-color: var(--white);
    color: var(--secondary);
    transform: translateY(-3px);
}

.cta-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
}

.cta-note span {
    font-size: 1.5rem;
}

.cta-note p {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* =============== ANIMATIONS =============== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============== RESPONSIVE DESIGN =============== */
@media (max-width: 992px) {
    .overview-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .page-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header,
    .projects-overview,
    .project-categories,
    .project-gallery,
    .project-process,
    .success-stories,
    .projects-cta {
        padding: 4rem 0;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .page-description {
        font-size: 1.1rem;
    }
    
    .header-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .project-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .project-stats {
        justify-content: center;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header,
    .project-body,
    .project-footer {
        padding: 1.5rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .story-results {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-note {
        flex-direction: column;
        text-align: center;
    }
}

/* =============== CARD ANIMATION DELAYS =============== */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }
.step:nth-child(5) { animation-delay: 0.5s; }

.story-card:nth-child(1) { animation-delay: 0.1s; }
.story-card:nth-child(2) { animation-delay: 0.2s; }
.story-card:nth-child(3) { animation-delay: 0.3s; }