:root {
    /* Premium Color Palette */
    --clr-bg: #090a0f;
    --clr-bg-alt: #13151f;
    --clr-primary: #3b82f6;
    --clr-secondary: #06b6d4;
    --clr-accent: #8b5cf6;
    --clr-text: #f8fafc;
    --clr-text-muted: #94a3b8;

    --gradient-brand: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary), var(--clr-accent));
    --glass-bg: rgba(19, 21, 31, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);

    --font-heading-ar: 'Cairo', sans-serif;
    --font-body-ar: 'Tajawal', sans-serif;
    
    --font-heading-en: 'Outfit', 'Inter', sans-serif;
    --font-body-en: 'Inter', sans-serif;

    --font-heading: var(--font-heading-ar);
    --font-body: var(--font-body-ar);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html[lang="en"] {
    --font-heading: var(--font-heading-en);
    --font-body: var(--font-body-en);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--clr-bg);
    color: var(--clr-text);
}

body {
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography & Utils */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-brand);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.subtitle {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary-gradient {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--clr-primary);
    color: var(--clr-primary);
}

.btn-outline:hover {
    background: var(--clr-primary);
    color: white;
}

.w-100 {
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.65rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    margin-inline-end: 25px;
}

.logo i {
    color: var(--clr-primary);
    font-size: 1.8rem;
}

.logo [data-i18n-logo],
.logo [data-i18n-logo] span {
    color: var(--clr-primary);
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.logo-watermark {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--clr-primary) !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: var(--clr-primary) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
    opacity: 0.95;
}

.logo .logo-watermark i {
    font-size: 0.7rem !important;
    color: var(--clr-primary) !important;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    transition: var(--transition);
}

.nav-links a:not(.btn):hover {
    color: var(--clr-primary);
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1), transparent 50%);
    z-index: -1;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-logo-wrapper {
    position: relative;
    display: inline-block;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95); /* Extremely light background to ensure dark text is highly visible */
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 
                0 0 30px rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 25px;
    animation: logoFloat 6s ease-in-out infinite;
    z-index: 1;
}

/* Conic gradient border glow animation */
.hero-logo-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(6, 182, 212, 0.5), /* Cyan glow */
        rgba(59, 130, 246, 0.5), /* Blue glow */
        transparent 60%
    );
    animation: rotateGlow 4s linear infinite;
    z-index: -2;
    pointer-events: none;
}

/* White glass card interior mask */
.hero-logo-wrapper::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdfa 100%); /* Premium white to soft teal/cyan gradient background */
    border-radius: 21px;
    z-index: -1;
}

.hero-logo {
    position: relative;
    z-index: 2;
    display: block;
    height: 220px;
    width: auto;
    object-fit: contain;
    margin: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

/* Floating animation */
@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(6, 182, 212, 0.15);
    }
    50% {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 50px rgba(59, 130, 246, 0.35);
    }
}

/* Rotating glow animation */
@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Hover effects */
.hero-logo-wrapper:hover {
    transform: scale(1.03) translateY(-3px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45), 0 0 60px rgba(6, 182, 212, 0.5);
    border-color: rgba(6, 182, 212, 0.3);
}

.hero-logo-wrapper:hover .hero-logo {
    transform: scale(1.04);
}

.hero-text .badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--clr-secondary);
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-text h2 {
    font-size: 4rem;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-text .tagline {
    font-size: 1.6rem;
    font-family: var(--font-heading);
    color: var(--clr-primary);
    margin-bottom: 20px;
}

.hero-text .description {
    font-size: 1.1rem;
    color: var(--clr-text-muted);
    line-height: 1.8;
    margin-bottom: 35px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.image-frame {
    position: relative;
    width: 400px;
    height: 500px;
    border-radius: 30px;
    background: var(--gradient-brand);
    padding: 5px;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
    filter: brightness(0.9);
}

.floating-card {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 15px 25px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: float 4s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.5rem;
    color: var(--clr-primary);
}

.floating-card span {
    font-weight: 700;
    font-size: 1.1rem;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Honors Grid */
.honors {
    background: var(--clr-bg-alt);
}

.honors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.honor-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.honor-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.honor-card .icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--clr-primary);
    transition: var(--transition);
}

.honor-card:hover .icon-wrapper {
    background: var(--gradient-brand);
    color: white;
}

.honor-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.honor-card p {
    color: var(--clr-text-muted);
    line-height: 1.6;
}

/* Swiper Gallery */
.gallery-swiper {
    width: 100%;
    padding-bottom: 50px;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--clr-primary) !important;
}

.swiper-pagination-bullet {
    background: var(--clr-text-muted) !important;
}

.swiper-pagination-bullet-active {
    background: var(--clr-primary) !important;
}

/* News Section */
.news-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    transition: var(--transition);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.news-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-5px);
}

.news-date {
    display: inline-block;
    color: var(--clr-secondary);
    font-weight: bold;
    margin-bottom: 15px;
}

.news-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.news-card p {
    color: var(--clr-text-muted);
    line-height: 1.8;
    margin-bottom: 25px;
}

/* Services */
.services-wrapper {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.service-box {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--clr-bg-alt);
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.service-box.reverse {
    flex-direction: row-reverse;
}

.service-image {
    flex: 1;
    min-height: 400px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    flex: 1;
    padding: 40px;
}

.service-content h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--clr-text);
}

.service-content p {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.features {
    margin-bottom: 30px;
}

.features li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.features li i {
    color: var(--clr-secondary);
}

/* Products & SaaS */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--clr-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--clr-primary);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.15);
}

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-brand);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.product-info p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-price {
    color: var(--clr-secondary);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-price i {
    color: var(--clr-primary);
    font-size: 1rem;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
    flex: 1;
    text-align: center;
}

/* Portfolio & Case Studies */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.case-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
}

.case-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.case-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(9, 10, 15, 0.95) 0%, rgba(9, 10, 15, 0.8) 60%, transparent 100%);
    transform: translateY(30px);
    transition: var(--transition);
}

.case-card:hover img {
    transform: scale(1.1);
}

.case-card:hover .case-content {
    transform: translateY(0);
}

.case-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--clr-text);
}

.case-content p {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0;
    transition: var(--transition);
}

.case-card:hover .case-content p {
    opacity: 1;
}

.case-link {
    color: var(--clr-secondary);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.case-link:hover {
    color: var(--clr-primary);
}

/* Footer & Contact */
.footer {
    background: #050608;
    padding: 80px 0 20px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-info {
    flex: 1;
}

.footer-info h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-info p {
    color: var(--clr-text-muted);
    line-height: 1.8;
    margin-bottom: 30px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--clr-primary);
    transform: translateY(-3px);
}

.footer-form {
    flex: 1;
    background: var(--clr-bg-alt);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.footer-form h3 {
    margin-bottom: 25px;
}

.footer-form input,
.footer-form select,
.footer-form textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 10px;
    color: white;
    font-family: inherit;
    margin-bottom: 20px;
    outline: none;
    transition: var(--transition);
}

.footer-form input:focus,
.footer-form select:focus,
.footer-form textarea:focus {
    border-color: var(--clr-primary);
}

.copyrights {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* Spacing and scaling for medium screens (between tablet and large desktop) */
@media (max-width: 1250px) and (min-width: 969px) {
    .nav-links {
        gap: 15px;
    }
    .nav-links a {
        font-size: 0.95rem;
    }
    .logo {
        font-size: 1.4rem;
        margin-inline-end: 15px;
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-logo-wrapper {
        display: block;
        margin: 0 auto 25px;
        width: fit-content;
        max-width: 100%;
        padding: 12px;
        border-radius: 16px;
    }

    .hero-logo {
        height: 140px;
        display: block;
        margin: 0 auto;
    }

    .hero-text .description {
        margin: 0 auto 35px;
    }

    .hero-actions {
        justify-content: center;
        margin-bottom: 40px;
    }

    .service-box,
    .service-box.reverse {
        flex-direction: column;
    }

    .service-image {
        min-height: 250px;
    }

    .footer-content {
        flex-direction: column;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 5%;
        width: 90%;
        background: var(--clr-bg-alt);
        border: 1px solid var(--glass-border);
        border-radius: 15px;
        padding: 30px;
        gap: 20px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    }

    .hamburger {
        display: block;
    }
}

/* Multi-Page SPA Navigation */
.page-view {
    display: none;
    width: 100%;
}

.page-view.active-page {
    display: block;
    animation: fadeInUp 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Linear Continuous Marquees */
.honors-swiper, .certs-swiper {
    padding: 15px 0 25px !important;
    overflow: hidden;
}

.honors-swiper .swiper-wrapper,
.certs-swiper .swiper-wrapper {
    transition-timing-function: linear !important;
}

.honors-swiper .swiper-slide,
.certs-swiper .swiper-slide {
    width: 320px !important;
    height: 240px !important;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.honors-swiper .swiper-slide:hover,
.certs-swiper .swiper-slide:hover {
    transform: scale(1.03);
    border-color: var(--clr-primary);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.25);
}

.honors-swiper .swiper-slide img,
.certs-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0c0d14;
}

/* Inside Gallery Titles */
.gallery-title-inside {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Fullscreen Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(9, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.lightbox-content-container {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-modal.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--clr-primary);
    text-decoration: none;
}

.lightbox-caption {
    margin-top: 15px;
    color: #ccc;
    font-size: 1.1rem;
    text-align: center;
}

/* Navbar active link highlighting */
.nav-links a.active {
    color: var(--clr-primary);
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-brand);
    border-radius: 2px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
}

/* Global Watermark removed and placed above the logo name */

@media (max-width: 968px) {
    /* Mobile text spacing fixes */
    .section-header h2 {
        font-size: 1.8rem;
        line-height: 1.4;
    }
    
    .section {
        padding: 100px 0 100px;
    }

    /* Show Bottom Nav on Mobile */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(19, 21, 31, 0.95);
        backdrop-filter: blur(15px);
        border-top: 1px solid var(--glass-border);
        justify-content: space-around;
        padding: 12px 0 15px 0;
        z-index: 1000;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--clr-text-muted);
        font-size: 0.75rem;
        font-weight: 700;
        gap: 6px;
        transition: var(--transition);
        text-decoration: none;
    }
    
    .bottom-nav-item.active, .bottom-nav-item:hover {
        color: var(--clr-primary);
    }
    
    .bottom-nav-item i {
        font-size: 1.3rem;
    }
    
    body {
        padding-bottom: 75px;
    }
}

/* ==========================================
   Featured Case Study & LawMind AI Simulator
   ========================================== */
.featured-case-study {
    background: rgba(19, 21, 31, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 50px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.featured-header {
    margin-bottom: 35px;
    text-align: center;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--clr-secondary);
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.featured-badge i {
    color: #eab308; /* Star color */
}

.featured-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.featured-tagline {
    font-size: 1.2rem;
    color: var(--clr-text-muted);
    font-weight: 600;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: start;
}

/* Simulator Window Mockup */
.simulator-wrapper {
    width: 100%;
}

.simulator-window {
    background: #0d0e14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    height: 480px;
}

.simulator-title-bar {
    background: #151722;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.simulator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.simulator-dot.red { background-color: #ef4444; }
.simulator-dot.yellow { background-color: #f59e0b; }
.simulator-dot.green { background-color: #10b981; }

.simulator-app-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-left: 15px;
    margin-right: 15px;
    color: var(--clr-text);
}

.simulator-status-indicator {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--clr-text-muted);
}

html[dir="rtl"] .simulator-status-indicator {
    margin-left: unset;
    margin-right: auto;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.status-dot.pulsing {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.simulator-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
}

/* Chat Pane */
.simulator-chat-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    background: #0a0b10;
}

.simulator-chat-pane.active {
    opacity: 1;
    pointer-events: auto;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: messageFadeIn 0.3s ease forwards;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-start;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--clr-text);
    border-bottom-left-radius: 2px;
}

html[dir="rtl"] .chat-message.user {
    align-self: flex-start;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 2px;
}

.chat-message.ai {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--clr-text);
    border-bottom-right-radius: 2px;
    width: 100%;
}

html[dir="rtl"] .chat-message.ai {
    align-self: flex-end;
    border-bottom-right-radius: 14px;
    border-bottom-left-radius: 2px;
}

.chat-message.ai .ai-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--clr-secondary);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.chat-message.ai .ai-header i {
    font-size: 1rem;
}

.chat-message-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

.chat-message-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.chat-input-container {
    background: #11131c;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-input-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--clr-text-muted);
    display: flex;
    align-items: center;
    min-height: 40px;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.chat-input-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 95%;
    text-align: right;
}

html[dir="ltr"] .chat-input-text {
    text-align: left;
}

.chat-caret {
    font-weight: bold;
    color: var(--clr-primary);
    animation: caretBlink 1s step-end infinite;
}

@keyframes caretBlink {
    from, to { color: transparent }
    50% { color: var(--clr-primary) }
}

.chat-input-actions {
    display: flex;
    gap: 10px;
}

.chat-btn-clip, .chat-btn-send {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--clr-text-muted);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.chat-btn-send {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.3));
    border-color: rgba(234, 179, 8, 0.4);
    color: #eab308;
}

.chat-btn-clip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--clr-text);
}

.chat-btn-send.active {
    background: #eab308;
    color: #000;
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.4);
}

/* PDF Card inside chat */
.pdf-download-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--transition);
    animation: messageFadeIn 0.4s ease forwards;
}

.pdf-download-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
}

.pdf-icon-wrapper {
    font-size: 2.2rem;
    color: #ef4444; /* PDF Red */
}

.pdf-details {
    flex: 1;
}

.pdf-details h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--clr-text);
}

.pdf-details p {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
}

.pdf-browse-icon {
    font-size: 1.2rem;
    color: var(--clr-secondary);
}

/* PDF Viewer Pane */
.simulator-pdf-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #090a0f;
    display: flex;
    flex-direction: column;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.simulator-pdf-pane.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.pdf-header {
    background: #11131c;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pdf-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--clr-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-title i {
    color: #ef4444;
}

.pdf-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--clr-text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.pdf-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--clr-text);
}

.pdf-viewer-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #1b1d29;
}

.pdf-page-container {
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    transition: opacity 0.2s ease;
}

.pdf-page-container.loading {
    opacity: 0.3;
}

.pdf-page-container img {
    width: 100%;
    height: auto;
    display: block;
}

.pdf-footer-nav {
    background: #11131c;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.btn-sm-nav {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-page-indicator {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--clr-text);
    user-select: none;
}

/* Featured Info Column */
.featured-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.case-study-block {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
    border-left: 3px solid var(--clr-primary);
}

html[dir="rtl"] .case-study-block {
    border-left: none;
    border-right: 3px solid var(--clr-primary);
}

.case-study-block:nth-child(2) {
    border-left-color: var(--clr-secondary);
}
html[dir="rtl"] .case-study-block:nth-child(2) {
    border-right-color: var(--clr-secondary);
}

.case-study-block:nth-child(3) {
    border-left-color: var(--clr-accent);
}
html[dir="rtl"] .case-study-block:nth-child(3) {
    border-right-color: var(--clr-accent);
}

.block-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.block-title.problem { color: var(--clr-primary); }
.block-title.solution { color: var(--clr-secondary); }
.block-title.results { color: var(--clr-accent); }

.case-study-block p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.featured-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.ff-item {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ff-item i {
    font-size: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tags .tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--clr-text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.featured-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

/* Responsiveness for Simulator & Case Study */
@media (max-width: 968px) {
    .featured-case-study {
        padding: 25px 20px;
    }

    .featured-title {
        font-size: 1.8rem;
    }

    .featured-tagline {
        font-size: 1rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .simulator-window {
        height: 420px;
    }
}

/* ==========================================
   Project Details Modal Styles
   ========================================== */
.project-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1050;
    display: none; /* Controlled by JS toggle */
    align-items: center;
    justify-content: center;
}

.project-details-modal.active {
    display: flex;
}

.project-details-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 10, 15, 0.8);
    backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-details-modal.active .modal-backdrop {
    opacity: 1;
}

.project-details-modal .modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 950px;
    max-height: 85vh;
    background: var(--clr-bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(59, 130, 246, 0.1);
    z-index: 2;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
}

.project-details-modal.active .modal-wrapper {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.project-details-modal .modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--clr-text-muted);
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.project-details-modal .modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

/* Modal Header */
.modal-header-section {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.modal-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--clr-secondary);
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.modal-title {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.modal-price-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--clr-secondary);
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.05);
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid rgba(6, 182, 212, 0.15);
    width: fit-content;
}

.modal-price-box i {
    color: var(--clr-primary);
}

/* Modal Body Grid */
.modal-body-content {
    display: grid;
    grid-template-columns: 1.1fr 1.3fr;
    gap: 35px;
    margin-bottom: 30px;
}

/* Left Visual Column */
.modal-visual-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-image-wrapper {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    background: var(--clr-bg);
}

.modal-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    max-height: 280px;
}

/* Right Info Column */
.modal-info-column {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.modal-info-block h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-info-block.problem h4 {
    color: #f97316; /* Orange */
}

.modal-info-block.solution h4 {
    color: var(--clr-secondary); /* Cyan */
}

.modal-info-block.results h4 {
    color: var(--clr-primary); /* Blue */
}

.modal-info-block.features h4 {
    color: var(--clr-accent); /* Purple */
}

.modal-info-block p {
    color: var(--clr-text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.modal-info-block ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-info-block ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--clr-text);
}

.modal-info-block ul li i {
    color: var(--clr-secondary);
    margin-top: 4px;
    font-size: 0.85rem;
}

/* Modal Footer */
.modal-footer-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.modal-footer-actions .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* Custom pricing styling for standard cards */
.service-price, .product-price {
    font-weight: 700;
    color: var(--clr-secondary);
    font-size: 0.95rem;
    margin-top: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-price i, .product-price i {
    color: var(--clr-primary);
}

/* RTL Adjustments for modal close button */
html[lang="ar"] .project-details-modal .modal-close-btn {
    right: auto;
    left: 20px;
}

/* Responsiveness */
@media (max-width: 768px) {
    .modal-body-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .modal-footer-actions {
        flex-direction: column;
    }
    .modal-footer-actions .btn {
        width: 100%;
        text-align: center;
    }
    .modal-title {
        font-size: 1.8rem;
    }
    .project-details-modal .modal-wrapper {
        padding: 25px 20px;
        width: 95%;
    }
}

/* ==========================================
   Interactive Simulators for Project Modal
   ========================================== */
.modal-simulator-wrapper {
    width: 100%;
    margin-bottom: 10px;
}

.modal-simulator-wrapper .simulator-window {
    height: 320px; /* Compact height for modal visual column */
    border-radius: 14px;
}

/* 1. CIPT Exam Simulator Styles */
.sim-cipt-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.sim-q-header {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--clr-text);
}
.sim-q-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sim-choice-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sim-choice-item.hovered {
    background: rgba(6, 182, 212, 0.1);
    border-color: var(--clr-secondary);
}
.sim-choice-item.selected {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}
.sim-choice-item i {
    opacity: 0;
    transition: opacity 0.2s ease;
}
.sim-choice-item.selected i {
    opacity: 1;
}
.sim-cursor {
    position: absolute;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M4.5 2.25l15 15-6.75 2.25-3 5.25L4.5 2.25z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 100;
    transition: transform 1.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translate(250px, 200px);
}
.sim-cipt-result {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 20, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
}
.sim-cipt-result.show {
    transform: translateY(0);
}
.sim-score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid #10b981;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #10b981;
    animation: scaleIn 0.5s ease forwards;
}

/* 2. Carbon Calculator Simulator Styles */
.sim-carbon-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    position: relative;
}
.sim-carbon-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.sim-carbon-field {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
}
.sim-carbon-field label {
    display: block;
    color: var(--clr-text-muted);
    margin-bottom: 4px;
    font-size: 0.7rem;
}
.sim-carbon-val {
    font-weight: 700;
    color: var(--clr-text);
    min-height: 18px;
}
.sim-carbon-btn {
    grid-column: span 2;
    background: var(--gradient-brand);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
}
.sim-carbon-btn.active {
    filter: brightness(1.2);
}
.sim-carbon-results {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 20, 0.95);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    transform: translateX(100%);
    transition: transform 0.5s ease;
}
.sim-carbon-results.show {
    transform: translateX(0);
}
.sim-chart-flex {
    display: flex;
    align-items: center;
    gap: 20px;
}
.sim-chart-ring {
    position: relative;
    width: 80px;
    height: 80px;
}
.sim-chart-svg {
    transform: rotate(-90deg);
}
.sim-chart-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}
.sim-chart-fill {
    fill: none;
    stroke: var(--clr-secondary);
    stroke-width: 8;
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    transition: stroke-dashoffset 1.5s ease;
}
.sim-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--clr-secondary);
}
.sim-recommendations {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #a7f3d0;
}

/* 3. Student Results Simulator Styles */
.sim-results-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    position: relative;
}
.sim-search-bar {
    display: flex;
    gap: 8px;
}
.sim-search-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: white;
}
.sim-search-btn {
    background: var(--clr-primary);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
}
.sim-search-btn.active {
    background: var(--clr-secondary);
}
.sim-results-table-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 20, 0.95);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    overflow-y: auto;
}
.sim-results-table-box.show {
    transform: translateY(0);
}
.sim-student-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
    margin-bottom: 4px;
}
.sim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.sim-table th, .sim-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
html[dir="rtl"] .sim-table th, html[dir="rtl"] .sim-table td {
    text-align: right;
}
.sim-table tr.total-row {
    font-weight: 800;
    color: var(--clr-secondary);
    background: rgba(6, 182, 212, 0.05);
}

/* 4. Flashcards Game Simulator Styles */
.sim-flashcards-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    align-items: center;
}
.sim-cards-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
}
.sim-card-scene {
    width: 120px;
    height: 150px;
    perspective: 600px;
}
.sim-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}
.sim-card-inner.flipped {
    transform: rotateY(180deg);
}
.sim-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.sim-card-face span {
    pointer-events: none;
}
.sim-card-front {
    background: linear-gradient(135deg, #1e1b4b, #311042);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--clr-secondary);
}
.sim-card-front i {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--clr-secondary);
}
.sim-card-back {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 2px solid var(--clr-accent);
    color: white;
    transform: rotateY(180deg);
    font-size: 0.8rem;
    font-weight: bold;
}
.sim-card-inner.matched .sim-card-back {
    border-color: #10b981;
    background: linear-gradient(135deg, #064e3b, #022c22);
}
.sim-score-hud {
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 5. Medical Clinic ERP Simulator Styles */
.sim-medical-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    position: relative;
}
.sim-medical-form {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 8px;
}
.sim-med-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sim-med-field label {
    font-size: 0.7rem;
    color: var(--clr-text-muted);
}
.sim-med-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    color: white;
    min-height: 28px;
}
.sim-rx-paper {
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 100%;
    background: white;
    color: #1e293b;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 10;
}
.sim-rx-paper.print {
    transform: translateY(15px);
}
.sim-rx-header {
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
}
.sim-rx-body {
    flex: 1;
    padding-top: 10px;
    font-size: 0.75rem;
}
.sim-rx-symbol {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3b82f6;
    margin-bottom: 4px;
}

/* 6. Medical RIS Scanner Simulator Styles */
.sim-ris-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}
.sim-scan-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 12px;
    flex: 1;
    align-items: center;
}
.sim-scan-monitor {
    position: relative;
    background: black;
    border: 2px solid #334155;
    border-radius: 8px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.sim-scan-img {
    max-width: 90%;
    max-height: 90%;
    opacity: 0.1;
    transition: opacity 1.5s ease;
}
.sim-scan-img.scanned {
    opacity: 0.9;
}
.sim-laser-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    background: #06b6d4;
    box-shadow: 0 0 8px #06b6d4;
    animation: laserScan 2s linear infinite;
    display: none;
}
.sim-laser-line.active {
    display: block;
}
.sim-ris-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.75rem;
}
.sim-ris-report {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
    font-size: 0.7rem;
    color: var(--clr-text-muted);
    min-height: 80px;
    white-space: pre-line;
}
@keyframes laserScan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

/* 7. Wedding Invitation Card Simulator Styles */
.sim-wedding-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.sim-envelope {
    width: 160px;
    height: 120px;
    background: #47112b;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-top: 15px;
}
.sim-envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-top: 60px solid #63193e;
    transform-origin: top;
    transition: transform 0.5s ease;
    z-index: 3;
}
.sim-envelope.open .sim-envelope-flap {
    transform: rotateX(180deg);
}
.sim-wedding-letter {
    position: absolute;
    width: 140px;
    height: 100px;
    background: #fdfaf6;
    color: #63193e;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.55rem;
    text-align: center;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateY(0);
}
.sim-envelope.open .sim-wedding-letter {
    transform: translateY(-50px) scale(1.05);
    z-index: 4;
}
.sim-wave-eq {
    display: flex;
    gap: 3px;
    height: 20px;
    align-items: flex-end;
}
.sim-wave-bar {
    width: 3px;
    background: var(--clr-accent);
    height: 3px;
    animation: bounceEq 0.8s ease infinite alternate;
}
.sim-wave-bar:nth-child(2) { animation-delay: 0.15s; }
.sim-wave-bar:nth-child(3) { animation-delay: 0.3s; }
.sim-wave-bar:nth-child(4) { animation-delay: 0.45s; }
.sim-wave-bar:nth-child(5) { animation-delay: 0.1s; }

@keyframes bounceEq {
    0% { height: 3px; }
    100% { height: 20px; }
}

.sim-wedding-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    display: none;
}
.sim-wedding-hearts.active {
    display: block;
}
.sim-falling-heart {
    position: absolute;
    color: #e11d48;
    font-size: 1.2rem;
    animation: heartFall 1.5s linear forwards;
}
@keyframes heartFall {
    0% { transform: translateY(-20px) scale(0); opacity: 0; }
    20% { transform: translateY(0) scale(1); opacity: 0.8; }
    100% { transform: translateY(180px) scale(0.6); opacity: 0; }
}

/* 8. LawMind AI Simulator Modal Styles */
.sim-lawmind-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}
.sim-lm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sim-lm-input-container {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.01);
}
.sim-lm-input-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
    font-size: 0.75rem;
    color: var(--clr-text-muted);
    min-height: 32px;
}

/* Common scale in keyframe */
@keyframes scaleIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}