/* ========== PROJECTS PAGE STYLES ========== */

/* Hero Section */
.projects-hero {
    background: linear-gradient(135deg, #111 0%, #111 100%);
    padding: 15px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.projects-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    font-family: 'Ubuntu', sans-serif;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 18px;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
    background: #fff;
}

.projects-section.dark-section {
    background: #111;
    color: #fff;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #111;
    font-family: 'Ubuntu', sans-serif;
}

.dark-section .section-title {
    color: #fff;
}

.section-title i {
    color: crimson;
    margin-right: 10px;
    font-size: 32px;
}

.section-description {
    text-align: center;
    font-size: 16px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 60px;
    line-height: 1.7;
}

.dark-section .section-description {
    color: #ccc;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

/* Project Card */
.project-card {
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.dark-section .project-card {
    background: #1a1a1a;
    border: 1px solid #333;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(220, 20, 60, 0.2);
}

.project-card.featured {
    border: 2px solid crimson;
}

.project-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, crimson, #ff1744);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(220, 20, 60, 0.3);
}

/* Project Image */
.project-image-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #e0e0e0;
}

.dark-section .project-image-wrapper {
    background: #0a0a0a;
}

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

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

/* Project Overlay */
.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.overlay-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: rgba(220, 20, 60, 0.9);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

/* Project Content */
.project-content {
    padding: 25px;
}

.project-title {
    font-size: 22px;
    font-weight: 600;
    color: #111;
    margin-bottom: 15px;
    font-family: 'Ubuntu', sans-serif;
    line-height: 1.3;
}

.dark-section .project-title {
    color: #fff;
}

.project-description {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify;
}

.dark-section .project-description {
    color: #ccc;
}

/* Project Metrics */
.project-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid crimson;
}

.dark-section .project-metrics {
    background: #0a0a0a;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.metric i {
    color: crimson;
    font-size: 20px;
    margin-bottom: 8px;
}

.metric span {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.dark-section .metric span {
    color: #ddd;
}

/* Project Tech */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-badge {
    background: #f0f0f0;
    color: #333;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.dark-section .tech-badge {
    background: #2a2a2a;
    color: #ddd;
    border-color: #444;
}

.tech-badge:hover {
    background: crimson;
    color: #fff;
    border-color: crimson;
    transform: translateY(-2px);
}

/* Project Actions */
.project-actions {
    display: flex;
    gap: 15px;
}

.project-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.code-btn {
    background: #333;
    color: #fff;
    border: 2px solid #333;
}

.dark-section .code-btn {
    background: #fff;
    color: #333;
    border-color: #fff;
}

.code-btn:hover {
    background: transparent;
    color: #333;
}

.dark-section .code-btn:hover {
    background: transparent;
    color: #fff;
}

.demo-btn {
    background: crimson;
    color: #fff;
    border: 2px solid crimson;
}

.demo-btn:hover {
    background: transparent;
    color: crimson;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    text-align: center;
}

.cta-content h3 {
    font-size: 36px;
    font-weight: 600;
    color: crimson;
    margin-bottom: 15px;
    font-family: 'Ubuntu', sans-serif;
}

.cta-content p {
    font-size: 18px;
    color: crimson;
    margin-bottom: 30px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 40px;
    background: crimson;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid crimson;
}

.cta-btn:hover {
    background: transparent;
    color: crimson;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.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; }

/* Responsive Design */
@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 947px) {
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .project-metrics {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .project-actions {
        flex-direction: column;
    }
}

@media (max-width: 690px) {
    .projects-hero {
        padding: 120px 0 80px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
    }

    .project-image-wrapper {
        height: 200px;
    }

    .project-title {
        font-size: 18px;
    }

    .cta-content h3 {
        font-size: 24px;
    }

    .cta-content p {
        font-size: 14px;
    }
}

@media (max-width: 500px) {
    .projects-hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 24px;
    }

    .project-card {
        margin: 0 10px;
    }

    .project-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}