/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e8eaed;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 0.05em;
    position: relative;
    transition: all 0.3s ease;
    margin: 0;
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e4761b, #d4651a);
    transition: width 0.3s ease;
}

.logo h1:hover {
    color: #1a1a1a;
}

.logo h1:hover::after {
    width: 100%;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #e4761b;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

.current-lang {
    background: transparent;
    border: 1px solid #e8eaed;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.current-lang:hover {
    border-color: #e4761b;
    color: #e4761b;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.language-selector:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 0.875rem;
}

.language-dropdown button:hover {
    background-color: #f8f9fa;
    color: #e4761b;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    margin-top: 80px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.svg') center center / cover no-repeat;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
    z-index: -1;
}

/* Floating Data Particles */
.hero::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 15%;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow:
        15px 25px 0 rgba(255, 255, 255, 0.4),
        30px 5px 0 rgba(255, 255, 255, 0.3),
        45px 35px 0 rgba(255, 255, 255, 0.5),
        60px 15px 0 rgba(255, 255, 255, 0.2),
        75px 45px 0 rgba(255, 255, 255, 0.4);
    animation: float 8s ease-in-out infinite reverse;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 20%;
    left: 20%;
    width: 3px;
    height: 3px;
    background: rgba(228, 118, 27, 0.8);
    border-radius: 50%;
    box-shadow:
        25px -20px 0 rgba(228, 118, 27, 0.6),
        50px 10px 0 rgba(228, 118, 27, 0.4),
        75px -30px 0 rgba(228, 118, 27, 0.7),
        100px 5px 0 rgba(228, 118, 27, 0.3);
    animation: float 10s ease-in-out infinite, pulse 3s ease-in-out infinite;
    z-index: 0;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1.2s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInFromLeft 1s ease-out 0.3s both;
    position: relative;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e4761b, transparent);
    animation: typewriter 2s ease-out 1.5s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-weight: 400;
}

.hero-subtitle p {
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out both;
}

.hero-subtitle p:nth-child(1) { animation-delay: 0.8s; }
.hero-subtitle p:nth-child(2) { animation-delay: 1.0s; }
.hero-subtitle p:nth-child(3) { animation-delay: 1.2s; }
.hero-subtitle p:nth-child(4) { animation-delay: 1.4s; }
.hero-subtitle p:nth-child(5) { animation-delay: 1.6s; }

.hero-subtitle p:last-child,
.hero-finale {
    font-weight: 400;
    color: #ffffff;
    font-size: 1.4rem;
    margin-top: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideInFromRight 1s ease-out 1.8s both;
    letter-spacing: 0.02em;
    line-height: 1.6;
}

/* Extra block inserted under hero subtitle */
.hero-extra {
    margin-top: 2.5rem;
}

.hero-extra h2 {
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-extra .highlight {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.6;
}

.hero-extra .cta-button {
    margin-top: 1.5rem;
}

.hero-finale::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 20px;
    background:
        radial-gradient(ellipse 8px 3px at 15% 50%, rgba(228, 118, 27, 0.8) 0%, transparent 70%),
        radial-gradient(ellipse 6px 2px at 35% 30%, rgba(228, 118, 27, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 10px 4px at 55% 70%, rgba(228, 118, 27, 0.7) 0%, transparent 70%),
        radial-gradient(ellipse 5px 2px at 75% 40%, rgba(228, 118, 27, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 7px 3px at 90% 60%, rgba(228, 118, 27, 0.6) 0%, transparent 70%);
    opacity: 0;
    animation: waveFlow 3s ease-in-out 2.5s both;
    filter: blur(0.5px);
}

.hero-finale::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 20px;
    background:
        radial-gradient(ellipse 6px 2px at 25% 80%, rgba(243, 156, 18, 0.4) 0%, transparent 70%),
        radial-gradient(ellipse 8px 3px at 45% 20%, rgba(243, 156, 18, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 5px 2px at 65% 90%, rgba(243, 156, 18, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 9px 4px at 85% 30%, rgba(243, 156, 18, 0.4) 0%, transparent 70%);
    opacity: 0;
    animation: waveFlow 3s ease-in-out 3.2s both, gentleFloat 4s ease-in-out 6s infinite;
    filter: blur(0.8px);
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #e4761b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 2.75rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.25rem;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Solutions Section */
.solutions {
    padding: 6rem 0;
    background: #ffffff;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 3rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.solution-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    border-color: #e4761b;
}

.solution-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.solution-card p {
    color: #4a5568;
    line-height: 1.7;
    font-size: 1.125rem;
    flex-grow: 1;
}

/* Insights Section */
.insights {
    padding: 6rem 0;
    background: #f8f9fa;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.insight-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.insight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.insight-card.featured {
    background: #ffffff;
    border: 1px solid #e8eaed;
    color: #1a1a1a;
    min-height: 320px;
}

.insight-card.featured h3 {
    color: #1a1a1a;
}

.insight-card.featured p {
    color: #4a5568;
}

.insight-card.featured .card-link {
    color: #e4761b;
    font-weight: 600;
}

.insight-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.insight-card p {
    color: #4a5568;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.7;
    flex-grow: 1;
}

.insight-card .card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.insight-card .card-content p {
    flex-grow: 1;
    margin-bottom: 2rem;
}

.card-link {
    color: #e4761b;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e4761b;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.3s ease;
    margin-top: auto;
    background: transparent;
}

.card-link:hover {
    background: #e4761b;
    color: white !important;
    transform: translateY(-2px);
    text-decoration: none;
}

/* About Section */
.about {
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.philosophy-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.philosophy-text h2 {
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.philosophy-text .highlight {
    font-size: 1.75rem;
    font-weight: 600;
    color: #e4761b;
    line-height: 1.4;
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #e4761b;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #d4651a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(228, 118, 27, 0.3);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #a0a0a0;
    padding: 3rem 0;
}

.footer-disclaimer {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-legal {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Advanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes heroGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(228, 118, 27, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(228, 118, 27, 0.6);
    }
}

@keyframes dataFlow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}



@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

@keyframes waveFlow {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.8);
    }
    30% {
        opacity: 0.8;
        transform: translateX(0) scale(1);
    }
    70% {
        opacity: 0.6;
        transform: translateX(10px) scale(1.1);
    }
    100% {
        opacity: 0.3;
        transform: translateX(20px) scale(0.9);
    }
}

@keyframes gentleFloat {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(20px) scale(0.9) translateY(0);
    }
    25% {
        opacity: 0.5;
        transform: translateX(15px) scale(1) translateY(-2px);
    }
    50% {
        opacity: 0.2;
        transform: translateX(25px) scale(1.05) translateY(0);
    }
    75% {
        opacity: 0.4;
        transform: translateX(18px) scale(0.95) translateY(1px);
    }
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.solution-card,
.insight-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.solution-card:nth-child(1) { animation-delay: 0.1s; }
.solution-card:nth-child(2) { animation-delay: 0.2s; }
.solution-card:nth-child(3) { animation-delay: 0.3s; }

.insight-card:nth-child(1) { animation-delay: 0.1s; }
.insight-card:nth-child(2) { animation-delay: 0.2s; }
.insight-card:nth-child(3) { animation-delay: 0.3s; }

/* Enhanced hover effects */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-content {
        padding: 0.75rem 0;
    }

    .hero {
        padding: 6rem 0 4rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* RTL Support for Arabic */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .container {
    direction: rtl;
}

/* Header RTL adjustments */
html[dir="rtl"] .header-content {
    flex-direction: row-reverse;
    justify-content: space-between;
}

html[dir="rtl"] .logo {
    order: 3;
    margin-left: auto;
    margin-right: 0;
    align-items: flex-end;
}

html[dir="rtl"] .logo-subtitle {
    text-align: right;
}

html[dir="rtl"] .nav {
    order: 2;
    margin-right: 0;
    margin-left: 0;
    flex: 1;
    display: flex;
    justify-content: center;
}

html[dir="rtl"] .nav ul {
    flex-direction: row-reverse;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

html[dir="rtl"] .nav li {
    margin-left: 0;
    margin-right: 0;
}

html[dir="rtl"] .nav li:first-child {
    margin-right: 0;
}

html[dir="rtl"] .nav li:last-child {
    margin-left: 0;
}

html[dir="rtl"] .language-selector {
    order: 1;
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
    text-align: right;
}

html[dir="rtl"] .language-dropdown button {
    text-align: right;
    direction: rtl;
}

/* Content RTL adjustments */
html[dir="rtl"] .hero-content {
    text-align: right;
}

html[dir="rtl"] .hero-title {
    text-align: right;
}

html[dir="rtl"] .hero-subtitle {
    text-align: right;
}

html[dir="rtl"] .section-header {
    text-align: right;
}

html[dir="rtl"] .section-label {
    text-align: right;
}

html[dir="rtl"] .section-title {
    text-align: right;
}

html[dir="rtl"] .section-subtitle {
    text-align: right;
}

html[dir="rtl"] .solutions-grid,
html[dir="rtl"] .insights-grid {
    direction: rtl;
}

html[dir="rtl"] .solution-card,
html[dir="rtl"] .insight-card {
    text-align: right;
}

html[dir="rtl"] .card-content {
    text-align: right;
}

html[dir="rtl"] .card-content h3 {
    text-align: right;
}

html[dir="rtl"] .card-content p {
    text-align: right;
}

html[dir="rtl"] .card-content a {
    text-align: right;
}

html[dir="rtl"] .philosophy-content {
    text-align: right;
}

html[dir="rtl"] .philosophy-content h2 {
    text-align: right;
}

html[dir="rtl"] .philosophy-content p {
    text-align: right;
}

html[dir="rtl"] .cta-content {
    text-align: right;
}

html[dir="rtl"] .cta-content h2 {
    text-align: right;
}

html[dir="rtl"] .cta-content p {
    text-align: right;
}

html[dir="rtl"] .cta-button {
    text-align: center;
}

html[dir="rtl"] .footer-content {
    text-align: right;
}

html[dir="rtl"] .footer-disclaimer {
    text-align: right;
}

html[dir="rtl"] .footer-disclaimer p {
    text-align: right;
}

html[dir="rtl"] .footer-legal {
    text-align: right;
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 3rem;
        min-height: 80vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .solutions-grid,
    .insights-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav {
        display: none;
    }

    .language-selector {
        margin-left: auto;
    }

    /* RTL Mobile Support */
    html[dir="rtl"] .header-content {
        flex-direction: row-reverse;
        justify-content: space-between;
    }

    html[dir="rtl"] .logo {
        order: 2;
        margin-left: 0;
        margin-right: 0;
    }

    html[dir="rtl"] .language-selector {
        order: 1;
        margin-left: 0;
        margin-right: 0;
    }

    html[dir="rtl"] .nav {
        order: 3;
        margin-left: 0;
        margin-right: 0;
    }

    html[dir="rtl"] .hero-content {
        text-align: right;
    }

    html[dir="rtl"] .section-header {
        text-align: right;
    }

    .solution-card,
    .insight-card {
        padding: 2rem 1.5rem;
    }

    .cta h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* Hide navigation on very narrow screens */
    .nav,
    html[dir="rtl"] .nav {
        display: none !important;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-subtitle p:last-child {
        font-size: 1.125rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .solution-card,
    .insight-card {
        padding: 1.5rem;
    }

    /* RTL Mobile Support for very narrow screens */
    html[dir="rtl"] .header-content {
        flex-direction: row-reverse;
        justify-content: space-between;
        align-items: center;
    }

    html[dir="rtl"] .logo {
        order: 2;
        margin-left: 0;
        margin-right: 0;
        flex-shrink: 0;
        align-items: flex-end;
    }

    html[dir="rtl"] .logo-subtitle {
        text-align: right;
    }

    html[dir="rtl"] .language-selector {
        order: 1;
        margin-left: 0;
        margin-right: 0;
        flex-shrink: 0;
    }

    /* Ensure proper spacing on very narrow screens */
    .header-content {
        padding: 0.5rem 0;
        gap: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-subtitle {
        font-size: 0.65rem;
        margin-bottom: 0.15rem;
    }

    .language-selector {
        font-size: 0.875rem;
    }
}
