/*
Theme Name: IPTV Modern Theme
Theme URI: https://example.com/iptv-modern-theme/
Author: Your Name/Company Name
Author URI: https://example.com
Description: A modern and professional WordPress theme for IPTV services.
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iptv-modern-theme
Tags: iptv, woocommerce, modern, responsive, custom-colors, custom-menu, featured-images, translation-ready
*/

/* Variables */
:root {
    --color-dark-bg: #222222; /* Main dark background for sections */
    --color-darker-bg: #1a1a1a; /* Slightly darker dark for cards on dark bg */
    --color-primary: #1a2b47; /* Dark blue for header, footer, cards on light bg */
    --color-light-bg: #f5f5f5; /* Light background for sections */
    --color-white: #ffffff; /* White for text on dark backgrounds, card backgrounds on light */
    --color-secondary: #007bff; /* Blue for links/accents */
    --color-accent: #dc3545; /* Red for primary actions */
    
    --color-text-dark: #333333; /* Dark text for light backgrounds */
    --color-text-light: #f5f5f5; /* Light text for dark backgrounds */
    --color-text-lighter: #cccccc; /* Even lighter text for secondary on dark */
    
    --color-border-dark: #444444; /* Dark border for elements on dark bg */
    --color-border-light: #e0e0e0; /* Light border for elements on light bg */
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --font-accent: 'Poppins', sans-serif;
    
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.6rem;
    line-height: 1.6;
    color: var(--color-text-light); /* Default body text color on dark background */
    background: var(--color-dark-bg); /* Main body background color */
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--color-white); /* Headings white by default on dark backgrounds */
}

h1 {
    font-size: 4.8rem;
}

h2 {
    font-size: 3.6rem;
}

h3 {
    font-size: 2.8rem;
}

h4 {
    font-size: 2.4rem;
}

h5 {
    font-size: 2rem;
}

h6 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1.6rem;
    color: var(--color-text-light);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--color-accent);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -1.5rem;
}

.col {
    padding: 0 1.5rem;
    flex: 1;
}

/* Header */
.site-header {
    background: #1a2b47 !important;
    padding: 2rem 0;
    position: relative;
    z-index: 100;
    box-shadow: var(--box-shadow);
    border-bottom: 1px solid var(--color-border-dark);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-branding img {
    max-height: 50px;
    width: auto;
}

.site-brand-text {
    color: #dc3545;
    font-size: 2.2rem;
    font-weight: 700;
    margin-left: 1.5rem;
    vertical-align: middle;
    letter-spacing: 1px;
}

.site-title {
    font-size: 2.4rem;
    margin: 0;
    margin-left: 1rem;
}

.site-title a {
    color: var(--color-white); /* White site title */
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    display: flex; /* Always display flex on desktop */
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 1.5rem;
}

.main-navigation a {
    color: var(--color-text-light); /* Light text for navigation links */
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    white-space: nowrap; /* Prevent menu items from wrapping */
}

.main-navigation a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-speed) ease;
}

.main-navigation a:hover:after,
.main-navigation .current-menu-item a:after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    color: var(--color-white); /* White color for the toggle icon on dark header */
    font-size: 2.8rem; /* Larger icon */
    cursor: pointer;
    z-index: 101; /* Ensure it's above other elements */
}

/* Buttons */
.button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    border-radius: var(--border-radius);
    font-family: var(--font-accent);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
}

.button-primary {
    background: var(--color-accent);
    color: var(--color-white); /* White text on red button */
    border: 2px solid var(--color-accent);
}

.button-primary:hover {
    background: darken(var(--color-accent), 10%); /* Darker red */
    border-color: darken(var(--color-accent), 10%);
}

.button-secondary {
    background: transparent;
    color: var(--color-secondary); /* Blue text */
    border: 2px solid var(--color-secondary);
    margin-left: 1.5rem;
}

.button-secondary:hover {
    background: var(--color-secondary);
    color: var(--color-white); /* White text on blue hover */
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('assets/images/aflam.jpg') no-repeat center center/cover;
    filter: brightness(0.25);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.hero-title {
    font-size: 5.6rem;
    margin-bottom: 2rem;
    color: #fff !important;
}

.hero-subtitle {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    color: #fff !important;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Global Movies Section */
.global-movies-section {
    padding: 4rem 0;
    background: var(--color-dark-bg); /* Dark background */
}

.global-movies-section .container {
    overflow: hidden; /* Hide scrollbar for cleaner look if not needed */
    padding: 0; /* Remove horizontal padding from container to allow full-width carousel */
}

.movies-carousel {
    overflow-x: scroll; /* Enable horizontal scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    white-space: nowrap; /* Prevent items from wrapping */
    padding: 2rem 0;
    direction: rtl; /* Set direction to Right-to-Left */
}

.movies-carousel::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, Opera */
}

.movies-grid {
    display: inline-flex; /* Use inline-flex to keep items on a single line */
    gap: 2rem; /* Space between movie items */
    padding: 0 2rem; /* Add horizontal padding to the grid itself for spacing from edges */
    direction: ltr; /* Reset direction to Left-to-Right for content inside */
}

.movie-item {
    flex: 0 0 auto; /* Prevent items from growing/shrinking and set base width */
    width: 250px; /* Adjust as needed */
    background: var(--color-darker-bg); /* Darker background for movie cards */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    text-align: center;
    transition: transform var(--transition-speed) ease;
    border: 1px solid var(--color-border-dark);
}

.movie-item:hover {
    transform: translateY(-10px);
}

.movie-item img {
    width: 100%;
    height: 350px; /* Fixed height for movie posters */
    object-fit: cover;
    display: block;
}

.movie-title {
    font-size: 2rem;
    color: var(--color-white); /* White movie title */
    margin: 1.5rem 0;
    padding: 0 1rem;
}

/* Support Section */
.support-section {
    padding: 6rem 0;
    background: var(--color-dark-bg); /* Changed to dark background */
    text-align: center;
}

.support-section .section-title {
    color: var(--color-white); /* White title on dark background */
}

.support-box {
    background: var(--color-primary); /* Dark blue background for the box */
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-dark);
}

.support-icon {
    font-size: 5rem;
    color: var(--color-secondary);
    margin-bottom: 2rem;
}

.support-title {
    font-size: 2.8rem;
    color: var(--color-white); /* White text for title */
    margin-bottom: 1.5rem;
}

.support-description {
    font-size: 1.6rem;
    color: var(--color-text-light); /* Light text for description */
    line-height: 1.8;
}

/* Features Section */
.features-section {
    padding: 8rem 0;
    background: var(--color-dark-bg); /* Changed to dark background */
}

.section-title {
    text-align: center;
    margin-bottom: 5rem;
    font-size: 4rem;
    color: var(--color-white); /* White title on dark background */
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.feature-item {
    background: var(--color-primary); /* Dark blue background for feature cards */
    padding: 3rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease;
    border: 1px solid var(--color-border-dark);
}

.feature-item:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 5rem;
    color: var(--color-secondary);
    margin-bottom: 2rem;
}

.feature-title {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: var(--color-white); /* White text for feature title */
}

.feature-description {
    font-size: 1.6rem;
    color: var(--color-text-light); /* Light text for feature description */
    opacity: 0.8;
}

/* Pricing Section */
.pricing-section {
    padding: 8rem 0;
    background: var(--color-dark-bg); /* Dark background */
    text-align: center;
}

.pricing-section .section-title {
    color: var(--color-white); /* White title on dark background */
}

.pricing-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 5rem;
}

.toggle-label {
    font-size: 1.8rem;
    color: var(--color-text-light); /* Light text for toggle labels */
    font-weight: 500;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-primary); /* Darker background for the slider track */
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--color-white); /* White circle for the slider */
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-secondary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 5rem;
}

.pricing-plan {
    background: var(--color-darker-bg); /* Darker background for pricing plans */
    padding: 4rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease, border var(--transition-speed) ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-plan.featured {
    border-color: var(--color-accent);
    transform: scale(1.05);
    z-index: 1;
}

.pricing-plan:hover {
    transform: translateY(-10px);
}

.pricing-plan.featured:hover {
    transform: translateY(-10px) scale(1.05);
}

.popular-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.5rem 2rem;
    font-size: 1.4rem;
    font-weight: bold;
    transform: rotate(45deg) translate(25%, -25%);
    transform-origin: 100% 0;
    width: 150px;
    text-align: center;
}

.plan-name {
    font-size: 3rem;
    color: var(--color-white); /* White plan name */
    margin-bottom: 2rem;
}

.plan-price {
    font-size: 5rem;
    color: var(--color-secondary);
    font-weight: 700;
    margin-bottom: 2rem;
}

.plan-price span {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--color-text-lighter); /* Lighter text for price unit */
}

.plan-features {
    list-style: none;
    margin-bottom: 3rem;
    flex-grow: 1;
}

.plan-features li {
    font-size: 1.6rem;
    color: var(--color-text-light); /* Light text for features */
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-dark);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* How It Works Section */
.how-it-works-section {
    padding: 8rem 0;
    background: var(--color-dark-bg); /* Changed to dark background */
    text-align: center;
}

.how-it-works-section .section-title {
    margin-bottom: 7rem;
    color: var(--color-white); /* White text for title */
}

.steps-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 220px;
    max-width: 300px;
    margin: 0 10px;
}

.step-title {
    margin-bottom: 1rem;
    font-size: 2.2rem;
    color: #007bff;
    font-weight: 700;
}

.step-description {
    font-size: 1.6rem;
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 0;
    margin-top: 0;
    text-align: center;
}

/* Testimonials Section */
.testimonials-section {
    padding: 8rem 0;
    background: var(--color-dark-bg); /* Dark background */
}

.testimonials-section .section-title {
    color: var(--color-white); /* White title on dark background */
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.testimonial-item {
    background: var(--color-primary); /* Dark blue background for testimonials */
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    padding-top: 5rem;
    border: 1px solid var(--color-border-dark);
}

.testimonial-item::before {
    content: '\f10d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 4rem;
    color: var(--color-accent);
    position: absolute;
    top: 2rem;
    left: 2rem;
    opacity: 0.3;
}

.testimonial-content {
    font-style: italic;
    color: var(--color-text-light); /* Light text for content */
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--color-white); /* White text for author */
}

.author-name {
    font-weight: 600;
    font-size: 1.8rem;
}

.author-title {
    font-size: 1.4rem;
    opacity: 0.7;
    color: var(--color-text-lighter); /* Lighter text for author title */
}

/* FAQ Section */
.faq-section {
    padding: 8rem 0;
    background: var(--color-dark-bg); /* Dark background */
    text-align: center;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
    margin-top: 5rem; /* Space below title */
}

.faq-item {
    background: var(--color-primary); /* Dark blue background for FAQ items */
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--color-border-dark);
}

.faq-question {
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--color-white); /* White text for FAQ question */
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 2rem;
    transition: background-color var(--transition-speed) ease;
}

.faq-question:hover {
    background-color: var(--color-darker-bg); /* Slightly darker on hover */
}

.faq-question .icon {
    font-size: 1.8rem;
    color: var(--color-secondary);
    transition: transform var(--transition-speed) ease;
}

.faq-answer {
    padding: 0 2.5rem 2rem;
    color: var(--color-text-light);
    font-size: 1.6rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease-out, opacity var(--transition-speed) ease-out;
    text-align: left !important;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    transition: max-height var(--transition-speed) ease-in, opacity var(--transition-speed) ease-in;
}

/* Call to Action Section */
.cta-section {
    padding: 8rem 0;
    background: var(--color-primary); /* Dark blue background */
    text-align: center;
    color: var(--color-white); /* White text */
}

.cta-title {
    font-size: 4.2rem;
    margin-bottom: 2rem;
    color: var(--color-white);
}

.cta-description {
    font-size: 2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    color: var(--color-text-lighter);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.site-footer {
    background: var(--color-primary); /* Dark blue footer */
    padding: 6rem 0 3rem;
    color: var(--color-text-light);
    font-size: 1.6rem;
    border-top: 1px solid var(--color-border-dark);
}

.site-footer .container {
    display: flex;
    flex-direction: column;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-widget {
    text-align: left;
}

.footer-widget h3 {
    font-size: 2.2rem;
    color: var(--color-white); /* White widget titles */
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
}

.footer-widget p,
.footer-widget ul li a {
    color: var(--color-text-light); /* Light text for footer content */
    line-height: 1.8;
}

.footer-widget ul li {
    margin-bottom: 1rem;
}

.footer-widget ul li a:hover {
    color: var(--color-secondary);
}

.footer-widget.contact-info p i {
    margin-right: 10px;
    color: var(--color-secondary);
}

.social-icons {
    margin-top: 2rem;
    display: flex;
    gap: 15px;
}

.social-icons a {
    font-size: 2rem;
    color: var(--color-white); /* White social icons */
    transition: color var(--transition-speed) ease;
}

.social-icons a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid var(--color-border-dark);
    padding-top: 2rem;
    text-align: center;
    font-size: 1.4rem;
    color: var(--color-text-light);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    html {
        font-size: 58%;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 55%;
    }

    .site-header .container {
        flex-direction: row; /* Keep header items in a row by default */
        align-items: center;
        justify-content: space-between; /* Space out branding and toggle */
    }

    .main-navigation {
        position: absolute; /* Position the menu absolutely */
        top: 100%; /* Below the header */
        left: 0; /* Align to left */
        width: 100%;
        background: var(--color-primary); /* Dark blue background for mobile menu */
        box-shadow: var(--box-shadow);
        border-top: 1px solid var(--color-border-dark);
        display: none; /* Hidden by default on mobile, will be controlled by JS */
        flex-direction: column; /* Stack menu items vertically */
        padding: 1.5rem 0;
    }

    .main-navigation.toggled {
        display: flex; /* Show when toggled */
    }

    .main-navigation ul {
        flex-direction: column; /* Stack menu items */
        width: 100%;
        text-align: center;
    }

    .main-navigation li {
        margin: 0;
        border-bottom: 1px solid var(--color-border-dark); /* Separator for menu items */
    }

    .main-navigation li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        display: block; /* Make links full width */
        padding: 1.5rem 2rem; /* Add padding for touch targets */
        color: var(--color-white); /* White text for mobile menu items */
    }

    .menu-toggle {
        display: block; /* Show toggle button on mobile */
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .button-secondary {
        margin-left: 0;
    }

    .features-grid,
    .pricing-grid,
    .testimonials-grid,
    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .how-it-works-section .steps-grid {
        flex-direction: column;
        gap: 4rem;
        padding: 0 2rem;
    }

    .how-it-works-section .steps-grid::before {
        display: none;
    }

    .faq-question {
        font-size: 1.8rem;
    }

    .cta-title {
        font-size: 3.2rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 50%;
    }

    .hero-title {
        font-size: 4rem;
    }

    .hero-subtitle {
        font-size: 2rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .faq-question {
        padding: 1.5rem 2rem;
    }
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right; /* Default text alignment for RTL, will override where needed */
}

.rtl .container {
    text-align: right; /* Align content to right within container for RTL */
}

.rtl h1, .rtl h2, .rtl h3, .rtl h4, .rtl h5, .rtl h6, .rtl p, .rtl li,
.rtl .section-title, .rtl .hero-subtitle, .rtl .cta-title, .rtl .cta-description,
.rtl .testimonial-content, .rtl .author-name, .rtl .author-title,
.rtl .feature-title, .rtl .feature-description,
.rtl .step-title, .rtl .step-description,
.rtl .plan-name, .rtl .plan-price, .rtl .plan-features li,
.rtl .support-title, .rtl .support-description {
    text-align: left; /* Override specific elements to left-align in RTL */
}

.rtl .site-title a {
    text-align: right; /* Adjust if logo is on left */
}

.rtl .main-navigation ul {
    direction: rtl;
}

.rtl .main-navigation li {
    margin: 0 0 0 1.5rem; /* Adjust margins for RTL menu items */
}

.rtl .main-navigation li:last-child {
    margin-left: 0; /* Remove margin for the last item in RTL */
}

.rtl .main-navigation a:after {
    left: auto;
    right: 0;
}

.rtl .menu-toggle {
    margin-left: auto; /* Push toggle to the left in RTL */
}

.rtl .button-secondary {
    margin-right: 1.5rem; /* Adjust margin for buttons in RTL */
    margin-left: 0;
}

.rtl .hero-content {
    text-align: right;
}

.rtl .testimonials-grid {
    text-align: right; /* Ensure grid items are aligned right in RTL */
}

.rtl .testimonial-item {
    text-align: right; /* Ensure testimonial item text is right-aligned in RTL */
}

.rtl .testimonial-item::before {
    left: auto;
    right: 15px;
}

.rtl .testimonial-author {
    flex-direction: row-reverse; /* Reverse direction for author info in RTL */
    text-align: right; /* Align author text to the right */
}

.rtl .faq-question {
    justify-content: flex-start; /* Align content to the start (left) in RTL */
    text-align: left; /* Keep text-align for potential inherited text */
}

.rtl .faq-question-text {
    direction: ltr; /* Ensure the question text itself is LTR to fix question mark */
    margin-right: auto; /* Push the text to the left and icon to the right */
    margin-left: 0; /* Reset left margin */
}

.rtl .faq-question .icon {
    left: auto;
    right: 15px; /* Adjust icon position for RTL */
}

.rtl .faq-answer {
    text-align: left; /* Ensure FAQ answer text is left-aligned in RTL */
}

.rtl .cta-section .container {
    text-align: right; /* Ensure CTA content is aligned right in RTL */
}

.rtl .pricing-toggle .toggle-label.active,
.rtl .pricing-toggle .toggle-label:hover {
    color: var(--color-primary); /* Keep text color consistent */
}

.rtl .pricing-grid {
    text-align: right;
}

.rtl .plan-features li {
    text-align: right;
}

.rtl .steps-grid {
    flex-direction: row; /* Force LTR order for steps in RTL */
    justify-content: space-between;
    text-align: center; /* Center the grid container itself */
}

.rtl .step-item {
    text-align: center; /* Center align step content */
}

.rtl .step-number {
    margin-left: 0;
    margin-right: 0; /* Reset margins to allow centering */
}

.rtl .steps-grid::before {
    left: 5%; /* Ensure the line starts from the left */
    right: 5%; /* Ensure the line extends to the right */
    /* No specific right adjustment needed, let global apply */
}

.rtl .footer-widgets {
    text-align: right; /* Align footer widgets right */
}

.rtl .footer-widget h3::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%); /* Center the underline */
}

.rtl .social-icons {
    justify-content: flex-end; /* Align social icons to the right */
}

@media (max-width: 768px) {
    body.rtl .main-navigation ul {
        align-items: flex-end;
    }
}

/* Dark Mode Toggle (if implemented later) */
.dark-mode-toggle {
    /* Add styles for a dark mode toggle button */
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #333; /* Dark track */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #888; /* Gray thumb */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555; /* Darker gray on hover */
}

.rtl .section-title,
.rtl .hero-title,
.rtl .hero-subtitle,
.rtl .cta-title,
.rtl .cta-description {
    text-align: center; /* Center align these titles/descriptions in RTL */
}

.rtl .testimonial-content,
.rtl .author-name,
.rtl .author-title,
.rtl .feature-title,
.rtl .feature-description,
.rtl .step-title,
.rtl .step-description,
.rtl .plan-name,
.rtl .plan-price,
.rtl .plan-features li,
.rtl .support-title,
.rtl .support-description {
    text-align: left; /* Ensure these specific elements are left-aligned in RTL */
}

.rtl .footer-widget {
    text-align: center; /* Center align the footer widget content in RTL */
}

.rtl .footer-widget h3 {
    text-align: center; /* Force center alignment for footer widget headings in RTL */
}

.rtl .footer-widget h3::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%); /* Center the underline */
}

/* Ensure the overall footer widget content is also centered in RTL */
.rtl .footer-widget p, 
.rtl .footer-widget ul {
    text-align: center;
}

.rtl .footer-widget ul li {
    text-align: center; /* Center list items as well */
}

/* RTL Overrides for Footer Widgets - Ensure centering */
body.rtl .footer-widget {
    text-align: center; /* Force center alignment for the entire widget content */
}

body.rtl .footer-widget h3 {
    text-align: center; /* Force center alignment for footer widget headings */
}

body.rtl .footer-widget h3::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%); /* Center the underline relative to the heading */
}

body.rtl .footer-widget p,
body.rtl .footer-widget ul li,
body.rtl .footer-widget ul li a {
    text-align: center; /* Ensure all text within footer widget is centered */
}

body.rtl .social-icons {
    justify-content: center; /* Center social icons in RTL footer */
}

/* RTL Navigation Fixes */
body.rtl .main-navigation {
    display: flex !important;
    align-items: center;
}

body.rtl .main-navigation ul {
    display: flex !important;
    flex-direction: row;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.rtl .main-navigation li {
    margin: 0 1.5rem;
    position: relative;
}

body.rtl .main-navigation a {
    color: var(--color-text-light);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    display: block;
}

body.rtl .main-navigation a:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-speed) ease;
}

body.rtl .main-navigation a:hover:after,
body.rtl .main-navigation .current-menu-item a:after {
    width: 100%;
}

@media (max-width: 768px) {
    body.rtl .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--color-primary);
        width: 100%;
        padding: 1rem 0;
    }

    body.rtl .main-navigation.toggled ul {
        display: flex;
    }

    body.rtl .main-navigation li {
        margin: 0;
        width: 100%;
    }

    body.rtl .main-navigation a {
        padding: 1rem 2rem;
    }
}

/* Style for Subscription Form */
.subscription-form-container {
    background-color: var(--color-darker-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
    margin: 4rem auto;
    color: var(--color-text-light);
}

.subscription-form-container h2 {
    color: var(--color-white);
    text-align: center;
    margin-bottom: 2.5rem;
}

.subscription-form-container label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.subscription-form-container input[type="text"],
.subscription-form-container input[type="email"],
.subscription-form-container select {
    width: 100%;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--border-radius);
    background-color: #333;
    color: var(--color-text-light);
    font-size: 1.6rem;
}

.subscription-form-container input[type="text"]:focus,
.subscription-form-container input[type="email"]:focus,
.subscription-form-container select:focus {
    border-color: var(--color-secondary);
    outline: none;
}

.subscription-form-container select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23cccccc%22%20d%3D%22M287%2C114.7L146.2%2C255.5L5.4%2C114.7H287z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 1.2rem;
    padding-right: 3rem; /* Make space for the arrow */
}

.subscription-form-container .button-primary {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 600;
}

/* RTL adjustments for the form */
.rtl .subscription-form-container {
    text-align: right; /* Adjust form alignment for RTL */
}

.rtl .subscription-form-container input,
.rtl .subscription-form-container select {
    text-align: right;
}

.rtl .subscription-form-container select {
    background-position: left 1.5rem center; /* Adjust dropdown arrow for RTL */
    padding-left: 3rem; 
    padding-right: 1.5rem;
}

/* Overrides for 'Our Packages' footer widget in RTL to ensure centering */
.rtl .footer-widget.our-packages {
    text-align: center !important; /* Force center for the entire packages widget */
}

.rtl .footer-widget.our-packages h3 {
    text-align: center !important; /* Force center for heading */
}

.rtl .footer-widget.our-packages h3::after {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important; /* Force center for underline */
}

.rtl .footer-widget.our-packages ul {
    list-style-position: inside !important; /* Helps center bullets with text-align */
    text-align: center !important; /* Force center for the list */
    padding-left: 0 !important; /* Remove any left padding that might push bullets */
    padding-right: 0 !important; /* Remove any right padding */
}

.rtl .footer-widget.our-packages ul li {
    text-align: center !important; /* Force center for list items */
    display: block !important; /* Ensure li behaves as block for text-align to work on its content */
    margin-left: auto !important; /* Attempt to center if li is inline-block */
    margin-right: auto !important;
}

/* --- Services Guide Page Styles --- */
.services-guide {
    padding: 40px 0;
    direction: ltr !important; /* Force Left-to-Right direction */
    text-align: left !important; /* Force Left Alignment for all content */
}

.guide-header {
    text-align: center !important; /* Ensure header content is centered */
    margin-bottom: 40px;
}

.guide-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #fff !important;
}

.guide-header h1 span,
.guide-header h1 a {
    background: none !important; /* Remove any background from nested elements */
    color: inherit !important; /* Ensure nested elements inherit the main title color */
}

.guide-header .lead {
    font-size: 1.2em;
    color: #666 !important;
    text-align: center !important; /* Ensure this lead text is centered */
}

.guide-sections {
    text-align: left !important; /* Ensure sections themselves align left */
}

.guide-section {
    margin-bottom: 40px;
    background: #1a2b47 !important;
    color: #f5f5f5 !important;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.guide-section h2 {
    color: #fff !important;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #223355 !important;
    text-align: left !important;
}

.section-intro {
    font-size: 1.1em;
    color: #e0e0e0 !important;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: left !important;
}

.guide-content h3 {
    color: #007bff !important;
    margin: 25px 0 15px;
    font-size: 1.3em;
    text-align: left !important;
    background: none !important;
}

.guide-content p,
.guide-content li {
    color: #e0e0e0 !important;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: left !important;
}

.step-item {
    margin-bottom: 25px;
}

.step-item h3 {
    color: #007bff !important;
    margin-bottom: 10px;
    text-align: left !important;
    background: none !important;
}

.device-setup {
    margin-bottom: 30px;
}

.device-setup h3 {
    color: #fff !important;
    margin-bottom: 15px;
    text-align: left !important;
}

.device-setup ol {
    padding-left: 20px !important;
}

.device-setup li {
    margin-bottom: 10px;
    color: #fff !important;
    line-height: 1.6;
    text-align: left !important;
}

.device-setup strong {
    color: #444 !important;
}

.troubleshooting-item {
    margin-bottom: 25px;
    padding: 15px;
    background: #223355 !important;
    color: #f5f5f5 !important;
    border-radius: 5px;
    text-align: left !important;
}

.troubleshooting-item h4 {
    color: #dc3545 !important;
    margin-bottom: 10px;
    text-align: left !important;
}

.troubleshooting-item p {
    margin-bottom: 0;
    text-align: left !important;
}

.support-options {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: flex-start !important;
}

.btn {
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #dc3545 !important;
    color: #fff !important;
}

.btn-secondary {
    background: #007bff !important;
    color: #fff !important;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Force LTR and Left alignment for RTL body on this page */
body.rtl .services-guide {
    direction: ltr !important;
    text-align: left !important;
}

body.rtl .services-guide h1,
body.rtl .services-guide h2,
body.rtl .services-guide h3,
body.rtl .services-guide h4,
body.rtl .services-guide h5,
body.rtl .services-guide h6,
body.rtl .services-guide p,
body.rtl .services-guide li {
    text-align: left !important;
}

body.rtl .guide-header {
    text-align: center !important; /* Ensure header content is centered in RTL */
}

body.rtl .guide-header h1 {
    text-align: center !important; /* Ensure main title is centered in RTL */
}

body.rtl .guide-header .lead {
    text-align: center !important; /* Ensure lead text is centered in RTL */
}

body.rtl .guide-sections {
    text-align: left !important; /* Ensure sections themselves align left in RTL */
}

body.rtl .support-options {
    justify-content: flex-start !important;
}

@media (max-width: 768px) {
    .guide-section {
        padding: 20px;
    }
    
    .support-options {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .btn {
        width: 100%;
        text-align: center !important;
    }
    
    .guide-header h1 {
        font-size: 2em;
        text-align: center !important; /* Center on small screens */
    }
    
    body.rtl .guide-header h1 {
        text-align: center !important; /* Center on small screens in RTL */
    }
} 