/* =========================
   Portfolio Grid Layout
========================= */
.custom-portfolio-section {
    position: relative;
    background: transparent;
    min-height: auto;
}

.custom-portfolio-ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.custom-portfolio-ul .portfolio-item {
    border-radius: 12px;
    border: 1px solid #e4e4e4;
    background: #fafafa;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.custom-portfolio-ul .portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.custom-portfolio-ul .portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.custom-portfolio-ul .portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.custom-portfolio-ul .portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

/* =========================
   Category Buttons
========================= */
.custom-portfolio-category-section {
    margin-bottom: 40px;
    text-align: center;
}

.custom-portfolio-category-section .category_button {
    display: inline-block;
    margin: 0 10px 15px;
    padding: 5px 24px;
    font-size: 15px;
    font-weight: bold;
    font-family: 'Outfit';
    border-radius: 50px;
    border: 2px solid #013437;
    color: #013437;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.custom-portfolio-category-section .category_button:hover, 
.custom-portfolio-category-section .category_button.active {
    background: linear-gradient(45deg, #F05B57, #EC1D68);
    color: #ffffff;
    border: 2px solid #f05b57;
}

/* =========================
   Pagination
========================= */
.custom-pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

.custom-pagination li {
    margin: 0 6px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0bd4d9;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-pagination li:hover {
    background: #08b5b9;
}

.custom-pagination li.active {
    background: #041a45;
    cursor: default;
}

/* =========================
   Loading Animation
========================= */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.loading .bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #000;
    animation: animIn 0.65s ease-in-out infinite;
}

.loading .bullet:nth-child(2) { animation-delay: 0.15s; }
.loading .bullet:nth-child(3) { animation-delay: 0.3s; }
.loading .bullet:nth-child(4) { animation-delay: 0.45s; }

@keyframes animIn {
    0%   { transform: translateY(-10px); opacity: 0; }
    50%  { opacity: 1; }
    100% { transform: translateY(10px); opacity: 0; }
}

/* =========================
   Responsive
========================= */
@media (max-width: 767px) {
    .custom-portfolio-ul {
        grid-template-columns: 1fr;
    }
    .custom-portfolio-category-section .category_button {
        margin: 5px;
        padding: 8px 18px;
        font-size: 14px;
    }
    .custom-pagination li {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .custom-portfolio-ul {
        grid-template-columns: 1fr 1fr;
    }
}
