/* Global Design System & Visual Identity */

:root {
    --base-black: #000000;
    --surface-black: #0A0A0A;
    --brand-purple: #5A2DA0;
    --tech-cyan: #49D1D3;
    --neon-green: #39FF14;
    --muted-gray: #9CA3AF;
    --fluid-h1: clamp(2rem, 8vw, 4.5rem);
    --fluid-h2: clamp(1.75rem, 6vw, 3.5rem);
    --fluid-h3: clamp(1.25rem, 4vw, 2.5rem);
    --fluid-p: clamp(0.85rem, 2vw, 1.1rem);
    --section-pad: clamp(3rem, 10vw, 8rem);
}

/* Base Body Styles */
body {
    background: #000000;
    color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.7;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(90, 45, 160, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(73, 209, 211, 0.05) 0%, transparent 40%);
    overflow-x: hidden;
}

/* Typography & Layout Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

html[lang="ar"] .hero-title {
    font-family: 'Cairo', sans-serif !important;
    line-height: 1.8 !important;
}

.hero-title {
    font-size: var(--fluid-h1) !important;
    line-height: 1.1 !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #FFF 60%, rgba(255,255,255,0.4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(73, 209, 211, 0.2));
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: var(--fluid-p) !important;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #CBD5E1;
    line-height: 1.8;
}

/* Floating Header Refinement */
#global-header.scrolled {
    background: rgba(10, 10, 10, 0.7) !important;
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: 1rem 2rem;
    border-radius: 1.5rem;
    width: calc(100% - 4rem);
    top: 0;
}

/* Professional Shared Card Style - The AI Agent Breathing Effect */
.shared-card, .sector-card, .pricing-card, .bento-card {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 5;
    overflow: hidden;
    animation: agentBreathing 4s ease-in-out infinite;
}

@keyframes agentBreathing {
    0%, 100% { 
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.02);
    }
    50% { 
        border-color: rgba(255, 255, 255, 0.25);
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.06);
    }
}

/* Specific Breathing for Purple/Pro elements */
@keyframes agentBreathingPurple {
    0%, 100% { 
        border-color: rgba(90, 45, 160, 0.3);
        box-shadow: 0 0 20px rgba(90, 45, 160, 0.1);
    }
    50% { 
        border-color: rgba(90, 45, 160, 0.7);
        box-shadow: 0 0 40px rgba(90, 45, 160, 0.25);
    }
}

.shared-card, .sector-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
}

.shared-card:hover, .sector-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--tech-cyan);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(73, 209, 211, 0.15);
    animation-play-state: paused;
}

.shared-icon-wrapper, .sector-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: rgba(73, 209, 211, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--tech-cyan);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.shared-card:hover .shared-icon-wrapper, .sector-card:hover .sector-icon {
    background: var(--tech-cyan);
    color: black;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 30px rgba(73, 209, 211, 0.3);
}

/* Shared Card Responsive Overrides */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .shared-card {
        aspect-ratio: 1 / 1; 
        justify-content: center;
        padding: 1.25rem;
    }
    .shared-card p {
        font-size: 0.85rem !important;
        -webkit-line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .shared-icon-wrapper {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.25rem !important;
    }
}

@media (min-width: 768px) {
    .shared-card {
        border-radius: 2rem;
        padding: 3rem 2rem;
        justify-content: center;
        height: 100% !important;
    }
    .shared-icon-wrapper {
        width: 90px;
        height: 90px;
        font-size: 2.8rem;
        border-radius: 2rem;
    }
    .sector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .sector-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.sector-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.sector-card p {
    color: #A0A0A0;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .sector-card h4 { font-size: 1.25rem; }
    .sector-card p { font-size: 0.9rem; }
}

/* Integrations Marquee - Infinite Loop */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 1.5rem 0;
}

.marquee-content {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: marquee 30s linear infinite;
}

/* Trust Strip Scrolling */
.animate-scroll {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: marquee 40s linear infinite;
}

[dir="rtl"] .animate-scroll,
[dir="rtl"] .marquee-content {
    animation: marqueeRTL 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marqueeRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.marquee-item {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .marquee-content { gap: 2.5rem; }
    .marquee-item { width: 110px; height: 110px; font-size: 3rem; }
    .animate-scroll { gap: 5rem; }
}

/* Global Grid Fixes */
@media (max-width: 768px) {
    .grid { align-items: start !important; }
    section { padding-top: var(--section-pad) !important; padding-bottom: var(--section-pad) !important; }
    .grid-cols-2:not(.bento-grid):not(.sector-grid), 
    .grid-cols-3:not(.bento-grid):not(.sector-grid), 
    .grid-cols-4:not(.bento-grid):not(.sector-grid) {
        grid-template-columns: 1fr !important;
    }
}

/* Feature Badge */
.stat-badge {
    background: rgba(73, 209, 211, 0.05);
    color: var(--tech-cyan);
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.6rem;
    font-weight: 700;
    border: 1px solid rgba(73, 209, 211, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(5px);
}

.stat-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--tech-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }

/* Modern Mega Menu */
.mega-menu {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: grid;
    position: absolute;
    top: 100%;
    right: 0;
}

.group:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.menu-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.menu-item:hover { background: rgba(255, 255, 255, 0.03); transform: translateX(5px); }
[dir="rtl"] .menu-item:hover { transform: translateX(-5px); }

/* Pricing Cards Original Style */
.pricing-card {
    background: rgba(10, 10, 10, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    position: relative;
    overflow: hidden;
    animation: agentBreathing 4s ease-in-out infinite;
}

.pricing-card:hover {
    border-color: var(--tech-cyan);
    transform: translateY(-10px);
}

/* Pricing Badge Expert Overrides */
.pricing-card-pro {
    border: 2px solid var(--brand-purple) !important;
    background: rgba(90, 45, 160, 0.12) !important;
    animation: agentBreathingPurple 4s ease-in-out infinite !important;
    margin-top: 40px !important;
    overflow: visible !important;
}

.badge-float-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--brand-purple), #7c3aed);
    color: white;
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    z-index: 40;
    box-shadow: 0 10px 30px rgba(90, 45, 160, 0.6);
    border: 2px solid var(--tech-cyan);
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.badge-float-save {
    position: absolute;
    top: -20px;
    right: 15px;
    background: var(--neon-green);
    color: var(--base-black);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 900;
    z-index: 50;
    border: 2px solid var(--base-black);
    box-shadow: 0 5px 15px rgba(57, 255, 20, 0.4);
    white-space: nowrap;
    transform: rotate(5deg);
}

@media (max-width: 768px) {
    .pricing-card-pro { margin-top: 50px !important; }
    .badge-float-top { font-size: 11px; padding: 8px 18px; }
    .badge-float-save { font-size: 9px; top: -18px; right: 10px; }
}

/* Vertical Marquee System for Sectors - Professional Tier */
.vertical-marquee-container {
    height: 700px; /* Adjust height based on needs */
    overflow: hidden;
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

.marquee-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    will-change: transform;
}

.marquee-column-up {
    animation: marqueeVerticalUp 40s linear infinite;
}

.marquee-column-down {
    animation: marqueeVerticalDown 40s linear infinite;
}

.marquee-column:hover {
    animation-play-state: paused;
}

@keyframes marqueeVerticalUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes marqueeVerticalDown {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(0); }
}

/* Simplified Sector Card - Expert Design */
.bento-card-minimal {
    background: rgba(15, 15, 15, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    min-height: 200px; /* Reduced for vertical flow */
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    animation: agentBreathing 4s ease-in-out infinite;
}

.bento-card-minimal:hover {
    border-color: var(--tech-cyan);
    background: rgba(20, 20, 20, 0.7);
    transform: scale(1.02);
}

.bento-card-minimal i {
    font-size: 2.2rem;
    color: var(--tech-cyan);
    margin-bottom: 1.25rem;
    transition: transform 0.5s ease;
}

.bento-card-minimal h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

@media (max-width: 768px) {
    .vertical-marquee-container {
        height: 500px;
        grid-template-columns: repeat(2, 1fr) !important; /* Force two columns on mobile */
        gap: 0.75rem;
    }
    .marquee-column { gap: 0.75rem; }
    .marquee-column-down { display: flex !important; } /* Force show on mobile */
    .bento-card-minimal {
        min-height: 140px;
        padding: 1rem;
        border-radius: 1.25rem;
    }
    .bento-card-minimal i { font-size: 1.5rem; margin-bottom: 0.75rem; }
    .bento-card-minimal h4 { font-size: 0.85rem; }
}

/* Custom Animations for Icons */
/* Neural Grid Background - Expert Design */
#neural-canvas {
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(73, 209, 211, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(73, 209, 211, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black, transparent 85%);
    pointer-events: none;
    z-index: 1;
    animation: gridMovement 20s linear infinite;
}

@keyframes gridMovement {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* AI Scanning Line */
.hero-grid-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--tech-cyan), transparent);
    opacity: 0.3;
    animation: scanning 4s linear infinite;
}

@keyframes scanning {
    0% { top: 0; opacity: 0; }
    50% { opacity: 0.5; }
    100% { top: 100%; opacity: 0; }
}

.hero-glow-sphere {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(90, 45, 160, 0.2) 0%, transparent 70%);
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
    animation: pulseGlow 10s ease-in-out infinite;
}

/* Architecture Table Style */
.arch-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
}

.arch-table th {
    padding: 1.5rem;
    text-align: right;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.arch-table td {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.arch-table tr td:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 1rem 1rem 0;
}

.arch-table tr td:last-child {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem 0 0 1rem;
}

.arch-table tr:hover td {
    background: rgba(73, 209, 211, 0.08);
    border-color: rgba(73, 209, 211, 0.2);
    color: white;
}

@media (max-width: 768px) {
    .arch-table thead { display: none; }
    .arch-table td { 
        display: block; 
        text-align: center !important; 
        padding: 1rem; 
        border: none !important;
        border-radius: 0 !important;
    }
    .arch-table tr {
        display: block;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 1.5rem;
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    .arch-table td:first-child { font-size: 1.25rem; color: var(--tech-cyan); font-weight: 800; }
}

/* Glowing Glass CTA Card */
.cta-glass-card {
    background: rgba(10, 10, 10, 0.6) !important;
    backdrop-filter: blur(25px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7),
        0 0 40px rgba(73, 209, 211, 0.1),
        0 0 80px rgba(90, 45, 160, 0.05);
    transition: all 0.5s ease;
}

.cta-glass-card:hover {
    border-color: rgba(73, 209, 211, 0.4) !important;
    box-shadow: 
        0 30px 60px -12px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(73, 209, 211, 0.2),
        0 0 100px rgba(90, 45, 160, 0.1);
    transform: translateY(-5px);
}

.cta-glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(90, 45, 160, 0.2) 0%, transparent 50%, rgba(73, 209, 211, 0.2) 100%);
    pointer-events: none;
    z-index: 0;
}

.cta-glass-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--brand-purple), transparent, var(--tech-cyan), transparent);
    animation: rotateGlow 15s linear infinite;
    opacity: 0.15;
    pointer-events: none;
    z-index: -1;
}

.cta-glass-card > * {
    position: relative;
    z-index: 1;
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Calendar Styling Refinement */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day:hover:not(.empty):not(.disabled) {
    background: rgba(73, 209, 211, 0.15);
    border-color: rgba(73, 209, 211, 0.4);
    color: var(--tech-cyan);
    transform: translateY(-2px);
}

.calendar-day.selected {
    background: var(--tech-cyan) !important;
    color: var(--void-black) !important;
    font-weight: 800;
    box-shadow: 0 0 20px rgba(73, 209, 211, 0.5);
    border-color: var(--tech-cyan);
}

.calendar-day.today {
    border: 2px solid var(--brand-purple);
    color: var(--brand-purple);
    font-weight: 800;
}

.calendar-day.disabled {
    opacity: 0.2;
    cursor: not-allowed;
    background: transparent;
}

.calendar-day.empty { 
    cursor: default;
    background: transparent;
    border: none;
}

.time-slot {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-slot:hover {
    background: rgba(73, 209, 211, 0.1);
    border-color: var(--tech-cyan);
    color: var(--tech-cyan);
    transform: scale(1.02);
}

.time-slot.selected {
    background: var(--tech-cyan);
    color: var(--void-black);
    border-color: var(--tech-cyan);
    font-weight: 800;
    box-shadow: 0 0 15px rgba(73, 209, 211, 0.3);
}

@media (max-width: 480px) {
    .calendar-grid { gap: 6px; }
    .calendar-day { font-size: 0.8rem; border-radius: 10px; }
}

/* Featured Sector Image Template */
.sector-featured-image-wrapper {
    position: relative;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 40px 100px -20px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(73, 209, 211, 0.1);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: visible;
}

.sector-featured-image-wrapper:hover {
    transform: translateY(-10px) scale(1.01);
    border-color: rgba(73, 209, 211, 0.3);
    box-shadow: 
        0 60px 120px -20px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(73, 209, 211, 0.2),
        0 0 100px rgba(90, 45, 160, 0.1);
}

.sector-featured-image-wrapper img {
    border-radius: 2rem;
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: all 0.6s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-floating-tag {
    position: absolute;
    top: -15px;
    right: -15px;
    background: linear-gradient(135deg, var(--brand-purple), #7c3aed);
    color: white;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(90, 45, 160, 0.5);
    border: 1px solid var(--tech-cyan);
    z-index: 20;
    animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
}

@media (max-width: 768px) {
    .sector-featured-image-wrapper { padding: 0.75rem; border-radius: 2rem; }
    .sector-featured-image-wrapper img { border-radius: 1.5rem; }
    .ai-floating-tag { font-size: 10px; padding: 6px 15px; top: -10px; right: -10px; }
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}
