/* 
    Tsheel - Main Stylesheet 
    Theme: Saudi Vision 2030 (Green/Gold/White)
    Direction: RTL (Arabic)
*/

:root {
    /* New Brand Colors */
    --primary-color: #3A2D7D;
    /* Deep Purple */
    --secondary-color: #2492AE;
    --accent-color: #FBF6D0;
    /* Pale Yellow */
    --accent-hover: #EFE8B0;

    /* Full Color Scale */
    --color-50: #EEECF8;
    --color-100: #D0CBEC;
    --color-200: #B2A9E0;
    --color-300: #9487D4;
    --color-400: #7665C8;
    --color-500: #5844BB;
    --color-600: #48379A;
    --color-700: #3A2D7D;
    --color-800: #281F56;
    --color-900: #191334;
    --color-950: #090713;

    /* Neutrals */
    --white: #FFFFFF;
    --off-white: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-800: #1F2937;
    --black: #090713;

    /* Typography */
    --font-primary: 'Almarai', sans-serif;
    --font-secondary: 'Tajawal', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--off-white);
    color: var(--gray-800);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--white);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-family: var(--font-secondary);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--color-600);
}

.btn-gold {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.secondary-header-bg {
    background-color: var(--primary-color);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: var(--font-secondary);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Header */
.main-header {
    background-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 80px;
    /* Responsive logo height */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--white);
    opacity: 0.9;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
    opacity: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    background-color: var(--gray-100);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 108, 53, 0.9) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    font-family: var(--font-secondary);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: var(--white);
}

.features-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.feature-card {
    flex: 1;
    min-width: 250px;
    background-color: var(--off-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

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

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--black);
}

/* Footer */
.main-footer {
    background-color: var(--black);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-family: var(--font-secondary);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-right: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9CA3AF;
    font-size: 0.9rem;
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25D366;
    color: #FFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    background-color: var(--white);
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 108, 53, 0.1);
}

/* Responsive */
    /* Slider Styles */
    .hero-slider {
        position: relative;
        width: 100%;
        height: 600px;
        overflow: hidden;
    }

    .slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 1s ease-in-out;
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: center;
    }

    .slide.active {
        opacity: 1;
        z-index: 1;
    }

    .slide::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, rgba(58, 45, 125, 0.85) 0%, rgba(0, 0, 0, 0.4) 100%);
        z-index: 1;
    }

    .slide-content {
        position: relative;
        z-index: 2;
        color: var(--white);
        max-width: 600px;
        padding: 0 20px;
        margin-right: 10%;
        /* Adjust for RTL layout */
    }

    .slide-content h1 {
        font-size: 3.5rem;
        font-weight: 800;
        margin-bottom: 20px;
        font-family: var(--font-secondary);
        line-height: 1.2;
    }

    .slide-content p {
        font-size: 1.25rem;
        margin-bottom: 30px;
        opacity: 0.9;
    }

    .slider-controls {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
        display: flex;
        gap: 10px;
    }

    .slider-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .slider-dot.active {
        background-color: var(--accent-color);
    }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu implementation needed via JS */
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        flex-direction: column;
    }

    .slide-content h1 {
        font-size: 2.5rem;
    }

    .hero-slider,
    .slide {
        height: 500px;
    }
}

/* Installment Page Background */
.installment-hero {
    background-image: linear-gradient(rgba(58, 45, 125, 0.85), rgba(58, 45, 125, 0.7)), url('../images/installment.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 80px 0;
    text-align: center;
    color: var(--white);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

/* Header Animation */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header h1,
.page-header p,
.installment-hero h1,
.installment-hero p {
    animation: fadeSlideIn 1s ease-out forwards;
}

.page-header p,
.installment-hero p {
    animation-delay: 0.3s;
    opacity: 0;
}