/*
 * MODERN PORTFOLIO SECTION
 * World-class design with glassmorphism effects and premium animations
 * Consistent with testimonials design system
 */

/* ===== ROOT VARIABLES ===== */
:root {
    --portfolio-primary: #FFDB59;
    --portfolio-secondary: #FF7D61;
    --portfolio-bg-dark: #0F141C;
    --portfolio-bg-glass: rgba(255, 255, 255, 0.08);
    --portfolio-bg-card: rgba(255, 255, 255, 0.05);
    --portfolio-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    --portfolio-shadow-hover: 0 35px 70px rgba(255, 219, 89, 0.3);
    --portfolio-text: #FFFFFF;
    --portfolio-text-muted: #B8BCC8;
    --portfolio-border: rgba(255, 255, 255, 0.12);
    --portfolio-gradient: linear-gradient(135deg, var(--portfolio-secondary) 0%, var(--portfolio-primary) 100%);
    --portfolio-gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
}

/* ===== MAIN PORTFOLIO SECTION ===== */
.portfolio-modern-section {
    background: linear-gradient(135deg, 
        var(--portfolio-bg-dark) 0%, 
        rgba(15, 20, 28, 0.95) 50%, 
        var(--portfolio-bg-dark) 100%) !important;
    position: relative;
    padding: 120px 0 !important;
    overflow: hidden;
    min-height: 100vh;
}

/* Advanced background gradients */
.portfolio-modern-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top left, rgba(255, 219, 89, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at bottom right, rgba(255, 125, 97, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at center, rgba(255, 219, 89, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Floating particles animation */
.portfolio-modern-section::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(2px 2px at 40px 60px, rgba(255, 219, 89, 0.15), transparent),
        radial-gradient(1px 1px at 90px 120px, rgba(255, 125, 97, 0.12), transparent),
        radial-gradient(1px 1px at 180px 80px, rgba(255, 219, 89, 0.08), transparent),
        radial-gradient(1px 1px at 250px 150px, rgba(255, 125, 97, 0.06), transparent);
    background-repeat: repeat;
    background-size: 300px 250px;
    animation: portfolio-particles 30s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes portfolio-particles {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    25% { transform: translateY(-20px) translateX(15px) rotate(1deg); }
    50% { transform: translateY(-10px) translateX(-10px) rotate(-0.5deg); }
    75% { transform: translateY(10px) translateX(8px) rotate(0.8deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
}

.portfolio-modern-section .container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
}

/* ===== PORTFOLIO HEADER ===== */
.portfolio-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.section-subtitle {
    font-size: 14px !important;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--portfolio-primary) !important;
    margin-bottom: 15px !important;
    position: relative;
    display: inline-block;
}

.section-subtitle::before,
.section-subtitle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 2px;
    background: var(--portfolio-gradient);
    transform: translateY(-50%);
}

.section-subtitle::before {
    left: -45px;
}

.section-subtitle::after {
    right: -45px;
}

.section-title {
    font-size: 56px !important;
    font-weight: 700;
    line-height: 1.1;
    color: var(--portfolio-text) !important;
    margin-bottom: 25px !important;
    background: var(--portfolio-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--portfolio-gradient);
    border-radius: 2px;
    box-shadow: 0 0 30px rgba(255, 219, 89, 0.6);
}

.section-description {
    font-size: 18px !important;
    color: var(--portfolio-text-muted) !important;
    margin: 0 auto !important;
    font-weight: 400;
    letter-spacing: 0.3px;
    line-height: 1.6;
    max-width: 600px;
}

/* ===== PORTFOLIO FILTERS ===== */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 60px;
    padding: 0 20px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--portfolio-bg-glass) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--portfolio-border) !important;
    color: var(--portfolio-text-muted) !important;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--portfolio-gradient);
    transition: left 0.6s ease;
    opacity: 0.1;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover {
    border-color: rgba(255, 219, 89, 0.4) !important;
    color: var(--portfolio-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 219, 89, 0.2);
}

.filter-btn.active {
    background: var(--portfolio-gradient) !important;
    color: var(--portfolio-bg-dark) !important;
    border-color: transparent !important;
    box-shadow: 0 8px 25px rgba(255, 219, 89, 0.3);
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.filter-btn.active .filter-count {
    background: rgba(15, 20, 28, 0.2);
    color: var(--portfolio-bg-dark);
}

/* ===== PORTFOLIO GRID ===== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        gap: 20px;
    }
}

/* ===== PORTFOLIO CARDS ===== */
.portfolio-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: var(--portfolio-gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--portfolio-border);
    box-shadow: var(--portfolio-shadow);
    will-change: transform;
}

.portfolio-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--portfolio-shadow-hover);
    border-color: rgba(255, 219, 89, 0.3);
}

.card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Card glow effect */
.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--portfolio-gradient);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: 1;
    border-radius: 24px;
}

.portfolio-card:hover::before {
    opacity: 0.05;
}

/* ===== CARD IMAGE ===== */
.card-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px 20px 0 0;
}

.portfolio-card:hover .card-image img {
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.05);
}

/* Card overlay */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(15, 20, 28, 0.4) 0%, 
        rgba(255, 219, 89, 0.2) 100%);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    gap: 15px;
    transform: translateY(20px);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .overlay-content {
    transform: translateY(0);
}

.preview-btn,
.external-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: var(--portfolio-text) !important;
    padding: 12px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.4s ease;
}

.preview-btn:hover,
.external-btn:hover {
    background: var(--portfolio-primary) !important;
    color: var(--portfolio-bg-dark) !important;
    border-color: var(--portfolio-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 219, 89, 0.4);
}

.preview-btn svg,
.external-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== CARD CONTENT ===== */
.card-content {
    padding: 30px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.project-type {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--portfolio-primary);
    margin-bottom: 12px;
    display: inline-block;
}

.project-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--portfolio-text);
    margin-bottom: 15px;
    line-height: 1.3;
    transition: all 0.4s ease;
}

.portfolio-card:hover .project-title {
    color: var(--portfolio-primary);
    transform: translateX(3px);
}

.project-description {
    font-size: 15px;
    color: var(--portfolio-text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-tag {
    background: rgba(255, 219, 89, 0.1);
    color: var(--portfolio-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 219, 89, 0.2);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-year,
.project-client {
    font-size: 13px;
    color: var(--portfolio-text-muted);
    font-weight: 500;
}

.project-year {
    color: var(--portfolio-primary);
    font-weight: 600;
}

/* ===== LOAD MORE BUTTON ===== */
.portfolio-actions {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--portfolio-gradient) !important;
    color: var(--portfolio-bg-dark) !important;
    border: none !important;
    padding: 16px 32px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(255, 219, 89, 0.3);
    position: relative;
    overflow: hidden;
}

.load-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    transition: left 0.6s ease;
}

.load-more-btn:hover::before {
    left: 100%;
}

.load-more-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 219, 89, 0.4);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.load-more-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-icon {
    transition: transform 0.4s ease;
}

.load-more-btn:hover .btn-icon {
    transform: scale(1.1);
}

/* ===== PROJECT MODAL ===== */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 28, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--portfolio-gradient-card);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--portfolio-border);
    border-radius: 24px;
    max-width: 900px;
    max-height: 90vh;
    width: 90%;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(50px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-modal.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: var(--portfolio-text) !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--portfolio-primary) !important;
    color: var(--portfolio-bg-dark) !important;
    transform: scale(1.1);
}

.modal-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 40px;
}

.modal-image {
    border-radius: 16px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    display: flex;
    flex-direction: column;
}

.modal-type {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--portfolio-primary);
    margin-bottom: 12px;
}

.modal-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--portfolio-text);
    margin-bottom: 20px;
    line-height: 1.2;
}

.modal-description {
    font-size: 16px;
    color: var(--portfolio-text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.modal-details {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-label {
    font-size: 14px;
    color: var(--portfolio-text-muted);
    font-weight: 600;
}

.detail-value {
    font-size: 14px;
    color: var(--portfolio-text);
    font-weight: 500;
}

.modal-tech {
    margin-bottom: 30px;
}

.modal-tech h4 {
    font-size: 16px;
    color: var(--portfolio-text);
    margin-bottom: 15px;
    font-weight: 600;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modal-actions {
    display: flex;
    gap: 15px;
}

.modal-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.modal-btn.primary {
    background: var(--portfolio-gradient) !important;
    color: var(--portfolio-bg-dark) !important;
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--portfolio-text) !important;
    border: 1px solid var(--portfolio-border) !important;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 219, 89, 0.3);
}

/* Modal responsive */
@media (max-width: 768px) {
    .modal-header {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .modal-title {
        font-size: 24px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 25px;
    }
    
    .section-title {
        font-size: 48px !important;
    }
}

@media (max-width: 991px) {
    .portfolio-modern-section {
        padding: 80px 0 !important;
    }
    
    .portfolio-header {
        margin-bottom: 60px;
    }
    
    .section-title {
        font-size: 42px !important;
    }
    
    .portfolio-filters {
        margin-bottom: 50px;
    }
    
    .card-image {
        height: 250px;
    }
    
    .card-content {
        padding: 25px 20px;
    }
    
    .project-title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .portfolio-modern-section {
        padding: 60px 0 !important;
    }
    
    .section-title {
        font-size: 36px !important;
    }
    
    .section-description {
        font-size: 16px !important;
    }
    
    .portfolio-filters {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card-image {
        height: 220px;
    }
    
    .project-title {
        font-size: 20px;
    }
    
    .project-description {
        font-size: 14px;
    }
    
    .load-more-btn {
        padding: 14px 28px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px !important;
    }
    
    .section-subtitle::before,
    .section-subtitle::after {
        width: 20px;
        left: -30px;
        right: -30px;
    }
    
    .section-title::after {
        width: 60px;
        height: 3px;
    }
    
    .portfolio-grid {
        gap: 15px;
    }
    
    .card-content {
        padding: 20px 15px;
    }
    
    .project-title {
        font-size: 18px;
    }
    
    .filter-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .tech-tag {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    .portfolio-card,
    .card-image img,
    .card-overlay,
    .project-title,
    .load-more-btn,
    .filter-btn {
        transition: none;
    }
    
    .portfolio-modern-section::after {
        animation: none;
    }
    
    .portfolio-card:hover {
        transform: none;
    }
    
    .portfolio-card:hover .card-image img {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .portfolio-card {
        background: #000000 !important;
        border-color: #FFFFFF !important;
    }
    
    .project-title {
        color: #FFFFFF !important;
    }
    
    .project-description {
        color: #CCCCCC !important;
    }
    
    .load-more-btn {
        background: #FFFFFF !important;
        color: #000000 !important;
    }
    
    .filter-btn.active {
        background: #FFFFFF !important;
        color: #000000 !important;
    }
}

/* Focus states for accessibility */
.portfolio-card:focus-visible,
.filter-btn:focus-visible,
.load-more-btn:focus-visible,
.preview-btn:focus-visible,
.external-btn:focus-visible {
    outline: 2px solid var(--portfolio-primary);
    outline-offset: 4px;
}

.modal-close:focus-visible {
    outline: 2px solid var(--portfolio-primary);
    outline-offset: 2px;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.portfolio-card {
    will-change: auto;
    contain: layout;
}

.card-image img {
    will-change: auto;
    transform: translateZ(0);
}

.card-overlay {
    will-change: auto;
}

/* Intersection Observer animation setup */
.portfolio-card {
    opacity: 0;
    transform: translateY(30px);
}

.portfolio-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== LOADING STATES ===== */
.portfolio-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.portfolio-card.loading {
    opacity: 0.5;
    transform: translateY(10px);
}

/* Skeleton loading animation */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.portfolio-card.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* ===== ADVANCED INTERACTIONS ===== */
.portfolio-card:hover {
    z-index: 10;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--portfolio-primary);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--portfolio-secondary);
}

/* Text selection styling */
::selection {
    background: var(--portfolio-primary);
    color: var(--portfolio-bg-dark);
}

::-moz-selection {
    background: var(--portfolio-primary);
    color: var(--portfolio-bg-dark);
}

/* ===== THEME OPTIMIZATIONS ===== */
@media (prefers-color-scheme: dark) {
    .portfolio-modern-section {
        background: linear-gradient(135deg, 
            #000000 0%, 
            var(--portfolio-bg-dark) 50%, 
            #000000 100%) !important;
    }
    
    .portfolio-card {
        background: linear-gradient(145deg, 
            rgba(255, 255, 255, 0.12) 0%, 
            rgba(255, 255, 255, 0.04) 100%);
    }
}

/* High performance GPU acceleration */
.portfolio-card,
.card-image img,
.card-overlay,
.filter-btn,
.load-more-btn {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/*
 * MODERN PORTFOLIO COMPLETE
 * World-class design system with glassmorphism effects
 * Consistent with testimonials section
 * Mobile-first responsive design
 * Advanced accessibility support
 * Performance optimized
 *//*
 * WORLD-CLASS TESTIMONIALS CSS
 * Clean, modern, optimized testimonials section
 * Replaces all messy CSS with a single, elegant solution
 */

/* ===== RESET & BASE ===== */
.testimonials-modern-section * {
    box-sizing: border-box;
}

/* ===== MAIN TESTIMONIALS SECTION ===== */
.testimonials-modern-section {
    background: linear-gradient(135deg, #0F141C 0%, #1a1f2e 30%, #2a2f3e 70%, #0F141C 100%);
    color: white;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* ===== BACKGROUND EFFECTS ===== */
.testimonials-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.bg-gradient-1 {
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 219, 89, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-up-down 8s ease-in-out infinite;
}

.bg-gradient-2 {
    position: absolute;
    bottom: 20%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 125, 97, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-up-down 10s ease-in-out infinite reverse;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.float-element {
    position: absolute;
    background: rgba(255, 219, 89, 0.1);
    border-radius: 50%;
    animation: float-random 15s linear infinite;
}

.float-1 {
    width: 4px;
    height: 4px;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.float-2 {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 80%;
    animation-delay: 5s;
}

.float-3 {
    width: 3px;
    height: 3px;
    top: 80%;
    left: 30%;
    animation-delay: 10s;
}

@keyframes float-up-down {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

@keyframes float-random {
    0% { transform: translateY(0px) translateX(0px) scale(0.5); opacity: 0; }
    50% { transform: translateY(-100px) translateX(50px) scale(1); opacity: 1; }
    100% { transform: translateY(-200px) translateX(-50px) scale(0.5); opacity: 0; }
}

/* ===== CONTENT CONTAINER ===== */
.testimonials-modern-section .container {
    position: relative;
    z-index: 2;
}

/* ===== HEADER STYLES ===== */
.testimonials-header {
    margin-bottom: 80px;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(45deg, #FF7D61, #FFDB59);
    color: #0F141C;
    padding: 8px 24px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 125, 97, 0.3);
}

.section-title {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFDB59 50%, #FFFFFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.section-description {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== STATS SECTION ===== */
.testimonials-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(45deg, #FFDB59, #FF7D61);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* ===== MAIN CONTAINER ===== */
.testimonials-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

/* ===== NAVIGATION ===== */
.testimonials-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.nav-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(45deg, #FF7D61, #FFDB59);
    color: #0F141C;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 125, 97, 0.3);
}

.nav-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 219, 89, 0.4);
}

.nav-btn:active {
    transform: scale(0.95);
}

.testimonials-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 24px;
}

.current {
    color: #FFDB59;
    font-size: 32px;
}

.divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
}

.total {
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
}

/* ===== TESTIMONIAL DISPLAY ===== */
.testimonial-display {
    margin-bottom: 40px;
}

.testimonial-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    padding: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 400px;
}

.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 219, 89, 0.03) 0%, transparent 50%, rgba(255, 125, 97, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.testimonial-card:hover .card-background {
    opacity: 1;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(255, 219, 89, 0.2);
    border-color: rgba(255, 219, 89, 0.3);
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ===== QUOTE SECTION ===== */
.quote-section {
    text-align: center;
    margin-bottom: 40px;
}

.quote-icon {
    color: rgba(255, 219, 89, 0.3);
    margin-bottom: 20px;
}

.rating {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.stars {
    display: flex;
    gap: 4px;
}

.star {
    color: #FFDB59;
    font-size: 20px;
    text-shadow: 0 2px 4px rgba(255, 219, 89, 0.3);
}

.featured-badge {
    background: linear-gradient(45deg, #FF7D61, #FFDB59);
    color: #0F141C;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.testimonial-title {
    font-size: 32px;
    font-weight: 700;
    color: #FFDB59;
    margin-bottom: 20px;
    line-height: 1.2;
}

.testimonial-text {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CLIENT INFO ===== */
.client-info {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.client-avatar {
    position: relative;
}

.client-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FF7D61;
    transition: all 0.3s ease;
}

.testimonial-card:hover .client-avatar img {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 219, 89, 0.4);
}

.verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 24px;
    height: 24px;
    background: #FFDB59;
    color: #0F141C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0F141C;
}

.client-details {
    text-align: left;
}

.client-name {
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    line-height: 1.2;
}

.client-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    line-height: 1.3;
}

.linkedin-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0077b5;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(0, 119, 181, 0.1);
}

.linkedin-link:hover {
    color: #FFDB59;
    background: rgba(255, 219, 89, 0.1);
    transform: translateY(-1px);
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF7D61, #FFDB59);
    border-radius: 2px;
    transition: width 0.6s ease;
    width: 4%;
    box-shadow: 0 0 10px rgba(255, 219, 89, 0.5);
}

/* ===== THUMBNAILS ===== */
.thumbnails-nav {
    margin-bottom: 40px;
}

.thumbnails-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.thumbnail-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    opacity: 0.6;
    position: relative;
}

.thumbnail-item.active {
    border-color: #FFDB59;
    opacity: 1;
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(255, 219, 89, 0.4);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* ===== CONTROLS ===== */
.controls-section {
    text-align: center;
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

.control-btn:hover {
    background: linear-gradient(45deg, #FF7D61, #FFDB59);
    color: #0F141C;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 219, 89, 0.3);
}

/* ===== UTILITIES ===== */
.hidden {
    display: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .testimonials-modern-section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    .testimonials-stats {
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .testimonial-card {
        padding: 30px 20px;
        min-height: 350px;
    }
    
    .testimonial-title {
        font-size: 24px;
    }
    
    .testimonial-text {
        font-size: 16px;
    }
    
    .client-info {
        flex-direction: column;
        text-align: center;
    }
    
    .client-details {
        text-align: center;
    }
    
    .nav-btn {
        width: 48px;
        height: 48px;
    }
    
    .testimonials-counter .current {
        font-size: 24px;
    }
    
    .thumbnail-item {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }
    
    .testimonial-card {
        padding: 20px 15px;
        min-height: 320px;
    }
    
    .testimonial-title {
        font-size: 20px;
    }
    
    .testimonial-text {
        font-size: 14px;
    }
    
    .client-avatar img {
        width: 60px;
        height: 60px;
    }
    
    .thumbnails-container {
        gap: 8px;
    }
    
    .thumbnail-item {
        width: 30px;
        height: 30px;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.testimonial-card {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.nav-btn {
    will-change: transform;
    transform: translateZ(0);
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .testimonial-card,
    .nav-btn,
    .thumbnail-item,
    .progress-fill,
    .client-avatar img {
        transition: none;
    }
    
    .bg-gradient-1,
    .bg-gradient-2,
    .float-element {
        animation: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .testimonial-card {
        background: #000000;
        border-color: #FFFFFF;
    }
    
    .testimonial-text,
    .client-name {
        color: #FFFFFF;
    }
    
    .nav-btn {
        background: #FFFFFF;
        color: #000000;
    }
}

/* ===== DARK MODE OPTIMIZATION ===== */
@media (prefers-color-scheme: dark) {
    .testimonials-modern-section {
        background: linear-gradient(135deg, #000000 0%, #0F141C 50%, #000000 100%);
    }
}/*
 * TESTIMONIALS READMORE FUNCTIONALITY
 * Simple, clean read more/less buttons for the new testimonials section
 * Fully compatible with the modern testimonials design
 */

/* ===== READ MORE BUTTONS ===== */
.testimonial-read-more,
.testimonial-read-less {
    display: inline-block;
    background: linear-gradient(45deg, #FF7D61, #FFDB59);
    color: #0F141C;
    border: none;
    padding: 6px 14px;
    margin-left: 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    overflow: hidden;
    vertical-align: baseline;
    line-height: 1.2;
    box-shadow: 0 3px 10px rgba(255, 125, 97, 0.4);
    text-decoration: none;
}

.testimonial-read-more:hover,
.testimonial-read-less:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 125, 97, 0.5);
    background: linear-gradient(45deg, #FFDB59, #FF7D61);
}

.testimonial-read-more:active,
.testimonial-read-less:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 125, 97, 0.4);
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
.testimonial-read-more:focus-visible,
.testimonial-read-less:focus-visible {
    outline: 2px solid #FFDB59;
    outline-offset: 3px;
}

/* ===== TEXT TRUNCATION ===== */
.testimonial-text-truncated {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    position: relative;
}

.testimonial-text-full {
    display: block;
}

/* ===== FADE EFFECT FOR TRUNCATED TEXT ===== */
.testimonial-text-truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 24px;
    background: linear-gradient(to right, transparent, rgba(15, 20, 28, 0.8));
    pointer-events: none;
}

/* ===== SMOOTH TRANSITIONS ===== */
.testimonial-text {
    transition: all 0.4s ease;
}

.testimonial-expanding {
    animation: expand-text 0.4s ease-out;
}

.testimonial-collapsing {
    animation: collapse-text 0.4s ease-in;
}

@keyframes expand-text {
    from {
        max-height: 72px;
        opacity: 0.8;
    }
    to {
        max-height: 1000px;
        opacity: 1;
    }
}

@keyframes collapse-text {
    from {
        max-height: 1000px;
        opacity: 1;
    }
    to {
        max-height: 72px;
        opacity: 0.8;
    }
}

/* ===== BUTTON SHIMMER EFFECT ===== */
.testimonial-read-more::before,
.testimonial-read-less::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.testimonial-read-more:hover::before,
.testimonial-read-less:hover::before {
    left: 100%;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .testimonial-read-more,
    .testimonial-read-less {
        font-size: 10px;
        padding: 5px 12px;
        margin-left: 8px;
        border-radius: 14px;
        margin-top: 4px;
    }
    
    .testimonial-text-truncated {
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 480px) {
    .testimonial-read-more,
    .testimonial-read-less {
        font-size: 9px;
        padding: 4px 10px;
        margin-left: 6px;
        border-radius: 12px;
        margin-top: 6px;
        display: block;
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
        margin-top: 15px;
    }
    
    .testimonial-text-truncated {
        -webkit-line-clamp: 2;
    }
    
    .testimonial-text-truncated::after {
        width: 30px;
        height: 20px;
    }
}

/* ===== TESTIMONIAL CARD HEIGHT MANAGEMENT ===== */
.testimonial-card {
    transition: min-height 0.4s ease;
}

.testimonial-card.expanded {
    min-height: auto;
}

/* ===== LOADING STATE ===== */
.testimonials-loading .testimonial-read-more,
.testimonials-loading .testimonial-read-less {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .testimonial-read-more,
    .testimonial-read-less {
        background: #FFFFFF;
        color: #000000;
        border: 2px solid #000000;
        box-shadow: none;
    }
    
    .testimonial-read-more:hover,
    .testimonial-read-less:hover {
        background: #000000;
        color: #FFFFFF;
        border-color: #FFFFFF;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .testimonial-read-more,
    .testimonial-read-less,
    .testimonial-text,
    .testimonial-card {
        transition: none;
        animation: none;
    }
    
    .testimonial-read-more::before,
    .testimonial-read-less::before {
        display: none;
    }
    
    .testimonial-read-more:hover,
    .testimonial-read-less:hover {
        transform: none;
    }
    
    .testimonial-expanding,
    .testimonial-collapsing {
        animation: none;
    }
}

/* ===== DARK MODE OPTIMIZATION ===== */
@media (prefers-color-scheme: dark) {
    .testimonial-read-more,
    .testimonial-read-less {
        box-shadow: 0 3px 10px rgba(255, 125, 97, 0.5);
    }
    
    .testimonial-read-more:hover,
    .testimonial-read-less:hover {
        box-shadow: 0 6px 15px rgba(255, 125, 97, 0.6);
    }
    
    .testimonial-text-truncated::after {
        background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.9));
    }
}

/* ===== INTEGRATION WITH NEW TESTIMONIALS SYSTEM ===== */
.testimonials-modern-section .testimonial-read-more,
.testimonials-modern-section .testimonial-read-less {
    margin-top: 12px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* ===== UTILITY CLASSES ===== */
.text-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.testimonial-read-more,
.testimonial-read-less {
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ===== NO-JS FALLBACK ===== */
.no-js .testimonial-read-more,
.no-js .testimonial-read-less {
    display: none;
}

.no-js .testimonial-text-truncated {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.no-js .testimonial-text-truncated::after {
    display: none;
}/*
 * PREMIUM POLISH & FINISHING TOUCHES
 * Final enhancements for a world-class experience
 */

/* ===== GLOBAL ENHANCEMENTS ===== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improved text rendering */
body {
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern", "liga", "clig", "calt";
}

/* ===== SELECTION STYLES ===== */
::selection {
    background: rgba(255, 219, 89, 0.3);
    color: #FFFFFF;
}

::-moz-selection {
    background: rgba(255, 219, 89, 0.3);
    color: #FFFFFF;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 20, 28, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #FF7D61, #FFDB59);
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #FFDB59, #FF7D61);
    box-shadow: 0 0 10px rgba(255, 219, 89, 0.5);
}

/* ===== ENHANCED FOCUS STATES ===== */
*:focus-visible {
    outline: 2px solid #FFDB59;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== IMPROVED LINK ANIMATIONS ===== */
a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:not(.btn):not(.portfolio-card):hover {
    color: #FFDB59;
}

/* ===== ENHANCED BUTTON STYLES ===== */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    pointer-events: none;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== IMAGE LOADING STATES ===== */
img {
    transition: opacity 0.3s ease;
}

img:not(.loaded) {
    opacity: 0.7;
    filter: blur(1px);
}

img.loaded {
    opacity: 1;
    filter: none;
}

/* ===== ENHANCED SHADOWS ===== */
.portfolio-card .card,
.testimonial_slider > div {
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.portfolio-card:hover .card,
.testimonial_slider > div:hover {
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 10px 20px rgba(255, 219, 89, 0.1),
        0 0 0 1px rgba(255, 219, 89, 0.2);
}

/* ===== IMPROVED TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p {
    line-height: 1.6;
    font-weight: 400;
}

/* ===== ENHANCED ANIMATIONS ===== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 219, 89, 0.1) 50%, 
        transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== LOADING SPINNER ===== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0F141C;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: all 0.6s ease;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.premium-loader {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 219, 89, 0.1);
    border-top: 3px solid #FFDB59;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.premium-loader::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 2px solid rgba(255, 125, 97, 0.1);
    border-top: 2px solid #FF7D61;
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== PERFORMANCE IMPROVEMENTS ===== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .shimmer {
        animation: none;
    }
    
    .premium-loader,
    .premium-loader::after {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .portfolio-card .card,
    .testimonial_slider > div {
        border: 2px solid #FFFFFF;
        background: #000000;
    }
    
    .btn {
        border: 2px solid #FFFFFF;
    }
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    /* Reduce motion on mobile for better performance */
    .portfolio-card:hover .card {
        transform: translateY(-5px) scale(1.01);
    }
    
    /* Optimize touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improve text readability */
    body {
        -webkit-text-size-adjust: 100%;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .testimonial_slider,
    #cases {
        break-inside: avoid;
    }
    
    .portfolio-card .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn {
        border: 1px solid #000;
        background: white;
        color: black;
    }
}

/* ===== DARK MODE REFINEMENTS ===== */
@media (prefers-color-scheme: dark) {
    ::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.5);
    }
    
    ::selection {
        background: rgba(255, 219, 89, 0.4);
    }
}

/* ===== SECTION SPACING IMPROVEMENTS ===== */
section {
    position: relative;
    isolation: isolate;
}

/* Improved section transitions */
section + section {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== ENHANCED VISUAL HIERARCHY ===== */
.section-title h2 {
    position: relative;
    z-index: 2;
}

.section-title h2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 219, 89, 0.1) 0%, 
        rgba(255, 125, 97, 0.1) 100%);
    filter: blur(20px);
    opacity: 0.5;
    z-index: -1;
    transform: scale(1.2);
}

/* ===== MICRO-ANIMATIONS ===== */
.card-title {
    position: relative;
    overflow: hidden;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF7D61, #FFDB59);
    transition: width 0.4s ease;
}

.portfolio-card:hover .card-title::after {
    width: 100%;
}

/* ===== REFINED SPACING ===== */
.section-six,
#cases {
    padding: clamp(60px, 8vw, 120px) 0;
}

.testimonial_slider > div {
    margin: clamp(10px, 2vw, 20px);
    padding: clamp(25px, 4vw, 50px) clamp(20px, 3vw, 40px);
}

/* ===== FINAL POLISH ===== */
.premium-gradient-text {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFDB59 50%, #FF7D61 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-glow {
    filter: drop-shadow(0 0 10px rgba(255, 219, 89, 0.3));
}

/* ===== CONTAINER IMPROVEMENTS ===== */
.container {
    position: relative;
    z-index: 2;
}

/* Better container spacing */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ===== ENHANCED INTERACTIVITY ===== */
.interactive-element {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: translateY(-2px);
}

.interactive-element:active {
    transform: translateY(0);
}

/* ===== IMPROVED LOADING EXPERIENCE ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }