/**
 * AgencyX Portfolio Frontend Styles - Optimized
 */

/* CSS Variables */
:root {
    --agencyx-primary-color: #3b82f6;
    --agencyx-secondary-color: #1e40af;
    --agencyx-accent-color: #f59e0b;
    --agencyx-text-color: #374151;
    --agencyx-background-color: #ffffff;
    --agencyx-border-radius: 8px;
    --agencyx-box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --agencyx-transition: all 0.3s ease;
}

/* Enhanced Container */
.agencyx-portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Portfolio Controls */
.agencyx-portfolio-controls {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Enhanced Tab-based Category Filter */
.agencyx-portfolio-filter-tabs {
    position: relative;
    margin-bottom: 50px;
    display: flex;
    justify-content: center;
}

.agencyx-filter-tabs-container {
    display: flex;
    background: #f8fafc;
    border-radius: 50px;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.agencyx-filter-tab {
    position: relative;
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    z-index: 2;
    min-width: 80px;
}

.agencyx-filter-tab:hover {
    color: #334155;
    transform: translateY(-1px);
}

.agencyx-filter-tab.active {
    color: #ffffff;
    font-weight: 700;
}

.agencyx-filter-tab.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    border-radius: 25px;
    z-index: -1;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    animation: tabActivate 0.3s ease-out;
}

@keyframes tabActivate {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Search Bar */
.agencyx-portfolio-search {
    margin-bottom: 1rem;
}

.agencyx-portfolio-search input {
    transition: all 0.3s ease;
}

.agencyx-portfolio-search input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Layout Switcher */
.agencyx-layout-switcher {
    margin-bottom: 1rem;
}

.agencyx-layout-btn {
    transition: all 0.3s ease;
    background: white;
    color: #6b7280;
}

.agencyx-layout-btn:hover,
.agencyx-layout-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Sorting Controls */
.agencyx-portfolio-sorting {
    margin-bottom: 1rem;
}

.agencyx-order-btn {
    transition: all 0.3s ease;
    background: white;
    color: #6b7280;
}

.agencyx-order-btn:hover,
.agencyx-order-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Filter Buttons */
.agencyx-portfolio-filter {
    margin-bottom: 2rem;
}

.agencyx-filter-btn {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.agencyx-filter-btn:hover,
.agencyx-filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Enhanced Portfolio Grid */
.agencyx-portfolio-grid {
    display: grid;
    gap: 35px;
    margin-bottom: 50px;
    position: relative;
}

/* Grid Layout Classes */
.agencyx-portfolio-grid.grid-cols-1 {
    grid-template-columns: 1fr;
}

.agencyx-portfolio-grid.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.agencyx-portfolio-grid.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.agencyx-portfolio-grid.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.agencyx-portfolio-grid.grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.agencyx-portfolio-grid.grid-cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Masonry Layout */
.agencyx-masonry-grid {
    column-count: 1;
    column-gap: 2rem;
    margin-bottom: 2rem;
}

.agencyx-masonry-grid .agencyx-portfolio-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    display: inline-block;
    width: 100%;
}

@media (min-width: 768px) {
    .agencyx-masonry-grid {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .agencyx-masonry-grid {
        column-count: 3;
    }
}

@media (min-width: 1280px) {
    .agencyx-masonry-grid {
        column-count: 4;
    }
}

/* Carousel Layout */
.agencyx-carousel-grid {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.agencyx-carousel-grid .agencyx-portfolio-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

.agencyx-carousel-grid::-webkit-scrollbar {
    height: 8px;
}

.agencyx-carousel-grid::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.agencyx-carousel-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.agencyx-carousel-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* List Layout */
.agencyx-list-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.agencyx-list-grid .agencyx-portfolio-item {
    width: 100%;
}

.agencyx-list-grid .agencyx-portfolio-card {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .agencyx-list-grid .agencyx-portfolio-card {
        flex-direction: row;
        min-height: 200px;
    }

    .agencyx-list-grid .agencyx-portfolio-image-list {
        height: 200px;
    }
}

/* Portfolio Items */
.agencyx-portfolio-item {
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.agencyx-portfolio-item.filtered-out,
.agencyx-portfolio-item-enhanced.filtered-out,
.agencyx-portfolio-item.search-hidden,
.agencyx-portfolio-item-enhanced.search-hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.agencyx-portfolio-item.filtered-out,
.agencyx-portfolio-item-enhanced.filtered-out {
    display: none;
}

.agencyx-portfolio-item.search-hidden,
.agencyx-portfolio-item-enhanced.search-hidden {
    display: none;
}

/* Portfolio Cards */
.agencyx-portfolio-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.agencyx-portfolio-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Card Style Variants */
.agencyx-portfolio-container[data-card-style="minimal"] .agencyx-portfolio-card {
    border: 1px solid #e5e7eb;
    box-shadow: none;
}

.agencyx-portfolio-container[data-card-style="minimal"] .agencyx-portfolio-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.agencyx-portfolio-container[data-card-style="modern"] .agencyx-portfolio-card {
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.agencyx-portfolio-container[data-card-style="modern"] .agencyx-portfolio-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-4px) scale(1.02);
}

.agencyx-portfolio-container[data-card-style="classic"] .agencyx-portfolio-card {
    border: 2px solid #f3f4f6;
    border-radius: 4px;
}

.agencyx-portfolio-container[data-card-style="classic"] .agencyx-portfolio-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Consolidated Portfolio Card Design */
.agencyx-portfolio-card,
.agencyx-portfolio-card-enhanced,
.agencyx-portfolio-card-premium {
    background: #ffffff;
    border-radius: var(--agencyx-border-radius);
    overflow: hidden;
    box-shadow: var(--agencyx-box-shadow);
    transition: var(--agencyx-transition);
    border: 1px solid #f1f5f9;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.agencyx-portfolio-card:hover,
.agencyx-portfolio-card-enhanced:hover,
.agencyx-portfolio-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #e2e8f0;
}

/* Card Style Variants */
.agencyx-portfolio-card.card-minimal,
.agencyx-portfolio-card-enhanced.card-minimal,
.agencyx-portfolio-card-premium.card-minimal {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.agencyx-portfolio-card.card-minimal:hover,
.agencyx-portfolio-card-enhanced.card-minimal:hover,
.agencyx-portfolio-card-premium.card-minimal:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.agencyx-portfolio-card.card-modern,
.agencyx-portfolio-card-enhanced.card-modern,
.agencyx-portfolio-card-premium.card-modern {
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.agencyx-portfolio-card.card-modern:hover,
.agencyx-portfolio-card-enhanced.card-modern:hover,
.agencyx-portfolio-card-premium.card-modern:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Consolidated Image Container */
.agencyx-portfolio-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--agencyx-border-radius);
    cursor: pointer;
    transition: var(--agencyx-transition);
}

.agencyx-portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.agencyx-portfolio-card:hover .agencyx-portfolio-image,
.agencyx-portfolio-card-enhanced:hover .agencyx-portfolio-image,
.agencyx-portfolio-card-premium:hover .agencyx-portfolio-image,
.agencyx-portfolio-image-container:hover .agencyx-portfolio-image {
    transform: scale(1.08);
}

/* Enhanced Overlay */
.agencyx-portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(147, 51, 234, 0.9) 100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.agencyx-overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Enhanced View More Button */
.agencyx-view-more-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.agencyx-view-more-btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.agencyx-view-more-btn .btn-icon {
    transition: transform 0.3s ease;
}

.agencyx-view-more-btn:hover .btn-icon {
    transform: translateX(2px) translateY(-2px);
}

/* Enhanced Content Section */
.agencyx-portfolio-content {
    padding: 24px;
    position: relative;
}

/* Enhanced Title */
.agencyx-portfolio-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.agencyx-portfolio-card-enhanced:hover .agencyx-portfolio-title {
    color: var(--agencyx-primary-color);
}

/* Enhanced Category Tags */
.agencyx-portfolio-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.agencyx-category-tag {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.agencyx-portfolio-card-enhanced:hover .agencyx-category-tag {
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-1px);
}

/* Enhanced Excerpt */
.agencyx-portfolio-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced CTA Section */
.agencyx-portfolio-cta {
    margin-top: auto;
}

.agencyx-view-details-btn {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #475569;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.agencyx-view-details-btn:hover {
    background: var(--agencyx-primary-color);
    border-color: var(--agencyx-primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.agencyx-view-details-btn .btn-arrow {
    transition: transform 0.3s ease;
}

.agencyx-view-details-btn:hover .btn-arrow {
    transform: translateX(3px);
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .agencyx-portfolio-container {
        padding: 30px 15px;
    }

    .agencyx-portfolio-grid {
        gap: 25px;
    }

    .agencyx-portfolio-grid.grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }

    .agencyx-portfolio-grid.grid-cols-5,
    .agencyx-portfolio-grid.grid-cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }

    .agencyx-filter-tabs-container {
        padding: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .agencyx-filter-tab {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .agencyx-portfolio-container {
        padding: 20px 10px;
    }

    .agencyx-portfolio-grid {
        gap: 20px;
    }

    .agencyx-portfolio-grid.grid-cols-2,
    .agencyx-portfolio-grid.grid-cols-3,
    .agencyx-portfolio-grid.grid-cols-4,
    .agencyx-portfolio-grid.grid-cols-5,
    .agencyx-portfolio-grid.grid-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .agencyx-portfolio-filter-tabs {
        margin-bottom: 30px;
    }

    .agencyx-filter-tabs-container {
        border-radius: 25px;
        padding: 3px;
    }

    .agencyx-filter-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .agencyx-portfolio-content {
        padding: 20px;
    }

    .agencyx-portfolio-title {
        font-size: 1.1rem;
    }

    .agencyx-portfolio-excerpt {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .agencyx-portfolio-container {
        padding: 15px 8px;
    }

    .agencyx-portfolio-grid {
        gap: 15px;
    }

    .agencyx-portfolio-grid.grid-cols-2,
    .agencyx-portfolio-grid.grid-cols-3,
    .agencyx-portfolio-grid.grid-cols-4,
    .agencyx-portfolio-grid.grid-cols-5,
    .agencyx-portfolio-grid.grid-cols-6 {
        grid-template-columns: 1fr;
    }

    .agencyx-filter-tabs-container {
        flex-direction: column;
        border-radius: 15px;
        padding: 2px;
    }

    .agencyx-filter-tab {
        padding: 10px 20px;
        border-radius: 12px;
        width: 100%;
        text-align: center;
    }

    .agencyx-portfolio-content {
        padding: 16px;
    }

    .agencyx-portfolio-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .agencyx-portfolio-categories {
        margin-bottom: 12px;
    }

    .category-tag {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .agencyx-portfolio-excerpt {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

    .agencyx-view-details-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .agencyx-view-more-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Enhanced Filtering Animations */
.agencyx-portfolio-grid.filtering,
.agencyx-portfolio-grid-enhanced.filtering {
    pointer-events: none;
}

.agencyx-portfolio-item.filtering-out,
.agencyx-portfolio-item-enhanced.filtering-out {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.agencyx-portfolio-item.filtering-in,
.agencyx-portfolio-item-enhanced.filtering-in {
    opacity: 1;
    transform: scale(1) translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.agencyx-portfolio-item.filtered-out,
.agencyx-portfolio-item-enhanced.filtered-out {
    display: none;
}

/* Enhanced Animation Delays for Staggered Effect */
.agencyx-portfolio-item.filtering-in:nth-child(1),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(1) { transition-delay: 0.05s; }
.agencyx-portfolio-item.filtering-in:nth-child(2),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(2) { transition-delay: 0.1s; }
.agencyx-portfolio-item.filtering-in:nth-child(3),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(3) { transition-delay: 0.15s; }
.agencyx-portfolio-item.filtering-in:nth-child(4),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(4) { transition-delay: 0.2s; }
.agencyx-portfolio-item.filtering-in:nth-child(5),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(5) { transition-delay: 0.25s; }
.agencyx-portfolio-item.filtering-in:nth-child(6),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(6) { transition-delay: 0.3s; }
.agencyx-portfolio-item.filtering-in:nth-child(7),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(7) { transition-delay: 0.35s; }
.agencyx-portfolio-item.filtering-in:nth-child(8),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(8) { transition-delay: 0.4s; }
.agencyx-portfolio-item.filtering-in:nth-child(9),
.agencyx-portfolio-item-enhanced.filtering-in:nth-child(9) { transition-delay: 0.45s; }

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .agencyx-portfolio-card-enhanced:hover {
        transform: none;
    }

    .agencyx-portfolio-card-enhanced:active {
        transform: scale(0.98);
    }

    .agencyx-view-more-btn,
    .agencyx-view-details-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .agencyx-filter-tab {
        min-height: 44px;
        padding: 12px 20px;
    }
}

/* Premium Portfolio Card Design System */
.agencyx-portfolio-grid-enhanced {
    display: grid;
    gap: 40px;
    margin-bottom: 60px;
    position: relative;
}

/* Enhanced Layout Classes */
.agencyx-portfolio-grid-enhanced.layout-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.agencyx-portfolio-grid-enhanced.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.agencyx-portfolio-grid-enhanced.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.agencyx-portfolio-grid-enhanced.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.agencyx-portfolio-grid-enhanced.grid-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.agencyx-portfolio-grid-enhanced.layout-list {
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Layout Switching Styles */
.agencyx-portfolio-grid-enhanced {
    transition: all 0.3s ease;
}

.agencyx-portfolio-grid-enhanced.layout-switching {
    opacity: 0.7;
    pointer-events: none;
}

/* Grid Layout (Default) */
.agencyx-portfolio-grid-enhanced.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Masonry Layout */
.agencyx-portfolio-grid-enhanced.agencyx-masonry-grid {
    display: block;
    column-count: 3;
    column-gap: 30px;
}

.agencyx-portfolio-grid-enhanced.agencyx-masonry-grid .agencyx-portfolio-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 30px;
    break-inside: avoid;
}

/* List Layout */
.agencyx-portfolio-grid-enhanced.agencyx-list-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.agencyx-portfolio-grid-enhanced.agencyx-list-grid .agencyx-portfolio-item {
    display: flex;
    align-items: stretch;
    gap: 30px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.agencyx-portfolio-grid-enhanced.agencyx-list-grid .agencyx-portfolio-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.agencyx-portfolio-grid-enhanced.agencyx-list-grid .agencyx-portfolio-image-container {
    flex: 0 0 300px;
    height: 200px;
}

.agencyx-portfolio-grid-enhanced.agencyx-list-grid .agencyx-portfolio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

/* Responsive Layout Adjustments */
@media (max-width: 768px) {
    .agencyx-portfolio-grid-enhanced.agencyx-masonry-grid {
        column-count: 2;
    }

    .agencyx-portfolio-grid-enhanced.agencyx-list-grid .agencyx-portfolio-item {
        flex-direction: column;
    }

    .agencyx-portfolio-grid-enhanced.agencyx-list-grid .agencyx-portfolio-image-container {
        flex: none;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .agencyx-portfolio-grid-enhanced.agencyx-masonry-grid {
        column-count: 1;
    }
}

.agencyx-portfolio-grid-enhanced.layout-column {
    display: grid;
    gap: 35px;
}

/* Premium Portfolio Card Base */
.agencyx-portfolio-card-premium {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.agencyx-portfolio-card-premium:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Premium Card Style Variants */
.agencyx-portfolio-card-premium.card-premium {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.agencyx-portfolio-card-premium.card-premium:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}



/* Image Placeholder */
.agencyx-portfolio-image-container.agencyx-no-image {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.agencyx-portfolio-placeholder {
    text-align: center;
    color: #94a3b8;
}

.agencyx-portfolio-placeholder p {
    margin: 8px 0 0 0;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Video Support */
.agencyx-portfolio-video-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f8fafc;
}

.agencyx-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.agencyx-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.agencyx-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agencyx-youtube-video,
.agencyx-vimeo-video {
    background: #000;
}

.agencyx-self-hosted-video video {
    background: #000;
}

/* Video overlay effects */
.agencyx-portfolio-video-container .agencyx-portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.agencyx-portfolio-card-premium:hover .agencyx-portfolio-video-container .agencyx-portfolio-overlay {
    opacity: 1;
}

/* Advanced Filters */
.agencyx-advanced-filters {
    margin: 20px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.agencyx-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.agencyx-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agencyx-filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.agencyx-filter-group input,
.agencyx-filter-group select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.agencyx-filter-group input:focus,
.agencyx-filter-group select:focus {
    outline: none;
    border-color: var(--agencyx-primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.agencyx-filter-group input[type="date"] {
    width: 100%;
}

#agencyx-toggle-advanced-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#agencyx-toggle-advanced-filters:hover {
    background: #f9fafb;
    border-color: var(--agencyx-primary-color);
}

#agencyx-toggle-advanced-filters .toggle-icon {
    transition: transform 0.2s ease;
}

#agencyx-toggle-advanced-filters.active .toggle-icon {
    transform: rotate(180deg);
}

.agencyx-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9rem;
}

.agencyx-btn-secondary {
    background: #6b7280;
    color: #ffffff;
}

.agencyx-btn-secondary:hover {
    background: #4b5563;
}

.agencyx-btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.agencyx-btn-outline:hover {
    background: #f9fafb;
    border-color: var(--agencyx-primary-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .agencyx-filters-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .agencyx-advanced-filters {
        padding: 15px;
        margin: 15px 0;
    }
}

/* Pagination Styles */
.agencyx-portfolio-pagination {
    margin: 40px 0 20px 0;
    text-align: center;
}

.agencyx-load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.agencyx-btn-primary {
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: center;
}

.agencyx-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.agencyx-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.load-more-info {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
}

.agencyx-infinite-scroll-trigger {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.infinite-scroll-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #6b7280;
}

.infinite-scroll-loader p {
    margin: 0;
    font-size: 0.9rem;
}

.agencyx-standard-pagination {
    display: flex;
    justify-content: center;
}

.agencyx-standard-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.agencyx-standard-pagination .page-numbers li {
    margin: 0;
}

.agencyx-standard-pagination .page-numbers a,
.agencyx-standard-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.agencyx-standard-pagination .page-numbers a:hover {
    background: var(--agencyx-primary-color);
    color: #ffffff;
    border-color: var(--agencyx-primary-color);
}

.agencyx-standard-pagination .page-numbers .current {
    background: var(--agencyx-primary-color);
    color: #ffffff;
    border-color: var(--agencyx-primary-color);
}

/* Animation for loading */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .agencyx-portfolio-pagination {
        margin: 30px 0 15px 0;
    }

    .agencyx-btn-primary {
        min-width: 160px;
        padding: 10px 20px;
    }

    .agencyx-standard-pagination .page-numbers a,
    .agencyx-standard-pagination .page-numbers span {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 0.9rem;
    }
}

/* Interactive Modal Elements */
.agencyx-modal-stats {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.agencyx-modal-stats .stats-title {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.stat-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-label {
    flex: 0 0 120px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.stat-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    border-radius: 4px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressGlow 2s ease-in-out infinite alternate;
}

.stat-value {
    flex: 0 0 40px;
    text-align: right;
    font-weight: 600;
    color: var(--agencyx-primary-color);
    font-size: 0.9rem;
}

@keyframes progressGlow {
    0% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.3); }
    100% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.6); }
}



/* Live Preview */
.agencyx-modal-live-preview {
    margin: 20px 0;
}

.agencyx-modal-live-preview .preview-title {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.preview-container {
    position: relative;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.live-preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    transform: scale(0.5);
    transform-origin: top left;
    width: 200%;
    height: 200%;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-container:hover .preview-overlay {
    opacity: 1;
}

.preview-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--agencyx-primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.preview-btn:hover {
    background: var(--agencyx-secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}



/* Minimal Hover Overlay */
.agencyx-portfolio-minimal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agencyx-portfolio-image-container:hover .agencyx-portfolio-minimal-overlay {
    opacity: 1;
}

/* Minimal Category Tags */
.agencyx-portfolio-categories-minimal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 12px 0;
}

.agencyx-category-tag-minimal {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.agencyx-category-tag-minimal:hover {
    background: #e2e8f0;
    color: #475569;
}

/* Enhanced Project Metadata */
.agencyx-portfolio-meta-enhanced {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.meta-item:hover {
    transform: translateX(4px);
}

.meta-icon {
    color: var(--agencyx-primary-color);
    font-size: 14px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meta-label {
    font-weight: 600;
    color: #64748b;
    min-width: 50px;
}

.meta-value {
    color: #1e293b;
    font-weight: 500;
}

.live-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Enhanced CTA Button */
.agencyx-view-details-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.agencyx-view-details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.agencyx-view-details-btn:hover::before {
    left: 100%;
}

.agencyx-view-details-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.agencyx-view-details-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* DUPLICATE REMOVED - Premium card styles already defined above */

/* Card Content Styling */
.agencyx-portfolio-content {
    padding: 24px;
    position: relative;
    z-index: 2;
}

.agencyx-portfolio-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.agencyx-portfolio-card-premium:hover .agencyx-portfolio-title {
    color: #3b82f6;
}

.agencyx-portfolio-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 16px 0;
    line-height: 1.5;
    font-weight: 400;
}

.agencyx-portfolio-excerpt {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Layout Switcher */
.agencyx-layout-switcher {
    margin-bottom: 20px;
}

.layout-switcher-container {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
}

.layout-switcher-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

.layout-buttons {
    display: flex;
    gap: 4px;
    background: #f8fafc;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.agencyx-layout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.agencyx-layout-btn:hover {
    background: #ffffff;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agencyx-layout-btn.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.layout-icon {
    font-size: 1rem;
    line-height: 1;
}

.layout-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .agencyx-portfolio-meta-enhanced {
        padding: 12px;
        gap: 6px;
    }

    .meta-item {
        font-size: 0.8rem;
    }

    .category-tag-enhanced {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .agencyx-portfolio-image-container:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .layout-switcher-container {
        justify-content: center;
        flex-wrap: wrap;
    }

    .layout-label {
        display: none;
    }

    .agencyx-layout-btn {
        padding: 8px;
    }
}

/* Enhanced Responsive Modal Layout */
.agencyx-modal-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    min-height: 500px;
    overflow-y: auto;
    max-height: 94vh;
    align-items: start;
}

.agencyx-modal-left-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.agencyx-modal-right-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

/* Fix modal image container for all aspect ratios */
.agencyx-modal-main-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #ffffff;
}

.agencyx-modal-image-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Handle different image orientations */
.agencyx-modal-image-container.portrait .agencyx-modal-main-image {
    max-height: 600px;
    max-width: 100%;
}

.agencyx-modal-image-container.landscape .agencyx-modal-main-image {
    max-height: 400px;
    width: 100%;
}

.agencyx-modal-image-container.square .agencyx-modal-main-image {
    max-height: 450px;
    max-width: 100%;
}





/* Fix "View Live Project" button visibility */
.agencyx-modal-cta {
    position: relative;
    z-index: 10;
    margin-top: 20px;
    padding: 20px 0;
}

.live-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.live-project-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: #ffffff !important;
}

.live-project-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.live-project-btn span {
    font-weight: 600;
}

.live-project-btn-placeholder {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: not-allowed;
    width: 100%;
    justify-content: center;
    opacity: 0.7;
}

.live-project-btn-placeholder .placeholder-text {
    font-weight: 600;
}

.live-project-btn-placeholder svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Enhanced Modal Responsive Design */
@media (max-width: 768px) {
    .agencyx-modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 85vh;
        border-radius: 8px;
    }

    .agencyx-modal-content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
        max-height: 80vh;
    }

    /* Show images on mobile but with proper scaling */
    .agencyx-modal-images {
        display: block !important;
        max-height: 250px;
        overflow: hidden;
    }

    .agencyx-modal-images img {
        width: 100%;
        height: auto;
        max-height: 250px;
        object-fit: cover;
        border-radius: 8px;
    }

    .agencyx-modal-close {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }



    /* Fix "View Live Project" button visibility */
    .agencyx-modal-actions {
        position: relative;
        z-index: 10;
        margin-top: 20px;
    }

    .agencyx-view-live-btn {
        display: block !important;
        width: 100%;
        padding: 12px 20px;
        background: var(--agencyx-primary-color);
        color: #ffffff;
        text-decoration: none;
        border-radius: 8px;
        text-align: center;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .agencyx-view-live-btn:hover {
        background: var(--agencyx-secondary-color);
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    .agencyx-modal-content-wrapper {
        padding: 15px;
        gap: 15px;
    }

    .agencyx-modal-content {
        width: 98%;
        margin: 2% auto;
    }

    .agencyx-modal-images {
        max-height: 200px;
    }

    .agencyx-modal-images img {
        max-height: 200px;
    }
}

/* Premium Overlay System */
.agencyx-portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(147, 51, 234, 0.95) 100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

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

.overlay-content {
    transform: translateY(30px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Premium View More Button */
.agencyx-view-more-btn {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.agencyx-view-more-btn:hover {
    background: #ffffff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    color: var(--agencyx-primary-color);
}

.agencyx-view-more-btn .btn-icon {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.agencyx-view-more-btn:hover .btn-icon {
    transform: translateX(3px) translateY(-3px) rotate(45deg);
}

/* Premium Content Section */
.agencyx-portfolio-content-enhanced {
    padding: 28px;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Premium Title */
.agencyx-portfolio-title-enhanced {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
    line-height: 1.3;
    transition: all 0.3s ease;
    letter-spacing: -0.02em;
}

.agencyx-portfolio-card-premium:hover .agencyx-portfolio-title-enhanced {
    color: var(--agencyx-primary-color);
    transform: translateY(-2px);
}

/* Premium Category Tags */
.agencyx-portfolio-categories-enhanced {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.category-tag-enhanced {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.category-tag-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-tag-enhanced span {
    position: relative;
    z-index: 1;
}

.agencyx-portfolio-card-premium:hover .category-tag-enhanced {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* DUPLICATE REMOVED - Category tag hover effects consolidated above */

/* Premium Excerpt */
.agencyx-portfolio-excerpt-enhanced {
    color: #64748b;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Premium CTA Section */
.agencyx-portfolio-cta-enhanced {
    margin-top: auto;
    padding-top: 8px;
    flex-shrink: 0;
}

.agencyx-view-details-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border: 2px solid rgba(59, 130, 246, 0.2);
    color: #475569;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    position: relative;
    overflow: hidden;
}

.agencyx-view-details-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agencyx-view-details-btn span,
.agencyx-view-details-btn svg {
    position: relative;
    z-index: 1;
}

.agencyx-view-details-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
    border-color: transparent;
}

.agencyx-view-details-btn:hover::before {
    opacity: 1;
}

.agencyx-view-details-btn:hover {
    color: #ffffff;
}

.agencyx-view-details-btn .btn-arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.agencyx-view-details-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Portfolio Info Section */
.agencyx-portfolio-info {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 15px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.portfolio-count-info {
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
}

/* Enhanced Controls Section */
.agencyx-portfolio-controls-enhanced {
    margin-bottom: 50px;
    position: relative;
}

/* Layout Switcher Enhancement */
.agencyx-layout-switcher {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 12px;
}

.layout-btn {
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid rgba(226, 232, 240, 0.8);
    color: #64748b;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.layout-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--agencyx-primary-color);
    transform: translateY(-2px);
}

.layout-btn.active {
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

/* Enhanced Responsive Design for Premium Cards */
@media (max-width: 1200px) {
    .agencyx-portfolio-grid-enhanced {
        gap: 30px;
    }

    .agencyx-portfolio-grid-enhanced.grid-cols-5 {
        grid-template-columns: repeat(4, 1fr);
    }

    .agencyx-portfolio-grid-enhanced.grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .agencyx-portfolio-container {
        padding: 30px 15px;
    }

    .agencyx-portfolio-grid-enhanced {
        gap: 25px;
    }

    .agencyx-portfolio-grid-enhanced.grid-cols-4,
    .agencyx-portfolio-grid-enhanced.grid-cols-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .agencyx-portfolio-grid-enhanced.layout-masonry {
        column-count: 2;
        column-gap: 25px;
    }

    .agencyx-portfolio-content-enhanced {
        padding: 24px;
    }

    .agencyx-portfolio-title-enhanced {
        font-size: 1.2rem;
    }

    .agencyx-filter-tabs-container {
        padding: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .agencyx-filter-tab {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .agencyx-portfolio-container {
        padding: 20px 10px;
    }

    .agencyx-portfolio-grid-enhanced {
        gap: 20px;
    }

    .agencyx-portfolio-grid-enhanced.grid-cols-2,
    .agencyx-portfolio-grid-enhanced.grid-cols-3,
    .agencyx-portfolio-grid-enhanced.grid-cols-4,
    .agencyx-portfolio-grid-enhanced.grid-cols-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .agencyx-portfolio-grid-enhanced.layout-masonry {
        column-count: 1;
        column-gap: 0;
    }

    .agencyx-portfolio-filter-tabs {
        margin-bottom: 30px;
    }

    .agencyx-filter-tabs-container {
        border-radius: 25px;
        padding: 3px;
    }

    .agencyx-filter-tab {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .agencyx-portfolio-content-enhanced {
        padding: 20px;
    }

    .agencyx-portfolio-title-enhanced {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .agencyx-portfolio-excerpt-enhanced {
        font-size: 0.95rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin-bottom: 20px;
    }

    .agencyx-view-details-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .agencyx-view-more-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .layout-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .agencyx-portfolio-container {
        padding: 15px 8px;
    }

    .agencyx-portfolio-grid-enhanced {
        gap: 15px;
    }

    .agencyx-portfolio-grid-enhanced.grid-cols-2,
    .agencyx-portfolio-grid-enhanced.grid-cols-3,
    .agencyx-portfolio-grid-enhanced.grid-cols-4,
    .agencyx-portfolio-grid-enhanced.grid-cols-5 {
        grid-template-columns: 1fr;
    }

    .agencyx-filter-tabs-container {
        flex-direction: column;
        border-radius: 15px;
        padding: 2px;
    }

    .agencyx-filter-tab {
        padding: 12px 20px;
        border-radius: 12px;
        width: 100%;
        text-align: center;
        margin-bottom: 2px;
    }

    .agencyx-portfolio-content-enhanced {
        padding: 18px;
    }

    .agencyx-portfolio-title-enhanced {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .agencyx-portfolio-categories-enhanced {
        margin-bottom: 14px;
        gap: 6px;
    }

    .category-tag-enhanced {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .agencyx-portfolio-excerpt-enhanced {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }

    .agencyx-view-details-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .agencyx-view-more-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .layout-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
        margin-bottom: 8px;
    }

    .agencyx-layout-switcher {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}

/* Animation Enhancements for Premium Cards */
.portfolio-item-animate {
    opacity: 0;
    transform: translateY(30px);
    animation: portfolioItemFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.portfolio-item-animate:nth-child(1) { animation-delay: 0.1s; }
.portfolio-item-animate:nth-child(2) { animation-delay: 0.2s; }
.portfolio-item-animate:nth-child(3) { animation-delay: 0.3s; }
.portfolio-item-animate:nth-child(4) { animation-delay: 0.4s; }
.portfolio-item-animate:nth-child(5) { animation-delay: 0.5s; }
.portfolio-item-animate:nth-child(6) { animation-delay: 0.6s; }
.portfolio-item-animate:nth-child(7) { animation-delay: 0.7s; }
.portfolio-item-animate:nth-child(8) { animation-delay: 0.8s; }
.portfolio-item-animate:nth-child(9) { animation-delay: 0.9s; }

@keyframes portfolioItemFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility and Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    .agencyx-portfolio-card-premium,
    .agencyx-portfolio-image,
    .agencyx-view-more-btn,
    .agencyx-view-details-btn,
    .category-tag-enhanced,
    .portfolio-item-animate {
        animation: none;
        transition: none;
    }

    .agencyx-portfolio-card-premium:hover {
        transform: none;
    }
}

.agencyx-portfolio-container[data-card-style="overlay"] .agencyx-portfolio-card {
    overflow: hidden;
    position: relative;
}

.agencyx-portfolio-container[data-card-style="overlay"] .agencyx-portfolio-card:hover {
    transform: scale(1.02);
}



/* Lazy Loading */
.agencyx-portfolio-image img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.agencyx-portfolio-image img.lazy-loaded {
    opacity: 1;
}

/* Portfolio Overlay */
.agencyx-portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* View More Buttons */
.agencyx-view-more-btn,
.agencyx-view-more-btn-alt {
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.agencyx-view-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agencyx-view-more-btn-alt:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Portfolio Content */
.agencyx-portfolio-category {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agencyx-portfolio-title {
    line-height: 1.3;
}

.agencyx-portfolio-subtitle {
    line-height: 1.5;
}

/* Modal */
#agencyx-portfolio-modal {
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.agencyx-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.agencyx-modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    line-height: 1;
}

.agencyx-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Modal Images */
.agencyx-modal-images img {
    transition: transform 0.3s ease;
}

.agencyx-modal-images img:hover {
    transform: scale(1.02);
}

/* Enhanced Modal Styles - Two Column Layout */
.agencyx-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease-out;
}

.agencyx-modal-content {
    position: relative;
    background-color: #fff;
    margin: 2vh auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 96vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animated Gradient Top Border */
.agencyx-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: agencyxGradientShift 4s ease-in-out infinite;
    z-index: 10;
    border-radius: 8px 8px 0 0;
}

/* Respect user motion preferences for top border */
@media (prefers-reduced-motion: reduce) {
    .agencyx-modal-content::before {
        animation: none;
        background: linear-gradient(135deg, #667eea, #764ba2);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.agencyx-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.agencyx-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #333;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.agencyx-modal-body {
    padding: 0;
    height: 94vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Two-Column Layout */
.agencyx-modal-content-wrapper {
    display: grid;
    grid-template-columns: 45% 55%;
    height: 96vh;
    overflow: hidden;
}

/* Left Column - Centered Image Layout */
.agencyx-modal-left-column {
    background: #f8fafc;
    padding: 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    position: relative;
    border-radius: 0;
}

.agencyx-modal-gallery-section {
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0;
}

/* Image Carousel Styles */
.agencyx-modal-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.agencyx-modal-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    background: #ffffff;
}

.agencyx-modal-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 100%;
}

.agencyx-modal-carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agencyx-modal-carousel-slide .agencyx-modal-image-container {
    width: 100%;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

/* Carousel Navigation */
.agencyx-carousel-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 16px;
    pointer-events: none;
    z-index: 20;
}

.agencyx-carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.agencyx-carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.agencyx-carousel-btn svg {
    color: #374151;
    transition: color 0.3s ease;
}

.agencyx-carousel-btn:hover svg {
    color: var(--agencyx-primary-color);
}

/* Carousel Indicators */
.agencyx-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0 16px;
}

.agencyx-carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(148, 163, 184, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.agencyx-carousel-indicator.active {
    background: var(--agencyx-primary-color);
    transform: scale(1.2);
}

.agencyx-carousel-indicator:hover {
    background: var(--agencyx-primary-color);
    transform: scale(1.1);
}

/* Hide navigation for single images */
.agencyx-modal-carousel-track[data-total-images="1"] + .agencyx-carousel-navigation,
.agencyx-modal-carousel-track[data-total-images="1"] ~ .agencyx-carousel-indicators {
    display: none;
}

.agencyx-modal-gallery-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.agencyx-modal-image-container {
    position: relative;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 70vh;
    z-index: 3;
}

.agencyx-modal-main-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    border: none;
}

.agencyx-modal-main-image:hover .main-portfolio-image {
    transform: scale(1.02);
}

/* Gallery section without thumbnails */
.agencyx-modal-gallery-section:not(:has(.agencyx-modal-gallery-thumbnails)) .agencyx-modal-main-image {
    margin-bottom: 0;
}

/* Hide gallery section when no images */
.agencyx-modal-gallery-section:empty {
    display: none;
}

.agencyx-modal-gallery-thumbnails {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Hide empty gallery thumbnails */
.agencyx-modal-gallery-thumbnails:empty {
    display: none;
}

.gallery-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
    border-color: var(--agencyx-primary-color);
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.gallery-nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.gallery-nav-btn svg {
    color: #374151;
}















/* Animations */
@keyframes achievementPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Right Column - Content */
.agencyx-modal-right-column {
    padding: 0;
    overflow-y: auto;
    background: white;
    height: 96vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Clean Modal Header */
.agencyx-modal-header {
    background: #ffffff;
    padding: 30px 24px 25px 24px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
}

.agencyx-modal-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.project-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    animation: agencyxTitleFadeIn 0.8s ease-out 0.3s forwards;
}

@keyframes agencyxTitleFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Respect user motion preferences for title animation */
@media (prefers-reduced-motion: reduce) {
    .project-title {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.project-categories {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.category-tag {
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    color: white;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 500;
}

.agencyx-modal-description {
    margin-bottom: 15px;
    padding: 0 24px;
}

.agencyx-modal-services,
.agencyx-modal-results,
.agencyx-modal-metadata,
.agencyx-modal-cta {
    padding: 0 24px;
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4b5563;
}

.agencyx-modal-services,
.agencyx-modal-results {
    margin-bottom: 10px;
}

.agencyx-modal-services h3,
.agencyx-modal-results h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agencyx-modal-services h3::before {
    
    font-size: 1.2rem;
}

.agencyx-modal-results h3::before {
    
    font-size: 1.2rem;
}

/* Services List - Badge/Pill Styling */
.services-pills{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0 14px 0;
    justify-content: flex-start;
}

.service-pill  {
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    display: inline-block;
    margin: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}
.service-pill:before {
    content: "";
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.08);
    border-radius: 22px;
    pointer-events: none;
}

.service-pill:hover {
    background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 18px rgba(59,130,246,0.18);
}

/* Simplified Results List */
.results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.results-list li {
    padding: 8px 0;
    padding-left: 32px;
    position: relative;
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateX(-20px);
    animation: agencyxResultsFadeIn 0.6s ease-out forwards;
}

.results-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--agencyx-primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Staggered fade-in animation delays */
.results-list li:nth-child(1) { animation-delay: 0.1s; }
.results-list li:nth-child(2) { animation-delay: 0.2s; }
.results-list li:nth-child(3) { animation-delay: 0.3s; }
.results-list li:nth-child(4) { animation-delay: 0.4s; }
.results-list li:nth-child(5) { animation-delay: 0.5s; }
.results-list li:nth-child(6) { animation-delay: 0.6s; }

@keyframes agencyxResultsFadeIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    .results-list li {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

.agencyx-modal-meta {
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    border-left: 3px solid var(--agencyx-primary-color);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.85rem;
}

.meta-value {
    color: #6b7280;
    font-size: 0.85rem;
}

.agencyx-modal-cta {
    text-align: center;
    margin-top: 15px;
}

.live-project-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--agencyx-primary-color), var(--agencyx-secondary-color));
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.live-project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: white;
}

.live-project-btn svg {
    transition: transform 0.3s ease;
}

.live-project-btn:hover svg {
    transform: translateX(4px);
}

/* Loading Animation */
.agencyx-modal-loading {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Animation Classes */
.portfolio-item-animate {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Consolidated stagger animation delays */
.agencyx-portfolio-item:nth-child(n+1):nth-child(-n+9) { animation-delay: calc(0.1s * var(--item-index, 1)); }
.agencyx-portfolio-item:nth-child(1) { --item-index: 1; }
.agencyx-portfolio-item:nth-child(2) { --item-index: 2; }
.agencyx-portfolio-item:nth-child(3) { --item-index: 3; }
.agencyx-portfolio-item:nth-child(4) { --item-index: 4; }
.agencyx-portfolio-item:nth-child(5) { --item-index: 5; }
.agencyx-portfolio-item:nth-child(6) { --item-index: 6; }
.agencyx-portfolio-item:nth-child(7) { --item-index: 7; }
.agencyx-portfolio-item:nth-child(8) { --item-index: 8; }
.agencyx-portfolio-item:nth-child(9) { --item-index: 9; }

/* ========================================
   MODAL PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Skeleton Loading Animation */
.agencyx-modal-skeleton {
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.skeleton-line,
.skeleton-image,
.skeleton-button {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-header {
    margin-bottom: 20px;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 8px;
}

.skeleton-subtitle {
    height: 16px;
    width: 50%;
}

.skeleton-image {
    height: 300px;
    width: 100%;
    margin: 20px 0;
    border-radius: 12px;
}

.skeleton-content {
    margin: 20px 0;
}

.skeleton-line {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-short {
    width: 60%;
}

.skeleton-footer {
    margin-top: 30px;
}

.skeleton-button {
    height: 44px;
    width: 150px;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Lazy Loading Image Transitions */
.agencyx-modal-main-image.lazy {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.agencyx-modal-main-image.loaded {
    opacity: 1;
}

/* Performance Optimized Modal Animations */
.agencyx-modal {
    will-change: opacity, transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.agencyx-modal-content {
    will-change: transform;
    transform: translateZ(0);
}

/* Mobile Skeleton Optimizations */
@media (max-width: 768px) {
    .agencyx-modal-skeleton {
        padding: 20px;
    }

    .skeleton-image {
        height: 200px;
    }
}

/* ========================================
   MODAL IMAGE AND LAYOUT FIXES
   ======================================== */

/* Legacy styles removed - using new centered layout */



/* Left Column Layout Fix */
.agencyx-modal-left-column {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow-y: auto !important;
}



/* Portrait Image Specific Handling */
@media (min-aspect-ratio: 1/1) {
    /* Landscape or square images */
    .agencyx-modal-main-image {
        max-height: 50vh;
    }
}

@media (max-aspect-ratio: 1/1) {
    /* Portrait images */
    .agencyx-modal-main-image {
        max-height: 45vh; /* Reduce height for portrait images */
    }

    .agencyx-modal-image-container {
        max-height: 45vh;
    }
}

/* ========================================
   MODAL CONTENT FORMATTING FIXES
   ======================================== */

/* Services Provided Section */
.agencyx-modal-services {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.agencyx-modal-services h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-icon {
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.service-item:last-child {
    border-bottom: none;
}

.service-bullet {
    color: #3b82f6;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
    margin-top: 2px;
}

.service-text {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

/* Results Achieved Section */
.agencyx-modal-results {
    margin: 15px 0;
    padding: 20px;
    background: #f0fdf4;
    border-radius: 12px;
    border-left: 4px solid #10b981;
}

.agencyx-modal-results h3 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-icon {
    font-size: 1.1rem;
}

.results-grid {
    display: grid;
    gap: 0px;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #dcfce7;
}

.result-item:last-child {
    border-bottom: none;
}

.result-check {
    color: #10b981;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 2px;
}

.result-text {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}





/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    .agencyx-modal-services,
    .agencyx-modal-results {
        margin: 20px 0;
        padding: 15px;
    }

    .agencyx-modal-services h3,
    .agencyx-modal-results h3 {
        font-size: 1.1rem;
    }

    .service-text,
    .result-text {
        font-size: 0.9rem;
    }




}

/* No Items Message */
.agencyx-portfolio-no-items {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.agencyx-portfolio-no-items p {
    font-size: 1.125rem;
    margin: 0;
}

/* Modal Responsive Styles */
@media (max-width: 1024px) {
    .agencyx-modal-content-wrapper {
        grid-template-columns: 1fr;
    }

    .agencyx-modal-left-column {
        order: 2;
        padding: 20px 15px;
        justify-content: flex-start;
    }

    .agencyx-modal-image-container {
        max-height: 50vh;
    }

    /* Carousel responsive adjustments */
    .agencyx-modal-carousel-slide .agencyx-modal-image-container {
        max-height: 50vh;
    }

    .agencyx-carousel-btn {
        width: 40px;
        height: 40px;
    }

    .agencyx-carousel-navigation {
        padding: 0 12px;
    }

    .agencyx-modal-right-column {
        order: 1;
        padding: 20px 15px;
    }

    .agencyx-modal-main-image {
        height: 220px;
    }

    .main-portfolio-image {
        height: 220px;
    }

    .project-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .agencyx-portfolio-container {
        padding: 0 0.5rem;
    }

    .agencyx-portfolio-filter {
        margin-bottom: 1.5rem;
    }

    .agencyx-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .agencyx-portfolio-image {
        height: 12rem;
    }

    .agencyx-modal-content {
        width: 90%;
        max-height: 85vh;
        margin: 7.5vh auto;
        border-radius: 8px;
    }

    .agencyx-modal-body {
        height: 85vh;
    }

    .agencyx-modal-content-wrapper {
        min-height: 85vh;
    }

    .agencyx-modal-left-column,
    .agencyx-modal-right-column {
        padding: 15px 10px;
    }

    .agencyx-modal-left-column {
        justify-content: flex-start;
    }

    .agencyx-modal-image-container {
        max-height: 40vh;
    }

    /* Carousel mobile adjustments */
    .agencyx-modal-carousel-slide .agencyx-modal-image-container {
        max-height: 40vh;
    }

    .agencyx-carousel-btn {
        width: 36px;
        height: 36px;
    }

    .agencyx-carousel-navigation {
        padding: 0 8px;
    }

    .agencyx-carousel-indicators {
        margin-top: 12px;
        gap: 6px;
    }

    .agencyx-carousel-indicator {
        width: 10px;
        height: 10px;
    }

    .agencyx-modal-main-image {
        height: 180px;
        margin-bottom: 10px;
    }

    .main-portfolio-image {
        height: 180px;
    }

    .project-title {
        font-size: 1.3rem;
        margin-bottom: 6px;
    }

    .project-description {
        font-size: 1rem;
    }

    .agencyx-modal-gallery-thumbnails {
        gap: 4px;
        margin-bottom: 10px;
    }

    .gallery-thumbnail {
        width: 40px;
        height: 40px;
    }

    .gallery-nav-btn {
        width: 32px;
        height: 32px;
    }



    .live-project-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .agencyx-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .agencyx-modal-content {
        width: 95%;
        height: 90vh;
        max-height: 90vh;
        margin: 5vh auto;
        border-radius: 6px;
    }

    .agencyx-modal-body {
        height: 90vh;
    }

    .agencyx-modal-content-wrapper {
        min-height: 90vh;
    }

    .agencyx-modal-left-column,
    .agencyx-modal-right-column {
        padding: 12px 8px;
    }

    .agencyx-modal-left-column {
        justify-content: flex-start;
    }

    .agencyx-modal-image-container {
        max-height: 35vh;
    }

    /* Carousel small mobile adjustments */
    .agencyx-modal-carousel-slide .agencyx-modal-image-container {
        max-height: 35vh;
    }

    .agencyx-carousel-btn {
        width: 32px;
        height: 32px;
    }

    .agencyx-carousel-btn svg {
        width: 18px;
        height: 18px;
    }

    .agencyx-carousel-navigation {
        padding: 0 6px;
    }

    .agencyx-carousel-indicators {
        margin-top: 10px;
        gap: 4px;
    }

    .agencyx-carousel-indicator {
        width: 8px;
        height: 8px;
    }

    .project-title {
        font-size: 1.2rem;
    }

    .agencyx-modal-main-image {
        height: 160px;
    }

    .main-portfolio-image {
        height: 160px;
    }

    .gallery-thumbnail {
        width: 36px;
        height: 36px;
    }

    .agencyx-modal-gallery-thumbnails {
        gap: 3px;
    }



    .live-project-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .services-list {
        gap: 6px;
    }

    .services-list li {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
}

/* Custom Color Variables (will be overridden by plugin settings) */
:root {
    --agencyx-primary-color: #3b82f6;
    --agencyx-secondary-color: #1e40af;
    --agencyx-border-radius: 8px;
}

/* Apply custom colors */
.agencyx-filter-btn:hover,
.agencyx-filter-btn.active {
    background: var(--agencyx-primary-color);
    border-color: var(--agencyx-primary-color);
}

.agencyx-view-more-btn-alt {
    background: var(--agencyx-primary-color);
}

.agencyx-view-more-btn-alt:hover {
    background: var(--agencyx-secondary-color);
}

.agencyx-portfolio-card,
.agencyx-modal-content {
    border-radius: var(--agencyx-border-radius);
}

.agencyx-filter-btn,
.agencyx-view-more-btn,
.agencyx-view-more-btn-alt {
    border-radius: var(--agencyx-border-radius);
}

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Layout Transitions */
.agencyx-portfolio-grid[data-layout="grid"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.agencyx-portfolio-grid[data-layout="masonry"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.agencyx-portfolio-grid[data-layout="carousel"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.agencyx-portfolio-grid[data-layout="list"] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Loading State for Layout Switching */
.agencyx-portfolio-grid.layout-switching {
    opacity: 0.5;
    pointer-events: none;
}

/* Enhanced Hover Effects */
.agencyx-portfolio-item:hover .agencyx-portfolio-title {
    color: var(--agencyx-primary-color);
    transition: color 0.3s ease;
}

/* Responsive Enhancements */
@media (max-width: 640px) {
    .agencyx-portfolio-controls {
        padding: 1rem;
    }

    .agencyx-layout-switcher .flex {
        justify-content: center;
    }

    .agencyx-portfolio-sorting .flex {
        flex-direction: column;
        gap: 1rem;
    }

    .agencyx-carousel-grid .agencyx-portfolio-item {
        flex: 0 0 240px;
    }
}





/* Like Button Styles */
.agencyx-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.agencyx-like-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.agencyx-like-btn.liked {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.agencyx-like-btn.liked:hover {
    background: #fee2e2;
}

.likes-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

/* Load More Button */
.agencyx-load-more {
    display: block;
    margin: 2rem auto;
    padding: 0.75rem 2rem;
    background: var(--agencyx-primary-color);
    color: white;
    border: none;
    border-radius: var(--agencyx-border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.agencyx-load-more:hover {
    background: var(--agencyx-secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.agencyx-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Search Widget Styles */
.agencyx-portfolio-search-widget {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.agencyx-search-form {
    margin-bottom: 1rem;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.agencyx-search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.agencyx-search-input:focus {
    outline: none;
    border-color: var(--agencyx-primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.agencyx-search-submit {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: color 0.3s ease;
}

.agencyx-search-submit:hover {
    color: var(--agencyx-primary-color);
}

.search-filters select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
}

.agencyx-search-results-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.agencyx-search-results .no-results {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
    font-style: italic;
}

/* Comparison Styles */
.agencyx-portfolio-comparison {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 2rem;
}

.comparison-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.comparison-selector {
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.agencyx-comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.agencyx-comparison-table th,
.agencyx-comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.agencyx-comparison-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.agencyx-comparison-table tbody tr:hover {
    background: #f9fafb;
}

/* Testimonials Styles */
.agencyx-portfolio-testimonials {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.agencyx-testimonial {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--agencyx-primary-color);
}

.agencyx-testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #374151;
}

.agencyx-testimonial-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agencyx-testimonial-info {
    font-weight: 600;
    color: #1f2937;
}

.agencyx-testimonial-position {
    font-size: 0.875rem;
    color: #6b7280;
}

.agencyx-testimonial-rating {
    color: #fbbf24;
}

/* Print Styles */
@media print {
    .agencyx-portfolio-controls,
    .agencyx-view-more-btn,
    .agencyx-view-more-btn-alt,
    .agencyx-like-btn,
    .agencyx-load-more,
    .social-buttons {
        display: none !important;
    }

    .agencyx-portfolio-grid {
        display: block !important;
    }

    .agencyx-portfolio-item {
        break-inside: avoid;
        margin-bottom: 1rem;
    }

    .agencyx-portfolio-search-widget,
    .agencyx-portfolio-comparison {
        display: none !important;
    }
}

/* Enhanced Modal Responsive Styles */
@media (max-width: 768px) {
    /* Modal Header Responsive */
    .agencyx-modal-header {
        padding: 20px 16px 18px 16px;
    }

    .project-title {
        font-size: 1.5rem;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }



    /* Results List Responsive */
    .results-list li {
        padding: 6px 0;
        padding-left: 28px;
        font-size: 0.9rem;
    }

    .results-list li::before {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    /* Modal Header Mobile */
    .agencyx-modal-header {
        padding: 16px 12px 14px 12px;
    }

    .project-title {
        font-size: 1.3rem;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }



    /* Results List Mobile */
    .results-list li {
        padding: 4px 0;
        padding-left: 24px;
        font-size: 0.85rem;
    }

    .results-list li::before {
        font-size: 1rem;
    }

    /* Typewriter animation adjustments for mobile */
    .results-list li .typewriter-text {
        white-space: normal;
        word-wrap: break-word;
    }
}
