/* ========================================================
   PORTFOLIO PAGE STYLES - PREMIUM DUBAI EDITION
   ======================================================== */

.portfolio-page {
    background: #02050A;
    color: #e2e8f0;
    font-family: 'Inter', 'Poppins', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

.portfolio-hero {
    padding-top: 160px;
    padding-bottom: 60px;
    position: relative;
    z-index: 2;
}

.basilshub-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-family: 'Exo 2', sans-serif;
    font-size: 0.85rem;
    color: #00F0FF;
    text-decoration: none;
    margin-bottom: 25px;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.basilshub-badge:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
}

/* Premium Parent Banner */
.parent-company-banner {
    background: linear-gradient(90deg, rgba(10, 15, 25, 0.8) 0%, rgba(20, 30, 50, 0.8) 50%, rgba(10, 15, 25, 0.8) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    text-align: center;
    margin-bottom: 50px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.parent-company-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
    animation: shine-sweep 6s infinite linear;
}

@keyframes shine-sweep {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.parent-company-banner p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: #a0aec0;
    margin: 0;
}

.parent-company-banner a {
    color: #00F0FF;
    text-decoration: none;
    font-style: normal;
    font-family: 'Exo 2', sans-serif;
    font-weight: 600;
    margin-left: 10px;
    position: relative;
}

.parent-company-banner a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #00F0FF;
    transition: width 0.3s ease;
}

.parent-company-banner a:hover::after {
    width: 100%;
}

/* Portfolio Grid & Filtering */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(10, 15, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 24px;
    border-radius: 30px;
    font-family: 'Exo 2', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00F0FF;
    color: #00F0FF;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

/* Enhanced Visual Treat: Animated Gradient Border Cards */
.case-card {
    background: rgba(10, 15, 25, 0.8);
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.case-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    /* Border thickness */
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: all 0.5s ease;
    z-index: -1;
}

.case-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 240, 255, 0.15);
}

.case-card:hover::before {
    background: linear-gradient(135deg, #00F0FF, #6A00FF, #00FFB2, #00F0FF);
    background-size: 300% 300%;
    animation: gradient-border-shimmer 3s ease infinite;
}

@keyframes gradient-border-shimmer {
    0% {
        background-position: 0% 50%;
    }

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

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

.card-image-wrap {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
    filter: brightness(0.8) contrast(1.1);
}

.case-card:hover .card-image-wrap img {
    transform: scale(1.1);
    filter: brightness(1) contrast(1.2);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 5, 10, 0.9) 0%, rgba(2, 5, 10, 0.4) 50%, rgba(2, 5, 10, 0.1) 100%);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 30px;
    opacity: 0;
    backdrop-filter: blur(2px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(20px);
}

.case-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(to bottom, rgba(10, 15, 25, 0) 0%, rgba(5, 10, 15, 0.8) 100%);
}

.category-tag {
    font-size: 0.75rem;
    color: #00F0FF;
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 20px;
    background: rgba(0, 240, 255, 0.05);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-content h3 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.5rem;
    margin: 0 0 20px;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.case-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.metric {
    font-size: 0.85rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric .highlight {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #00F0FF 0%, #0080FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.summary {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
}

/* Modals */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 2, 5, 0.9);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-content {
    background: rgba(10, 15, 25, 0.9);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    padding: 50px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(0, 240, 255, 0.05);
}

.custom-modal-overlay.active .custom-modal-content {
    transform: scale(1) translateY(0);
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 0, 85, 0.2);
    border-color: #ff0055;
    color: #ff0055;
    transform: rotate(90deg);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.modal-section.full-width {
    grid-column: 1 / -1;
}

.modal-section h3 {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.modal-section p {
    color: #cbd5e1;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

/* KPIs */
.portfolio-kpis {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.portfolio-kpis .stat {
    background: linear-gradient(135deg, rgba(10, 15, 25, 0.8), rgba(15, 20, 35, 0.6));
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 40px 30px;
    border-radius: 16px;
    min-width: 220px;
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.02);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.portfolio-kpis .stat:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.5);
}

.portfolio-kpis .counter {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    color: #00F0FF;
    display: block;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.testimonial-section {
    padding: 100px 0;
    position: relative;
}

.testimonial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.5), transparent);
}

.mt-5 {
    margin-top: 60px;
}

/* Hide elements based on filter */
.case-card.hide {
    display: none;
}