/* ASKera Design - Case Studies Page Styles - 3D Grid System */
:root {
    --primary: #FF6B35;
    --secondary: #00D4AA;
    --purple: #9B5DE5;
    --dark-bg: #0A1929;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #FFFFFF;
    --text-muted: #B0B0B0;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    margin: 0;
    overflow-x: clip;
    /* Changed from hidden to allow sticky positioning */
}

/* =========================================
   Modern Hero Section
   ========================================= */
.modern-hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a2c42 0%, #0A1929 70%);
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(155, 93, 229, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    z-index: 0;
    animation: pulseGlow 5s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

.hero-content-wrapper {
    text-align: center;
    z-index: 1;
    position: relative;
}

.hero-badge-pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: var(--secondary);
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero-headline {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--secondary), var(--purple), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtext {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   Portfolio Section with Filters
   ========================================= */
.portfolio-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    z-index: 10;
    position: relative;
}

.section-label {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin: 0 0 20px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Filter Buttons Styles Removed */

/* 3D Grid Layout */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    padding: 0 20px;
    perspective: 1000px;
}

/* Portfolio Card with 3D Effect */
.portfolio-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.portfolio-card.hide {
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Stagger animation for cards */
.portfolio-card:nth-child(1) {
    animation-delay: 0.1s;
}

.portfolio-card:nth-child(2) {
    animation-delay: 0.15s;
}

.portfolio-card:nth-child(3) {
    animation-delay: 0.2s;
}

.portfolio-card:nth-child(4) {
    animation-delay: 0.25s;
}

.portfolio-card:nth-child(5) {
    animation-delay: 0.3s;
}

.portfolio-card:nth-child(6) {
    animation-delay: 0.35s;
}

.portfolio-card:nth-child(7) {
    animation-delay: 0.4s;
}

.portfolio-card:nth-child(8) {
    animation-delay: 0.45s;
}

.portfolio-card:nth-child(9) {
    animation-delay: 0.5s;
}

.portfolio-card:nth-child(10) {
    animation-delay: 0.55s;
}

.portfolio-card:nth-child(11) {
    animation-delay: 0.6s;
}

.portfolio-card:nth-child(12) {
    animation-delay: 0.65s;
}

.portfolio-card:nth-child(13) {
    animation-delay: 0.7s;
}

.card-3d-wrapper {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(20, 30, 45, 0.95), rgba(10, 25, 41, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.portfolio-card:hover .card-3d-wrapper {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 212, 170, 0.15);
    border-color: rgba(0, 212, 170, 0.3);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-card:hover .card-image-wrapper img {
    transform: scale(1.1);
}

.card-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 25, 41, 0.95) 100%);
    pointer-events: none;
}

.card-info {
    padding: 30px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-category {
    color: var(--secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    display: inline-block;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin: 0;
    color: white;
    font-weight: 700;
    line-height: 1.2;
}

.card-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-details-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-family: var(--font-body);
}

.view-details-btn i {
    transition: transform 0.3s;
}

.view-details-btn:hover {
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-color: transparent;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.view-details-btn:hover i {
    transform: translateX(5px);
}

/* =========================================
   Modal Styles
   ========================================= */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(10px);
}

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

.modal-content {
    width: 90%;
    max-width: 1100px;
    height: 85vh;
    background: #0d1b2a;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal:hover {
    background: #EF4444;
    transform: rotate(90deg);
}

.modal-image-col {
    width: 55%;
    flex-shrink: 0;
    background: #000;
    height: 100%;
    position: relative;
}

.modal-image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info-col {
    padding: 60px 50px;
    overflow-y: auto;
    width: 45%;
    display: flex;
    flex-direction: column;
}

.modal-cat-tag {
    color: var(--secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    display: inline-block;
}

.modal-title-text {
    font-size: 2.8rem;
    line-height: 1.1;
    margin: 0 0 25px;
    font-family: var(--font-heading);
    color: white;
}

.modal-desc-text {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 40px;
}

.modal-features {
    list-style: none;
    padding: 0;
    margin-bottom: 50px;
}

.modal-features li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: #e0e0e0;
}

.modal-features li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 400;
    color: var(--secondary);
    margin-right: 15px;
}

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .hero-headline {
        font-size: 3rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }

    .card-3d-wrapper {
        height: 480px;
    }

    .modal-content {
        flex-direction: column;
        height: 95vh;
    }

    .modal-image-col {
        width: 100%;
        height: 40vh;
    }

    .modal-info-col {
        width: 100%;
        height: auto;
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .portfolio-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .card-3d-wrapper {
        height: 450px;
    }

    .card-info {
        padding: 25px;
    }

    .card-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero-headline {
        font-size: 2rem;
    }

    .portfolio-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        justify-content: center;
    }

    .card-3d-wrapper {
        height: 420px;
    }

    .modal-title-text {
        font-size: 2rem;
    }
}