/* ==== El Gendy Interiors – Clean RTL Dark Theme ==== */
/* Base Styles and Color Palette */
:root {
  /* Brand */
  --primary-dark: #232121;   /* page background */
  --off-white: #f4f3f3;      /* main text */
  --accent: #5177a8;         /* accent (links / buttons) */

  /* Secondary Palette */
  --secondary-brown: #704f40;
  --light-beige: #b4a38f;
  --dark-gray: #212121;

  --warm-brown: #4d362b;
  --soft-blue: #7aa3bc;
  --cream: #e2d8c2;
  --rust: #b77941;
  --deep-red: #9b4d2a;
  --dark-brown: #372920;
  --navy: #263673;
  --deep-black: #170b0b;
  --rich-brown: #1e140b;
  --darker-brown: #0b0807;
  --teal: #466061;
  --dark-navy: #24284c;
  --burgundy: #5c2416;
  --forest-green: #384541;

  /* UI helpers */
  --border: #2a2a2a;
  --panel: #1a1a1a;
  --shadow: rgba(0,0,0,.25);
}

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

html, body { height: 100%; }

body {
  font-family: 'Tajawal', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
  direction: rtl;
  background: var(--primary-dark);
  color: var(--off-white);
  line-height: 1.6;
}

/* Accessibility */
a { color: var(--soft-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

img { max-width: 100%; height: auto; display: block; border-radius: 10px; }

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

/* ===== Header ===== */
header {
  background: var(--dark-gray);
  color: var(--off-white);
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px var(--shadow);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  flex-direction: row-reverse; /* RTL */
}

/* Reserve space for fixed header */
:root { --header-h: 72px; }
body { padding-top: var(--header-h); }

.logo {
  display: flex; align-items: center; gap: 12px;
}
.logo img { height: 44px; width: auto; }
.logo-text { display: flex; flex-direction: column; }
.logo h1 { font-size: 22px; font-weight: 700; margin: 0; }
.logo p { font-size: 12px; opacity: .85; margin: 0; }

nav ul {
  list-style: none; display: flex; align-items: center; gap: 22px;
}
nav a {
  color: var(--off-white); font-weight: 500; font-size: 16px; white-space: nowrap;
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: .2s ease;
}
nav a:hover { color: var(--light-beige); }
nav a.active { color: var(--light-beige); border-bottom-color: var(--light-beige); }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--accent);
  font-weight: 600;
  font-size: 16px;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { background: transparent; color: var(--light-beige); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--off-white); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--light-beige); }

/* ===== Sections ===== */
section { padding: 72px 0; }
.section-description {
  text-align: center; font-size: 18px; opacity: .9; max-width: 700px; margin: 0 auto 32px;
}
section h2 {
  text-align: center; font-size: 32px; margin-bottom: 32px; color: var(--off-white); position: relative;
}
section h2::after {
  content: ''; display: block; width: 80px; height: 3px; background: var(--secondary-brown); margin: 12px auto 0;
}

/* ===== Hero ===== */
.hero {
  background:
    linear-gradient(
      rgba(35,33,33,.20),  /* كان .65 */
      rgba(35,33,33,.20)
    ),
    url('img/placeholder-hero.png');
  background-size: cover;
  background-position: center;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--off-white);
  border-radius: 0 0 20px 20px;
}
/* عربي (يمين + لتحت) */
html[dir="rtl"] .hero-content h2,
html[dir="rtl"] .hero-content p {
  transform: translate(30px, 290px);
}

/* إنجليزي (شمال + لتحت) */
html[dir="ltr"] .hero-content h2,
html[dir="ltr"] .hero-content p {
  transform: translate(70px, 290px);
}


/* ===== Features ===== */
.features {
  background: var(--secondary-brown);
  color: var(--off-white);
  padding: 50px 0;
}
.features .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card {
  text-align: center; padding: 20px;
}
.feature-card h3 { font-size: 20px; margin-bottom: 10px; color: var(--light-beige); }
.feature-card p { font-size: 16px; }

/* ===== Page Header (inner pages) ===== */
.page-header {
  background: var(--dark-gray);
  color: var(--off-white);
  padding: 72px 0 40px;
  text-align: center;
}
.page-header h1 { font-size: 32px; margin: 0; }

/* ===== About ===== */
.about { background: var(--primary-dark); }
.about-content {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center;
}
.about-text { font-size: 17px; }
.about-text p { margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 20px; text-align: center; }
.stat-item h3 { font-size: 28px; color: var(--secondary-brown); margin-bottom: 4px; }
.stat-item p { font-size: 14px; opacity: .9; }

.about-image { border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px var(--shadow); }
.about-image img { width: 100%; height: 380px; object-fit: cover; border-radius: 12px; }

.mission-vision { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 22px 0; }
.mission, .vision { padding: 16px; background: color-mix(in srgb, var(--cream) 10%, var(--panel)); border: 1px solid var(--border); border-radius: 12px; }
.mission h3, .vision h3 { color: var(--light-beige); margin-bottom: 10px; }

/* ===== Team ===== */
.team { background: color-mix(in srgb, var(--cream) 8%, var(--primary-dark)); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.team-member {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 14px var(--shadow); text-align: center;
}
.member-image img { width: 100%; height: 240px; object-fit: cover; border-radius: 12px 12px 0 0; }
.member-info { padding: 16px; }
.member-info h3 { color: var(--light-beige); margin-bottom: 6px; }
.member-info p { opacity: .9; }

/* ===== Services (sections + page) ===== */
.services { background: color-mix(in srgb, var(--cream) 8%, var(--primary-dark)); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

.services-page { background: var(--primary-dark); }
.services-intro { text-align: center; margin-bottom: 32px; font-size: 17px; opacity: .95; }

.service-category {
  margin-bottom: 28px; padding: 22px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px;
}
.service-category h2 { color: var(--light-beige); text-align: right; margin-bottom: 12px; }
.service-category h3 { color: var(--warm-brown); margin: 14px 0 8px; }
.service-category p { margin-bottom: 12px; line-height: 1.8; }
.service-features ul { padding-right: 18px; }
.service-features li { margin-bottom: 8px; }

.types-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.type-card {
  background: var(--primary-dark); padding: 16px; border-radius: 10px;
  border: 1px solid var(--border); box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.type-card h4 { color: var(--light-beige); margin-bottom: 8px; }

.service-card {
  background: var(--panel); padding: 20px; border-radius: 12px; text-align: center;
  border: 1px solid var(--border); transition: transform .25s ease, box-shadow .25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 10px 24px var(--shadow); }
.service-card h3 { color: var(--light-beige); margin-bottom: 10px; font-size: 20px; }
.service-card p { opacity: .95; }
.service-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px 10px 0 0; }

/* ===== Portfolio ===== */
.portfolio, .portfolio-page { background: var(--primary-dark); }
.portfolio-categories {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 28px;
}
.category-btn {
  background: var(--accent); color: #fff; border: none; padding: 10px 18px; border-radius: 999px;
  cursor: pointer; font-family: inherit; transition: filter .2s ease, transform .2s ease;
}
.category-btn:hover, .category-btn.active { filter: brightness(1.1); transform: translateY(-2px); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }

#index-home .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
#index-home .portfolio-item { height: 240px; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 14px rgba(0,0,0,.18); }

.portfolio-item { position: relative; overflow: hidden; border-radius: 10px; height: 280px; }
.portfolio-item img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease;
}
.portfolio-item:hover img { transform: scale(1.08); }

.portfolio-overlay {
  position: absolute; inset-inline: 0; bottom: 0;
  background: rgba(35,33,33,.82); color: var(--off-white);
  padding: 16px; transform: translateY(100%); transition: transform .3s ease;
}
.portfolio-item:hover .portfolio-overlay { transform: translateY(0); }
.portfolio-overlay h3 { margin-bottom: 4px; color: var(--light-beige); }
.portfolio-overlay p { font-size: 14px; margin: 0; }

/* ===== Testimonials ===== */
.testimonials { background: color-mix(in srgb, var(--cream) 8%, var(--primary-dark)); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial-card {
  background: var(--panel); padding: 22px; border-radius: 12px; border: 1px solid var(--border);
  box-shadow: 0 5px 16px rgba(0,0,0,.12);
}
.testimonial-card p { font-style: italic; margin-bottom: 10px; }
.testimonial-card h4 { color: var(--light-beige); margin-bottom: 4px; }

/* ===== CTA ===== */
.cta-section {
  background:
    linear-gradient(rgba(35,33,33,.8), rgba(35,33,33,.8)),
    url('img/placeholder-hero.png');
  background-size: cover; background-position: center;
  color: var(--off-white); text-align: center; padding: 72px 0; border-radius: 14px;
}
.cta-section h2 { font-size: 30px; margin-bottom: 14px; }
.cta-section p { font-size: 18px; max-width: 700px; margin: 0 auto 20px; }

/* ===== Contact ===== */
.contact, .contact-page { background: color-mix(in srgb, var(--cream) 8%, var(--primary-dark)); }
.contact-content {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px;
}
.contact-info h2, .contact-form-section h2 { color: var(--light-beige); margin-bottom: 16px; }
.info-item { margin-bottom: 18px; }
.info-item h3 { color: var(--warm-brown); margin-bottom: 8px; }
.map-container { margin-top: 18px; }
.map-placeholder {
  background: #3a3a3a; color: #ddd; border: 1px dashed #555;
  height: 200px; display: grid; place-items: center; border-radius: 10px;
}

/* Contact Form Section */
.contact-form-section {
    background-color: var(--panel);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.contact-form-section h2 {
    color: var(--secondary-brown);
    margin-bottom: 25px;
    text-align: center;
    font-size: 28px;
}

.contact-form {
    display: grid;
    gap: 20px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 14px 16px;
    background: var(--deep-black);
    color: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #bfbfbf;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(81, 119, 168, 0.2);
}

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

.contact-form button {
    background-color: var(--secondary-brown);
    color: var(--off-white);
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.contact-form button:hover {
    background-color: var(--warm-brown);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ===== FAQ ===== */
.faq { background: color-mix(in srgb, var(--cream) 8%, var(--primary-dark)); }
.faq-items { display: grid; gap: 16px; }
.faq-item {
  background: var(--panel); padding: 18px; border-radius: 10px; border: 1px solid var(--border);
}
.faq-item h3 { color: var(--light-beige); margin-bottom: 10px; }

/* ===== Stats Cards ===== */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 18px;
}
.stat-card {
  background: var(--panel); padding: 18px; border-radius: 10px; text-align: center; border: 1px solid var(--border);
}
.stat-card h3 { color: var(--light-beige); margin-bottom: 6px; }
.stat-card p { font-size: 22px; font-weight: 700; color: var(--warm-brown); margin: 0; }

/* ===== Footer ===== */
footer {
  background: var(--dark-gray);
  color: var(--off-white);
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  :root { --header-h: 68px; }
  .about-content { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  :root { --header-h: 66px; }
  header .container { flex-direction: column; text-align: center; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: 12px; }
  section { padding: 60px 0; }
  .hero-content h2 { font-size: 34px; }
  .hero-content p { font-size: 17px; }
  .stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  :root { --header-h: 64px; }
  .btn { padding: 10px 18px; font-size: 15px; }
  .hero-content h2 { font-size: 28px; }
  .hero-content p { font-size: 16px; }
  .stats { grid-template-columns: 1fr; }
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #c3e6cb;
    text-align: center;
    font-weight: 500;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #f5c6cb;
    text-align: center;
    font-weight: 500;
}
/* ======= Portfolio Grid New Layout ======= */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 صور في الصف */
  gap: 25px;
  margin-top: 35px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .35s ease;
}

.portfolio-item:hover {
  transform: translateY(-4px);
}

.portfolio-item img {
  width: 100%;
  height: 330px; /* شكل كبير فخم */
  object-fit: cover;
  border-radius: 12px;
  transition: transform .35s ease;
}

.portfolio-item:hover img {
  transform: scale(1.06);
}

/* Overlay */
.portfolio-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 18px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  opacity: 0;
  transition: opacity .35s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

/* فلترة */
.portfolio-categories {
  margin-top: 25px;
  text-align: center;
}

.category-btn {
  padding: 10px 18px;
  margin: 5px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #b4a38f;
  color: #232121;
  font-weight: 600;
  transition: .25s;
}

.category-btn.active,
.category-btn:hover {
  background: #5177a8;
  color: #fff;
}

/* موبايل */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .portfolio-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  .portfolio-item img {
    height: 260px;
  }
}
/* ===== Watermark Logo Over Image ===== */
.portfolio-item {
  position: relative;
}

/* مكان وشكل اللوجو */
.portfolio-item::after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 60px; /* حجم اللوجو */
  height: 60px;
  background-image: url('img/logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.65; /* شفافية بسيطة */
  pointer-events: none; /* علشان اللوجو ما يغطّيش على الضغط */
  transition: opacity .3s ease;
}

/* عند الـ Hover تزيد وضوح بسيط */
.portfolio-item:hover::after {
  opacity: 1;
}

/* Language Switcher */
.language-switcher {
  margin-right: auto;
}

.lang-link {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  transition: transform .2s ease, background .2s ease;
}

.lang-link:hover {
  background: var(--secondary-brown);
  transform: translateY(-1px);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .language-switcher {
    margin-right: 0;
    order: -1;
  }
}

/* ==== Team section polish ==== */
.team {
  background: color-mix(in srgb, var(--cream) 8%, var(--primary-dark));
  padding: 60px 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 22px;
}

.team-member {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-member:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px var(--shadow);
}

.member-image {
  aspect-ratio: 4/3;            /* نفس الارتفاع لكل الصور */
  overflow: hidden;
}

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

.member-info {
  padding: 14px 16px 16px;
}

.member-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--off-white);
}

.member-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: color-mix(in srgb, var(--secondary-brown) 25%, var(--panel));
  color: var(--light-beige);
  border: 1px solid var(--border);
}

/* ريسبونسيف */
@media (max-width: 1024px){
  .team-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
}
@media (max-width: 780px){
  .team-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 520px){
  .team-grid { grid-template-columns: 1fr; }
}
  html[dir="rtl"] body { direction: rtl; text-align: right; }
    html[dir="ltr"] body { direction: ltr; text-align: left; }

    header nav ul { display:flex; align-items:center; gap:16px; }
    html[dir="rtl"] header nav ul { justify-content:flex-end; }
    html[dir="ltr"] header nav ul { justify-content:flex-start; }

    .lang-switch{ display:flex; gap:8px; align-items:center; }
    html[dir="rtl"] .lang-switch { margin-left:auto; }
    html[dir="ltr"] .lang-switch { margin-right:auto; }
    .lang-switch a{ padding:6px 10px; border-radius:999px; text-decoration:none; border:1px solid #e7e7e7; font-weight:600; }
    .lang-switch .active{ background:#704f40; color:#fff; border-color:#704f40; }

    html[dir="rtl"] .page-header .container,
    html[dir="rtl"] .hero .container,
    html[dir="rtl"] .features .container,
    html[dir="rtl"] .about .container,
    html[dir="rtl"] .services .container,
    html[dir="rtl"] .portfolio .container,
    html[dir="rtl"] .contact .container,
    html[dir="rtl"] footer .container { text-align:right; }
    html[dir="ltr"] .page-header .container,
    html[dir="ltr"] .hero .container,
    html[dir="ltr"] .features .container,
    html[dir="ltr"] .about .container,
    html[dir="ltr"] .services .container,
    html[dir="ltr"] .portfolio .container,
    html[dir="ltr"] .contact .container,
    html[dir="ltr"] footer .container { text-align:left; }

    .about .about-content{ display:grid; grid-template-columns:1.2fr .8fr; gap:20px; align-items:start; }
    @media (max-width: 900px){ .about .about-content{ grid-template-columns:1fr; } }
    .stats{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:14px; }
    .stat-item h3{ margin:0; font-size:28px; }

    .services .services-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
    .portfolio .portfolio-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
    .portfolio .portfolio-overlay p{ white-space:normal; }
    .contact .contact-content{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
    @media (max-width: 900px){ .contact .contact-content{ grid-template-columns:1fr; } }
    .social-links .social-icons{ display:flex; gap:10px; flex-wrap:wrap; }
    .social-links .social-icon{ padding:8px 12px; border-radius:999px; background:#704f40; color:#fff; text-decoration:none; }
  /* ===== 1) Center the HERO content text & button ===== */
.hero .container {
  display: flex;
  justify-content: center;
}
.hero .hero-content {
  text-align: center;      /* يخلي العناوين والنص والزر في النص */
  max-width: 900px;
  margin-inline: auto;
}

/* لو عندك زر بمظهر inline أو محتاج يتمركز أكتر */
.hero .hero-content .btn {
  display: inline-block;
}

/* ===== 2) Services grid: 3 per row on desktop, 1 on mobile ===== */
.services .services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* 3 كروت في الصف */
  gap: 14px;
}

/* موبايل/شاشات صغيرة: عمود واحد لقراءة أفضل */
@media (max-width: 900px) {
  .services .services-grid {
    grid-template-columns: 1fr;
  }
}
/* زر القائمة */
.menu-toggle {
  display: none;
  font-size: 32px;
  cursor: pointer;
  color: var(--off-white);
  padding: 4px 10px;
  user-select: none;
}

/* نافيجেশন موبايل */
#mobileMenu {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* ———— موبايل فقط ———— */
@media (max-width: 768px) {

  /* زر القائمة يظهر */
  .menu-toggle {
    display: block;
  }

  /* إخفاء القائمة الأساسية */
  nav#mobileMenu {
    position: fixed;
    top: 0;
    height: 100%;
    width: 70%;
    background: var(--panel);
    padding: 70px 25px;
    box-shadow: 0 0 20px rgba(0,0,0,.5);

    /* RTL / LTR متوافق */
    inset-inline-start: -100%;
    transition: .35s ease-in-out;
    z-index: 9999;
  }

  /* عند الفتح */
  nav#mobileMenu.open {
    inset-inline-start: 0;
  }

  /* زر X */
  nav#mobileMenu .close-btn {
    position: absolute;
    top: 15px;
    inset-inline-end: 15px;
    font-size: 32px;
    cursor: pointer;
    color: var(--off-white);
  }

  /* عناصر القائمة عمودي */
  nav#mobileMenu ul {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  nav#mobileMenu ul li a {
    font-size: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #444;
    color: var(--off-white);
  }

  /* اللغات */
  nav#mobileMenu .lang-switch {
    margin-top: 25px;
    display: flex;
    gap: 10px;
  }

  /* أخفي القائمة الأصلية في الموبايل */
  header nav ul {
    display: none !important;
  }
}
/* Fix header layout */
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Hide close button on desktop */
.menu-close {
    display: none;
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

/* ===== Hamburger ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}
.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--off-white);
    border-radius: 3px;
}

/* ===== Navigation Mobile ===== */
.nav-menu {
    display: flex;
    gap: 20px;
}

@media (max-width: 768px) {

    .desktop-lang {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    nav .nav-menu {
        position: fixed;
        top: var(--header-h);
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--dark-gray);
        flex-direction: column;
        padding: 40px 20px;
        gap: 25px;
        transition: right .35s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,.3);
        z-index: 999;
    }

    nav .nav-menu.active {
        right: 0;
    }

    .menu-close {
        display: block;
    }

    .mobile-lang {
        display: flex !important;
        gap: 12px;
        margin-top: 20px;
    }
}

/* Hide mobile-lang on desktop */
.mobile-lang {
    display: none;
}
/* --------------------------
   Mobile Menu – Final Version
---------------------------*/

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--off-white);
    border-radius: 2px;
}

/* Navigation (Desktop Default) */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
}

/* Close Button (Hidden on Desktop) */
.menu-close {
    display: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--off-white);
    position: absolute;
    top: 18px;
    inset-inline-end: 20px;
}

/* Mobile Layout */
@media (max-width: 768px) {

    .menu-toggle {
        display: flex;
    }

    .desktop-lang {
        display: none;
    }

    /* Hidden by default */
    .nav-menu {
        position: fixed;
        top: 0;
        height: 100vh;
        width: 70%;
        flex-direction: column;
        padding: 80px 24px;
        background: var(--dark-gray);
        box-shadow: -3px 0 20px rgba(0,0,0,.4);

        /* RTL-aware slide-in */
        inset-inline-end: -100%;
        transition: inset-inline-end .35s ease;
        z-index: 9999;
    }

    /* When opened */
    .nav-menu.active {
        inset-inline-end: 0;
    }

    /* X button */
    .menu-close {
        display: block;
    }

    /* Menu items vertically */
    .nav-menu ul {
        display: flex;
        flex-direction: column;
        gap: 18px;
        width: 100%;
    }

    .nav-menu ul li a {
        display: block;
        width: 100%;
        padding: 10px 0;
        border-bottom: 1px solid #444;
        color: var(--off-white);
        font-size: 20px;
    }

    /* Mobile language switch */
    .mobile-lang {
        display: flex;
        gap: 12px;
        margin-top: 20px;
    }
}
/* ========== Hide Mobile Menu on Desktop ========== */
#mobileMenu {
    display: none !important;   /* إخفاء كامل في الكمبيوتر */
    visibility: hidden;
    opacity: 0;
}

/* ========== Show Mobile Menu ONLY on mobile ========== */
@media (max-width: 768px) {
    #mobileMenu {
        display: block !important;
        visibility: visible;
        opacity: 1;
        position: fixed;
        top: 0;
        height: 100%;
        width: 75%;
        background: var(--dark-gray);
        padding: 80px 25px;
        inset-inline-start: -100%;
        transition: 0.35s ease-in-out;
        z-index: 9999;
    }

    #mobileMenu.open {
        inset-inline-start: 0;
    }
}
.close-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .close-btn {
        display: block !important;
    }
}
/* Portfolio Grid – 4 columns on desktop */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Tablets — 2 صور */
@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* موبايل — صورة واحدة */
@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.team {
  padding: 40px 0;
}

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

.team-member {
  background: #fff;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 10px #0001;
}

.member-image img {
  width: 100%;
  border-radius: 10px;
}

.member-role {
  color: #704f40;
  font-weight: bold;
}

/* تنسيق الهيدر للموبايل فقط */
@media (max-width: 768px) {
  header .container {
    flex-direction: row !important; /* إلغاء الـ reverse في الموبايل فقط */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
  }

  .logo {
    order: 1; /* اللوجو على الشمال */
  }

  .menu-toggle {
    order: 2; /* الهمبرجر على اليمين */
    display: flex !important;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
  }

  .desktop-menu {
    display: none; /* إخفاء القائمة الرئيسية في الموبايل */
  }
}
header {
  transition: transform 0.3s ease-in-out;
}
/* Preloader Screen */
#preloader {
  position: fixed;
  inset: 0;
  background: #232121; /* نفس لون الخلفية */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity .4s ease;
}

/* Spinner */
#preloader .loader {
  width: 48px;
  height: 48px;
  border: 4px solid #b4a38f;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hide on complete */
#preloader.hide {
  opacity: 0;
  pointer-events: none;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #704f40;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: 0.25s;
}

.social-icon:hover {
  background: #5177a8;
}

/* Section */
.team {
  padding: 60px 0;
  background: #0b0807; /* داكن جداً - نفس روح الموقع */
  text-align: center;
}

.team h2 {
  font-size: 32px;
  margin-bottom: 40px;
  font-weight: 700;
  color: #e2d8c2; /* أوف وايت ذهبي */
}

/* Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  align-items: stretch;
}

/* Card */
.team-member {
  background: #232121; /* داكن مناسب للثيم */
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: 0.3s ease;
  border: 1px solid #1e140b;
}

.team-member:hover {
  transform: translateY(-6px);
  background: #2c2a2a; /* تفتيح بسيط فقط */
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

/* Image */
.member-image img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  border-bottom: 3px solid #704f40; /* بني من الباليتة */
}

/* Info */
.member-info {
  padding: 20px;
  text-align: center;
}

.member-role {
  display: block;
  font-size: 14px;
  color: #b4a38f; /* درجة ذهبية–رمادية لطيفة */
  margin-bottom: 6px;
  font-weight: 600;
}

.member-info h3 {
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 700;
  color: #e2d8c2; /* أوف وايت */
}

.member-info p {
  margin: 0;
  font-size: 15px;
  color: #cfc7b7; /* رمادي دافئ */
}

/* Pagination — خفيف ومرتب */
.pagination {
  --bg: #222;            /* خلفية الأزرار */
  --fg: #f4f3f3;         /* لون النص */
  --accent: #a66b4a;     /* لون الزر النشط وhover */
  --radius: 10px;
  --gap: 8px;

  display: flex;
  gap: var(--gap);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 10px;
  user-select: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: 14px;
}

/* common button style */
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(0,0,0,0.15) inset;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}

/* page numbers hover */
.pagination a:hover {
  transform: translateY(-2px);
  background: rgba(166,107,74,0.12);
  border-color: rgba(166,107,74,0.18);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  color: var(--fg);
}

/* active page */
.pagination .active-page {
  background: linear-gradient(180deg, var(--accent), #8f563f);
  border: 1px solid rgba(0,0,0,0.15);
  color: white;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(134,84,61,0.18);
  transform: translateY(0);
}

/* disabled state */
.pagination .disabled {
  opacity: 0.38;
  cursor: default;
  transform: none;
  pointer-events: none;
}

/* small chevrons for back/next */
.pagination .chev {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-size: 15px;
}

/* dots style */
.pagination span.dots {
  background: transparent;
  border: none;
  min-width: auto;
  padding: 0 6px;
  color: rgba(255,255,255,0.75);
}

/* responsive: shrink on very small screens */
@media (max-width:460px) {
  .pagination { gap:6px; font-size:13px; padding:12px 6px; }
  .pagination a, .pagination span { min-width:30px; height:30px; border-radius:8px; }
  .pagination .chev { width:30px; height:30px; font-size:13px; }
}

/* RTL friendly: reverse order of arrows if dir=rtl */
:root { /* default LTR */ }
[dir="rtl"] .pagination { direction: rtl; }
[dir="rtl"] .pagination .chev.prev::after { content: "›"; } /* flip arrow */
[dir="rtl"] .pagination .chev.next::after { content: "‹"; }
[dir="ltr"] .pagination .chev.prev::after { content: "‹"; }
[dir="ltr"] .pagination .chev.next::after { content: "›"; }

/* small accessibility focus */
.pagination a:focus { outline: 3px solid rgba(166,107,74,0.18); outline-offset: 3px; }
.portfolio-subimages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.portfolio-subimages img {
    width: 80px;   /* حجم الصورة الثانوية */
    height: 60px;  /* ثابت أو auto */
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.portfolio-subimages img:hover {
    transform: scale(1.1);
    border-color: #333;
}
/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #000;
    border-radius: 2px;
}

