/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #263850;
    --secondary-color: #f39c12;
    --accent-color: #e67e22;
    --dark-color: #1a2332;
    --light-color: #f3f4f6;
    --text-color: #4b5563;
    --white: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.logo-text {
    margin-left: 10px;
    font-weight: 700;
}

/* Language Switch */
.lang-switch {
    font-size: 0.9rem;
    margin-left: 20px;
    color: var(--dark-color);
}

.lang-switch a {
    text-decoration: none;
    color: var(--dark-color);
    margin: 0 3px;
}

.lang-switch a.active {
    color: var(--secondary-color);
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

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

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

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

.btn-white:hover {
    background: var(--light-color);
    transform: translateY(-2px);
}

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

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

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1.25rem;
}

/* About Section */
.about-home {
    padding: 80px 0;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content h2 {
    color: var(--dark-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-list {
    list-style: none;
    margin: 30px 0;
}

.about-list li {
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.about-list i {
    color: var(--secondary-color);
    margin-right: 15px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services-home {
    padding: 80px 0;
    background: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 50px;
}

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

.service-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.service-card h3 {
    color: var(--dark-color);
    padding: 20px 20px 10px;
}

.service-card p {
    padding: 0 20px 20px;
}

.service-link {
    display: inline-block;
    padding: 0 20px 20px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Statistics Section */
.statistics {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    color: var(--white);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--primary-color);
}

.cta-content {
    text-align: center;
    color: var(--white);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column h4 {
    margin-bottom: 20px;
    color: var(--white);
}

.footer-column p {
    line-height: 1.8;
    opacity: 0.9;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    padding: 8px 0;
}

.footer-column ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-column ul li a:hover {
    opacity: 1;
}

.contact-info li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    opacity: 0.9;
}

.contact-info i {
    margin-right: 10px;
    width: 20px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--secondary-color);
}

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

/* Page Specific Styles */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 80px 0;
    text-align: center;
    color: var(--white);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.page-content {
    padding: 80px 0;
}

/* Services Page */
.services-detailed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

/* لعمل زجزاج في النسخة الإنجليزية */
.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) .service-info {
    direction: ltr;
}

.service-info h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.service-info p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.service-features {
    list-style: none;
    margin: 20px 0;
}

.service-features li {
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.service-features i {
    color: var(--secondary-color);
    margin-right: 10px;
}

/* Products Page */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    color: var(--dark-color);
    margin-bottom: 10px;
}

.product-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* Contact Form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.contact-sidebar {
    background: var(--light-color);
    padding: 40px;
    border-radius: 10px;
}

.contact-sidebar h3 {
    color: var(--dark-color);
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: start;
    margin-bottom: 25px;
}

.info-item i {
    color: var(--secondary-color);
    margin-right: 15px;
    margin-top: 5px;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .service-detail {
        grid-template-columns: 1fr;
    }

    .service-detail:nth-child(even) {
        direction: ltr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lang-switch {
        display: none;
    }
}

/* WhatsApp Widget Styles */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.whatsapp-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.whatsapp-chat {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    overflow: hidden;
}

.whatsapp-chat.active {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

.chat-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.chat-title h4 {
    margin: 0;
    font-size: 16px;
}

.chat-title p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.close-chat {
    position: absolute;
    right: 15px;
    top: 15px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.chat-body {
    padding: 20px;
    background: #f8f9fa;
}

.chat-message {
    background: white;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.chat-message p {
    margin: 0;
    color: #333;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.chat-option:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateX(5px);
}

.chat-option i {
    margin-right: 12px;
    font-size: 18px;
}

@media (max-width: 480px) {
    .whatsapp-chat {
        width: calc(100vw - 40px);
        right: -10px;
    }
}

/* =========================================
   RTL / Arabic Support
   ========================================= */

body.rtl {
    text-align: right;
}

/* تصحيح الهوامش في العربي */
body.rtl .logo i {
    margin-right: 0;
    margin-left: 10px;
}

body.rtl .logo-text {
    margin-left: 0;
    margin-right: 10px;
}

body.rtl .about-list i,
body.rtl .service-features i,
body.rtl .contact-info i,
body.rtl .info-item i,
body.rtl .chat-option i {
    margin-right: 0;
    margin-left: 10px;
}

/* الناف بار واللينك سويتش */
body.rtl .nav-wrapper {
    flex-direction: row-reverse;
}

body.rtl .nav-menu {
    flex-direction: row-reverse;
}

body.rtl .lang-switch {
    margin-left: 0;
    margin-right: 20px;
}

/* تصحيح المحاذاة في أقسام عربية */
body.rtl .about-content,
body.rtl .service-info,
body.rtl .contact-form,
body.rtl .contact-sidebar {
    text-align: right;
}

/* إلغاء حيلة الاتجاه المتعاكس في الخدمات للنسخة العربية (اختياري) */
body.rtl .service-detail:nth-child(even) {
    direction: ltr; /* يبقى التخطيط ثابت بدون لخبطة */
}

body.rtl .service-detail:nth-child(even) .service-info {
    direction: ltr;
}

/* واتساب إلى اليسار في العربي */
body.rtl .whatsapp-widget {
    right: auto;
    left: 20px;
}

body.rtl .whatsapp-chat {
    right: auto;
    left: 0;
}

@media (max-width: 768px) {
    body.rtl .nav-menu {
        left: auto;
        right: 0;
    }
}
/* Logo text next to the logo - smaller */
.logo-text {
    font-size: 16px;      /* تصغير الخط */
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;  /* عشان ما ينزل سطر ثاني بسهولة */
}

/* Footer main title smaller */
.footer .footer-column h3 {
    font-size: 1.1rem;    /* أصغر شوي من الافتراضي */
    margin-bottom: 10px;
}

/* Projects cards with images on home page */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.project-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-info {
    padding: 16px 18px 20px;
}

/* Enhanced Company Name Styles */
.company-name-hero {
    margin-bottom: 25px;
    text-align: center;
}

.company-name-main {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    letter-spacing: 3px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin-bottom: 5px;
}

.company-name-sub {
    display: block;
    font-size: 1.8rem;
    font-weight: 300;
    color: #f39c12;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

.company-tagline {
    margin-top: 10px;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    font-style: italic;
    letter-spacing: 1px;
}

/* Search Bar Styles */
.search-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.search-wrapper {
    text-align: center;
}

.search-wrapper h2 {
    color: #263850;
    margin-bottom: 25px;
    font-size: 2rem;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.2);
}

.search-select {
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.search-select:hover {
    border-color: #f39c12;
}

.search-btn {
    padding: 15px 35px;
    background: #f39c12;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.4);
}

.search-results {
    margin-top: 30px;
    text-align: left;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.search-result-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.search-result-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.search-result-title {
    font-size: 1.2rem;
    color: #263850;
    margin-bottom: 5px;
}

.search-result-category {
    display: inline-block;
    background: #f39c12;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.search-result-description {
    color: #4b5563;
}

@media (max-width: 768px) {
    .company-name-main {
        font-size: 2rem;
    }
    
    .company-name-sub {
        font-size: 1.2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .search-input,
    .search-select,
    .search-btn {
        width: 100%;
    }
}
