/* Main Stylesheet for Alraha Developing Website */

/* CSS Variables for consistent theming */
:root {
    /* Primary Colors */
    --primary-blue: #1a73e8;
    --primary-green: #34a853;
    --primary-red: #ea4335;
    
    /* Neutral Colors */
    --dark: #333333;
    --medium-dark: #555555;
    --medium: #777777;
    --light-medium: #999999;
    --light: #f5f5f5;
    --white: #ffffff;
    
    /* Font Families */
    --font-english: 'Poppins', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    
    /* Other Variables */
    --border-radius: 5px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-english);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
}

/* RTL Support for Arabic */
html[dir="rtl"] body {
    font-family: var(--font-arabic);
    text-align: right;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--dark);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 15px;
    color: var(--medium-dark);
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-green);
}

ul {
    list-style: none;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    margin-right: 10px;
    margin-bottom: 10px;
}

html[dir="rtl"] .btn {
    margin-right: 0;
    margin-left: 10px;
}

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

.primary-btn:hover {
    background-color: #0d5bba;
    color: var(--white);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

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

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    background-color: var(--white);
    border-radius: 30px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

html[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

.lang-btn {
    padding: 8px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    color: var(--medium-dark);
}

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

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--dark);
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

html[dir="rtl"] .logo-image {
    margin-right: 0;
    margin-left: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
}

.logo .company-first {
    color: var(--primary-blue);
}

.logo .company-second {
    color: var(--primary-green);
}

nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    position: relative;
    margin-left: 25px;
}

html[dir="rtl"] .nav-menu li {
    margin-left: 0;
    margin-right: 25px;
}

.nav-menu a {
    color: var(--dark);
    font-weight: 500;
    padding: 10px 0;
    display: block;
    position: relative;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary-blue);
}

.nav-menu a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: var(--transition);
}

html[dir="rtl"] .nav-menu a:after {
    left: auto;
    right: 0;
}

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

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 99;
    padding: 10px 0;
}

html[dir="rtl"] .dropdown-menu {
    left: auto;
    right: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 10px 20px;
    color: var(--medium-dark);
}

.dropdown-menu a:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

.dropdown-menu a:after {
    display: none;
}

/* Dropdown arrow rotation */
.dropdown > a i {
    transition: transform 0.3s ease;
    margin-left: 5px;
}

html[dir="rtl"] .dropdown > a i {
    margin-left: 0;
    margin-right: 5px;
}

.dropdown.active > a i {
    transform: rotate(180deg);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* Hero Section */
.hero {
    position: relative;
    height: calc(100vh - 80px);
    min-height: 520px;
    overflow: hidden;
    margin-top: -1px;
}

.hero-slider {
    height: 100%;
    position: relative;
}

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

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

.slide-content {
    width: 50%;
    padding: 0 50px;
    z-index: 2;
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.slide-image:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
}

html[dir="rtl"] .slide-image:after {
    background: linear-gradient(-90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
}

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

.prev-btn, .next-btn {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.prev-btn:hover, .next-btn:hover {
    background-color: var(--primary-blue);
}

.slider-dots {
    display: flex;
    margin: 0 15px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Section Styles */
section {
    padding: 20px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    color: var(--dark);
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-blue);
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--medium);
}

/* Services Overview */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-card .icon {
    width: 70px;
    height: 70px;
    background-color: rgba(26, 115, 232, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-blue);
    font-size: 1.8rem;
    transition: var(--transition);
}

.service-card:hover .icon {
    background-color: var(--primary-blue);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    margin-bottom: 20px;
    color: var(--medium);
}

.read-more {
    color: var(--primary-blue);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.read-more i {
    margin-left: 5px;
    transition: var(--transition);
}

html[dir="rtl"] .read-more i {
    margin-left: 0;
    margin-right: 5px;
    transform: rotate(180deg);
}

.read-more:hover i {
    transform: translateX(5px);
}

html[dir="rtl"] .read-more:hover i {
    transform: translateX(-5px) rotate(180deg);
}

/* Why Choose Us */
.why-choose-us {
    background-color: var(--light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature {
    display: flex;
    align-items: flex-start;
}

.feature .icon {
    min-width: 60px;
    height: 60px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: var(--primary-blue);
    font-size: 1.5rem;
    box-shadow: var(--box-shadow);
}

html[dir="rtl"] .feature .icon {
    margin-right: 0;
    margin-left: 20px;
}

.feature-content h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-content p {
    color: var(--medium);
}

/* Stats Counter */
.stats-counter {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.counter {
    padding: 20px;
}

.counter i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--white);
}

.counter-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
}

.counter h4 {
    font-size: 1.1rem;
    color: var(--white);
    opacity: 0.9;
}

/* Testimonials */
.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    display: none;
}

.testimonial.active {
    display: block;
}

.client-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.client-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

html[dir="rtl"] .client-image {
    margin-right: 0;
    margin-left: 15px;
}

.client-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-details h4 {
    margin-bottom: 5px;
}

.client-details p {
    color: var(--medium);
    margin-bottom: 0;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 15px;
    color: var(--medium-dark);
}

.rating {
    color: #ffc107;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.testimonial-dots {
    display: flex;
    margin: 0 15px;
}

.testimonial-controls .prev-btn, .testimonial-controls .next-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-controls .prev-btn:hover, .testimonial-controls .next-btn:hover {
    background-color: var(--primary-green);
}

.testimonial-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(26, 115, 232, 0.3);
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-dots .dot.active {
    background-color: var(--primary-blue);
}

/* Call to Action */
.cta {
    background-color: var(--primary-green);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 15px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.cta .primary-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.cta .secondary-btn {
    border-color: var(--white);
    color: var(--white);
}

.cta .secondary-btn:hover {
    background-color: var(--white);
    color: var(--primary-green);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--white);
    padding: 70px 0 0;
}

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

.footer-logo h2 {
    margin-bottom: 20px;
}

.footer-logo .company-first {
    color: var(--primary-blue);
}

.footer-logo .company-second {
    color: var(--primary-green);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h3, .footer-services h3, .footer-contact h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3:after, .footer-services h3:after, .footer-contact h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-blue);
}

html[dir="rtl"] .footer-links h3:after, 
html[dir="rtl"] .footer-services h3:after, 
html[dir="rtl"] .footer-contact h3:after {
    left: auto;
    right: 0;
}

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

.footer-links ul li a, .footer-services ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links ul li a:hover, .footer-services ul li a:hover {
    color: var(--primary-blue);
    padding-left: 5px;
}

html[dir="rtl"] .footer-links ul li a:hover, 
html[dir="rtl"] .footer-services ul li a:hover {
    padding-left: 0;
    padding-right: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact ul li i {
    margin-right: 10px;
    color: var(--primary-blue);
}

html[dir="rtl"] .footer-contact ul li i {
    margin-right: 0;
    margin-left: 10px;
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--white);
    transition: var(--transition);
}

html[dir="rtl"] .social-icons a {
    margin-right: 0;
    margin-left: 10px;
}

.social-icons a:hover {
    background-color: var(--primary-blue);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

/* Responsive Styles */
@media screen and (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .slide-content {
        width: 70%;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
}

@media screen and (max-width: 768px) {
    header {
        padding: 15px 0;
        overflow: visible;
    }
    
    header .container {
        position: relative;
        overflow: visible;
    }
    
    nav {
        position: relative;
        z-index: 102;
    }
    
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 103;
        padding: 10px;
        cursor: pointer;
        background: none;
        border: none;
        outline: none;
    }
    
    .menu-toggle:hover {
        background-color: rgba(26, 115, 232, 0.1);
        border-radius: 5px;
    }
    
    .menu-toggle i {
        font-size: 1.5rem;
        color: var(--dark);
        transition: var(--transition);
        pointer-events: none;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--box-shadow);
        transition: var(--transition);
        z-index: 101; /* Higher than language switcher */
        overflow-y: auto;
    }
    
    html[dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    html[dir="rtl"] .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 0 0 15px 0;
    }
    
    .nav-menu a {
        padding: 10px 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        transform: none;
        box-shadow: none;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        background-color: rgba(26, 115, 232, 0.05);
        border-radius: var(--border-radius);
        margin-top: 10px;
    }
    
    .dropdown.active .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 300px;
        padding: 10px 0;
    }
    
    .dropdown-menu li {
        margin: 0;
    }
    
    .dropdown-menu a {
        padding: 10px 20px;
    }
    
    .hero {
        height: calc(100vh - 70px);
        min-height: 450px;
        margin-top: -1px;
    }
    
    .slide-content {
        width: 100%;
        text-align: center;
        padding: 0 20px;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .slide-image:after {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    }
    
    section {
        padding: 15px 0;
    }
    
    .feature {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .feature .icon {
        margin: 0 0 15px 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .language-switcher {
        display: none;
    }
    
    /* Mobile language switcher inside menu */
    .mobile-language-switcher {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .language-switcher-mobile {
        display: flex;
        background-color: var(--light);
        border-radius: 30px;
        overflow: hidden;
        margin: 0;
    }
    
    .language-switcher-mobile .lang-btn {
        flex: 1;
        padding: 10px 15px;
        background: transparent;
        border: none;
        cursor: pointer;
        font-weight: 600;
        transition: var(--transition);
        color: var(--medium-dark);
        text-align: center;
    }
    
    .language-switcher-mobile .lang-btn.active {
        background-color: var(--primary-blue);
        color: var(--white);
    }
}

/* Hide mobile language switcher on desktop */
@media screen and (min-width: 769px) {
    .mobile-language-switcher {
        display: none;
    }
}

/* Mobile container adjustments for better width utilization */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    /* Blog and contact page specific adjustments */
    .blog-container {
        gap: 20px;
    }
    
    .contact-info {
        margin-bottom: 30px;
    }
    
    .contact-form-container {
        padding: 20px;
    }
    
    .sidebar-widget {
        padding: 20px;
        margin-bottom: 20px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    /* Enhanced mobile optimizations for contact and blog */
    .blog-container {
        gap: 15px;
    }
    
    .blog-post {
        margin-bottom: 20px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .contact-form-container {
        padding: 15px;
    }
    
    .contact-form {
        gap: 15px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .sidebar-widget {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .sidebar-widget h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
}

@media screen and (max-width: 576px) {
    .language-switcher {
        display: none;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .hero {
        height: calc(100vh - 60px);
        min-height: 400px;
        margin-top: -1px;
    }
    
    .slide-content h2 {
        font-size: 1.5rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .counter-value {
        font-size: 2rem;
    }
    
    .client-image {
        width: 50px;
        height: 50px;
    }
}