/* =====================================================================
   MES – Mansour Electrical Service | Main stylesheet
   Lightweight, framework-free, mobile-first.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --primary: #2F6FE4;
  --primary-2: #6AA3F5;
  --dark: #070B14;
  --dark-2: #0E1626;
  --dark-3: #16213A;
  --text: #172033;
  --muted: #5B6578;
  --bg: #FFFFFF;
  --bg-alt: #F3F6FC;
  --border: #E2E8F2;
  --white: #FFFFFF;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(15, 28, 60, .06);
  --shadow: 0 12px 34px rgba(15, 28, 60, .10);
  --shadow-lg: 0 24px 60px rgba(15, 28, 60, .16);
  --grad: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  --header-h: 76px;
  --font: "Segoe UI", Inter, system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 16.5px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-2); }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; color: inherit; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.center-x { justify-content: center; }
.mt-40 { margin-top: 40px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--white); color: var(--dark); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* SVG icons (sprite) */
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.25em; }

/* ---------- Buttons ---------- */
.btn { background-origin: border-box; display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .8em 1.45em; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: .97rem; line-height: 1.2; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn .ic { width: 1.1em; height: 1.1em; transition: transform .2s; }
.btn:hover .ic-arrow, .btn:hover use[href$="#arrow-right"] { transform: translateX(3px); }
.btn-lg { padding: 1em 1.8em; font-size: 1.02rem; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--grad) border-box; border-color: transparent; color: var(--white); box-shadow: 0 8px 22px rgba(47, 111, 228, .35); }
.btn-primary:hover { color: var(--white); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(47, 111, 228, .45); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-light { background: var(--white); color: var(--primary); }
.btn-light:hover { color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .35); color: var(--white); background: rgba(255, 255, 255, .06); }
.btn-ghost-light:hover { border-color: var(--white); color: var(--white); background: rgba(255, 255, 255, .12); }

/* ---------- Circuit background (inspired by the logo) ---------- */
.circuit { position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(circle, rgba(106, 163, 245, .55) 1.5px, transparent 2px),
    linear-gradient(to right, rgba(106, 163, 245, .10) 1px, transparent 1px);
  background-size: 120px 140px, 120px 100%;
  background-position: 60px 30px, 60px 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 70%, transparent);
}

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h); transition: background .3s, box-shadow .3s, height .3s; }
.site-header.scrolled { background: rgba(7, 11, 20, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); --header-h: 66px; }
.nav-wrap { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); flex: none; }
.brand:hover { color: var(--white); }
.brand img { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(106, 163, 245, .35); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt strong { font-size: 1.28rem; letter-spacing: .04em; }
.brand-txt small { font-size: .72rem; color: rgba(255, 255, 255, .62); letter-spacing: .02em; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav ul a { display: block; padding: 8px 14px; color: rgba(255, 255, 255, .82); font-weight: 600; font-size: .96rem; border-radius: 999px; position: relative; }
.main-nav ul a:hover { color: var(--white); background: rgba(255, 255, 255, .07); }
.main-nav ul a.active { color: var(--white); }
.main-nav ul a.active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--grad); }
.nav-cta { padding: .62em 1.2em; }
.nav-phone { display: none; }
.burger { display: none; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .3s, opacity .3s, top .3s; }
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 29px; }
.nav-open .burger span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: block; }
  .nav-phone { display: inline-flex; margin-left: auto; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 12px; background: var(--grad); color: var(--white); }
  .nav-phone span { display: none; }
  .nav-phone + .burger { margin-left: 0; }
  .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; height: calc(100dvh - var(--header-h)); flex-direction: column; align-items: stretch; gap: 18px; margin: 0; padding: 22px 20px 40px; background: var(--dark); overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s; }
  .nav-open .main-nav { transform: none; visibility: visible; }
  .nav-open .site-header { background: var(--dark); }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav ul a { padding: 14px 16px; font-size: 1.1rem; border-radius: 12px; }
  .main-nav ul a.active { background: rgba(47, 111, 228, .16); }
  .main-nav ul a.active::after { display: none; }
  .nav-cta { padding: 1em; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: radial-gradient(1000px 520px at 85% 20%, rgba(47, 111, 228, .28), transparent 60%), radial-gradient(700px 420px at 0% 100%, rgba(106, 163, 245, .14), transparent 60%), var(--dark); color: var(--white); padding: calc(var(--header-h) + 60px) 0 130px; overflow: hidden; isolation: isolate; }
.hero .circuit { z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; background: rgba(47, 111, 228, .16); border: 1px solid rgba(106, 163, 245, .35); color: #CFE0FF; font-size: .86rem; font-weight: 600; margin-bottom: 22px; }
.badge .ic { color: var(--primary-2); }
.hero h1 { margin-bottom: 20px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .grad { background-image: linear-gradient(135deg, #5B95F2, #9CC3FF); }
.hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: rgba(255, 255, 255, .74); max-width: 590px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px; color: rgba(255, 255, 255, .7); font-size: .94rem; }
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust .ic { color: var(--primary-2); }
.hero-trust a { color: var(--white); font-weight: 600; }

.hero-visual { display: flex; justify-content: center; }
.hero-img { border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(106, 163, 245, .25); aspect-ratio: 4 / 4.3; width: 100%; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.orb { position: relative; width: min(100%, 420px); aspect-ratio: 1; }
.orb img { position: absolute; inset: 9%; width: 82%; height: 82%; border-radius: 50%; box-shadow: 0 0 80px rgba(47, 111, 228, .45), 0 0 0 1px rgba(106, 163, 245, .2); }
.orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(106, 163, 245, .4); animation: spin 40s linear infinite; }
.orb .ring::before { content: ""; position: absolute; top: 8%; left: 14%; width: 12px; height: 12px; border-radius: 50%; background: var(--primary-2); box-shadow: 0 0 18px var(--primary-2); }
.float { position: absolute; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: rgba(14, 22, 38, .85); border: 1px solid rgba(106, 163, 245, .3); color: var(--primary-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: bob 6s ease-in-out infinite; }
.float .ic { width: 26px; height: 26px; }
.f1 { top: 4%; right: 6%; }
.f2 { bottom: 10%; right: -2%; animation-delay: -1.5s; }
.f3 { bottom: 2%; left: 10%; animation-delay: -3s; }
.f4 { top: 22%; left: -4%; animation-delay: -4.5s; }

.sparks { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sparks i { position: absolute; top: -20%; width: 1.5px; height: 90px; background: linear-gradient(to bottom, transparent, var(--primary-2)); opacity: .7; animation: fall 7s linear infinite; }
.sparks i:nth-child(1) { left: 8%; animation-delay: 0s; }
.sparks i:nth-child(2) { left: 22%; animation-delay: -2.5s; animation-duration: 9s; }
.sparks i:nth-child(3) { left: 41%; animation-delay: -5s; }
.sparks i:nth-child(4) { left: 58%; animation-delay: -1s; animation-duration: 8s; }
.sparks i:nth-child(5) { left: 77%; animation-delay: -4s; }
.sparks i:nth-child(6) { left: 92%; animation-delay: -6s; animation-duration: 10s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-12px); } }
@keyframes fall { to { transform: translateY(140vh); } }

@media (max-width: 900px) {
  .hero { padding: calc(var(--header-h) + 36px) 0 110px; text-align: center; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-visual { order: -1; }
  .orb { width: min(72vw, 300px); }
  .float { width: 46px; height: 46px; border-radius: 13px; }
  .float .ic { width: 21px; height: 21px; }
  .hero-img { aspect-ratio: 16 / 11; }
}

/* ---------- Stats ---------- */
.stats-wrap { position: relative; z-index: 2; margin-top: -70px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.stat { padding: 28px 18px; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--border); }
.stat strong { display: block; font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat > span { color: var(--muted); font-weight: 600; font-size: .93rem; }
.stats-plain { background: transparent; box-shadow: none; }
.stats-plain .stat > span { color: rgba(255, 255, 255, .72); }
.stats-plain .stat + .stat::before { background: rgba(255, 255, 255, .12); }
.stats-plain .stat strong { background-image: linear-gradient(135deg, #7DB0FF, #FFFFFF); }
@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stats:not(.stats-plain) .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; position: relative; }
.section.slim { padding: clamp(40px, 6vw, 64px) 0; }
.bg-alt { background: var(--bg-alt); }
.section-dark { background: radial-gradient(800px 400px at 50% 0%, rgba(47, 111, 228, .22), transparent 70%), var(--dark); color: var(--white); overflow: hidden; isolation: isolate; }
.section-dark .circuit { z-index: -1; opacity: .35; }
.sec-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.split-copy .sec-head { margin-bottom: 18px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--grad); }
.section-dark .eyebrow { color: var(--primary-2); }
.lead { font-size: 1.08rem; color: var(--muted); }
.section-dark .lead { color: rgba(255, 255, 255, .7); }
.rich p { color: var(--muted); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.ic-box { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--grad); color: var(--white); margin-bottom: 20px; box-shadow: 0 10px 22px rgba(47, 111, 228, .28); flex: none; }
.ic-box .ic { width: 27px; height: 27px; }
.service-card { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.service-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::after { transform: scaleX(1); }
.service-card p { color: var(--muted); flex: 1; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; }
.more .ic { transition: transform .2s; }
.more:hover .ic { transform: translateX(4px); }
.mv-card { text-align: center; }
.mv-card p, .feature-light p { color: var(--muted); margin: 0; }
.feature-light:hover, .mv-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }

.feature { padding: 30px 26px; border-radius: var(--radius); background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); transition: background .3s, transform .3s var(--ease), border-color .3s; }
.feature:hover { background: rgba(47, 111, 228, .12); border-color: rgba(106, 163, 245, .35); transform: translateY(-5px); }
.feature p { color: rgba(255, 255, 255, .66); margin: 0; }

/* ---------- Split (image + text) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.split-media { position: relative; }
.split-media > img, .split-media > .ph { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-lg); }
.media-badge { position: absolute; right: -14px; bottom: -22px; background: var(--grad); color: var(--white); padding: 18px 24px; border-radius: 18px; box-shadow: 0 14px 34px rgba(47, 111, 228, .4); max-width: 200px; }
.media-badge strong { display: block; font-size: 2rem; line-height: 1; }
.media-badge span { font-size: .85rem; font-weight: 600; opacity: .9; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .media-badge { right: 12px; } }

.checks { display: grid; gap: 12px; margin: 22px 0 30px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checks .ic { flex: none; width: 24px; height: 24px; padding: 4px; margin-top: 1px; border-radius: 50%; background: rgba(47, 111, 228, .12); color: var(--primary); stroke-width: 3; }
.checks.two-col { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .checks.two-col { grid-template-columns: 1fr; } }

/* ---------- Placeholder art (when no image is uploaded) ---------- */
.ph { position: relative; display: grid; place-items: center; align-content: center; gap: 14px; width: 100%; height: 100%; min-height: 200px; overflow: hidden; color: var(--white); text-align: center; padding: 20px;
  background: radial-gradient(circle at 70% 20%, rgba(106, 163, 245, .45), transparent 55%), linear-gradient(145deg, var(--dark-3), var(--dark)); }
.ph .circuit { opacity: .45; }
.ph-ic { position: relative; width: 64px; height: 64px; color: var(--primary-2); stroke-width: 1.6; filter: drop-shadow(0 0 18px rgba(106, 163, 245, .6)); }
.ph span { position: relative; font-weight: 700; letter-spacing: .02em; color: rgba(255, 255, 255, .85); }

/* ---------- Projects ---------- */
.project-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; display: flex; flex-direction: column; }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.pc-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--dark); }
.pc-media img, .pc-media .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project-card:hover .pc-media img { transform: scale(1.06); }
.pc-body { padding: 22px 24px 26px; }
.pc-body h3 { margin: 10px 0 8px; }
.pc-body h3 a { color: var(--text); }
.pc-body h3 a:hover { color: var(--primary); }
.pc-body p { color: var(--muted); font-size: .95rem; margin: 0; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(47, 111, 228, .1); color: var(--primary); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filters a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--bg-alt); color: var(--text); font-weight: 600; font-size: .94rem; border: 1px solid var(--border); transition: all .2s; }
.filters a .ic { color: var(--primary); }
.filters a:hover { border-color: var(--primary); color: var(--primary); }
.filters a.active { background: var(--grad); color: var(--white); border-color: transparent; box-shadow: 0 8px 20px rgba(47, 111, 228, .3); }
.filters a.active .ic { color: var(--white); }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pager a { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); font-weight: 700; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager a.active { background: var(--grad); color: var(--white); border-color: transparent; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .ic { width: 54px; height: 54px; color: var(--primary-2); margin-bottom: 12px; }

/* Project detail */
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.g-item { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-alt); cursor: zoom-in; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.g-item:hover img { transform: scale(1.05); }
.g-main { grid-column: 1 / -1; aspect-ratio: 16 / 9; border-radius: var(--radius); }
.g-empty { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.project-desc { margin-top: 32px; font-size: 1.05rem; }
.project-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 20px; }
.side-card h3 { margin-bottom: 18px; }
.side-card dl { margin: 0; display: grid; gap: 0; }
.side-card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
.side-card dl div:last-child { border-bottom: 0; }
.side-card dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.side-card dt .ic { color: var(--primary); }
.side-card dd { margin: 0; font-weight: 700; text-align: right; }
.side-cta { background: var(--grad); color: var(--white); border: 0; display: grid; gap: 12px; }
.side-cta h3 { margin: 0; }
.side-cta p { color: rgba(255, 255, 255, .88); margin: 0 0 4px; }
@media (max-width: 960px) { .project-layout { grid-template-columns: 1fr; } .project-side { position: static; } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(4, 7, 14, .94); display: grid; place-items: center; padding: 60px 16px; animation: fade .25s; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lightbox figcaption { color: rgba(255, 255, 255, .8); text-align: center; margin-top: 12px; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: var(--white); cursor: pointer; }
.lightbox button:hover { background: var(--primary); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.lb-next { right: 16px; top: 50%; margin-top: -24px; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Services page ---------- */
.svc-index { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 70px; }
.svc-index a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .93rem; }
.svc-index a .ic { color: var(--primary); }
.svc-index a:hover { border-color: var(--primary); color: var(--primary); }
.svc-list { display: grid; gap: clamp(56px, 8vw, 96px); }
.svc-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 70px); align-items: center; }
.svc-row.flip .svc-media { order: 2; }
.svc-media > img, .svc-media > .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-lg); }
.svc-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.svc-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .svc-row { grid-template-columns: 1fr; } .svc-row.flip .svc-media { order: 0; } }

/* ---------- Testimonials slider (CSS scroll-snap + tiny JS) ---------- */
.slider { position: relative; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 4px 20px; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.testimonial { position: relative; margin: 0; scroll-snap-align: start; background: var(--white); border-radius: var(--radius); padding: 32px 28px 28px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.testimonial .q { position: absolute; top: 24px; right: 24px; width: 40px; height: 40px; color: rgba(47, 111, 228, .14); fill: currentColor; stroke: none; }
.testimonial blockquote { margin: 14px 0 24px; color: var(--text); flex: 1; }
.testimonial figcaption { display: flex; align-items: center; gap: 14px; }
.testimonial figcaption strong { display: block; }
.testimonial figcaption small { color: var(--muted); }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; }
.initials { display: grid; place-items: center; background: var(--grad); color: var(--white); font-weight: 800; font-size: 1.2rem; }
.stars { display: flex; gap: 3px; }
.stars .ic { width: 18px; height: 18px; color: #D5DCE8; fill: currentColor; stroke: none; }
.stars .ic.on { color: #F5B301; }
.slider-nav { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.slider-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--white); color: var(--text); cursor: pointer; display: grid; place-items: center; transition: all .2s; }
.slider-nav button:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }
@media (max-width: 1024px) { .slides { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 640px)  { .slides { grid-auto-columns: 88%; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; color: var(--white); padding: calc(var(--header-h) + 64px) 0 72px;
  background: radial-gradient(900px 400px at 80% 0%, rgba(47, 111, 228, .32), transparent 65%), var(--dark); }
.page-hero .circuit { z-index: -1; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 860px; margin-bottom: 14px; }
.page-hero p { color: rgba(255, 255, 255, .72); font-size: 1.1rem; max-width: 680px; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: rgba(255, 255, 255, .55); margin-bottom: 16px; }
.crumbs a { color: var(--primary-2); }
.crumbs a:hover { color: var(--white); }
.nf { min-height: 80vh; display: flex; align-items: center; }
.nf p { margin: 0 auto 30px; }
.nf-code { display: block; font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.info-list { display: grid; gap: 14px; margin: 26px 0; }
.info-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--bg-alt); border: 1px solid var(--border); color: var(--text); transition: border-color .2s, transform .2s; }
a.info-item:hover { border-color: var(--primary); color: var(--text); transform: translateX(4px); }
.info-item .ic-box { width: 48px; height: 48px; margin: 0; border-radius: 14px; }
.info-item .ic-box .ic { width: 22px; height: 22px; }
.info-item .ic-box.wa { background: linear-gradient(135deg, #1FAF5A, #3DDC84); box-shadow: 0 10px 22px rgba(31, 175, 90, .28); }
.info-item small { display: block; color: var(--muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.info-item strong { display: block; word-break: break-word; }
.form-card { padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.6rem; }
.form { display: grid; gap: 16px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea { width: 100%; padding: 13px 15px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg-alt); transition: border-color .2s, box-shadow .2s, background .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 4px rgba(47, 111, 228, .14); }
.field textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-weight: 600; }
.alert-success { background: #E7F8EE; color: #126B3A; border: 1px solid #B5E8C9; }
.alert-error { background: #FDECEC; color: #A02020; border: 1px solid #F6C4C4; }
.btn.loading { opacity: .7; pointer-events: none; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

.map-wrap { line-height: 0; }
.map { position: relative; height: 420px; display: grid; place-items: center; background: linear-gradient(135deg, var(--dark-3), var(--dark)); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map .btn { line-height: 1.2; }

/* ---------- Social ---------- */
.social { display: flex; flex-wrap: wrap; gap: 10px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .07); color: var(--white); transition: background .2s, transform .2s; }
.social a:hover { background: var(--primary); color: var(--white); transform: translateY(-3px); }
.social-dark a { background: var(--bg-alt); color: var(--primary); border: 1px solid var(--border); }

/* ---------- CTA band ---------- */
.cta-band { padding: 0 0 clamp(64px, 8vw, 96px); }
.page-default .cta-band, .section + .cta-band { padding-top: 0; }
.cta-inner { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding: clamp(32px, 5vw, 56px); border-radius: 26px; color: var(--white);
  background: radial-gradient(600px 300px at 100% 0%, rgba(255, 255, 255, .22), transparent 60%), var(--grad); box-shadow: 0 24px 60px rgba(47, 111, 228, .35); }
.cta-inner h2 { margin-bottom: 8px; }
.cta-inner p { margin: 0; opacity: .9; max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.bg-alt + .cta-band { background: var(--bg-alt); }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: hidden; isolation: isolate; background: var(--dark); color: rgba(255, 255, 255, .7); padding-top: 70px; font-size: .96rem; }
.site-footer .circuit { z-index: -1; opacity: .25; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr; gap: 40px; padding-bottom: 50px; }
.f-about p { margin: 18px 0 22px; max-width: 340px; }
.site-footer h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 18px; }
.f-col ul { display: grid; gap: 10px; }
.f-col a { color: rgba(255, 255, 255, .7); }
.f-col a:hover { color: var(--primary-2); }
.f-contact li { display: flex; gap: 10px; align-items: flex-start; }
.f-contact .ic { color: var(--primary-2); margin-top: 3px; }
.f-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 20px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .88rem; }
.f-bottom p { margin: 0; }
.f-bottom .credit { margin-left: auto; color: rgba(255, 255, 255, .5); }
.f-bottom .credit a { color: var(--primary-2); font-weight: 600; }
.f-bottom .credit a:hover { color: var(--white); }
@media (max-width: 640px) {
  .f-bottom { flex-wrap: wrap; text-align: center; justify-content: center; }
  .f-bottom p, .f-bottom .credit { width: 100%; margin: 0; }
}
.to-top { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, .07); color: var(--white); font-weight: 700; }
.to-top:hover { background: var(--primary); color: var(--white); }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* WhatsApp floating button */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: var(--white); background: linear-gradient(135deg, #1FAF5A, #3DDC84); box-shadow: 0 10px 28px rgba(31, 175, 90, .45); transition: transform .2s; }
.wa-float:hover { color: var(--white); transform: scale(1.08); }
.wa-float .ic { width: 28px; height: 28px; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #3DDC84; animation: ping 2.4s infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
