/* Category Archive Page - Grid Layout */
.ph-category-archive,
.ph-category-archive * {
    font-family: 'Gilroy', sans-serif !important;
    box-sizing: border-box;
}

.ph-category-archive {
    width: 100%;
    padding: 40px 20px;
    background-color: #f9f9f9;
}

.ph-category-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Breadcrumbs */
.ph-category-archive .ph-breadcrumbs {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 30px;
}

.ph-category-archive .ph-breadcrumbs a {
    color: #FFD230;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ph-category-archive .ph-breadcrumbs a:hover {
    color: #e6bd1f;
    text-decoration: underline;
}

.ph-category-archive .ph-breadcrumbs span.breadcrumb_last {
    color: #374151;
    font-weight: 400;
}

/* Category Header */
.ph-category-header {
    text-align: center;
    margin-bottom: 50px;
}

.ph-category-header h1 {
    font-size: 42px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.2 !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

.ph-cat-description {
    font-size: 16px;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto 12px;
    line-height: 1.6;
}

.ph-cat-count {
    font-size: 15px;
    color: #9ca3af;
    font-weight: 500;
}

/* Crews Grid */
.ph-cat-crews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Card */
.ph-cat-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ph-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.ph-cat-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header - Horizontal Layout */
.ph-cat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f3f4f6;
}

/* Logo */
.ph-cat-card-logo {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.ph-cat-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #f3f4f6;
}

/* Info (Name + Location) */
.ph-cat-card-info {
    flex: 1;
    min-width: 0;
}

.ph-cat-card-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.3 !important;
    word-break: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ph-cat-card-location {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

/* Type Badge */
.ph-cat-card-type {
    flex-shrink: 0;
    padding: 6px 16px;
    background-color: #FFF4D6;
    color: #8B6914;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: capitalize;
    height: fit-content;
}

/* Content */
.ph-cat-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Tags */
.ph-cat-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.ph-cat-tag {
    display: inline-block;
    padding: 6px 14px;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.ph-cat-tag:hover {
    background-color: #e5e7eb;
    color: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Description */
.ph-cat-card-description {
    margin-bottom: 20px;
    flex: 1;
}

.ph-cat-card-description h4 {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.4 !important;
}

.ph-cat-card-description p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Footer */
.ph-cat-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.ph-cat-member-since {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}

.ph-cat-view-btn {
    padding: 10px 24px;
    background-color: #FFD230;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
    display: inline-block;
}

.ph-cat-view-btn:hover {
    background-color: #E6BD2A;
    color: #111827;
}

/* Pagination */
.ph-cat-pagination {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
}

.ph-cat-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 4px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.ph-cat-pagination .page-numbers:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.ph-cat-pagination .page-numbers.current {
    background-color: #FFD230;
    border-color: #FFD230;
    color: #111827;
}

.ph-cat-pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* No Results */
.ph-no-results {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.ph-no-results h2 {
    font-size: 24px;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 600;
}

.ph-no-results p {
    font-size: 16px;
    color: #9ca3af;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ph-cat-crews-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .ph-category-header h1 {
        font-size: 28px !important;
    }

    .ph-cat-crews-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ph-cat-card {
        padding: 24px;
    }

    .ph-cat-card-header {
        flex-wrap: wrap;
    }

    .ph-cat-card-logo {
        width: 60px;
        height: 60px;
    }

    .ph-cat-card-title {
        font-size: 16px !important;
    }

    .ph-cat-card-type {
        font-size: 11px;
        padding: 5px 12px;
    }

    .ph-cat-card-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .ph-cat-view-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ph-category-archive {
        padding: 30px 15px;
    }

    .ph-category-header h1 {
        font-size: 24px !important;
    }

    .ph-cat-card {
        padding: 20px;
    }

    .ph-cat-card-logo {
        width: 55px;
        height: 55px;
    }

    .ph-cat-card-title {
        font-size: 15px !important;
    }

    .ph-cat-card-location {
        font-size: 12px;
    }

    .ph-cat-card-tags {
        gap: 6px;
    }

    .ph-cat-tag {
        font-size: 11px;
        padding: 5px 12px;
    }

    .ph-cat-card-type {
        font-size: 10px;
        padding: 4px 10px;
    }
}

/* Elementor Compatibility */
.ph-category-archive a.ph-cat-view-btn {
    background-color: #FFD230;
    color: #111827;
    text-decoration: none;
    border: none;
}
.ph-category-archive a.ph-cat-view-btn:hover {
    background-color: #E6BD2A;
    color: #111827;
    text-decoration: none;
}
.ph-category-archive .ph-cat-pagination .page-numbers {
    background-color: #ffffff;
    color: #374151;
    text-decoration: none;
    border: 1px solid #e5e7eb;
}
.ph-category-archive .ph-cat-pagination .page-numbers.current {
    background-color: #FFD230;
    color: #111827;
    border-color: #FFD230;
}
.ph-category-archive a.ph-cat-tag {
    text-decoration: none;
    color: #374151;
    background-color: #f3f4f6;
}
.ph-category-archive a.ph-cat-tag:hover {
    color: #1f2937;
    background-color: #e5e7eb;
    text-decoration: none;
}
