/* ==================== Work Portfolio Page Styles ==================== */

/* ==================== CSS Variables ==================== */
:root {
    --primary-green: #74b812;
    --dark-teal: #123d33;
    --darker-teal: #0a2920;
    --text-dark: #0a2920;
    --text-muted: #6c757d;
    --neutral-bg: #f8f9fa;
    --white: #ffffff;
    --border-light: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== Hero Section ==================== */
.work-hero {
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
    background: linear-gradient(135deg,#002b22 0%, #002b22 100%);
}

.work-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(116, 184, 18, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(116, 184, 18, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.work-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(116, 184, 18, 0.2);
    border: 1px solid var(--primary-green);
    border-radius: 50px;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.work-hero__badge i {
    font-size: 18px;
}

.work-hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.work-hero__subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.work-hero__stats {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
}

.stat-pill i {
    font-size: 20px;
    color: var(--primary-green);
}

/* ==================== Filter Controls ==================== */
.filter-controls {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    padding: 24px 0;
    z-index: 100;
    transition: all 0.3s var(--transition-smooth);
}

.filter-controls.scrolled {
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.filter-controls__wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-controls__label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--neutral-bg);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(116, 184, 18, 0.1);
    border-color: var(--primary-green);
    color: var(--primary-green);
    transform: translateY(-2px);
}

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

/* ==================== Portfolio Grid ==================== */
.portfolio-grid {
    padding: 60px 0;
    background: var(--white);
}

.portfolio-item {
    margin-bottom: 32px;
}

/* ==================== Project Cards ==================== */
.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--neutral-bg);
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

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

.project-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 22, 40, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth);
}

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

.view-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-green);
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
    border-radius: 50px;
    text-decoration: none;
    transform: translateY(10px);
    transition: all 0.3s var(--transition-smooth);
}

.project-card:hover .view-project-btn {
    transform: translateY(0);
}

.view-project-btn:hover {
    background: #5a9a0a;
    transform: scale(1.05);
}

.view-project-btn i {
    font-size: 18px;
}

.project-card__content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card__tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tag {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
}

.tag--service {
    background: rgba(116, 184, 18, 0.1);
    color: var(--primary-green);
}

.tag--industry {
    background: rgba(18, 61, 51, 0.1);
    color: var(--dark-teal);
}

.project-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.project-card:hover .project-card__title {
    color: var(--primary-green);
}

.project-card__client {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.project-card__value {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.project-card__value i {
    color: var(--primary-green);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.project-card__tech {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.tech-badge {
    padding: 4px 10px;
    background: var(--neutral-bg);
    color: var(--text-dark);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

/* ==================== Mid-page CTA ==================== */
.mid-page-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 40px;
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--darker-teal) 100%);
    border-radius: 16px;
    margin: 32px 0 48px;
}

.mid-page-cta__content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.mid-page-cta__content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--primary-green);
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s var(--transition-smooth);
    white-space: nowrap;
}

.btn-primary:hover {
    background: #5a9a0a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 184, 18, 0.4);
}

/* ==================== Stats Bar ==================== */
.stats-bar {
    padding: 60px 0;
    background: var(--neutral-bg);
}

.stats-bar__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s var(--transition-smooth);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-item__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(116, 184, 18, 0.1);
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-item__icon i {
    font-size: 32px;
    color: var(--primary-green);
}

.stat-item__number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stat-item__label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==================== Bottom CTA Section ==================== */
.bottom-cta {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-teal) 0%, var(--darker-teal) 100%);
}

.bottom-cta__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 30% 20%, rgba(116, 184, 18, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(116, 184, 18, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.bottom-cta__title {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.bottom-cta__subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
}

.bottom-cta__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary--large {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: transparent;
    color: var(--white);
    font-weight: 600;
    font-size: 16px;
    border: 2px solid var(--white);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s var(--transition-smooth);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-teal);
    transform: translateY(-2px);
}

.btn-secondary--large {
    padding: 16px 40px;
    font-size: 18px;
}

/* ==================== Responsive Design ==================== */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .work-hero__title {
        font-size: 2.5rem;
    }

    .stats-bar__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mid-page-cta {
        flex-direction: column;
        text-align: center;
        padding: 32px;
    }

    .bottom-cta__title {
        font-size: 2.25rem;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .work-hero {
        padding: 80px 0 60px;
    }

    .work-hero__title {
        font-size: 2rem;
    }

    .work-hero__subtitle {
        font-size: 1rem;
    }

    .work-hero__stats {
        flex-direction: column;
        gap: 12px;
    }

    .stat-pill {
        width: 100%;
        justify-content: center;
    }

    .filter-controls {
        padding: 16px 0;
    }

    .filter-controls__wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }

    .filter-buttons::-webkit-scrollbar {
        height: 4px;
    }

    .filter-buttons::-webkit-scrollbar-track {
        background: var(--neutral-bg);
    }

    .filter-buttons::-webkit-scrollbar-thumb {
        background: var(--primary-green);
        border-radius: 4px;
    }

    .portfolio-grid {
        padding: 40px 0;
    }

    .portfolio-item {
        margin-bottom: 24px;
    }

    .project-card__content {
        padding: 20px;
    }

    .mid-page-cta {
        padding: 24px;
    }

    .mid-page-cta__content h3 {
        font-size: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .stats-bar {
        padding: 40px 0;
    }

    .stat-item {
        padding: 24px;
    }

    .stat-item__icon {
        width: 56px;
        height: 56px;
    }

    .stat-item__icon i {
        font-size: 28px;
    }

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

    .bottom-cta {
        padding: 60px 0;
    }

    .bottom-cta__title {
        font-size: 1.75rem;
    }

    .bottom-cta__subtitle {
        font-size: 1rem;
    }

    .bottom-cta__actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary--large,
    .btn-secondary--large {
        width: 100%;
        justify-content: center;
    }
}

/* Small Mobile (≤375px) */
@media (max-width: 375px) {
    .work-hero__title {
        font-size: 1.75rem;
    }

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

    .project-card__title {
        font-size: 1.125rem;
    }
}

/* ==================== Animation Utilities ==================== */
.portfolio-item.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-item.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

/* ==================== Print Styles ==================== */
@media print {
    .filter-controls,
    .work-hero__stats,
    .mid-page-cta,
    .bottom-cta {
        display: none;
    }

    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-light);
    }
}
