/* --- 1. GLOBAL RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: white;
    /* Blue Gradient matching your image */
    background: linear-gradient(135deg, #0093E9 0%, #0056b3 50%, #003366 100%);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    animation: fadeInPage 1.5s ease-out; /* Smooth page entry */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- 2. HEADER & NAVBAR (Centered Nav, Far Right Translate) --- */
header {
    padding: 30px 0;
}

.navbar {
    display: flex;
    justify-content: space-between; /* Pushes Logo left and Translate right */
    align-items: center;
    position: relative; /* Anchor for centered nav */
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

.logo-brand h1 {
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.logo-brand h1 span { font-weight: 600; }

/* DEAD CENTER NAVIGATION */
nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    text-transform: lowercase;
    transition: 0.3s;
}

nav ul li a.active {
    background: rgba(255, 255, 255, 0.9);
    color: #003366;
    padding: 8px 20px;
    border-radius: 10px;
}

/* FAR RIGHT TRANSLATE BUTTON */
.translate-container {
    z-index: 10;
}

.translate-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.3s;
}

.translate-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.translate-icon {
    width: 20px;
    filter: brightness(0) invert(1); /* Turns black icon white */
}

/* --- 3. HERO SECTION (Home Page) --- */
.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: calc(100vh - 150px);
}

.hero-content {
    max-width: 550px;
    animation: slideUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tagline { letter-spacing: 4px; font-size: 18px; margin-bottom: 20px; opacity: 0.9; }
.main-title { font-size: 64px; font-weight: 800; line-height: 1.1; margin-bottom: 30px; }
.description { font-size: 15px; margin-bottom: 40px; opacity: 0.8; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    background: white;
    color: #003366;
    padding: 5px 5px 5px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.2s;
}

.btn-primary:hover { transform: scale(1.05); }

.arrow-icon {
    background: #0093E9;
    color: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 20px;
}

.logo-circle {
    width: 420px;
    height: 420px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 8px solid #00ACC1;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    overflow: hidden;
    animation:fadeInPage 1.2s ease-out ;
}
.logo-circle img { width: 85%; }

/* --- 4. SHARED PAGE COMPONENTS (About/Services) --- */
.section-padding { padding: 80px 0; }
.flex-row { display: flex; align-items: center; gap: 60px; justify-content: space-between; }

.image-frame { position: relative; padding: 20px; }
.image-frame::before { 
    content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; 
    border: 1px solid rgba(255,255,255,0.4); border-radius: 40px; 
}
.image-frame img { 
    width: 450px; height: 550px; object-fit: cover; border-radius: 30px; 
    border: 1px solid rgba(255,255,255,0.6); position: relative; z-index: 2; 
    animation:fadeInPage 1.2s ease-out;
}

.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 30px; }
.service-item h3 { color: #70d8ff; margin-bottom: 10px; }

/* --- 5. CONTACT & OFFICES --- */
.contact-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; }
.card { background: white; color: #003366; padding: 30px; border-radius: 15px; text-align: center; }
.form-section { background: rgba(255,255,255,0.1); padding: 40px; border-radius: 20px; display: flex; gap: 40px; }
input, textarea { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 5px; border: none; }
button { background: #0093E9; color: white; border: none; padding: 15px 40px; border-radius: 5px; cursor: pointer; }
/* Office Section Styles */
.office-section {
    margin-top: 80px;
    padding-bottom: 60px;
}

.pill-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 50px;
    font-weight: 600;
}

.office-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    gap: 25px;
}

.office-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    color: #333;
    transition: transform 0.3s ease;
}

/* Update the main card class */
.office-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    transition: transform 0.3s ease;
    
    /* Centering logic added here */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.office-card:hover {
    transform: translateY(-5px);
}

.icon-circle {
    background: #7c76f0; 
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
    /* This ensures the circle stays centered even if display changes */
    flex-shrink: 0; 
}

.office-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #003366;
    width: 100%; /* Ensures text alignment works properly */
}

.office-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
    max-width: 280px; /* Optional: keeps the text block tidy in the center */
}

.get-direction {
    color: #7c76f0;
    text-decoration: none; /* Fixed typo from 'ceme' */
    font-weight: 600;
    font-size: 16px;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
    display: inline-block;
}

.get-direction:hover {
    border-bottom: 1px solid #7c76f0;
}

/* Responsive for smaller screens */
@media (max-width: 992px) {
    .office-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .office-grid { 
        grid-template-columns: 1fr; 
    }
}

/* --- 6. FOOTER --- */
footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 60px 0 30px;
    margin-top: 100px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

.contact-column {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers Contact Us section */
    text-align: center;
}

.footer-column h3 { font-size: 18px; color: #70d8ff; margin-bottom: 25px; }
.footer-item, .social-row-link { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; color: white; text-decoration: none; }

/* Social Links with Text */
.social-row-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    text-decoration: none;
    color: white;
    font-size: 15px;
    transition: 0.3s;
}

.social-row-link:hover { color: #70d8ff; transform: translateX(5px); }

/* The specific icon image styling */
.social-icon-img {
    width: 22px; /* Small size as requested */
    height: 22px;
    object-fit: contain;
    /* Turns your black icons into WHITE icons */
    filter: brightness(0) invert(1); 
}

.footer-bottom { 
    text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.1); 
    padding-top: 30px; margin-top: 40px; font-size: 14px; opacity: 0.8; 
}

/* --- 7. ANIMATIONS & RTL --- */
/* --- NEW: SMOOTH PAGE ANIMATIONS --- */

/* 1. Fade in the entire body on load */
body {
    animation: fadeInPage 1.2s ease-out;
}

@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 2. Slide up effect for main content blocks */
.hero-content, .image-frame, .content, .form-section, .office-card {
    animation: slideUp 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 3. Smooth transition for hover effects */
a, button, .card, .office-card {
    transition: all 0.3s ease-in-out !important;
}

/* --- WHATSAPP ICON STYLES --- */
.office-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.whatsapp-link {
    color: #25D366; /* WhatsApp Green */
    text-decoration: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.whatsapp-link:hover {
    transform: scale(1.2);
}

/* --- ARABIC RTL OVERRIDES --- */
[dir="rtl"] {
    font-family: 'Montserrat', sans-serif; /* You can change this to an Arabic font later if desired */
}

[dir="rtl"] .logo-brand {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-primary {
    padding: 5px 30px 5px 5px;
}

[dir="rtl"] .arrow-icon {
    margin-left: 0;
    margin-right: 20px;
    transform: rotate(180deg);
}

[dir="rtl"] .translate-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .social-row-link:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .form-section div {
    text-align: right !important;
}

/* --- PREVENT SPECIFIC ELEMENTS FROM CHANGING DIRECTION (RTL OVERRIDES) --- */

/* 1. Keep phone numbers and their icons in the footer Left-to-Right */
[dir="rtl"] .footer-item {
    direction: ltr;
}

/* 2. Keep phone numbers in the Contact Us cards Left-to-Right */
[dir="rtl"] .contact-row .card p {
    direction: ltr;
}

/* 3. Keep the Submit button on the left side */
[dir="rtl"] .form-section form {
    text-align: center; /* Forces the button to stay on the left */
}

/* Ensure the inputs above the submit button still type from Right-to-Left */
[dir="rtl"] .form-section input,
[dir="rtl"] .form-section textarea {
    text-align: right;
    direction: rtl;
}

/* Keep the Submit button text styling strictly Left-to-Right */[dir="rtl"] button[type="submit"] {
    direction: ltr;
}
/* --- MOBILE RESPONSIVENESS & SMOOTHING --- */

@media (max-width: 768px) {
    /* 1. Reset Container Padding */
    .container {
        padding: 0 20px;
    }

    /* 2. Fix Header & Navbar */
    header {
        padding: 15px 0;
    }

    .navbar {
        flex-direction: column; /* Stack logo, nav, and translate */
        gap: 20px;
        text-align: center;
    }

    nav {
        position: static; /* Remove the absolute centering */
        transform: none;
        left: 0;
        width: 100%;
    }

    nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap; /* Allow menu items to wrap if needed */
    }

    nav ul li a {
        font-size: 14px;
    }

    /* 3. Hero Section (Home Page) */
    .hero-wrapper {
        flex-direction: column-reverse; /* Put image on top of text for mobile */
        height: auto;
        padding-top: 40px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        margin-top: 30px;
    }

    .main-title {
        font-size: 38px; /* Smaller title for mobile */
    }

    .logo-circle {
        width: 280px; /* Smaller logo circle to fit phone screens */
        height: 280px;
        margin: 0 auto;
    }

    .btn-primary {
        margin-bottom: 50px;
    }

    /* 4. About & Services Layouts */
    .flex-row {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .image-frame img {
        width: 100%; /* Responsive width */
        height: auto;
        max-width: 350px; /* Limits size on large phones */
    }

    .services-grid {
        grid-template-columns: 1fr; /* Single column for services */
    }

    /* 5. Contact Page */
    .contact-row {
        grid-template-columns: 1fr; /* Stack "Call us", "Email us" cards */
    }

    .form-section {
        flex-direction: column;
        padding: 25px;
    }

    .form-section div {
        text-align: center !important;
    }

    /* 6. Offices Section */
    .office-grid {
        grid-template-columns: 1fr !important;
    }

    /* 7. Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .contact-column {
        align-items: center;
    }

    .social-row-link {
        justify-content: center;
    }

    /* 8. Fix RTL Issues on Mobile */
    [dir="rtl"] nav ul {
        flex-direction: row;
    }
}

/* 9. Overall Smooth Experience */
html {
    scroll-behavior: smooth;
}

/* Improve button tap feel for mobile */
a, button {
    touch-action: manipulation;
}