/* CSS Reset and Variables */
:root {
    --primary-color: #5E3BEE;
    --primary-hover: #4b2fc2;
    --dark-bg: #0A0F1C;
    --darker-bg: #05080f;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #F8FAFC;
    --text-light-muted: #94A3B8;
    --border-color: #E2E8F0;
    --border-dark: rgba(255, 255, 255, 0.1);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(94, 59, 238, 0.4);

    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(90deg, #8B5CF6 0%, #5E3BEE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-warning {
    color: #F59E0B;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge-dark {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.badge-light {
    background: #EEF2FF;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(94, 59, 238, 0.5);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-dark {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-dark:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.btn-light {
    background-color: var(--white);
    color: var(--text-main);
}

.btn-light:hover {
    background-color: #f1f5f9;
}

/* Header */
.header {
    background-color: var(--dark-bg);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

.site-logo {
    height: 75px;
    width: auto;
    object-fit: contain;
}

.logo-icon {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.navbar .nav-links {
    display: flex;
    gap: 32px;
}

.navbar .nav-links a {
    color: var(--text-light-muted);
    font-weight: 500;
    font-size: 1rem;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: var(--white);
}

.navbar .nav-links a.active {
    position: relative;
}

.navbar .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background-color: var(--dark-bg);
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
    color: var(--white);
}

.hero-bg-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(94,59,238,0.15) 0%, rgba(10,15,28,0) 60%);
    pointer-events: none;
}

.hero .container {
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text p {
    color: var(--text-light-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-dark);
    padding-top: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.stat-info span {
    color: var(--text-light-muted);
    font-size: 0.9rem;
}

.hero-image {
    position: relative;
}

.mockup-img {
    width: 100%;
    /* Remove transform as the image is already isometric */
    mix-blend-mode: screen;
    /* Increase contrast and decrease brightness to crush the dark gray background into pure black, making it completely transparent with screen blend mode */
    filter: contrast(1.6) brightness(0.8);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.mockup-img:hover {
    transform: translateY(-10px);
    filter: contrast(1.6) brightness(0.9);
}

.floating-features {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2;
}

.feature-tag {
    position: absolute;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.feature-tag svg {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.tag-1 { top: 0%; left: -5%; }
.tag-2 { top: -5%; right: 20%; }
.tag-3 { bottom: 25%; left: -5%; }
.tag-4 { bottom: 10%; right: 15%; }

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.section-header {
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.text-center {
    text-align: center;
}

.section-header h2 {
    color: var(--text-main);
}

.section-header p {
    color: var(--text-muted);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.service-card {
    background: var(--white);
    padding: 0;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 240px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color);
}

.service-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.15rem;
    margin: 20px 15px 12px;
    color: var(--text-main);
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 15px 24px;
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background-color: var(--white);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    border-radius: 100px;
    border: none;
    background: var(--light-bg);
    color: var(--text-muted);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.portfolio-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 24px;
    position: relative;
}

.slider-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
    transition: all 0.3s;
    flex-shrink: 0;
}

.slider-arrow:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    flex-grow: 1;
}

.portfolio-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 240px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title-row h3 {
    font-size: 1.2rem;
    margin: 0;
}

.tag {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-green { background: #DCFCE7; color: #16A34A; }
.tag-blue { background: #E0F2FE; color: #0284C7; }
.tag-purple { background: #F3E8FF; color: #9333EA; }

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
}

.project-link:hover {
    gap: 12px;
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
    background-color: var(--white);
}

.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.pricing-card.popular {
    background: var(--dark-bg);
    color: var(--white);
    border: none;
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-10px);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #8B5CF6 0%, #5E3BEE 100%);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.pricing-card:hover .pricing-icon {
    transform: scale(1.1) rotate(5deg);
}

.pricing-header {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.pricing-card.popular .pricing-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.pricing-header h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.pricing-card.popular h3 {
    color: var(--white);
}

.pricing-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.pricing-card.popular p {
    color: var(--text-light-muted);
}

.price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pricing-card.popular .currency {
    color: #a78bfa;
}

.amount {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.period {
    color: var(--text-muted);
    font-size: 0.9rem;
    align-self: flex-end;
    margin-bottom: 5px;
}

.pricing-card.popular .period {
    color: var(--text-light-muted);
}

.pricing-features {
    text-align: right;
    margin-bottom: 40px;
    flex-grow: 1;
}

.pricing-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: var(--text-main);
}

.pricing-card.popular .pricing-features li {
    color: var(--white);
}

.pricing-features i {
    font-size: 1.1rem;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.stars {
    color: #F59E0B;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.quote {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.8;
}

.author {
    display: flex;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.author img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.author-info span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Footer CTA */
.footer-cta {
    padding: 60px 0;
    background-color: var(--light-bg);
}

.cta-box {
    background: var(--dark-bg);
    border-radius: var(--border-radius-xl);
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: var(--white);
    box-shadow: var(--shadow-xl);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(94,59,238,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content p {
    color: var(--text-light-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 16px;
}

.cta-image {
    position: relative;
    z-index: 1;
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
}

.cta-image img {
    width: 100%;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5));
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .feature-tag {
        transform: scale(0.75);
    }
    .tag-1 { top: -10%; left: -10%; }
    .tag-2 { top: -15%; right: 10%; }
    .tag-3 { bottom: 20%; left: -10%; }
    .tag-4 { bottom: 5%; right: 5%; }

    .pricing-card.popular {
        transform: none;
    }

    .pricing-card.popular:hover {
        transform: translateY(-10px);
    }

    .portfolio-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-box {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 20px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; line-height: 1.4; margin-bottom: 1rem; }
    .hero { padding: 110px 0 50px; overflow-x: hidden; }
    
    .hero-content {
        display: flex;
        flex-direction: column-reverse;
        gap: 30px;
        align-items: center;
        width: 100%;
    }
    
    .hero-image {
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
        padding: 0 15px;
    }
    
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .badge {
        margin-bottom: 1.2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
        padding: 0 10px;
    }
    
    .navbar {
        display: none;
    }
    
    .mobile-toggle {
        display: block;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 16px;
        margin-bottom: 2.5rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0;
    }
    
    .hero-stats {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
        padding: 20px 10px;
        background: rgba(255, 255, 255, 0.03);
        border-radius: var(--border-radius-lg);
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-top: 0;
    }
    
    .stat-item {
        flex-direction: column;
        flex: 1;
        gap: 6px;
        text-align: center;
    }
    
    .stat-item i {
        font-size: 1.3rem;
        margin: 0 auto 4px;
    }
    
    .stat-info h3 {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
    
    .stat-info span {
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .feature-tag {
        display: none !important;
    }

    .services-grid {
        flex-direction: column;
        align-items: center;
    }

    .service-card {
        width: 100%;
        max-width: 100%;
    }

    .pricing-grid {
        flex-direction: column;
        align-items: center;
    }

    .pricing-card {
        width: 100%;
        max-width: 100%;
    }

    .portfolio-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .slider-arrow {
        display: none;
    }
}

/* ===== Portfolio Carousel ===== */

.portfolio-slider-wrapper {
    position: relative;
    direction: rtl;
}

.portfolio-grid {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    min-width: 0;
}

.portfolio-grid::-webkit-scrollbar {
    display: none;
}

.portfolio-card {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
    scroll-snap-align: start;
}

.portfolio-slider-wrapper .slider-arrow {
    display: flex;
    position: relative;
    z-index: 2;
}

@media (max-width: 992px) {
    .portfolio-card {
        flex-basis: calc((100% - 24px) / 2);
    }
}

@media (max-width: 768px) {
    .portfolio-card {
        flex-basis: 100%;
    }

    .portfolio-slider-wrapper .slider-arrow {
        display: none;
    }
}
