/* ========================================= */
/* PORTFOLIO SECTION - PREMIUM & RESPONSIVE */
/* ========================================= */
:root {
    --primary: #FFFFFF;          /* White background */
    --secondary: #F5F7F6;        /* Very subtle off-white for sections */
    --accent: #06543C;           /* Rich Teal Green (Primary Action) */
    --accent-light: #38785D;     /* Earthy Green (Hover / Secondary Action) */
    --dark: #053527;             /* Dark Evergreen (Headers / Footer) */
    --text: #175442;             /* Deep Forest Green (Body Text) */
    --text-light: #38785D;       /* Muted Green (Subtext) */
    --border: #C3A25D;           /* Soft Antique Gold (Minimal borders) */
    --shadow: 0 5px 15px rgba(5, 53, 39, 0.08);
    --transition: all 0.3s ease;
    --impotent-text:#FFD700;
}

:root {
    --portfolio-bg: var(--secondary);
    --portfolio-card-bg: var(--primary);
    --portfolio-overlay: rgba(5, 52, 39, 0.9);
    --portfolio-gap: 30px;
}

/* Portfolio Hero */
.portfolio-hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, var(--accent) 100%);
    color: var(--primary);
    padding: 180px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/wave.svg') no-repeat center bottom;
    background-size: cover;
    opacity: 0.1;
}

.portfolio-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    animation: fadeInUp 0.8s ease;
}

.portfolio-hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease;
}

.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 50px;
    animation: fadeInUp 1.2s ease;
}

.stat-item {
    text-align: center;
    padding: 20px;
    min-width: 150px;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--impotent-text);
    margin-bottom: 10px;
    font-weight: 800;
}

.stat-item p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark);
}

/* Portfolio Filter */
.portfolio-filter-section {
    padding: 40px 0;
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(5, 52, 39, 0.1);
}

.filter-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px 0;
}

.filter-btn {
    padding: 12px 28px;
    background: var(--secondary);
    border: 2px solid transparent;
    border-radius: 50px;
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.filter-btn:hover {
    color: var(--primary);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(6, 84, 60, 0.2);
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary);
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(6, 84, 60, 0.3);
}

/* Portfolio Grid */
.portfolio-grid-section {
    padding: 80px 0;
    background: var(--portfolio-bg);
    min-height: 100vh;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--portfolio-gap);
    margin-top: 30px;
}

.portfolio-item {
    background: var(--portfolio-card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(5, 52, 39, 0.15);
}

.portfolio-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--portfolio-overlay) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.portfolio-item:hover .overlay-content {
    transform: translateY(0);
}

.portfolio-category {
    display: inline-block;
    padding: 8px 20px;
    background: var(--impotent-text);
    color: var(--dark);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.overlay-content h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.overlay-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.portfolio-info {
    padding: 25px;
}

.portfolio-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.portfolio-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.portfolio-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(195, 162, 93, 0.2);
}

.portfolio-date {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.portfolio-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.portfolio-link:hover {
    color: var(--accent-light);
    gap: 12px;
}

/* Case Studies */
.case-studies-section {
    padding: 100px 0;
    background: var(--primary);
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.case-study-card {
    background: var(--secondary);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease;
}

.case-study-card:hover {
    transform: translateY(-10px);
}

.case-study-image {
    height: 300px;
    overflow: hidden;
}

.case-study-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.case-study-card:hover .case-study-image img {
    transform: scale(1.05);
}

.case-study-content {
    padding: 40px;
}

.case-study-category {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.case-study-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.case-study-content p {
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.6;
}

.case-study-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.result {
    text-align: center;
    padding: 20px;
    background: var(--primary);
    border-radius: 10px;
}

.result h4 {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.result p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.case-study-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.case-study-link:hover {
    color: var(--accent-light);
    gap: 15px;
}

/* Testimonials Slider */
.portfolio-testimonials {
    padding: 100px 0;
    background: var(--secondary);
    position: relative;
}

.testimonial-slider {
    max-width: 800px;
    margin: 50px auto 0;
    position: relative;
}

.testimonial-slide {
    display: none;
    animation: fadeIn 0.8s ease;
}

.testimonial-slide.active {
    display: block;
}

.testimonial-content {
    background: var(--primary);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.testimonial-content p {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 20px;
}

.testimonial-author img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.author-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.author-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    font-style: normal;
}

.testimonial-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: 2px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* Trust Indicators */
.trust-indicators {
    padding: 100px 0;
    background: var(--primary);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.trust-card {
    background: var(--secondary);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.trust-card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(6, 84, 60, 0.1);
}

.trust-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.trust-card:hover .trust-icon {
    transform: rotateY(360deg);
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
}

.trust-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.trust-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Portfolio CTA */
.portfolio-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/wave.svg') no-repeat center;
    background-size: cover;
    opacity: 0.1;
}

.portfolio-cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-cta h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.portfolio-cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-cta .btn-primary {
    background: var(--primary);
    color: var(--accent);
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
}

.portfolio-cta .btn-primary:hover {
    background: var(--dark);
    color: var(--impotent-text);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-cta .btn-outline {
    background: transparent;
    color: var(--primary);
    border: 3px solid var(--primary);
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
}

.portfolio-cta .btn-outline:hover {
    background: var(--primary);
    color: var(--accent);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loader Animation */
.portfolio-loader {
    display: none;
    text-align: center;
    padding: 40px;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--secondary);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results Message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-results i {
    font-size: 4rem;
    color: var(--border);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}

/* Premium Portfolio Styles */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.portfolio-item.premium {
    position: relative;
    perspective: 1000px;
}

.portfolio-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(5, 52, 39, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.portfolio-item.premium:hover .portfolio-card {
    box-shadow: 0 20px 40px rgba(5, 52, 39, 0.15);
}

/* Image Container */
.portfolio-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.image-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item.premium:hover .portfolio-main-image {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
}

.portfolio-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #053427, #0a5c42);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-icon {
    font-size: 0.9rem;
}

/* Card Content */
.portfolio-card-content {
    padding: 1.5rem;
    background: white;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(5, 52, 39, 0.08);
    color: #053427;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.tag-icon {
    color: #0a5c42;
    font-weight: bold;
}

.portfolio-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.portfolio-client {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #666;
}

.client-icon {
    font-size: 0.8rem;
}

/* Full Overlay */
.portfolio-full-overlay {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: white;
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 40px 80px rgba(5, 52, 39, 0.2);
    overflow: hidden;
    pointer-events: none;
}

.portfolio-item.premium:hover .portfolio-full-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.overlay-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 52, 39, 0.9) 0%, rgba(5, 52, 39, 0.7) 100%);
    mix-blend-mode: multiply;
}

.overlay-content {
    position: relative;
    z-index: 1;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.overlay-category {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #053427;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.overlay-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    color: white;
}

.overlay-client {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.overlay-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.overlay-actions {
    display: flex;
    gap: 12px;
}

.overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.primary-btn {
    background: white;
    color: #053427;
}

.primary-btn:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Loading Animation */
.portfolio-item.premium {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item.premium.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .portfolio-image-container {
        height: 220px;
    }
    
    .portfolio-full-overlay {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
    
    .overlay-content {
        padding: 1.5rem;
    }
    
    .overlay-title {
        font-size: 1.5rem;
    }
    
    .overlay-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-card-content {
        padding: 1.25rem;
    }
    
    .overlay-features {
        display: none;
    }
}

/* ========================================= */
/* RESPONSIVE DESIGN */
/* ========================================= */

/* Tablet */
@media (max-width: 991.98px) {
    .portfolio-hero-title {
        font-size: 2.8rem;
    }
    
    .portfolio-stats {
        gap: 20px;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 15px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .case-studies-grid {
        grid-template-columns: 1fr;
    }
    
    .case-study-results {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonial-content {
        padding: 40px 30px;
    }
    
    .portfolio-cta h2 {
        font-size: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .portfolio-hero-section {
        padding: 150px 0 60px;
    }
    
    .portfolio-hero-title {
        font-size: 2.2rem;
    }
    
    .portfolio-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .portfolio-stats {
        gap: 15px;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 10px;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .stat-item p {
        font-size: 0.8rem;
    }
    
    .filter-controls {
        gap: 10px;
        padding: 15px 0;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-info {
        padding: 20px;
    }
    
    .case-studies-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .case-study-content {
        padding: 30px 20px;
    }
    
    .case-study-content h3 {
        font-size: 1.5rem;
    }
    
    .case-study-results {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .result {
        padding: 15px 10px;
    }
    
    .result h4 {
        font-size: 1.5rem;
    }
    
    .testimonial-content {
        padding: 30px 20px;
    }
    
    .testimonial-content p {
        font-size: 1.1rem;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-cta {
        padding: 60px 0;
    }
    
    .portfolio-cta h2 {
        font-size: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .portfolio-cta .btn-primary,
    .portfolio-cta .btn-outline {
        width: 100%;
        max-width: 300px;
        padding: 16px 30px;
    }
}

/* Small Mobile */
@media (max-width: 575.98px) {
    .portfolio-hero-title {
        font-size: 1.8rem;
    }
    
    .portfolio-stats {
        gap: 10px;
    }
    
    .stat-item {
        min-width: 80px;
        padding: 8px;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    .stat-item p {
        font-size: 0.7rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .case-study-results {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .testimonial-slider-controls {
        gap: 20px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .portfolio-item:hover {
        transform: none;
    }
    
    .portfolio-item:active {
        transform: scale(0.98);
    }
    
    .portfolio-overlay {
        opacity: 1;
        background: linear-gradient(to bottom, transparent 0%, rgba(5, 52, 39, 0.7) 100%);
    }
    
    .trust-card:active {
        transform: scale(0.98);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .portfolio-item,
    .portfolio-image img,
    .portfolio-overlay,
    .overlay-content,
    .case-study-card,
    .trust-card,
    .trust-icon,
    .portfolio-cta .btn-primary,
    .portfolio-cta .btn-outline {
        transition: none;
        animation: none;
    }
    
    .portfolio-item:hover {
        transform: none;
    }
    
    .portfolio-item:hover .portfolio-image img {
        transform: none;
    }
    
    .trust-card:hover .trust-icon {
        transform: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .portfolio-filter-section {
        background: var(--dark);
    }
    
    .filter-btn {
        background: rgba(255, 255, 255, 0.1);
        color: #e0e0e0;
    }
    
    .portfolio-item {
        background: #1e1e1e;
    }
    
    .portfolio-info h3 {
        color: #e0e0e0;
    }
    
    .portfolio-info p {
        color: #b0b0b0;
    }
}

/* ========================================= */
/* PORTFOLIO FILTER - MOBILE RESPONSIVE */
/* ALL WORKS on top row, others in rows of 2 */
/* ========================================= */

/* Base mobile styles (768px and below) */
@media (max-width: 768px) {
    .portfolio-filter-section {
        padding: 20px 0 !important;
        position: relative !important;
        top: auto !important;
        z-index: 100 !important;
        background: var(--primary) !important;
        box-shadow: 0 2px 10px rgba(5, 52, 39, 0.05) !important;
        margin: 0 !important;
    }
    
    .filter-controls {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
    }
    
    /* "ALL WORKS" button - full width on top row */
    .filter-btn[data-filter="all"] {
        width: 100% !important;
        flex: 0 0 100% !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        height: auto !important;
        min-height: 44px !important;
        margin: 0 0 8px 0 !important;
        order: -999 !important;
        display: block !important;
    }
    
    /* Other filter buttons - 2 per row */
    .filter-controls .filter-btn:not([data-filter="all"]) {
        flex: 1 0 calc(50% - 4px) !important;
        min-width: calc(50% - 4px) !important;
        max-width: calc(50% - 4px) !important;
        padding: 10px 8px !important;
        font-size: 0.8rem !important;
        min-height: 42px !important;
        height: auto !important;
        margin: 0 !important;
        order: 0 !important;
    }
    
    /* Base filter button styles */
    .filter-btn {
        background: var(--secondary) !important;
        border: 2px solid transparent !important;
        border-radius: 50px !important;
        color: var(--text) !important;
        font-family: 'Montserrat', sans-serif !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        position: relative !important;
        overflow: hidden !important;
        z-index: 1 !important;
        white-space: nowrap !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1.2 !important;
        transition: all 0.2s ease !important;
        box-sizing: border-box !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    /* Remove hover animations on mobile */
    .filter-btn::before,
    .filter-btn::after {
        display: none !important;
    }
    
    /* Active state - Simple color change only */
    .filter-btn.active {
        background: var(--dark) !important;
        color: white !important;
        border-color: transparent !important;
        box-shadow: 0 2px 6px rgba(5, 53, 39, 0.2) !important;
    }
    
    /* Remove all transforms and scale effects */
    .filter-btn:active,
    .filter-btn.active:active,
    .filter-btn:hover,
    .filter-btn.active:hover {
        transform: none !important;
        scale: none !important;
    }
    
    /* Focus accessibility */
    .filter-btn:focus-visible {
        outline: 2px solid var(--accent) !important;
        outline-offset: 2px !important;
    }
}

/* Medium phones (481px to 576px) */
@media (max-width: 576px) and (min-width: 481px) {
    .portfolio-filter-section {
        padding: 18px 0 !important;
    }
    
    .filter-controls {
        gap: 6px !important;
        padding: 0 10px !important;
    }
    
    .filter-btn[data-filter="all"] {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        min-height: 40px !important;
        margin-bottom: 6px !important;
    }
    
    .filter-controls .filter-btn:not([data-filter="all"]) {
        flex: 1 0 calc(50% - 3px) !important;
        min-width: calc(50% - 3px) !important;
        max-width: calc(50% - 3px) !important;
        padding: 8px 6px !important;
        font-size: 0.75rem !important;
        min-height: 38px !important;
    }
}

/* Small phones (376px to 480px) */
@media (max-width: 480px) and (min-width: 376px) {
    .portfolio-filter-section {
        padding: 16px 0 !important;
    }
    
    .filter-controls {
        gap: 5px !important;
        padding: 0 8px !important;
    }
    
    .filter-btn[data-filter="all"] {
        padding: 9px 14px !important;
        font-size: 0.8rem !important;
        min-height: 38px !important;
        margin-bottom: 5px !important;
    }
    
    .filter-controls .filter-btn:not([data-filter="all"]) {
        flex: 1 0 calc(50% - 2px) !important;
        min-width: calc(50% - 2px) !important;
        max-width: calc(50% - 2px) !important;
        padding: 7px 5px !important;
        font-size: 0.7rem !important;
        min-height: 36px !important;
    }
}

/* Very small phones (320px to 375px) */
@media (max-width: 375px) and (min-width: 321px) {
    .portfolio-filter-section {
        padding: 14px 0 !important;
    }
    
    .filter-controls {
        gap: 4px !important;
        padding: 0 6px !important;
    }
    
    .filter-btn[data-filter="all"] {
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
        min-height: 36px !important;
        margin-bottom: 4px !important;
    }
    
    .filter-controls .filter-btn:not([data-filter="all"]) {
        flex: 1 0 calc(50% - 2px) !important;
        min-width: calc(50% - 2px) !important;
        max-width: calc(50% - 2px) !important;
        padding: 6px 4px !important;
        font-size: 0.65rem !important;
        min-height: 34px !important;
    }
}

/* Extra small phones (below 320px) */
@media (max-width: 320px) {
    .portfolio-filter-section {
        padding: 12px 0 !important;
    }
    
    .filter-controls {
        gap: 3px !important;
        padding: 0 4px !important;
    }
    
    .filter-btn[data-filter="all"] {
        padding: 7px 10px !important;
        font-size: 0.7rem !important;
        min-height: 34px !important;
        margin-bottom: 3px !important;
    }
    
    .filter-controls .filter-btn:not([data-filter="all"]) {
        flex: 1 0 calc(50% - 1.5px) !important;
        min-width: calc(50% - 1.5px) !important;
        max-width: calc(50% - 1.5px) !important;
        padding: 5px 3px !important;
        font-size: 0.6rem !important;
        min-height: 32px !important;
    }
}

/* Landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .portfolio-filter-section {
        padding: 12px 0 !important;
        position: sticky !important;
        top: 0 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
    
    .filter-controls {
        gap: 4px !important;
        padding: 0 !important;
    }
    
    .filter-btn[data-filter="all"] {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        min-height: 32px !important;
        margin-bottom: 4px !important;
    }
    
    .filter-controls .filter-btn:not([data-filter="all"]) {
        flex: 1 0 calc(33.333% - 3px) !important;
        min-width: calc(33.333% - 3px) !important;
        max-width: calc(33.333% - 3px) !important;
        padding: 5px 4px !important;
        font-size: 0.65rem !important;
        min-height: 30px !important;
    }
}

/* Tablet optimization (577px to 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    .portfolio-filter-section {
        padding: 22px 0 !important;
    }
    
    .filter-controls {
        gap: 10px !important;
        padding: 0 15px !important;
        max-width: 600px !important;
    }
    
    .filter-btn[data-filter="all"] {
        padding: 14px 24px !important;
        font-size: 0.95rem !important;
        min-height: 46px !important;
        margin-bottom: 10px !important;
    }
    
    .filter-controls .filter-btn:not([data-filter="all"]) {
        flex: 1 0 calc(33.333% - 7px) !important;
        min-width: calc(33.333% - 7px) !important;
        max-width: calc(33.333% - 7px) !important;
        padding: 11px 10px !important;
        font-size: 0.8rem !important;
        min-height: 44px !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .filter-btn {
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(6, 84, 60, 0.1) !important;
        user-select: none !important;
    }
    
    .filter-btn:active {
        background: var(--secondary) !important;
        opacity: 0.85 !important;
    }
    
    .filter-btn.active:active {
        background: var(--dark) !important;
        opacity: 0.9 !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .portfolio-filter-section {
        background: #121212 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    }
    
    .filter-btn {
        background: #2a2a2a !important;
        color: #e0e0e0 !important;
        border-color: #3a3a3a !important;
    }
    
    .filter-btn.active {
        background: var(--accent) !important;
        color: white !important;
        border-color: transparent !important;
    }
    
    /* Landscape dark mode */
    @media (orientation: landscape) {
        .portfolio-filter-section {
            background: rgba(18, 18, 18, 0.95) !important;
        }
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .filter-btn,
    .portfolio-filter-section {
        transition: none !important;
    }
    
    .filter-btn:active {
        opacity: 1 !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .filter-btn {
        border: 2px solid currentColor !important;
    }
    
    .filter-btn.active {
        border: 3px solid var(--accent) !important;
        outline: 2px solid var(--impotent-text) !important;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .filter-btn {
        -webkit-appearance: none !important;
    }
}

/* Fix for Firefox */
@-moz-document url-prefix() {
    .filter-btn {
        appearance: none !important;
    }
}

/* Ensure proper text sizing on all devices */
.filter-btn[data-filter="all"] {
    font-size: clamp(0.7rem, 2.5vw, 0.95rem) !important;
}

.filter-controls .filter-btn:not([data-filter="all"]) {
    font-size: clamp(0.6rem, 2vw, 0.8rem) !important;
}

/* Prevent text overflow */
.filter-btn {
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
}

/* Ensure proper spacing with fixed header */
body:has(header[style*="position: fixed"]) .portfolio-filter-section {
    margin-top: 60px !important;
}

/* ========================================= */
/* TRUST INDICATORS - MOBILE RESPONSIVE */
/* Header fixed in center, cards scroll horizontally */
/* ========================================= */

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
    .trust-indicators {
        padding: 40px 0 !important;
        background: var(--primary) !important;
        position: relative !important;
        overflow: visible !important;
    }
    
    .trust-indicators .container {
        padding: 0 !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Section Header - Fixed in center, no scrolling */
    .trust-indicators .section-header {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 25px !important;
        padding: 0 20px !important;
        position: static !important;
        transform: none !important;
        z-index: 2 !important;
    }
    
    .trust-indicators .section-header h2 {
        font-size: 1.6rem !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
        color: var(--dark) !important;
    }
    
    .trust-indicators .section-header p {
        font-size: 0.9rem !important;
        color: var(--text-light) !important;
        line-height: 1.5 !important;
        max-width: 500px !important;
        margin: 0 auto !important;
    }
    
    /* Trust Grid - Horizontal scrolling container */
    .trust-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 15px !important;
        padding: 10px 20px 25px !important;
        margin: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        scroll-behavior: smooth !important;
    }
    
    /* Hide scrollbar but keep functionality */
    .trust-grid::-webkit-scrollbar {
        display: none !important;
        height: 0 !important;
        width: 0 !important;
    }
    
    /* Add subtle scroll indicators */
    .trust-grid::before {
        content: '' !important;
        flex: 0 0 20px !important;
        min-width: 20px !important;
    }
    
    .trust-grid::after {
        content: '' !important;
        flex: 0 0 20px !important;
        min-width: 20px !important;
    }
    
    /* Trust Cards - Scrollable items */
    .trust-card {
        flex: 0 0 auto !important;
        width: 180px !important;
        min-width: 180px !important;
        padding: 25px 20px !important;
        background: var(--secondary) !important;
        border-radius: 15px !important;
        text-align: center !important;
        border: 1px solid rgba(195, 162, 93, 0.1) !important;
        box-shadow: 0 4px 12px rgba(5, 52, 39, 0.08) !important;
        transition: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    /* Remove hover effects on mobile */
    .trust-card:hover {
        transform: none !important;
        border-color: rgba(195, 162, 93, 0.1) !important;
        box-shadow: 0 4px 12px rgba(5, 52, 39, 0.08) !important;
    }
    
    .trust-icon {
        width: 60px !important;
        height: 60px !important;
        background: linear-gradient(135deg, var(--accent), var(--accent-light)) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto 20px !important;
        color: white !important;
        font-size: 1.4rem !important;
        flex-shrink: 0 !important;
    }
    
    /* Remove rotation animation on mobile */
    .trust-card:hover .trust-icon {
        transform: none !important;
        background: linear-gradient(135deg, var(--accent), var(--accent-light)) !important;
    }
    
    .trust-card h3 {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
        color: var(--dark) !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        flex-grow: 0 !important;
    }
    
    .trust-card p {
        font-size: 0.85rem !important;
        color: var(--text-light) !important;
        line-height: 1.5 !important;
        margin: 0 !important;
        flex-grow: 1 !important;
        display: flex !important;
        align-items: center !important;
    }
}

/* Small Phones (576px and below) */
@media (max-width: 576px) {
    .trust-indicators {
        padding: 35px 0 !important;
    }
    
    .trust-indicators .section-header {
        margin-bottom: 20px !important;
        padding: 0 15px !important;
    }
    
    .trust-indicators .section-header h2 {
        font-size: 1.4rem !important;
    }
    
    .trust-indicators .section-header p {
        font-size: 0.85rem !important;
        max-width: 100% !important;
    }
    
    .trust-grid {
        gap: 12px !important;
        padding: 10px 15px 20px !important;
    }
    
    .trust-card {
        width: 160px !important;
        min-width: 160px !important;
        padding: 22px 16px !important;
    }
    
    .trust-icon {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.3rem !important;
        margin-bottom: 18px !important;
    }
    
    .trust-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
    }
    
    .trust-card p {
        font-size: 0.8rem !important;
    }
}

/* Very Small Phones (375px and below) */
@media (max-width: 375px) {
    .trust-indicators {
        padding: 30px 0 !important;
    }
    
    .trust-indicators .section-header {
        margin-bottom: 18px !important;
        padding: 0 12px !important;
    }
    
    .trust-indicators .section-header h2 {
        font-size: 1.3rem !important;
    }
    
    .trust-indicators .section-header p {
        font-size: 0.8rem !important;
    }
    
    .trust-grid {
        gap: 10px !important;
        padding: 8px 12px 18px !important;
    }
    
    .trust-card {
        width: 150px !important;
        min-width: 150px !important;
        padding: 20px 14px !important;
    }
    
    .trust-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        margin-bottom: 16px !important;
    }
    
    .trust-card h3 {
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
    }
    
    .trust-card p {
        font-size: 0.75rem !important;
    }
}

/* Extra Small Phones (320px and below) */
@media (max-width: 320px) {
    .trust-indicators {
        padding: 25px 0 !important;
    }
    
    .trust-indicators .section-header h2 {
        font-size: 1.2rem !important;
    }
    
    .trust-indicators .section-header p {
        font-size: 0.75rem !important;
    }
    
    .trust-grid {
        gap: 8px !important;
        padding: 8px 10px 15px !important;
    }
    
    .trust-card {
        width: 140px !important;
        min-width: 140px !important;
        padding: 18px 12px !important;
    }
    
    .trust-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.1rem !important;
        margin-bottom: 14px !important;
    }
    
    .trust-card h3 {
        font-size: 0.85rem !important;
    }
    
    .trust-card p {
        font-size: 0.7rem !important;
    }
}

/* Landscape Mode for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .trust-indicators {
        padding: 30px 0 !important;
    }
    
    .trust-indicators .section-header {
        margin-bottom: 20px !important;
    }
    
    .trust-grid {
        gap: 18px !important;
        padding: 10px 20px 20px !important;
    }
    
    .trust-card {
        width: 170px !important;
        min-width: 170px !important;
        padding: 22px 18px !important;
    }
    
    .trust-icon {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.3rem !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) and (max-width: 768px) {
    .trust-card {
        touch-action: pan-y !important;
        -webkit-tap-highlight-color: rgba(6, 84, 60, 0.1) !important;
    }
    
    /* Add touch feedback for cards */
    .trust-card:active {
        background: rgba(6, 84, 60, 0.05) !important;
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .trust-indicators {
        background: #121212 !important;
    }
    
    .trust-indicators .section-header h2 {
        color: #e0e0e0 !important;
    }
    
    .trust-indicators .section-header p {
        color: #b0b0b0 !important;
    }
    
    .trust-card {
        background: #1e1e1e !important;
        border-color: #333 !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    .trust-card h3 {
        color: #e0e0e0 !important;
    }
    
    .trust-card p {
        color: #b0b0b0 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
    .trust-card,
    .trust-icon,
    .trust-indicators,
    .trust-grid {
        transition: none !important;
        animation: none !important;
    }
    
    .trust-card:active {
        transform: none !important;
    }
    
    .trust-grid {
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) and (max-width: 768px) {
    .trust-card {
        border: 2px solid currentColor !important;
    }
    
    .trust-icon {
        border: 2px solid white !important;
    }
    
    .trust-indicators .section-header h2 {
        text-shadow: 1px 1px 0 black !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .trust-grid {
        padding-bottom: 30px !important;
        margin-bottom: -5px !important;
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .trust-grid {
        scrollbar-width: none !important;
    }
}

/* Responsive text sizing */
@media (max-width: 768px) {
    .trust-indicators .section-header h2 {
        font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
    }
    
    .trust-indicators .section-header p {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem) !important;
    }
    
    .trust-card h3 {
        font-size: clamp(0.85rem, 2.5vw, 1rem) !important;
    }
    
    .trust-card p {
        font-size: clamp(0.7rem, 2vw, 0.85rem) !important;
    }
}

/* ==========================================================================
   PORTFOLIO GLOBAL STYLES
   ========================================================================== */

/* Base Styles */
.portfolio-grid-section {
    padding: 20px 0 60px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

/* Portfolio Item Base */
.portfolio-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: forwards;
}

.portfolio-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Portfolio Card Base */
.portfolio-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(5, 53, 39, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(5, 53, 39, 0.15);
}

/* ==========================================================================
   VIDEO PORTFOLIO CARD STYLES (9:16 Ratio)
   ========================================================================== */

/* Video Container - Fixed 9:16 Ratio */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%; /* 9:16 ratio (16/9 = 1.7778) */
    background: #000;
    overflow: hidden;
}

.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.portfolio-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Video Overlay */
.video-overlay-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.video-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        transparent 40%,
        transparent 70%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

/* Video Info */
.video-info-display {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
}

.video-duration-badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
}

/* Play Indicator */
.video-play-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.video-card:hover .video-play-indicator {
    opacity: 1;
}

.play-icon-large {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Loading State */
.video-loading-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 3;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4dffd6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

/* Portfolio Badge */
.portfolio-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
}

.badge-icon {
    font-size: 12px;
}

.video-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* ==========================================================================
   CARD CONTENT (COMMON FOR ALL CARDS)
   ========================================================================== */

.portfolio-card-content {
    padding: 16px;
    background: #ffffff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tag-icon {
    color: #0a5c41;
    font-size: 12px;
}

.tag-text {
    color: #0a5c41;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #053527;
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-verified-badge {
    color: #0a5c41;
    font-size: 14px;
}

.portfolio-description {
    color: #666666;
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.portfolio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888888;
    font-size: 12px;
}

.meta-item i {
    color: #0a5c41;
    font-size: 12px;
}

/* ==========================================================================
   REGULAR PORTFOLIO ITEM STYLES (Non-Video)
   ========================================================================== */

.portfolio-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 ratio */
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    overflow: hidden;
}

.image-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.portfolio-main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-main-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(5, 53, 39, 0.1) 0%,
        transparent 50%,
        rgba(5, 53, 39, 0.2) 100%
    );
}

/* ==========================================================================
   PORTFOLIO FILTER SECTION
   ========================================================================== */

.portfolio-filter-section {
    padding: 20px 0;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(5, 52, 39, 0.1);
    transition: box-shadow 0.3s ease;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 10px 0;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    color: #666666;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #0a5c41;
    color: #0a5c41;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #053527;
    border-color: #053527;
    color: #ffffff;
}

/* ==========================================================================
   CATEGORY TITLE OVERLAY
   ========================================================================== */

.category-title-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(5, 53, 39, 0.98) 0%, rgba(8, 70, 51, 0.95) 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backdrop-filter: blur(10px);
}

.category-title-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.category-title-overlay.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.category-title-overlay-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.overlay-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(10, 92, 65, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 230, 207, 0.2) 0%, transparent 50%);
    opacity: 0.8;
}

.category-title-overlay-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: min(1000px, 90vw);
    padding: clamp(20px, 5vw, 60px);
    animation: contentReveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes contentReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.category-title-overlay-text {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    color: white;
    margin: 0 0 clamp(15px, 3vw, 20px) 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #a8e6cf 50%,
        #ffffff 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 100% center;
    }
}

.title-overlay-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: clamp(30px, 5vw, 40px);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    animation: subtitleReveal 0.8s 0.5s ease-out forwards;
}

@keyframes subtitleReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-loading-indicator {
    margin-top: clamp(30px, 6vw, 50px);
    opacity: 0;
    animation: loadingReveal 0.8s 1s ease-out forwards;
}

@keyframes loadingReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-bar {
    width: min(300px, 80vw);
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 15px;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #a8e6cf, #4dffd6);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out forwards;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

/* ==========================================================================
   PORTFOLIO STATES (Loading & No Results)
   ========================================================================== */

.portfolio-loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #053527;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.portfolio-loader p {
    color: #053527;
    font-size: 16px;
    font-weight: 500;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.no-results i {
    font-size: 48px;
    color: #cccccc;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #053527;
    font-size: 24px;
    margin-bottom: 12px;
}

.no-results p {
    color: #666666;
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Mobile (Landscape) */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .video-container {
        padding-bottom: 150%; /* Adjust for landscape */
    }
    
    .play-icon-large {
        font-size: 32px;
    }
    
    .category-title-overlay {
        backdrop-filter: blur(5px);
    }
}

/* Tablet Portrait */
@media screen and (min-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 32px;
    }
    
    .filter-controls {
        gap: 12px;
    }
    
    .filter-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .portfolio-card-content {
        padding: 20px;
    }
    
    .portfolio-title {
        font-size: 18px;
    }
    
    .portfolio-description {
        font-size: 14px;
    }
    
    .video-duration-badge {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .play-icon-large {
        font-size: 56px;
    }
    
    .category-title-overlay-text {
        font-size: clamp(3rem, 6vw, 4rem);
    }
}

/* Tablet Landscape */
@media screen and (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    .container {
        padding: 0 30px;
    }
    
    .filter-controls {
        gap: 16px;
    }
    
    .filter-btn {
        padding: 12px 28px;
        font-size: 16px;
    }
    
    .portfolio-title {
        font-size: 20px;
    }
    
    .portfolio-description {
        font-size: 15px;
    }
    
    .play-icon-large {
        font-size: 64px;
    }
}

/* Desktop */
@media screen and (min-width: 1280px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
    
    .portfolio-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 40px rgba(5, 53, 39, 0.18);
    }
    
    .category-title-overlay-text {
        font-size: 4.5rem;
    }
}

/* Large Desktop */
@media screen and (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
        gap: 40px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 375px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filter-controls {
        gap: 6px;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .filter-controls::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }
    
    .video-container {
        padding-bottom: 177.78%; /* Maintain 9:16 ratio */
    }
    
    .play-icon-large {
        font-size: 36px;
    }
    
    .video-duration-badge {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .portfolio-badge {
        top: 10px;
        right: 10px;
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .portfolio-card-content {
        padding: 12px;
    }
    
    .portfolio-title {
        font-size: 15px;
    }
    
    .portfolio-description {
        font-size: 12px;
    }
    
    .category-title-overlay-text {
        font-size: 2rem;
    }
    
    .title-overlay-subtitle {
        font-size: 0.875rem;
        letter-spacing: 1px;
    }
}

/* Extra Small Devices */
@media screen and (max-width: 320px) {
    .portfolio-grid {
        gap: 16px;
    }
    
    .portfolio-card {
        border-radius: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .play-icon-large {
        font-size: 28px;
    }
    
    .portfolio-card-content {
        padding: 10px;
    }
    
    .portfolio-title {
        font-size: 14px;
    }
    
    .portfolio-description {
        font-size: 11px;
        -webkit-line-clamp: 3;
    }
    
    .portfolio-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .portfolio-card {
        box-shadow: 0 2px 10px rgba(5, 53, 39, 0.1);
    }
    
    .portfolio-card:hover {
        box-shadow: 0 4px 20px rgba(5, 53, 39, 0.15);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .portfolio-item,
    .portfolio-card,
    .portfolio-card:hover,
    .filter-btn,
    .category-title-overlay,
    .category-title-overlay-content,
    .loading-progress,
    .portfolio-main-image,
    .video-play-indicator {
        transition: none !important;
        animation: none !important;
    }
    
    .portfolio-card:hover {
        transform: none;
    }
    
    .loading-progress {
        animation: none;
        width: 100%;
    }
    
    .video-card:hover .video-play-indicator {
        opacity: 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .portfolio-card,
    .portfolio-card-content {
        background: #1a1a1a;
    }
    
    .portfolio-title {
        color: #ffffff;
    }
    
    .portfolio-description {
        color: #cccccc;
    }
    
    .meta-item {
        color: #aaaaaa;
    }
    
    .portfolio-filter-section {
        background: #1a1a1a;
    }
    
    .filter-btn {
        background: #2a2a2a;
        border-color: #333;
        color: #cccccc;
    }
    
    .filter-btn:hover {
        border-color: #0a5c41;
        color: #4dffd6;
    }
    
    .filter-btn.active {
        background: #053527;
        border-color: #0a5c41;
        color: #ffffff;
    }
    
    .portfolio-image-container {
        background: linear-gradient(135deg, #2a2a2a, #333333);
    }
    
    .category-title-overlay {
        background: linear-gradient(135deg, rgba(3, 40, 30, 0.98) 0%, rgba(5, 53, 39, 0.95) 100%);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .portfolio-card {
        border: 2px solid #053527;
    }
    
    .filter-btn {
        border: 2px solid #053527;
    }
    
    .portfolio-badge {
        border: 2px solid #ffffff;
    }
    
    .video-duration-badge {
        border: 1px solid #ffffff;
    }
}

/* Print Styles */
@media print {
    .portfolio-filter-section,
    .category-title-overlay,
    .video-play-indicator,
    .portfolio-badge {
        display: none !important;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .portfolio-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .video-container {
        height: 200px;
        padding-bottom: 0;
    }
}