/* =================================
   PORTFOLIO PAGE - PREMIUM
   ================================= */

/* Gradient Text Effect */
.text-gradient {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 30%, #0a1628 70%, #1a3a5c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Page Header */
.portfolio-header {
    background: linear-gradient(180deg, #081220 0%, #0a1628 20%, #1a3a5c 60%, #2a5a8c 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.portfolio-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b00, #ff8c00, #ff6b00);
    z-index: 10;
}

.header-badge {
    display: inline-block;
    background: rgba(192, 192, 192, 0.2);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.portfolio-header h1 {
    color: #fff;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.portfolio-header .lead {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    max-width: 500px;
}

.header-stats {
    display: flex;
    gap: 2rem;
    justify-content: flex-end;
}

.header-stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    min-width: 120px;
}

.header-stat-item .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
}

.header-stat-item .stat-suffix {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.header-stat-item .stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* =================================
   LOGO SLIDER - INFINITE SCROLL
   ================================= */
.clients-slider-section {
    background: #ffffff;
    padding: 80px 0;
}

.section-header {
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a1628 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #6b7280;
    font-size: 1.1rem;
}

.logo-slider-wrapper {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-slider {
    overflow: hidden;
}

.logo-track {
    display: flex;
    animation: scrollLogos 30s linear infinite;
    will-change: transform;
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.logo-slide {
    flex-shrink: 0;
    padding: 0 30px;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 100px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: default;
}

.logo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.logo-item i {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.logo-item:hover i {
    color: #666666;
}

.logo-item span {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-align: center;
}

/* =================================
   CASE STUDIES SECTION
   ================================= */
.case-studies-section {
    background: #f5f5f5;
    padding: 100px 0;
}

.case-studies-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.case-study-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.08);
    border: 3px solid #e5e5e5;
    transition: all 0.4s ease;
}

.case-study-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(255, 107, 0, 0.15);
    border-color: #ff6b00;
}

.case-card-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 450px;
}

.case-study-card.reverse .case-card-inner {
    direction: rtl;
}

.case-study-card.reverse .case-card-inner>* {
    direction: ltr;
}

/* Case Info Side */
.case-info-side {
    padding: 3rem;
    display: flex;
    align-items: center;
}

.case-info-content {
    width: 100%;
}

.case-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.case-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.case-desc {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Before/After Box */
.before-after-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.ba-item {
    flex: 1;
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
}

.ba-item.before {
    background: rgba(107, 114, 128, 0.08);
}

.ba-item.after {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a1628 100%);
}

.ba-tag {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.ba-item.before .ba-tag {
    color: #9ca3af;
}

.ba-item.after .ba-tag {
    color: #c0c0c0;
}

.ba-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.ba-item.before .ba-value {
    color: #6b7280;
}

.ba-item.after .ba-value {
    color: #fff;
}

.ba-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.ba-item.before .ba-label {
    color: #9ca3af;
}

.ba-item.after .ba-label {
    color: rgba(255, 255, 255, 0.7);
}

.ba-arrow {
    color: var(--gold);
    font-size: 1.5rem;
}

/* Case Stats Side */
.case-stats-side {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #0a1628 100%);
    padding: 3rem;
    display: flex;
    align-items: center;
    position: relative;
}

.case-stats-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(192, 192, 192, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 100%;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.stat-card::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: 50%;
    left: 50%;
    background: conic-gradient(from 0deg,
            transparent 0deg 80deg,
            #ff6b00 80deg 100deg,
            transparent 100deg 180deg,
            #0066ff 180deg 200deg,
            transparent 200deg 280deg,
            #ff6b00 280deg 300deg,
            transparent 300deg 360deg);
    transform: translate(-50%, -50%);
    animation: rotateBorderStat 4s linear infinite paused;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover::before {
    opacity: 1;
    animation-play-state: running;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 100%);
    border-radius: 14px;
    z-index: -1;
}

@keyframes rotateBorderStat {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
}

.stat-icon-box {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-icon-box i {
    color: #ffffff;
    font-size: 1.1rem;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 50%, #ffffff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.stat-info .stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
}

.stat-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #a0a0a0 0%, #d0d0d0 100%);
    border-radius: 2px;
}

/* =================================
   IMPACT SECTION
   ================================= */
.impact-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 25%, #dee2e6 50%, #e9ecef 75%, #f8f9fa 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.impact-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 107, 0, 0.05) 0%, transparent 30%),
        radial-gradient(circle at 70% 70%, rgba(10, 22, 40, 0.05) 0%, transparent 30%);
    animation: floatBg 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes floatBg {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(20px, 20px) rotate(10deg);
    }
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.impact-item {
    text-align: center;
    padding: 2.5rem 2rem;
    background: #ffffff;
    border-radius: 24px;
    border: 2px solid #e5e5e5;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.impact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b00, #ff8c00, #0a1628);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.impact-item:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: #ff6b00;
    box-shadow: 0 25px 50px rgba(255, 107, 0, 0.15);
}

.impact-item:hover::before {
    transform: scaleX(1);
}

.impact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
}

.impact-item:hover .impact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(255, 107, 0, 0.4);
}

.impact-icon i {
    font-size: 1.75rem;
    color: #ffffff;
}

.impact-value {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0a1628 0%, #1a3a5c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.impact-item:hover .impact-value {
    transform: scale(1.05);
}

.impact-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =================================
   CTA SECTION - Blends with Footer
   ================================= */
.cta-section {
    background: linear-gradient(180deg, #0a1628 0%, #0d1e35 100%);
    padding: 100px 0;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.15rem;
    color: #cccccc;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-outline-light {
    border-color: #ffffff;
    color: #ffffff;
}

.cta-buttons .btn-outline-light:hover {
    background: #ffffff;
    color: #0a1628;
}

.text-gold {
    color: #c0c0c0;
}

/* =================================
   RESPONSIVE
   ================================= */
@media (max-width: 1199px) {
    .header-stats {
        gap: 1rem;
    }

    .header-stat-item {
        padding: 1rem;
        min-width: 100px;
    }

    .header-stat-item .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 991px) {
    .portfolio-header h1 {
        font-size: 2.5rem;
    }

    .case-card-inner {
        grid-template-columns: 1fr;
    }

    .case-study-card.reverse .case-card-inner {
        direction: ltr;
    }

    .case-info-side,
    .case-stats-side {
        padding: 2rem;
    }

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

@media (max-width: 767px) {
    .portfolio-header {
        padding: 100px 0 60px;
    }

    .portfolio-header h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .logo-item {
        width: 110px;
        height: 80px;
    }

    .logo-item i {
        font-size: 1.5rem;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .before-after-box {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ba-arrow {
        transform: rotate(90deg);
    }

    .impact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .impact-item {
        padding: 1.5rem 1rem;
    }

    .impact-value {
        font-size: 1.75rem;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 575px) {
    .logo-slide {
        padding: 0 15px;
    }

    .logo-item {
        width: 100px;
        height: 70px;
    }

    .logo-item span {
        font-size: 0.65rem;
    }
}