/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-purple: #8E44AD;
    --brand-dark: #141414;
    --brand-black: #0a0a0a;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--brand-black);
    color: #ffffff;
    overflow-x: hidden;
}

/* Lenis Smooth Scroll */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Custom Utilities */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-reveal {
    animation: revealUp 0.8s ease-out forwards;
}

.text-reveal.delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.line-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Swiper Custom Navigation */
.projects-strip {
    width: 100%;
    padding-bottom: 50px;
    overflow: visible;
}

.swiper-slide {
    width: 350px;
    /* Card Width */
    height: auto;
    min-height: 450px;
    align-self: stretch;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.swiper-slide-active {
    transform: scale(1.05);
    z-index: 10;
}

/* Project Card Styles */
.project-card {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
}

.project-card__image {
    width: 100%;
    /* height: 60%; Removed to allow flexible height via utilities */
    min-height: 250px;
    position: relative;
    overflow: hidden;
}

.project-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.project-card:hover .project-card__image img {
    transform: scale(1.1);
}

.project-status {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: white;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
}

.project-card__content {
    padding: 24px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to top, #1a1a1a, #1a1a1a 90%, transparent);
}

/* Button Standard */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: white;
    color: black;
    padding: 16px 40px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--brand-purple);
    color: white;
    padding-right: 50px;
    /* Slight expansion */
}

.btn-outline-dark {
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: black;
    padding: 12px 30px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    background-color: black;
    color: white;
    border-color: black;
}

/* Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(10px);
}

.project-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 1100px;
    height: 80vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    position: relative;
    overflow: hidden;
    transform: translateY(50px);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    left: 20px;
    /* RTL check: left ok? */
    font-size: 2rem;
    color: black;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.modal-image {
    background: #f0f0f0;
    height: 100%;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
    direction: rtl;
    /* Enforce RTL content inside grid */
    text-align: right;
}

@media (max-width: 1024px) {
    .modal-content {
        grid-template-columns: 1fr;
        height: 90vh;
        overflow-y: auto;
    }

    .modal-image {
        height: 300px;
    }

    .modal-info {
        padding: 30px;
    }
}

/* Header Scroll State */
.header-scrolled {
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding-top: 1rem !important; /* Compress padding */
    padding-bottom: 1rem !important;
}