/* assets/css/default/projects.css */

/* === BAGONG DAGDAG: Gawing full-height (100vh) at i-center vertically === */
#projects {
    min-height: 100vh;
    display: flex;       /* Gamit ng flex para sa alignment */
    align-items: center; /* I-center yung content (yung .container) */
    justify-content: center;
}

#projects .container {
    width: 100%; /* Siguraduhin na 100% width yung container sa loob */
}
/* === END NG BAGONG DAGDAG === */


/* --- Stats Row (Counters) --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
}

.stat-item i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.75rem;
}

.stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1.1;
}

.stat-item .stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

/* --- Project Filters (Pills) --- */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 3rem;
    position: relative; /* Kailangan para sa mobile fade/mask */
}

.filter-pills-wrapper {
    display: flex;
    justify-content: center; /* Center by default */
    flex-wrap: wrap; /* Wrap by default */
    gap: inherit; /* Kopyahin ang gap */
}

.filter-pill {
    position: relative; /* Good practice para sa stacking */
    z-index: 1;         /* Good practice para sa stacking */
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 99px; /* Pill shape */
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-pill:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* --- Project Grid --- */
.project-grid {
    display: grid;
    /* === ITO YUNG BINAGO KO === */
    /* Pinalitan ang '1fr' ng '380px' para hindi mag-stretch ang columns */
    grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
    justify-content: center; /* Ito na ang mag-ce-center sa buong grid block */
    gap: 1.5rem;
}

.project-card {
    border-radius: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1;
    transform: scale(1);

    /* === ITO YUNG BAGONG DAGDAG para hindi lumapad nang sobra === */
    max-width: 380px; /* Pwede mong i-adjust 'to kung gusto mo mas malapad/makitid */
    /* === END NG BAGONG DAGDAG === */

    /* Kailangan ito para gumana ang justify-content: center sa grid */
    margin-left: auto;
    margin-right: auto;
    width: 100%; /* Para kunin pa rin yung space na binigay ng minmax pero may max */
}


.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 150, 255, 0.1);
}

.project-card-image {
    height: 200px;
    overflow: hidden;
}

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

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

.project-card-content {
    padding: 1.25rem;
}

.project-card-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.project-card-title {
    font-size: 1.15rem;
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.project-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.project-card-link i {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: transform 0.3s ease;
}

.project-card-link:hover i {
    transform: translateX(4px);
}

/* === Mobile Styles (Walang Binago Dito, OK NA TO) === */
@media screen and (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem 0;
    }
    .stat-item i { font-size: 2.5rem; }
    .stat-item .stat-number { font-size: 2rem; }
    .stat-item .stat-label { font-size: 0.8rem; }

    .project-filters {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0%, black 15px, black calc(100% - 15px), transparent 100%);
    }
    .project-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-pills-wrapper {
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 0 15px;
    }

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

    /* === TINANGGAL KO YUNG max-width SA MOBILE === */
    .project-card {
        max-width: none; /* Hayaan siyang mag-adjust sa 2 columns */
        margin-left: 0;  /* Reset margin auto */
        margin-right: 0; /* Reset margin auto */
    }
    /* === END NG TINANGGAL === */

    .project-card-image {
        height: 150px;
    }

    .project-card-content {
        padding: 1rem;
    }

    .project-card-title {
        font-size: 1rem;
    }
}