/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    --primary-gold: #D4AF37;
    --secondary-gold: #FFD700;
    --dark-gold: #B8860B;
    --light-gold: #F0E68C;
    --background-dark: #111111;
    --background-darker: #0A0A0A;
    --background-lighter: #222222;
    --background-light: #333333;
    --text-light: #FFFFFF; /* Default text color: White */
    --text-muted: rgba(255, 255, 255, 0.7); /* Muted text color: Light transparent white (grayish on dark bg) */
    --border-color: rgba(212, 175, 55, 0.3);

    /* Override Bootstrap dark colors to be dark gray instead of pure black */
    --bs-dark-rgb: 17, 17, 17;
    --bs-dark: #111111;
}

/* ---- START: GENERAL STYLES & COLOR STABILIZATION ---- */
body {
    font-family: 'Montserrat', sans-serif; /* Default font */
    background-color: var(--background-dark);
    color: var(--text-light); /* Base color for text */
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 50%, #222222 0%, #0A0A0A 100%);
}

/* Ensure common text elements inherit the body's intended light color */
p, h1, h2, h3, h4, h5, h6, li,
.feature-box p,
.card-pricing .price-features .price-feature,
.section-subtitle {
    color: var(--text-light); /* Default to white */
}

/* Specific color classes should maintain their definitions */
.text-gold {
    color: var(--primary-gold) !important;
}

.text-gold-glow {
    color: var(--primary-gold) !important;
    text-shadow: 0 0 18px rgba(212, 175, 55, 0.7);
}

.text-muted,
.feature-box .text-muted,
.card-pricing .text-muted {
    color: var(--text-muted) !important;
}

.btn-gold {
    background: var(--background-dark);
    color: var(--text-light) !important; /* Ensure button text is light */
    border: 2px solid var(--primary-gold);
    border-radius: 40px;
    padding: 12px 30px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.btn-gold:hover {
    color: var(--background-dark) !important; /* Text color on hover */
}

.btn-gold::after {
    content: "";
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    left: 0;
    background: var(--primary-gold);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-gold:hover::after {
    width: 100%;
}

.btn-free-trial {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white !important; /* Ensure text is always white */
    border: none;
    border-radius: 40px;
    padding: 12px 30px;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 15px rgba(40, 167, 69, 0.5); }
  50% { box-shadow: 0 0 25px rgba(40, 167, 69, 0.8); }
  100% { box-shadow: 0 0 15px rgba(40, 167, 69, 0.5); }
}

/* Company Introduction Section */
.company-intro-section {
    background: linear-gradient(135deg, rgba(17, 17, 17, 0.9) 0%, rgba(34, 34, 34, 0.8) 100%);
}

.company-intro-card {
    background: rgba(51, 51, 51, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.company-intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.2);
    border-color: var(--primary-gold);
}

.company-logo-container {
    padding: 20px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 15px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.company-logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(212, 175, 55, 0.3));
}

.company-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
}

.company-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: var(--text-light);
}

.company-address {
    display: flex;
    align-items: center;
    font-size: 1rem;
    color: var(--text-muted);
}

/* Navbar */
.navbar {
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand img {
    height: 40px;
}

.navbar-nav .nav-link {
    color: var(--text-light);
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-gold);
}

.navbar-toggler {
    border: none;
    color: var(--text-light) !important; /* Color of the hamburger icon lines */
}
.navbar-toggler:focus {
    box-shadow: none;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Hero Section */
.hero-section {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
    radial-gradient(circle at 20% 10%, rgba(212, 175, 55, 0.1) 0%, transparent 40%),
    linear-gradient(to top, transparent 60%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
}

/* Section Titles & Subtitles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
}

.section-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

/* Feature Boxes */
.feature-box {
    background: rgba(34, 34, 34, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    height: 100%;
}
.feature-box h4 { color: var(--text-light); }

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-gold);
    background: rgba(51, 51, 51, 0.5);
}

.feature-icon {
    font-size: 40px;
    color: var(--primary-gold);
    margin-bottom: 20px;
}

/* Pricing Cards */
.card-pricing {
    background: rgba(34, 34, 34, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 40px 30px;
    transition: all 0.3s ease;
    height: 100%;
}
.card-pricing h4 { color: var(--text-light); }

.card-pricing.popular {
    background: rgba(51, 51, 51, 0.6);
    border: 2px solid var(--primary-gold);
    position: relative;
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.card-pricing:hover {
    background: rgba(51, 51, 51, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.price-tag {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin: 20px 0;
}

.price-term {
    font-size: 1rem;
}

.price-feature {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.price-feature i {
    color: var(--primary-gold);
    margin-right: 10px;
}

.badge.bg-warning { /* Text on yellow badge */
    color: var(--bs-dark) !important;
}

/* Testimonials Slider - MODIFIED SECTION */
.testimonial-slider-viewport {
    overflow: hidden; /* Hide the overflowing content */
    width: 100%;
    padding: 20px 0; /* Vertical spacing for the slider */
}

.testimonial-slider-track {
    display: flex; /* Arrange card wrappers in a row */
    /* Each card wrapper: 360px width + 20px margin-right = 380px slot */
    /* 10 cards in HTML (8 unique + 2 duplicates for loop) */
    width: calc(380px * 12);
    animation: scrollTestimonialsLTR 120s linear infinite; /* Slower speed for more cards */
}

.testimonial-slider-track:hover {
    animation-play-state: paused; /* Pause on hover */
}

.testimonial-card-wrapper {
    flex-shrink: 0; /* Prevent cards from shrinking */
    width: 360px;   /* Width of the card itself */
    margin-right: 20px; /* Space between cards */
    box-sizing: border-box;
}

.testimonial-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px; /* Internal padding for content */
    height: 100%; /* Make card fill the wrapper height */
    box-sizing: border-box;
}
.testimonial-card h5 { color: var(--text-light); }
.testimonial-card p { color: var(--text-light); } /* Ensure p inside card is light */
.testimonial-card .text-muted { color: var(--text-muted) !important; } /* Muted text inside card */

@keyframes scrollTestimonialsLTR {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Scroll by the width of the original set of cards (10 cards) */
        /* Each slot (card + margin) = 380px */
        transform: translateX(calc(-380px * 10));
    }
}
/* END OF MODIFIED Testimonials Slider SECTION */

.testimonial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-gold);
}

/* Accordion (FAQ) Styles */
.accordion-item {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
}

.accordion-button {
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-light);
    font-weight: 600;
    padding: 20px 25px;
    box-shadow: none;
    text-align: left; /* LTR Default */
}

.accordion-button:not(.collapsed) {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold) !important;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-gold);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23D4AF37'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.accordion-body {
    padding: 20px 25px;
    color: var(--text-light) !important; /* Ensure answer text is white */
    background: transparent; /* Body itself is transparent, item has the bg */
}
.accordion-body a { /* Links inside accordion body */
    color: var(--primary-gold); /* Example: make links gold */
}
.accordion-body a:hover {
    color: var(--light-gold);
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 70px 0 30px;
    position: relative;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--primary-gold);
}

.footer-link {
    display: block;
    color: var(--text-muted);
    margin-bottom: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-gold);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-gold);
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-gold);
    color: var(--background-dark);
    transform: translateY(-5px);
}

.copyright {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px;
    font-size: 0.9rem;
}
.copyright p { color: var(--text-muted); }
.copyright p .text-gold-glow { color: var(--primary-gold) !important; }

/* Profit Slider */
.profits-slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(45, 45, 45, 0.3);
    backdrop-filter: blur(10px);
    padding: 2rem;
    width: 100%;
}

.profits-slider-track {
    display: flex;
    /* Assuming profitImages has 6 items, duplicated = 12 items. */
    /* Let's assume each .profit-card (image + margin) takes up approx 270px for mobile, 320px for desktop */
    /* For desktop: calc(320px * 12) - adjust if image width is different or number of images changes */
    /* For this example, we'll keep the original calc(320px * 10) but this might need review based on actual image count and sizing */
    width: calc(300px * 12); /* Assuming 6 images, 2 sets. Each card 280px width + 20px margin. So 300px per slot. */
    animation: seamlessSlideLTR 30s linear infinite; /* Updated duration for 6 images */
}

.profits-slider-track:hover {
    animation-play-state: paused;
}

@keyframes seamlessSlideLTR {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-300px * 6)); } /* Scroll by width of 6 original images */
}

.profit-card {
    width: auto;
    height: 400px;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 3px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-right: 20px;
    flex-shrink: 0;
}

.profit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.8);
}

.profit-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
}

/* Media Queries (Responsive) */
@media (max-width: 767px) {
    .hero-title { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .card-pricing.popular { transform: scale(1); margin: 20px 0; }

    .company-intro-card {
        padding: 30px 20px;
    }

    .company-title {
        font-size: 1.6rem;
    }

    .company-description {
        font-size: 1rem;
    }

    .company-logo {
        max-width: 120px;
    }

    .profits-slider-track {
        /* For 6 images, each card 230px width + 20px margin = 250px slot */
        width: calc(250px * 12);
        animation-name: seamlessSlideMobileLTR; /* Use a different animation name if calculations change significantly */
        animation-duration: 45s; /* Adjust speed for mobile */
    }
    @keyframes seamlessSlideMobileLTR {
      0% { transform: translateX(0); }
      100% { transform: translateX(calc(-250px * 6));}
    }
    .profit-card {
        width: auto;
        height: 300px;
        margin-right: 20px;
    }

    /* Testimonial slider on mobile */
    .testimonial-slider-track {
        /* Each card wrapper: 300px width + 20px margin-right = 320px slot */
        width: calc(320px * 12);
        animation-name: scrollTestimonialsMobileLTR;
        animation-duration: 100s;
    }
    .testimonial-card-wrapper {
        width: 300px; /* Adjust card width for mobile if needed */
        margin-right: 20px;
    }
    @keyframes scrollTestimonialsMobileLTR {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-320px * 10)); }
    }
}

@media (max-width: 390px) {
    .profit-card {
        width: 50vh;
    }   
}
/* ---- END: GENERAL STYLES & COLOR STABILIZATION ---- */

/*--------------------------------------------------------------
# RTL Styles
--------------------------------------------------------------*/
html[dir="rtl"] {
    --bs-body-font-family: 'Tajawal', sans-serif;
}

html[dir="rtl"] body {
    font-family: 'Tajawal', sans-serif;
    text-align: right;
}

/* Re-assert base text colors for RTL to override potential bootstrap.rtl.css overrides */
html[dir="rtl"] p,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] li,
html[dir="rtl"] .feature-box p,
html[dir="rtl"] .card-pricing .price-features .price-feature,
html[dir="rtl"] .section-subtitle {
    color: var(--text-light) !important; /* Force light text */
}
html[dir="rtl"] .text-gold { color: var(--primary-gold) !important; }
html[dir="rtl"] .text-gold-glow { color: var(--primary-gold) !important; }
html[dir="rtl"] .text-muted,
html[dir="rtl"] .feature-box .text-muted,
html[dir="rtl"] .card-pricing .text-muted {
    color: var(--text-muted) !important;
}
html[dir="rtl"] .copyright p { color: var(--text-muted) !important; }
html[dir="rtl"] .copyright p .text-gold-glow { color: var(--primary-gold) !important; }
html[dir="rtl"] .testimonial-card p { color: var(--text-light) !important; }
html[dir="rtl"] .testimonial-card .text-muted { color: var(--text-muted) !important; }

/* Company section RTL adjustments */
html[dir="rtl"] .company-description {
    color: var(--text-light) !important;
}

html[dir="rtl"] .company-address {
    color: var(--text-muted) !important;
}

/* Navbar adjustments */
html[dir="rtl"] .navbar-nav {
    margin-left: auto !important;
    margin-right: 0 !important;
}
html[dir="rtl"] .navbar-brand {
    margin-right: 0;
    margin-left: 1rem;
}
html[dir="rtl"] .ms-lg-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}
html[dir="rtl"] .mx-lg-2 {
    margin-right: 0.5rem !important;
    margin-left: 0.5rem !important;
}
html[dir="rtl"] .navbar-toggler {
    margin-left: 1rem;
    margin-right: 0;
}

/* General margin/padding flips (Bootstrap logical props should handle most) */
html[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
html[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
html[dir="rtl"] .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
html[dir="rtl"] .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }

html[dir="rtl"] .list-unstyled .fa-check {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .price-feature i {
    margin-left: 10px !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .testimonial-img.me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .btn-gold::after {
    right: 0;
    left: auto;
}

/* ---- START: RTL ACCORDION COLOR & STYLE FIX ---- */
html[dir="rtl"] .accordion-item {
    background: rgba(0, 0, 0, 0.5) !important;
    border: 1px solid var(--border-color) !important;
}

html[dir="rtl"] .accordion-button {
    background: rgba(0, 0, 0, 0.8) !important;
    color: var(--text-light) !important;
    text-align: right;
}

html[dir="rtl"] .accordion-button:not(.collapsed) {
    background: rgba(212, 175, 55, 0.1) !important;
    color: var(--primary-gold) !important;
}

html[dir="rtl"] .accordion-button::after {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .accordion-body {
    background: transparent !important; /* Match LTR behavior */
    color: var(--text-light) !important;
}
html[dir="rtl"] .accordion-body a {
    color: var(--primary-gold) !important;
}
html[dir="rtl"] .accordion-body a:hover {
    color: var(--light-gold) !important;
}
/* ---- END: RTL ACCORDION COLOR & STYLE FIX ---- */

/* Input group for subscribe */
html[dir="rtl"] .input-group {
    direction: rtl;
}
html[dir="rtl"] .input-group .form-control {
    text-align: right;
    border-left: 0; /* Remove left border for input */
    border-right: 1px solid var(--primary-gold); /* Add right border */
}
html[dir="rtl"] .input-group .btn { /* The subscribe button */
    border-right: 0; /* Remove right border for button */
    border-left: 2px solid var(--primary-gold); /* Add left border */
}
/* Bootstrap RTL CSS should handle the border-radius for input groups */

/* Footer social icons */
html[dir="rtl"] .social-icon {
    margin-left: 10px !important;
    margin-right: 0 !important;
}

/* Profit Slider RTL */
html[dir="rtl"] .profits-slider-track {
    animation-name: seamlessSlideRTL;
}

@keyframes seamlessSlideRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(300px * 6)); } /* Scroll by width of 6 original images for RTL */
}

/* Testimonial Slider RTL */
html[dir="rtl"] .testimonial-slider-track {
    animation-name: scrollTestimonialsRTL;
}
html[dir="rtl"] .testimonial-card-wrapper {
    margin-left: 20px; /* Space between cards for RTL */
    margin-right: 0;
}
@keyframes scrollTestimonialsRTL {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(380px * 10)); } /* Scroll in the opposite direction */
}

/* Mobile Responsiveness for RTL slider */
@media (max-width: 768px) {
    html[dir="rtl"] .profits-slider-track {
        animation-name: seamlessSlideMobileRTL;
        width: calc(250px * 12);
    }
    @keyframes seamlessSlideMobileRTL {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(250px * 6)); }
    }

    html[dir="rtl"] .testimonial-slider-track {
        animation-name: scrollTestimonialsMobileRTL;
        width: calc(320px * 12);
    }
    @keyframes scrollTestimonialsMobileRTL {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(320px * 10)); }
    }
}

/* Ensure dropdown menu items are also RTL */
html[dir="rtl"] .dropdown-menu {
    text-align: right;
}
html[dir="rtl"] .dropdown-item {
    text-align: right;
}
html[dir="rtl"] .navbar-nav .dropdown-menu {
     right: 0 !important;
     left: auto !important;
}
html[dir="rtl"] .dropdown-menu-end {
    right: auto !important;
    left: 0 !important;
}