/* ============================================
   COMMON.CSS - Shared Styles for All Pages
   ============================================ */

:root {
    --primary-color: #008080;
    --secondary-color: #006b6b;
    --accent-color: #199a8e;
    --accent-transparent: rgba(25, 154, 142, 0.6);
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-light: #f8f9fa;
    --background-white: #ffffff;
    --border-color: #e0e6ea;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-bg-strong: rgba(255, 255, 255, 0.45);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    --glass-blur: blur(12px);
    --transition-fast: all 0.3s ease;
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Almarai', sans-serif;
    margin: 0;
    padding: 0;
    background: #ffffff;
    color: var(--text-dark);
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    transition: all 0.3s ease;
    min-height: 100vh;
}

html[lang="en"] body {
    font-family: 'Inter', sans-serif;
    direction: ltr;
    text-align: left;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

html[lang="en"] h1::after {
    right: unset;
    left: 0;
}

h2 {
    font-size: 2rem;
    color: var(--text-dark);
}

h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px var(--shadow-light);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ============================================
   UTILITIES
   ============================================ */

.glass-effect {
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-effect-light {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.1);
}

body.noscroll {
    overflow: hidden;
    height: 100vh;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   SHARED COMPONENTS
   ============================================ */

.section-header {
    font-family: 'Almarai', sans-serif;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 10px;
}

.section-header::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-header.centered {
    text-align: center;
    width: 100%;
}

.section-header.centered::after {
    right: 50%;
    transform: translateX(50%);
}

html[lang="en"] .section-header::after {
    right: unset;
    left: 0;
}

html[lang="en"] .section-header.centered::after {
    right: unset;
    left: 50%;
}

/* ============================================
   SOCIAL ICONS
   ============================================ */

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* ============================================
   NEWS TICKER STYLES
   ============================================ */

/* ============================================
   NAVBAR LOGO SECTION
   ============================================ */

.navbar-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-ticker-container {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 12px 0 18px 0;
    overflow: hidden;
    border-bottom: 3px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 128, 128, 0.2);
    position: relative;
    z-index: 100;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.news-ticker-header {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0 6px 6px 0;
    white-space: nowrap;
    z-index: 10;
    backdrop-filter: blur(5px);
}

html[lang="en"] .news-ticker-header {
    left: unset;
    right: 0;
    border-radius: 6px 0 0 6px;
}

.news-ticker-wrapper {
    margin-right: 140px;
    margin-left: 0;
    overflow: hidden;
    position: relative;
}

html[lang="en"] .news-ticker-wrapper {
    margin-right: 0;
    margin-left: 140px;
}

.news-ticker-content {
    display: flex;
    align-items: center;
    gap: 30px;
    animation: scroll-left 40s linear infinite;
    white-space: nowrap;
    padding: 0 20px;
}

.news-ticker-content:hover {
    animation-play-state: paused;
}

html[lang="en"] .news-ticker-content {
    animation: scroll-right 40s linear infinite;
}

html[lang="en"] .news-ticker-content:hover {
    animation-play-state: paused;
}

.news-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.news-item-separator {
    display: inline-block;
    width: 2px;
    height: 20px;
    background: rgba(255, 255, 255, 0.4);
    margin: 0 10px;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .section-header {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .section-header {
        font-size: 28px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .lang-toggle button {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .section-header {
        font-size: 24px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 12px;
    }

    .social-icons a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

[data-theme="dark"] {
    --text-dark: #e2e8f0;
    --text-light: #94a3b8;
    --background-light: #1e293b;
    --background-white: #0f172a;
    --border-color: #334155;
    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-bg-strong: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(71, 85, 105, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
}

[data-theme="dark"] body {
    background: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #f1f5f9;
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span:not(.badge):not([class*="icon"]) {
    color: #cbd5e1;
}

[data-theme="dark"] a {
    color: #38bdf8;
}

[data-theme="dark"] .section-description,
[data-theme="dark"] .section-subtitle {
    color: #94a3b8 !important;
}

/* Navbar */
[data-theme="dark"] .navbar,
[data-theme="dark"] .navbar.sticky {
    background: #0f172a !important;
    border-bottom: 1px solid #1e293b !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5) !important;
}

[data-theme="dark"] .nav-links a {
    color: #e2e8f0 !important;
}

[data-theme="dark"] .nav-links a:hover {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .hamburger {
    color: #e2e8f0;
}

/* Cards */
[data-theme="dark"] .feature-card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .partner-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .review-card {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

[data-theme="dark"] .feature-card h3,
[data-theme="dark"] .service-card h3,
[data-theme="dark"] .stat-card h3 {
    color: #f1f5f9 !important;
}

[data-theme="dark"] .feature-card p,
[data-theme="dark"] .service-card p {
    color: #94a3b8 !important;
}

/* Sections */
[data-theme="dark"] .features-section,
[data-theme="dark"] .services-section,
[data-theme="dark"] .partners-section,
[data-theme="dark"] .contact-section,
[data-theme="dark"] .faq-section,
[data-theme="dark"] .app-services-section,
[data-theme="dark"] .download-section,
[data-theme="dark"] .page-main,
[data-theme="dark"] main {
    background: #0f172a !important;
}

[data-theme="dark"] .features-section::before,
[data-theme="dark"] .services-section::before {
    opacity: 0.05;
}

/* FAQ */
[data-theme="dark"] .faq-item {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

[data-theme="dark"] .faq-question {
    color: #f1f5f9 !important;
    background: transparent !important;
}

[data-theme="dark"] .faq-answer {
    color: #94a3b8 !important;
    border-top: 1px solid #334155 !important;
}

/* Cube section */
[data-theme="dark"] .cube__face {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2744 100%) !important;
    border: 2px solid #334155 !important;
}

[data-theme="dark"] .cube-menu-button {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}

[data-theme="dark"] .cube-menu-button:hover,
[data-theme="dark"] .cube-menu-button.active {
    background: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Footer */
[data-theme="dark"] footer,
[data-theme="dark"] .footer,
[data-theme="dark"] .footer-section,
[data-theme="dark"] .site-footer {
    background: #020617 !important;
}

[data-theme="dark"] .footer-bottom {
    background: #010409 !important;
    border-top: 1px solid #1e293b !important;
}

[data-theme="dark"] .footer-link,
[data-theme="dark"] .footer a {
    color: #94a3b8 !important;
}

[data-theme="dark"] .footer-link:hover,
[data-theme="dark"] .footer a:hover {
    color: #38bdf8 !important;
}

/* Forms & Inputs */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #64748b !important;
}

/* News ticker */
[data-theme="dark"] .news-ticker-container {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .news-ticker-header {
    background: var(--primary-color) !important;
}

[data-theme="dark"] .news-item {
    color: #cbd5e1 !important;
}

/* Scroll to top */
[data-theme="dark"] #scrollToTopBtn {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #334155 !important;
}
