/* ===========================================
   ADTEK Portfolio Grid — Frontend
   =========================================== */

.adtek-pf {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Loading State --- */
.adtek-pf__loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.adtek-pf.is-loading .adtek-pf__loading {
    display: flex;
}

.adtek-pf.is-loading .adtek-pf__grid {
    display: none;
}

.adtek-pf__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #c41231;
    border-radius: 50%;
    animation: adtek-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes adtek-spin {
    to { transform: rotate(360deg); }
}

.adtek-pf__loading p {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #666666;
    margin: 0;
}

/* --- Filter Buttons --- */
.adtek-pf__filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.adtek-pf__filter-btn {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: #222222;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.adtek-pf__filter-btn:hover,
.adtek-pf__filter-btn.is-active {
    background: #c41231;
    color: #ffffff;
}

/* --- Grid --- */
.adtek-pf__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

[data-columns="2"] .adtek-pf__grid { grid-template-columns: repeat(2, 1fr); }
[data-columns="4"] .adtek-pf__grid { grid-template-columns: repeat(4, 1fr); }

/* --- Card --- */
.adtek-pf__card {
    background: #ffffff;
    overflow: hidden;
    transition: box-shadow 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
}

/* Lazy load fade-in animation */
.adtek-pf__card.is-lazy {
    opacity: 0;
    transform: translateY(20px);
}

.adtek-pf__card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.adtek-pf__card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.adtek-pf__card[hidden] {
    display: none;
}

/* Card Image */
.adtek-pf__card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.adtek-pf__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.adtek-pf__card:hover .adtek-pf__card-image img {
    transform: scale(1.05);
}

.adtek-pf__card-placeholder {
    width: 100%;
    height: 100%;
    background: #e0e0e0;
}

/* Hover Overlay */
.adtek-pf__card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(196, 18, 49, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.adtek-pf__card:hover .adtek-pf__card-overlay {
    opacity: 1;
}

.adtek-pf__card-overlay a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.2s ease;
}

.adtek-pf__card-overlay a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.adtek-pf__card-overlay svg {
    width: 22px;
    height: 22px;
}

/* Card Body */
.adtek-pf__card-body {
    padding: 16px 18px 20px;
}

.adtek-pf__card-title {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

.adtek-pf__card-title a {
    color: #222222;
    text-decoration: none;
}

.adtek-pf__card-title a:hover {
    color: #c41231;
}

.adtek-pf__card-meta {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #888888;
    margin: 0 0 8px;
}

.adtek-pf__card-desc {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: #555555;
    margin: 0 0 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adtek-pf__card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.adtek-pf__card-cats span {
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #c41231;
    background: rgba(196, 18, 49, 0.08);
    padding: 3px 8px;
    border-radius: 2px;
}

/* --- Load More --- */
.adtek-pf__load-more-wrap {
    text-align: center;
    margin-top: 30px;
}

.adtek-pf__load-more {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: #222222;
    border: none;
    padding: 12px 32px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.adtek-pf__load-more:hover {
    background: #c41231;
}

.adtek-pf__load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.adtek-pf__empty {
    grid-column: 1 / -1;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #888888;
    padding: 40px 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .adtek-pf__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .adtek-pf__grid {
        grid-template-columns: 1fr;
    }
    .adtek-pf__filter-btn {
        font-size: 12px;
        padding: 8px 14px;
    }
}
