/**
 * Portfolio Section Styles
 * Modern portfolio card design with hover effects
 */

/* Page Header Section */
.page-template-page-portfolio .page-header-section,
.tax-portfolio_category .page-header-section,
.tax-portfolio_tag .page-header-section {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, #00a8cc 0%, #0077b6 100%);
    color: #fff;
}

.page-template-page-portfolio .page-header-content,
.tax-portfolio_category .page-header-content,
.tax-portfolio_tag .page-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-template-page-portfolio .page-title,
.tax-portfolio_category .page-title,
.tax-portfolio_tag .page-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #fff;
}

.page-description {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.95;
}

.page-description p {
    margin-bottom: 0;
}

/* Portfolio Archive Section */
.portfolio-archive-section {
    padding: 60px 0 80px;
    background: #f8f9fa;
}

/* Portfolio Filter */
.portfolio-filter-wrapper {
    margin-bottom: 30px;
}

.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-decoration: none;
}

.filter-btn:hover {
    background: #f0f6ff;
    border-color: #00a8cc;
    color: #00a8cc;
}

.filter-btn.active {
    background: linear-gradient(135deg, #00a8cc 0%, #0077b6 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 168, 204, 0.3);
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Portfolio Item Animation */
.portfolio-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Portfolio Pagination */
.portfolio-pagination {
    margin-top: 40px;
    text-align: center;
}

.portfolio-pagination .page-numbers {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.portfolio-pagination .page-numbers li {
    display: inline-block;
}

.portfolio-pagination .page-numbers a,
.portfolio-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.portfolio-pagination .page-numbers a:hover {
    background: #f8f9fa;
    border-color: #00a8cc;
    color: #00a8cc;
    transform: translateY(-2px);
}

.portfolio-pagination .page-numbers .current {
    background: linear-gradient(135deg, #00a8cc 0%, #0077b6 100%);
    border-color: #00a8cc;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 168, 204, 0.3);
}

.portfolio-pagination .page-numbers .prev,
.portfolio-pagination .page-numbers .next {
    font-size: 13px;
}

.portfolio-pagination .page-numbers .dots {
    border: none;
    background: transparent;
    color: #adb5bd;
}

/* Portfolio Section */
.portfolio {
    padding: 80px 0;
    background: #f8f9fa;
}

/* Portfolio Card */
.portfolio-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Portfolio Image Wrapper */
.portfolio-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 56.2%; /* 4:3 aspect ratio */
    background: #e9ecef;
}

.portfolio-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-thumbnail {
    transform: scale(1.1);
}

/* Portfolio Overlay */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 168, 204, 0.95) 0%, rgba(0, 119, 182, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.portfolio-overlay-content {
    text-align: center;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-overlay-content {
    transform: translateY(0);
}

/* Portfolio Category Badge */
.portfolio-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.portfolio-category i {
    margin-right: 5px;
}

/* Portfolio Title in Overlay */
.portfolio-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

/* Portfolio Excerpt */
.portfolio-excerpt {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.95;
}

/* Portfolio Link */
.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #00a8cc;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    background: #f8f9fa;
    color: #0077b6;
    gap: 12px;
}

.portfolio-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.portfolio-link:hover i {
    transform: translateX(3px);
}

/* Portfolio Info (below image) */
.portfolio-info {
    padding: 20px;
    flex-grow: 1;
}

.portfolio-info-title {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
    line-height: 1.4;
}

.portfolio-info-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.portfolio-info-title a:hover {
    color: #00a8cc;
}

.portfolio-info-category {
    display: inline-block;
    font-size: 13px;
    color: #00a8cc;
    font-weight: 600;
    padding: 4px 12px;
    background: rgba(0, 168, 204, 0.1);
    border-radius: 4px;
}

/* Portfolio Empty State */
.portfolio-empty {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.portfolio-empty-icon {
    font-size: 80px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.portfolio-empty h3 {
    font-size: 24px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 12px;
}

.portfolio-empty p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 0;
}

/* Responsive */

/* Tablet: Force 2 columns (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .portfolio .row .col-md-6.col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Desktop: Show 3 columns (1200px+) */
@media (min-width: 1200px) {
    .portfolio .row .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Mobile: Smaller padding and text */
@media (max-width: 768px) {
    .page-header-section {
        padding: 40px 0 30px;
    }

    .page-title {
        font-size: 32px;
    }

    .page-description {
        font-size: 14px;
    }

    .portfolio-archive-section {
        padding: 40px 0 60px;
    }

    .portfolio-filter {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .portfolio-pagination .page-numbers a,
    .portfolio-pagination .page-numbers span {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 13px;
    }

    .portfolio {
        padding: 60px 0;
    }

    .portfolio-title {
        font-size: 18px;
    }

    .portfolio-excerpt {
        font-size: 13px;
    }

    .portfolio-info-title {
        font-size: 16px;
    }

    .portfolio-empty {
        padding: 60px 20px;
    }

    .portfolio-empty-icon {
        font-size: 60px;
    }

    .portfolio-empty h3 {
        font-size: 20px;
    }
}
