/*
Theme Name: Ebdaa Al-Qalam
Theme URI: https://ebdaa-alqalam.com
Author: Ebdaa Al-Qalam Co.
Description: موقع شركة إبداع القلم للتجارة العامة والمقاولات - Ebdaa Al-Qalam General Trading & Contracting Co. Ltd.
Version: 1.0
Text Domain: ebdaa
*/

/* ===== CSS VARIABLES ===== */
:root {
  --navy:   #0D1B2E;
  --navy2:  #152438;
  --green:  #2D6A14;
  --green2: #3D8A22;
  --accent: #72B84A;
  --white:  #ffffff;
  --gray:   #F4F7F2;
  --border: #e0e8d8;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  color: #1a1a1a;
  line-height: 1.6;
  background: #fff;
}
body.lang-ar { font-family: 'Cairo', 'Tahoma', sans-serif; direction: rtl; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ===== NAVBAR ===== */
#navbar {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lang-ar .nav-inner { flex-direction: row-reverse; }
.logo-wrap { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 42px; height: 42px; }
.logo-text .name { color: white; font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.logo-text .name em { color: var(--accent); font-style: normal; }
.logo-text .sub { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.lang-ar .nav-links { flex-direction: row-reverse; }
.nav-links a { color: rgba(255,255,255,0.75); font-size: 14px; transition: color 0.2s; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: #fff; border-bottom-color: var(--accent); }
.lang-btn {
  background: var(--green);
  color: white;
  border: none;
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.2s;
}
.lang-btn:hover { background: var(--green2); }

/* ===== HERO ===== */
#home {
  background: var(--navy);
  padding: 6rem 2rem 5rem;
}
.hero-inner { max-width: 1200px; margin: 0 auto; }
.lang-ar .hero-inner { text-align: right; }
.hero-tag {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}
.hero-h1 {
  color: white;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-h1 em { color: var(--accent); font-style: normal; }
.hero-p {
  color: rgba(255,255,255,0.62);
  font-size: 17px;
  max-width: 580px;
  margin-bottom: 2rem;
  line-height: 1.8;
}
.lang-ar .hero-p { margin-right: 0; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.lang-ar .hero-btns { flex-direction: row-reverse; }
.btn-primary {
  background: var(--green2);
  color: white;
  padding: 13px 28px;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--green); }
.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.85);
  padding: 13px 28px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s;
}
.btn-outline:hover { border-color: rgba(255,255,255,0.7); color: #fff; }

/* ===== STATS BAR ===== */
.statsbar { background: var(--green); padding: 2rem; }
.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat { text-align: center; color: white; }
.stat-num { font-size: 32px; font-weight: 700; }
.stat-label { font-size: 13px; opacity: 0.82; margin-top: 4px; }

/* ===== SECTIONS ===== */
.section { padding: 5rem 2rem; }
.sec-inner { max-width: 1200px; margin: 0 auto; }
.lang-ar .sec-inner { text-align: right; }
.sec-eyebrow { font-size: 12px; color: var(--green2); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }
.sec-title { font-size: 34px; font-weight: 700; color: var(--navy); margin-bottom: 1rem; }
.sec-text { font-size: 16px; color: #555; line-height: 1.8; max-width: 700px; }
.lang-ar .sec-text { margin-right: 0; }
.sec-bg { background: var(--gray); }
.sec-dark { background: var(--navy); }
.sec-dark .sec-eyebrow { color: var(--accent); }
.sec-dark .sec-title { color: white; }

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2.5rem;
}
.vismis { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.vm-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}
.vm-title { font-size: 14px; font-weight: 700; color: var(--green2); margin-bottom: 8px; }
.vm-text { font-size: 13px; color: #666; line-height: 1.7; }
.certs { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 8px; }
.cert {
  font-size: 12px;
  background: #EAF3DE;
  color: #2D6A14;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #C0DD97;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.svc-card {
  background: white;
  border: 1px solid #e8edf0;
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.svc-icon {
  width: 52px; height: 52px;
  background: #EAF3DE;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 26px;
}
.svc-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.svc-text { font-size: 14px; color: #666; line-height: 1.7; }

/* ===== PROJECTS ===== */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.proj-card {
  background: white;
  border: 1px solid #e8edf0;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s;
}
.proj-card:hover { transform: translateY(-4px); }
.proj-top {
  background: var(--navy);
  height: 90px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
}
.proj-body { padding: 1.1rem; }
.proj-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.proj-loc { font-size: 13px; color: #888; }
.proj-tag {
  display: inline-block; margin-top: 8px; font-size: 11px;
  background: #EAF3DE; color: #2D6A14;
  padding: 3px 10px; border-radius: 20px;
}

/* ===== WHY US ===== */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2.5rem;
}
.why-item { display: flex; align-items: flex-start; gap: 12px; }
.lang-ar .why-item { flex-direction: row-reverse; }
.why-check { color: var(--accent); font-size: 22px; margin-top: 1px; flex-shrink: 0; }
.why-text { font-size: 15px; color: rgba(255,255,255,0.85); line-height: 1.6; }

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
}
.cinfo-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 1.5rem; }
.lang-ar .cinfo-item { flex-direction: row-reverse; text-align: right; }
.cinfo-icon {
  width: 42px; height: 42px;
  background: #EAF3DE;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green2); font-size: 20px; flex-shrink: 0;
}
.cinfo-label { font-size: 12px; color: #999; margin-bottom: 2px; }
.cinfo-val { font-size: 15px; font-weight: 700; color: var(--navy); }
.cform { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cform input, .cform textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #dde;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  background: white;
  transition: border-color 0.2s;
}
.cform input:focus, .cform textarea:focus { outline: none; border-color: var(--green2); }
.cform textarea { resize: vertical; min-height: 120px; }
.form-msg { display: none; background: #EAF3DE; color: #2D6A14; border: 1px solid #C0DD97; border-radius: 8px; padding: 12px 16px; font-size: 14px; text-align: center; }
.form-msg.show { display: block; }

/* ===== FOOTER ===== */
footer { background: var(--navy2); padding: 2rem; }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lang-ar .footer-inner { flex-direction: row-reverse; }
.footer-logo .name { color: white; font-size: 16px; font-weight: 700; }
.footer-logo .name em { color: var(--accent); font-style: normal; }
.footer-logo .sub { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 3px; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.4); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-h1 { font-size: 36px; }
  .services-grid, .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .vismis { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column !important; gap: 1rem; text-align: center; }
  #home { padding: 4rem 1rem 3rem; }
  .section { padding: 3.5rem 1rem; }
  .hero-h1 { font-size: 28px; }
}
@media (max-width: 520px) {
  .services-grid, .proj-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .stat-num { font-size: 24px; }
  .lang-btn span { display: none; }
}

/* ===== PROJECT PHOTO CARDS ===== */
.proj-photo {
  height: 210px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}
.proj-card:hover .proj-photo { transform: scale(1.03); }
.proj-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,27,46,0.75) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 12px;
}
.proj-count {
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.proj-click {
  color: rgba(255,255,255,0.8);
  font-size: 12px;
}
.proj-sub {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
  font-style: italic;
}
.proj-area {
  font-size: 12px;
  color: var(--green2);
  font-weight: 600;
  margin-top: 5px;
}
.proj-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-top: 6px;
}

/* ===== LIGHTBOX ===== */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#lightbox.open { display: flex; }
#lb-img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 22px;
  color: white;
  font-size: 32px;
  cursor: pointer;
  z-index: 2;
  opacity: 0.8;
  line-height: 1;
}
.lb-close:hover { opacity: 1; }
.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 48px;
  cursor: pointer;
  opacity: 0.7;
  user-select: none;
  padding: 0 16px;
  z-index: 2;
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-info {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
}
.lb-counter {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  margin-top: 4px;
}

/* ===== MOBILE MENU ===== */
.nav-right { display: flex; align-items: center; gap: .75rem; }
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 36px;
  height: 36px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#mobile-nav {
  display: none;
  background: var(--navy2);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.5rem 1.5rem 1rem;
}
#mobile-nav.open { display: block; }
#mobile-nav a {
  display: block;
  color: rgba(255,255,255,0.82);
  padding: 13px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s;
}
#mobile-nav a:last-child { border-bottom: none; }
#mobile-nav a:hover { color: var(--accent); }
.lang-ar #mobile-nav { text-align: right; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .nav-inner { padding: 0 1rem; }
}
@media (min-width: 769px) {
  #mobile-nav { display: none !important; }
  .menu-toggle { display: none !important; }
}
