/* Main CSS for Eng Khaled Al-Zagri Engineering Website */

:root {
  --primary-color: #0a1f44; /* Dark blue from logo */
  --secondary-color: #e61e2a; /* Red from logo */
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --border-color: #dee2e6;
}

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

body {
  font-family: 'Cairo', 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--light-color);
}

/* RTL Support for Arabic */
body.rtl {
  direction: rtl;
  text-align: right;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Styles */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  margin-right: 10px;
}

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

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

.rtl nav ul li {
  margin-left: 0;
  margin-right: 20px;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--secondary-color);
}

/* Language Switcher */
.language-switcher {
  margin-left: 20px;
}

.rtl .language-switcher {
  margin-left: 0;
  margin-right: 20px;
}

.language-switcher button {
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s;
}

.language-switcher button:hover {
  background-color: white;
  color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(10, 31, 68, 0.8), rgba(10, 31, 68, 0.8)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 5rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--secondary-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-weight: 500;
}

.btn:hover {
  background-color: #c41822;
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary-color);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

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

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

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

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

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

.service-content {
  padding: 1.5rem;
}

.service-content h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.project-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(10, 31, 68, 0.8);
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.project-card:hover .project-overlay {
  transform: translateY(0);
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
}

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

.footer-logo img {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-links h4 {
  margin-bottom: 1rem;
  color: white;
}

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

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links ul li a:hover {
  color: white;
}

.footer-contact p {
  margin-bottom: 0.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  transition: background-color 0.3s;
}

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

.copyright {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
  nav ul {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 250px;
    background-color: var(--primary-color);
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 1000;
  }
  
  .rtl .mobile-menu {
    right: auto;
    left: 0;
    transform: translateX(-100%);
  }
  
  .mobile-menu.active {
    transform: translateX(0);
  }
  
  .mobile-menu ul {
    list-style: none;
    margin-top: 2rem;
  }
  
  .mobile-menu ul li {
    margin-bottom: 1rem;
  }
  
  .mobile-menu ul li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
  }
  
  .close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    cursor: pointer;
  }
  
  .rtl .close-menu {
    right: auto;
    left: 1rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 576px) {
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  .language-switcher {
    margin: 1rem 0;
  }
}

/* Google AdSense Styles */
.ad-container {
  width: 100%;
  margin: 2rem auto;
  text-align: center;
  overflow: hidden;
}

.ad-container.horizontal {
  height: 90px;
}

.ad-container.vertical {
  height: 600px;
  max-width: 300px;
}

.ad-container.square {
  height: 250px;
  max-width: 300px;
}
