/* Robotech Egypt — main stylesheet (RTL, Arabic-first) */
:root {
  --accent: #01b7f2;
  --navy: #07182a;
  --ink: #0b1f33;
  --muted: #4a5f73;
  --light: #b6c8d8;
  --line: #d5e0e8;
  --bg: #f3f7fa;
  --radius: 16px;
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 800; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

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

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--navy); padding: 10px 18px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 5px var(--accent);
}

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 24px; border: 2px solid transparent; border-radius: 12px;
  font-weight: 700; font-size: 16px; line-height: 1.2; cursor: pointer; text-align: center;
  transition: filter .15s, background-color .15s, border-color .15s;
}
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 17px; }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { filter: brightness(1.25); }
.btn-outline { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-outline:hover { background: rgba(255, 255, 255, .12); }
.btn-outline-dark { border-color: var(--navy); color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.pill {
  display: inline-block; background: var(--accent); color: var(--navy);
  font-weight: 700; font-size: 14px; padding: 5px 16px; border-radius: 999px; line-height: 1.6;
}
.link-underline {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 700;
  border-bottom: 3px solid var(--accent);
}

/* ---------- Header ---------- */
.dark-grid,
.site-header, .hero, .page-hero {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  color: #fff;
}
.site-header { position: relative; z-index: 20; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.header-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .custom-logo-link { display: block; }
.brand .custom-logo { max-height: 64px; width: auto; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--navy);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 20px; font-weight: 800; }
.brand-tag { font-size: 13px; color: var(--light); }

.site-nav .menu { display: flex; flex-wrap: wrap; gap: 2px 26px; font-weight: 600; font-size: 16px; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a { display: block; padding: 10px 0; }
.site-nav .menu a:hover,
.site-nav .current-menu-item > a:not([href*="#"]) { color: var(--accent); }
.site-nav .sub-menu {
  display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 220px;
  background: var(--navy); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 8px 16px; z-index: 30;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { display: block; }
.site-nav .sub-menu a { padding: 8px 0; font-size: 15px; }

.nav-toggle {
  display: none; align-items: center; justify-content: center; width: 46px; height: 46px;
  background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 12px; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero-inner { position: relative; padding-top: 88px; padding-bottom: 104px; display: flex; align-items: center; gap: 56px; }
/* Decorative technical graphic, shown only when no hero image is set */
.hero-inner:not(.has-image)::after {
  content: ''; position: absolute; inset-inline-end: 24px; top: 50%; width: 380px; height: 380px;
  transform: translateY(-50%); background-color: var(--accent); opacity: .28; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='200' cy='200' r='190' stroke-dasharray='6 10'/%3E%3Ccircle cx='200' cy='200' r='130' opacity='.7'/%3E%3Ccircle cx='200' cy='200' r='72' stroke-width='16' stroke-dasharray='22 15'/%3E%3Ccircle cx='200' cy='200' r='18' fill='white' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='200' cy='200' r='190' stroke-dasharray='6 10'/%3E%3Ccircle cx='200' cy='200' r='130' opacity='.7'/%3E%3Ccircle cx='200' cy='200' r='72' stroke-width='16' stroke-dasharray='22 15'/%3E%3Ccircle cx='200' cy='200' r='18' fill='white' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 1100px) { .hero-inner:not(.has-image)::after { display: none; } }
.hero-text { flex: 1 1 0; min-width: 0; }
.hero-image { flex: 0 0 42%; }
.hero-image img { border-radius: 20px; width: 100%; }
.hero-inner:not(.has-image) .hero-text { max-width: 820px; }
.hero h1 { margin-top: 22px; font-size: clamp(34px, 5vw, 58px); line-height: 1.25; }
.lead { margin-top: 22px; font-size: 19px; color: var(--light); max-width: 600px; }
.hero .btn-row { margin-top: 34px; }

.page-hero .container { padding-top: 60px; padding-bottom: 68px; }
.page-hero h1 { margin-top: 18px; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.25; }
.page-hero .lead { max-width: 640px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 0 0 72px; }
.section-alt { background: var(--bg); }
.section-title { margin-top: 14px; font-size: clamp(27px, 3.6vw, 40px); line-height: 1.3; }
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px;
}
.section-title + .grid, .section-head + .grid { margin-top: 44px; }

.grid { display: grid; gap: 24px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: border-color .15s;
}
.card:hover { border-color: var(--navy); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--navy); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.card-title { margin-top: 20px; font-size: 21px; font-weight: 700; }
.card-text { margin-top: 8px; font-size: 16px; color: var(--muted); }

/* ---------- Product / project cards ---------- */
.p-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: border-color .15s;
}
.p-card:hover { border-color: var(--navy); }
.p-thumb { aspect-ratio: 16 / 10; background: #e6eef4; overflow: hidden; }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-empty {
  display: flex; align-items: center; justify-content: center; color: var(--muted);
  background: repeating-linear-gradient(135deg, #e6eef4 0 12px, #dce7ef 12px 24px);
}
.p-body { padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.p-title { font-size: 20px; font-weight: 700; line-height: 1.45; }
.p-arrow {
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.j-body { display: block; }
.tag {
  display: inline-block; font-size: 13px; font-weight: 700; background: #e6eef4; color: var(--ink);
  padding: 1px 12px; border-radius: 999px;
}
.j-body .p-title { margin-top: 8px; font-size: 19px; }

/* ---------- Lectures ---------- */
.lectures { background: var(--navy); color: #fff; padding: 96px 0; }
.lectures-inner { display: flex; flex-wrap: wrap; gap: 48px 56px; }
.lectures-text { flex: 1 1 420px; min-width: 0; }
.lectures-text h2 { margin-top: 16px; font-size: clamp(27px, 3.6vw, 40px); }
.lectures-text p { margin-top: 16px; font-size: 18px; color: var(--light); }
.lectures-links { flex: 1 1 380px; min-width: 0; }
.lectures-heading { display: block; font-size: 22px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 32px; }
.chips a {
  display: inline-block; padding: 9px 18px; border-radius: 999px; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .3); transition: background-color .15s;
}
.chips a:hover { background: rgba(255, 255, 255, .12); }

/* ---------- CTA ---------- */
.cta { background: var(--accent); color: var(--navy); padding: 68px 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.cta-inner > div:first-child { flex: 1 1 460px; min-width: 0; }
.cta h2 { font-size: clamp(25px, 3.3vw, 36px); }
.cta p { margin-top: 10px; font-size: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: #04101d; color: #fff; padding: 72px 0 30px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; }
.footer-col { flex: 1 1 200px; min-width: 0; }
.footer-about { flex: 1.6 1 280px; }
.footer-brand { font-size: 22px; font-weight: 800; display: block; }
.footer-tag { display: block; color: var(--light); font-size: 14px; }
.footer-about p { margin-top: 12px; color: var(--light); max-width: 360px; }
.footer-title { display: block; font-size: 17px; margin-bottom: 10px; }
.footer-menu a, .footer-contact a { color: var(--light); }
.footer-menu a:hover, .footer-contact a:hover { color: var(--accent); }
.footer-menu li { padding: 5px 0; }
.footer-contact { color: var(--light); }
.footer-contact li { padding: 5px 0; }
.footer-bottom {
  margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 15px; color: var(--light);
}
.social { display: flex; flex-wrap: wrap; gap: 12px; }
.social a { padding: 7px 16px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; color: #fff; }
.social a:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Contact ---------- */
.contact-wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.form-card { flex: 1 1 560px; min-width: 0; border: 1px solid var(--line); border-radius: 20px; padding: 36px; }
.form-card h2 { font-size: 26px; margin-bottom: 24px; }
.form-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.field { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field-full { flex-basis: 100%; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 0 16px; border: 1.5px solid #9db0c0; border-radius: 12px; background: #fff; color: var(--ink);
}
.field textarea { padding: 12px 16px; resize: vertical; min-height: 140px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-weight: 600; }
.alert-ok { background: #e3f6ec; color: #0f5132; border: 1px solid #a8dcc1; }
.alert-err { background: #fdeaea; color: #7a1f1f; border: 1px solid #f2b8b8; }

.contact-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.wa-btn {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-radius: var(--radius);
  background: var(--accent); color: var(--navy);
}
.wa-btn:hover { filter: brightness(1.08); }
.wa-btn strong { display: block; font-size: 19px; font-weight: 800; }
.info-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--navy); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.info-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; }
.info-row strong { font-size: 17px; }
.info-row div div { color: var(--muted); }
.social-row { display: flex; flex-wrap: wrap; gap: 12px; }
.social-row .btn { flex: 1 1 130px; }
.map { margin-top: 40px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs-bar { background: var(--bg); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 14px; font-size: 15px; color: var(--muted); }
.crumbs a { text-decoration: underline; }
.crumbs .current { color: var(--ink); font-weight: 700; }

/* ---------- Single product ---------- */
.product-top { padding: 56px 0 72px; }
.product-grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.gallery { flex: 1 1 520px; min-width: 0; }
.gallery-main {
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #e6eef4;
  min-height: 320px; display: flex; align-items: center; justify-content: center;
}
.gallery-main img { width: 100%; }
.gallery-main .thumb-empty { width: 100%; min-height: 420px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.thumb-btn {
  width: 96px; height: 96px; padding: 0; border: 2px solid var(--line); border-radius: 12px;
  overflow: hidden; cursor: pointer; background: #e6eef4;
}
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.thumb-btn.is-active { border-color: var(--accent); }

.summary { flex: 1 1 400px; min-width: 0; }
.summary h1 { margin-top: 16px; font-size: clamp(30px, 4vw, 44px); line-height: 1.25; }
.lead-dark { margin-top: 16px; font-size: 18px; color: var(--muted); }
.check-list { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: center; }
.check {
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.price-box { margin: 28px 0 24px; padding: 18px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.price-box div { color: var(--muted); }
.summary .link-underline { margin-top: 14px; }

.spec-grid { display: flex; flex-wrap: wrap; gap: 48px; }
.spec-grid > div { flex: 1 1 380px; min-width: 0; }
.spec-grid > div:first-child { flex: 1.4 1 480px; }
.spec-grid h2 { font-size: 30px; margin-bottom: 22px; }
.spec-box { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec { width: 100%; border-collapse: collapse; text-align: start; }
.spec th, .spec td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: start; }
.spec th { width: 40%; font-weight: 700; }
.spec tr:nth-child(odd) { background: var(--bg); }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.uses { display: flex; flex-direction: column; gap: 14px; }
.use { padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.use strong { font-size: 18px; }
.use div { color: var(--muted); }

.video-band { background: var(--navy); color: #fff; padding: 80px 0; text-align: center; }
.container-video { max-width: 1000px; }
.video-band h2 { font-size: 30px; }
.video-wrap { margin-top: 30px; }
.video-wrap iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 16px; }

/* ---------- Generic content ---------- */
.entry { font-size: 18px; }
.entry > * + * { margin-top: 1.1em; }
.entry h2, .entry h3 { margin-top: 1.6em; }
.entry h2 { font-size: 28px; }
.entry h3 { font-size: 22px; }
.entry ul, .entry ol { padding-inline-start: 1.4em; }
.entry ul { list-style: disc; }
.entry ol { list-style: decimal; }
.entry a { color: #0a6e96; text-decoration: underline; }
.entry img { border-radius: 14px; }
.entry-thumb { margin: 24px 0; }
.entry-thumb img { border-radius: 18px; width: 100%; }
.entry-list { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.entry-list h2 a:hover { color: #0a6e96; }
.entry-meta { color: var(--muted); font-size: 15px; }
.single-title { margin: 16px 0 8px; font-size: clamp(28px, 4vw, 42px); }

.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 44px; }
.nav-links a, .nav-links span {
  min-width: 44px; min-height: 44px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; font-weight: 700;
}
.nav-links .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.nav-links a:hover { border-color: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { flex-direction: column; align-items: flex-start; padding-top: 56px; padding-bottom: 64px; gap: 36px; }
  .hero-image { flex-basis: auto; width: 100%; }
  .section { padding: 64px 0; }
  .lectures, .video-band { padding: 64px 0; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .site-nav { display: none; flex-basis: 100%; order: 3; padding: 6px 0 12px; border-top: 1px solid rgba(255, 255, 255, .14); }
  .site-nav.is-open { display: block; }
  .site-nav .menu { flex-direction: column; gap: 0; }
  .site-nav .menu a { padding: 12px 0; }
  .site-nav .sub-menu { display: block; position: static; border: 0; padding: 0 16px; background: transparent; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .form-card { padding: 24px 20px; }
  .p-body { padding: 16px 20px; }
  .map iframe { height: 280px; }
  .btn-row .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
