/* ============================================================
   Cigale Power — Load Bank Rental & Sales
   Design system + components
   ============================================================ */

:root {
  /* ===== Brand palette — derived from the Cigale Power logo ===== */
  --brand:      #0f76ba;   /* primary blue (globe)        */
  --brand-d:    #0c5f97;   /* darker blue — hover states   */
  --brand-l:    #dceefb;   /* light blue tint — backgrounds */
  --brand-cyan: #2aa7e0;   /* bright cyan accent           */
  --brand-hl:   #6cc8f5;   /* light highlight on dark bg   */
  --red:        #e23b2f;   /* logo red — sparing accent    */
  /* aliases: existing rules now resolve to the brand blue */
  --green:      var(--brand);
  --green-d:    var(--brand-d);
  --green-l:    var(--brand-l);
  --navy:       #0b1f3a;
  --charcoal:   #0e1726;
  --ink:        #0f172a;
  --ink-2:      #475569;
  --ink-3:      #64748b;
  --line:       #e5e9f0;
  --bg:         #ffffff;
  --bg-soft:    #f6f8fb;
  --bg-soft-2:  #eef2f7;
  --amber:      #f5a524;
  --white:      #ffffff;
  --radius:     14px;
  --radius-sm:  10px;
  --shadow:     0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg:  0 24px 60px rgba(15, 23, 42, 0.16);
  --maxw:       1200px;
  --font:       'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--ink-2); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--charcoal); color: #fff; }
.section--dark p { color: #aebacb; }
.center { text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-d);
  background: var(--green-l);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.section--dark .eyebrow { background: rgba(42,167,224,.16); color: var(--brand-hl); }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 720px; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 48px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 0.95rem;
  padding: 14px 24px; border-radius: 100px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--green); color: #fff; box-shadow: 0 8px 20px rgba(15,118,186,.35); }
.btn--primary:hover { background: var(--green-d); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: #122a4d; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--green); color: var(--green-d); }
.btn--light { background: #fff; color: var(--navy); }
.btn--wa { background: #25d366; color: #fff; }
.btn--wa:hover { background: #1ebe5a; }
.btn--lg { padding: 16px 30px; font-size: 1.02rem; }
.btn--block { width: 100%; justify-content: center; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; color: var(--ink); }
.brand__mark {
  width: 46px; height: 46px; border-radius: 50%;
  overflow: hidden; flex: none; background: transparent;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand__mark svg { width: 22px; height: 22px; }
.brand small { display: block; font-size: .62rem; font-weight: 600; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }
.brand__name { line-height: 1.05; }

.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav__links a {
  font-size: .92rem; font-weight: 600; color: var(--ink-2);
  padding: 9px 13px; border-radius: 8px; transition: .15s;
}
.nav__links a:hover { color: var(--green-d); background: var(--bg-soft); }
.nav__links a.active { color: var(--green-d); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.has-drop { position: relative; }
.has-drop > a::after { content: '▾'; font-size: .7rem; margin-left: 4px; opacity: .6; }
.drop {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 8px; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s;
}
.has-drop:hover .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.drop a { display: block; padding: 10px 12px; border-radius: 8px; font-size: .9rem; }

.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(8,15,26,.55) 0%, rgba(8,15,26,.35) 40%, rgba(8,15,26,.85) 100%),
    radial-gradient(120% 80% at 15% 30%, rgba(11,31,58,.55), transparent 60%);
}
.hero__inner { position: relative; z-index: 2; padding: 90px 0; max-width: 820px; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 .hl { color: var(--brand-hl); }
.hero p { color: #d7dee8; font-size: 1.2rem; max-width: 640px; margin-bottom: 32px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 22px; }
.hero__badge { display: flex; align-items: center; gap: 9px; font-size: .92rem; color: #cdd6e2; font-weight: 500; }
.hero__badge svg { width: 18px; height: 18px; color: var(--brand-hl); flex: none; }

/* trust strip */
.trust { background: var(--navy); color: #fff; padding: 22px 0; }
.trust__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.trust__item { display: flex; align-items: center; gap: 11px; font-size: .92rem; font-weight: 600; color: #cfdaeb; }
.trust__item svg { width: 22px; height: 22px; color: var(--green); flex: none; }

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: .2s; height: 100%;
}
.card:hover { border-color: #cfe9da; box-shadow: var(--shadow); transform: translateY(-3px); }
.card__icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--green-l);
  display: grid; place-items: center; color: var(--green-d); margin-bottom: 18px;
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: .95rem; }
.card--link { display: flex; flex-direction: column; text-decoration: none; }
.card__link { margin-top: auto; padding-top: 14px; color: var(--green-d); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; }
.card--link:hover .card__link { gap: 11px; }

/* feature list */
.flist { list-style: none; display: grid; gap: 12px; }
.flist li { display: flex; gap: 11px; align-items: flex-start; font-size: .96rem; color: var(--ink-2); }
.flist svg { width: 20px; height: 20px; color: var(--green); flex: none; margin-top: 2px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: .85rem; font-weight: 600; color: var(--ink-2);
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 100px;
}
.section--dark .chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #cdd6e2; }

/* split */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 54px; align-items: center; }
.split--reverse > :first-child { order: 2; }

/* media frame */
.media-frame {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); background: #000;
}
.media-frame video, .media-frame img { width: 100%; display: block; }

/* ---------- Tables ---------- */
.spec-table { width: 100%; border-collapse: collapse; font-size: .94rem; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.spec-table th, .spec-table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.spec-table th { background: var(--bg-soft); font-weight: 700; width: 38%; color: var(--ink); }
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: none; }
.spec-table td { color: var(--ink-2); }
.table-wrap { overflow-x: auto; }

.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--navy); color: #fff; font-weight: 700; }
.data-table tbody tr:hover { background: var(--bg-soft); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step__n {
  counter-increment: step; flex: none;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green-l); color: var(--green-d);
  display: grid; place-items: center; font-weight: 800;
}
.step__n::before { content: counter(step); }
.step h4 { margin-bottom: 3px; }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: .95rem; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; transition: .15s; width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,118,186,.18);
}
.form-note { font-size: .82rem; color: var(--ink-3); margin-top: 4px; }
.h-captcha { display: flex; justify-content: center; margin-top: 18px; }
.form-fallback { text-align: center; font-size: .85rem; color: var(--ink-3); margin-top: 12px; }
.form-fallback a { color: var(--brand-d); font-weight: 600; text-decoration: underline; }
.form-result { text-align: center; padding: 18px 6px; }
.form-result__icon { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; font-size: 1.9rem; color: #fff; }
.form-result__icon--ok { background: var(--brand); }
.form-result h3 { margin-bottom: 8px; }
.form-result p { margin-bottom: 22px; }
.form-error { background: #fdecea; border: 1px solid #f5c6c2; color: #9a2820; border-radius: 10px; padding: 12px 14px; font-size: .88rem; margin-top: 16px; }
.form-error a { color: #9a2820; font-weight: 700; text-decoration: underline; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy), #123a6b);
  color: #fff; border-radius: 20px; padding: 56px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(42,167,224,.45), transparent 70%);
}
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: #cdd6e2; max-width: 600px; margin: 14px auto 28px; position: relative; }
.cta-band .hero__cta { justify-content: center; position: relative; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat { text-align: center; }
.stat__n { font-size: 2.6rem; font-weight: 800; color: var(--green); letter-spacing: -.03em; }
.stat__l { font-size: .9rem; color: var(--ink-3); font-weight: 600; }
.section--dark .stat__l { color: #aebacb; }

/* ---------- Page hero (inner) ---------- */
.page-hero {
  background: linear-gradient(120deg, var(--charcoal), var(--navy));
  color: #fff; padding: 64px 0; position: relative; overflow: hidden;
}
.page-hero::after {
  content:''; position:absolute; inset:0;
  background: radial-gradient(80% 120% at 90% 10%, rgba(42,167,224,.20), transparent 55%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #cdd6e2; max-width: 680px; margin-top: 14px; font-size: 1.1rem; }
.crumbs { font-size: .85rem; color: #8fa0b6; margin-bottom: 14px; }
.crumbs a:hover { color: #fff; }

/* ---------- Products filter ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; align-items: center; }
.filters select {
  font-family: inherit; font-size: .9rem; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer;
}
.prod-card { display: flex; flex-direction: column; }
.prod-card__top {
  height: 150px; border-radius: 10px; margin-bottom: 16px;
  display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0b1f3a, #16345f);
}
.prod-card__top.dc { background: linear-gradient(135deg, #3a2a0b, #5f4416); }
.prod-card__top svg { width: 64px; height: 64px; color: rgba(255,255,255,.85); }
.prod-tag {
  position: absolute; top: 10px; left: 10px; font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 100px; background: var(--green); color: #fff;
}
.prod-tag.sale { background: var(--amber); }
.prod-card__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: .85rem; color: var(--ink-2); margin: 12px 0 16px; }
.prod-card__meta b { color: var(--ink); font-weight: 600; }
.muted { color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq__item { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.faq__q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 20px 22px; font-size: 1.03rem; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit;
}
.faq__q .ico { flex: none; transition: .25s; color: var(--green); font-size: 1.4rem; line-height: 1; }
.faq__item.open .ico { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__a p { padding: 0 22px 20px; font-size: .96rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #c7d2e0; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #aebacb; font-size: .92rem; display: block; padding: 5px 0; transition: .15s; }
.site-footer a:hover { color: var(--green); }
.footer-brand .brand { display: flex; align-items: center; gap: 11px; color: #fff; margin-bottom: 16px; }
.footer-brand .brand small { color: #8fa0b6; }
.footer-brand p { color: #9fb0c4; font-size: .92rem; max-width: 320px; }
.footer-contact { font-style: normal; }
.footer-contact div { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .92rem; }
.footer-contact svg { width: 18px; height: 18px; color: var(--green); flex: none; margin-top: 3px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); margin-top: 44px; padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: #8092a8;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 10px 24px rgba(37,211,102,.5); transition: .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 100px;
  font-size: .9rem; font-weight: 600; opacity: 0; pointer-events: none; transition: .3s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.note-box { background: var(--green-l); border: 1px solid #bcdcf3; border-radius: 12px; padding: 18px 20px; font-size: .92rem; color: #0b4a73; }
.icon-list-2 { columns: 2; column-gap: 30px; }
.icon-list-2 li { break-inside: avoid; }

/* RTL / Arabic */
[dir="rtl"] body, body.rtl { font-family: 'Segoe UI', Tahoma, var(--font); }
[dir="rtl"] .flist li, [dir="rtl"] .hero__badge { flex-direction: row-reverse; text-align: right; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2,1fr); }
  .grid--3 { grid-template-columns: repeat(2,1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split--reverse > :first-child { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .nav__links, .nav__cta .btn--ghost { display: none; }
  .nav__toggle { display: block; }
  .nav.open .nav__links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 74px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: 14px; gap: 2px; box-shadow: var(--shadow);
  }
  .nav.open .nav__links a { padding: 12px 14px; }
  .has-drop .drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 14px; }
  .has-drop:hover .drop { display: block; }
}
@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .grid--2, .grid--4, .grid--3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 40px 24px; }
  .icon-list-2 { columns: 1; }
  .hero { min-height: 80vh; }
}
