/* ================= VARIABLES ================= */
:root {
    --blue: #3B82F6;
    --blue-accent: #0ea5e9;
    --purple: #3B82F6;
    --text-light: #ffffff;
    --text-muted: #BEB69B;
    --text-dark: #0F172A;
    --bg-dark: #0F172A;
    --bg-light: #f9fafb;
    --border-color: #1E293B;
}

/* ================= BASE ================= */
.works-page {
    margin-top: 0;
    font-family: "Poppins", sans-serif;
    background: white;
}

/* ================= HERO SECTION ================= */
.works-hero {
    height: 60vh;
    width: 100%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.works-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

.works-hero .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(15, 23, 42, 0.65) 0%,
        rgba(15, 23, 42, 0.55) 100%
    );
}

.works-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    max-width: 800px;
}

.works-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.works-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* ================= FILTER SECTION ================= */
.works-filter {
    background: white;
    padding: 60px 0;
    border-bottom: 1px solid #e5e7eb;
}

.filter-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid #e5e7eb;
    background: white;
    color: var(--text-dark);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: "Inter", system-ui, sans-serif;
}

.filter-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

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

/* ================= PROJECTS GRID ================= */
.works-grid-section {
    padding: 80px 0;
    background: white;
}

.works-grid-section > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
}

.works-grid-section .project-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.works-grid-section .project-card:hover {
    border-color: var(--blue);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.15);
    transform: translateY(-5px);
}

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

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

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.view-btn {
    padding: 12px 32px;
    background: var(--blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.view-btn:hover {
    background: var(--purple);
    transform: scale(1.05);
}

.project-info {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-category {
    display: inline-block;
    background: var(--blue);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}

.project-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.project-info p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.meta-item svg {
    color: var(--blue);
}

/* ================= LOAD MORE ================= */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 60px 0 0 0;
    grid-column: 1 / -1;
}

.load-more-btn {
    padding: 14px 50px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Inter", system-ui, sans-serif;
}

.load-more-btn:hover {
    background: var(--purple);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

/* ================= STATS SECTION ================= */
.works-stats {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 80px 0;
}

.works-stats > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.works-stats h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
}

.stat-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-card:hover {
    border-color: var(--blue);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--purple);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--blue-accent);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.95rem;
    color: #666;
}

/* ================= CTA SECTION ================= */
.works-cta {
    background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
    padding: 80px 0;
}

.works-cta > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-content {
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 32px;
    line-height: 1.6;
}

.cta-btn {
    display: inline-block;
    padding: 14px 50px;
    background: var(--blue-accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: #0ea5e9;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .works-hero h1 {
        font-size: 2.5rem;
    }

    .works-hero p {
        font-size: 1.05rem;
    }

    .works-grid-section > .container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }

    .works-stats h2 {
        font-size: 1.75rem;
    }

    .stats-grid {
        gap: 30px;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .filter-container {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .works-hero {
        height: 50vh;
    }

    .works-hero h1 {
        font-size: 2rem;
    }

    .works-hero p {
        font-size: 0.95rem;
    }

    .works-stats,
    .works-cta {
        padding: 50px 0;
    }

    .works-grid-section > .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-image {
        height: 200px;
    }

    .project-info {
        padding: 20px;
    }

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

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 0.95rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}
