:root {
    --primary-color: #2a515a;
    /* Extracted Teal/Blue */
    --secondary-color: #ffffff;
    --accent-color: #f3efe6;
    /* Extracted Cream/Off-white */
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --dark-overlay: rgba(42, 81, 90, 0.9);
    --transition-speed: 0.3s;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 50px;
    /* Adjust based on actual logo ratio */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: var(--primary-color);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.btn-consult {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-consult:hover {
    background-color: var(--accent-color);
    color: var(--secondary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--secondary-color);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-radius: 4px;
    padding: 10px 0;
    top: 100%;
}

.dropdown-content a {
    color: var(--text-color) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    text-transform: none;
}

.dropdown-content a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color) !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(var(--dark-overlay), var(--dark-overlay)), url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--secondary-color);
    padding-top: 80px;
    /* Navbar height */
}

.hero-content h1 {
    color: var(--secondary-color);
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    /* Fixed contrast */
    padding: 15px 35px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #b08d4b;
    transform: translateY(-2px);
}

/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--secondary-color);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    color: #555;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition-speed);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ccc;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    font-size: 0.9rem;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 15px;
    margin-left: 30px;
}

[dir="rtl"] .lang-switcher {
    margin-left: 0;
    margin-right: 30px;
}

.lang-btn {
    border: none;
    background: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: opacity 0.3s;
    opacity: 0.7;
    font-family: inherit;
}

.lang-btn:hover,
.lang-btn.active {
    opacity: 1;
    color: var(--primary-color);
}

/* RTL Adjustments */
[dir="rtl"] body,
[dir="rtl"] [data-i18n] {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    text-align: right;
}

[dir="rtl"] .nav-links {
    margin-right: auto;
    margin-left: 0;
}

[dir="rtl"] .service-card {
    text-align: right;
}

[dir="rtl"] .hero-content {
    text-align: center;
}

[dir="rtl"] .about-content {
    direction: rtl;
}

[dir="rtl"] .about-image {
    order: -1;
}

[dir="rtl"] .section-header {
    text-align: center;
}

[dir="rtl"] .footer-col {
    text-align: right;
}

[dir="rtl"] .footer-col ul li i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .btn-consult {
    margin-right: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
    }

    [dir="rtl"] .lang-switcher {
        margin-right: 0;
        margin-top: 15px;
    }
}