/* General Styles */
body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f8f8f8; /* Light background */
    color: #333;
    line-height: 1.6;
    font-size: 16px; /* Base font size */
}

/* Base font for Arabic, will be overridden by JS for English */
html[dir="rtl"] body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
}

/* Base font for English, will be overridden by JS for Arabic */
html[dir="ltr"] body {
    font-family: 'Poppins', sans-serif;
    direction: ltr;
    text-align: left;
}


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

h1, h2, h3 {
    font-family: 'Amiri', serif; /* Serif font for headings for AR */
    color: #2c3e50; /* Darker blue/grey for headings */
    text-align: center;
    margin-bottom: 30px;
}

html[dir="ltr"] h1, html[dir="ltr"] h2, html[dir="ltr"] h3 { /* Specific font for EN headings */
    font-family: 'Poppins', sans-serif;
}


h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

h2 {
    font-size: 2.5em;
    padding-bottom: 10px;
    border-bottom: 2px solid #e74c3c; /* A touch of red */
    display: inline-block;
    text-align: center;
    width: 100%; /* For centering the border-bottom */
}

a {
    color: #e74c3c; /* Red links */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c0392b; /* Darker red on hover */
}

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

/* Language specific display classes controlled by JS */
.ar { display: inline; }
.en { display: none; }

/* Header & Navigation */
header {
    background-color: #2c3e50; /* Dark blue/grey */
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav .logo {
    font-family: 'Amiri', serif;
    font-size: 1.8em;
    font-weight: bold;
    color: #fff;
}

html[dir="ltr"] nav .logo {
    font-family: 'Poppins', sans-serif; /* Specific font for EN logo */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

/* RTL specific for AR nav (default) */
html[dir="rtl"] nav ul li {
    margin-right: 25px;
    margin-left: 0;
}
html[dir="rtl"] nav ul li:last-child {
    margin-right: 0;
}

/* LTR specific for EN nav (applied by JS) */
html[dir="ltr"] nav ul li {
    margin-left: 25px;
    margin-right: 0;
}
html[dir="ltr"] nav ul li:first-child {
    margin-left: 0;
}


nav ul li a {
    color: #fff;
    font-weight: bold;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s ease;
}

nav ul li a:hover {
    border-bottom: 2px solid #e74c3c; /* Red underline on hover */
}

#lang-toggle {
    background-color: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#lang-toggle:hover {
    background-color: #c0392b;
}

/* Hero Section */
.hero {
    position: relative;
    height: 70vh; /* Adjust height as needed */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden; /* Hide overflowing parts of image */
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area without distorting aspect ratio */
    filter: brightness(0.6); /* Darken image for text readability */
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-content h1 {
    color: #fff;
    font-size: 4em;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.5em;
    font-style: italic;
}

}

/* Section Styling */
section {
    padding: 80px 0;
    border-bottom: 1px solid #eee;
}

section:last-of-type {
    border-bottom: none;
}

/* About Section */
.about-section {
    background-color: #fff;
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}
html[dir="rtl"] .about-content { flex-direction: row-reverse; }
html[dir="ltr"] .about-content { flex-direction: row; }


.about-text {
    flex: 2;
}
html[dir="rtl"] .about-text { text-align: right; }
html[dir="ltr"] .about-text { text-align: left; }


.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

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

.about-section ul {
    list-style: none;
    padding: 0;
}
html[dir="rtl"] .about-section ul { text-align: right; }
html[dir="ltr"] .about-section ul { text-align: left; }


.about-section ul li {
    background-color: #f0f0f0;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

html[dir="rtl"] .about-section ul li { justify-content: flex-end; }
html[dir="ltr"] .about-section ul li { justify-content: flex-start; }


.about-section ul li strong {
    color: #e74c3c;
}
html[dir="rtl"] .about-section ul li strong { margin-left: 10px; margin-right: 0; }
html[dir="ltr"] .about-section ul li strong { margin-right: 10px; margin-left: 0; }


/* Portfolio Section */
.portfolio-category {
    margin-bottom: 60px;
}

.portfolio-category h3 {
    font-size: 1.8em;
    color: #34495e;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 20px;
}
html[dir="rtl"] .portfolio-category h3 { text-align: right; }
html[dir="ltr"] .portfolio-category h3 { text-align: left; }

.portfolio-category p {
    margin-bottom: 30px;
    font-size: 1.1em;
    color: #555;
}
html[dir="rtl"] .portfolio-category p { text-align: right; }
html[dir="ltr"] .portfolio-category p { text-align: left; }


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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%; /* Fixed height for consistency */
    object-fit: cover; /* Cover the area */
    display: block;
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 15px;
    font-size: 1.1em;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

/* @halas_eyes Project Section */
.project-halas-eyes {
    background-color: #f0f0f0;
    text-align: center;
}

.project-halas-eyes img {
  position: relative;
    max-width: 100%;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.project-halas-eyes p {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: center; /* Center align text in this section */
}

/* Contact Section */
footer {
    background-color: #34495e; /* Darker blue/grey */
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.contact-content {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-top: 30px;
    margin-bottom: 50px;
}
html[dir="rtl"] .contact-content { flex-direction: row-reverse; }
html[dir="ltr"] .contact-content { flex-direction: row; }


.contact-info {
    flex: 1;
}
html[dir="rtl"] .contact-info { text-align: right; }
html[dir="ltr"] .contact-info { text-align: left; }


.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

.contact-info a {
    color: #e74c3c; /* Red links */
    font-weight: bold;
}

.contact-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

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

.contact-image p {
    font-style: italic;
    font-size: 0.9em;
    color: #ccc;
    margin-top: 10px;
}

.social-links a {
    display: inline-block;
    font-size: 1.2em;
    color: #fff;
    border: 1px solid #fff;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
html[dir="rtl"] .social-links a { margin-left: 15px; margin-right: 0; }
html[dir="ltr"] .social-links a { margin-right: 15px; margin-left: 0; }
html[dir="rtl"] .social-links a:last-child { margin-left: 0; }
html[dir="ltr"] .social-links a:last-child { margin-right: 0; }


.social-links a:hover {
    background-color: #e74c3c; /* Red background on hover */
    border-color: #e74c3c;
}

.copyright {
    margin-top: 40px;
    font-size: 0.9em;
    color: #bbb;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 2em;
    }
    nav {
        flex-direction: column;
    }
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    nav ul li {
        margin: 5px 10px !important; /* Override specific margin from JS */
    }
    nav ul li:first-child { margin-left: 10px !important; } /* Override specific margin from JS */
    nav ul li:last-child { margin-right: 10px !important; } /* Override specific margin from JS */
    
    .hero {
        height: 50vh;
    }
    .about-content, .contact-content {
        flex-direction: column;
        text-align: center;
    }
    .about-image, .contact-image {
        order: -1; /* Image first on small screens */
    }
    .about-text, .contact-info {
        text-align: center !important; /* Override JS setting for small screens */
    }
    .about-section ul li {
        justify-content: center !important; /* Center on small screens */
    }

    .gallery {
        grid-template-columns: 1fr;
    }
    .portfolio-category h3, .portfolio-category p {
        text-align: center !important; /* Override JS setting for small screens */
    }
    .social-links a {
        margin: 5px 10px !important; /* Override JS setting for small screens */
    }
}