/* =============================================================================
   Company website: one page, English (LTR) and Arabic (RTL).
   Layout uses logical properties (inline-start/end), so one stylesheet serves
   both directions. Change the brand colours in :root.
   ========================================================================== */

:root {
    /* Brand colours from the Saleh Group logo */
    --navy:        #0a2a4d;   /* dark backgrounds */
    --navy-2:      #0d3d70;
    --accent:      #29a9f0;   /* light logo blue: highlights on dark */
    --accent-dark: #0b63b6;   /* main logo blue: buttons, links on white */
    --accent-deep: #084f92;   /* button hover */
    --text:        #1c2733;
    --muted:       #5a6675;
    --bg:          #ffffff;
    --bg-alt:      #f3f6f9;
    --border:      #e1e7ee;
    --success:     #1f7a4d;
    --error:       #b3261e;
    --whatsapp:    #25d366;

    --radius:      12px;
    --shadow:      0 6px 24px rgba(10, 42, 77, .08);
    --shadow-lg:   0 18px 48px rgba(10, 42, 77, .16);
    --header-h:    72px;
    --container:   1180px;

    --font:        "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

:root[lang="ar"] {
    --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.skip-link {
    position: absolute; inset-inline-start: 16px; top: -60px; z-index: 200;
    background: var(--accent-dark); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

section[id] { scroll-margin-top: var(--header-h); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    padding: .85em 1.6em; border-radius: 999px; border: 2px solid transparent;
    font: inherit; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: .5em 1.1em; font-size: .9rem; }
.btn-primary { background: var(--accent-dark); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-light:hover { background: #fff; color: var(--navy); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #1ebe5a; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s, border-color .25s;
}
.site-header.scrolled { box-shadow: var(--shadow); border-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.brand-logo { width: auto; height: 52px; max-width: 240px; object-fit: contain; }
.brand-logo + .brand-name { display: none; }
.brand-logo.missing { display: none; }
.brand-logo.missing + .brand-name { display: inline; }
@media (max-width: 480px) { .brand-logo { height: 44px; max-width: 180px; } }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { font-weight: 500; color: var(--muted); padding-block: 6px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--navy); border-color: var(--accent); }
.lang-switch { font-weight: 600; color: var(--navy); }
.lang-switch:hover { color: var(--accent-dark); }
:root[lang="en"] .lang-switch { font-family: "Cairo", sans-serif; }
:root[lang="ar"] .lang-switch { font-family: "Inter", sans-serif; }

.nav-toggle {
    display: none; background: none; border: 0; padding: 8px; color: var(--navy); cursor: pointer;
}
.nav-toggle .icon { width: 28px; height: 28px; }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }

@media (max-width: 960px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: absolute; top: var(--header-h); inset-inline: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
        padding: 8px 20px 20px; display: none;
    }
    .site-nav.open { display: flex; }
    .nav-links { flex-direction: column; gap: 0; }
    .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); }
    .nav-links a.active { border-bottom-color: var(--border); color: var(--accent-dark); }
    .site-nav .lang-switch { padding-top: 16px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: min(88vh, 760px); display: flex; align-items: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #0b63b6 100%);
    color: #fff;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-bg.missing { display: none; }
.hero-overlay {
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(10, 42, 77, .92) 0%, rgba(10, 42, 77, .65) 55%, rgba(10, 42, 77, .35) 100%);
}
:root[dir="rtl"] .hero-overlay {
    background: linear-gradient(270deg, rgba(10, 42, 77, .92) 0%, rgba(10, 42, 77, .65) 55%, rgba(10, 42, 77, .35) 100%);
}
.hero-content { padding-block: 96px; max-width: var(--container); }
.hero h1 { color: #fff; max-width: 16em; }
.hero-subtitle { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255, 255, 255, .85); max-width: 34em; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 110px); }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.kicker {
    display: inline-block; margin-bottom: .6em;
    font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark);
}
:root[lang="ar"] .kicker { letter-spacing: 0; font-size: .95rem; }
.lead { font-size: 1.1rem; color: var(--muted); }

/* ---------- Image placeholders ----------
   Every photo sits in a .ph box. If the file is not uploaded yet, main.js adds
   .missing and the box shows the exact file path to upload. */
.ph { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--bg-alt); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.missing img { visibility: hidden; }
.ph.missing {
    background:
        repeating-linear-gradient(45deg, #e6ebf1 0 14px, #eef2f6 14px 28px);
    border: 2px dashed #b9c4d0;
}
.ph.missing::after {
    content: attr(data-label) "\A" attr(data-file);
    white-space: pre-line;
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    padding: 16px; text-align: center; direction: ltr;
    font: 600 .85rem/1.5 "Inter", monospace; color: var(--muted);
}

/* ---------- Key figures (under the top photo) ---------- */
.stats { background: var(--navy-2); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 22px; border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.stat:first-child { border-inline-start: 0; }
.stat strong {
    display: block; unicode-bidi: plaintext;
    font: 700 clamp(1.4rem, 2.4vw, 1.9rem)/1.2 "Inter", var(--font); color: var(--accent);
}
.stat span { display: block; margin-top: 4px; color: rgba(255, 255, 255, .78); font-size: .92rem; line-height: 1.45; }
@media (max-width: 860px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat { border-inline-start: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
    .stat:nth-child(-n+2) { border-top: 0; }
    .stat:nth-child(even) { border-inline-start: 1px solid rgba(255, 255, 255, .12); }
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-text p { color: var(--muted); }
.about-photo { aspect-ratio: 4 / 3; box-shadow: var(--shadow-lg); }
.check-list { display: grid; gap: 12px; margin-top: 24px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; }
.check-list .icon {
    width: 26px; height: 26px; padding: 5px; border-radius: 50%;
    background: rgba(11, 99, 182, .15); color: var(--accent-dark); stroke-width: 3;
}
@media (max-width: 860px) {
    .about-grid { grid-template-columns: 1fr; }
}

/* ---------- Heritage timeline + equipment (About) ---------- */
.heritage { margin-top: clamp(56px, 7vw, 88px); display: grid; gap: 32px; }
.heritage-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.heritage-head h3 { font-size: 1.5rem; margin: 0; }
.identity { margin: 0; font-weight: 700; color: var(--accent-dark); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 14px; inset-inline: 0; height: 2px; background: var(--border); }
.timeline li { position: relative; padding-top: 42px; }
.timeline li::before {
    content: ""; position: absolute; top: 7px; inset-inline-start: 0;
    width: 16px; height: 16px; border-radius: 50%; background: var(--accent-dark);
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(11, 99, 182, .25);
}
.timeline-year { font: 700 1.3rem/1.2 "Inter", sans-serif; color: var(--navy); }
.timeline p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
@media (max-width: 860px) {
    .timeline { grid-template-columns: 1fr; gap: 0; }
    .timeline::before { top: 0; bottom: 0; inset-inline-start: 7px; inset-inline-end: auto; width: 2px; height: auto; }
    .timeline li { padding: 0 0 22px; padding-inline-start: 38px; }
    .timeline li::before { top: 4px; }
}
.equipment { background: var(--bg-alt); border-radius: var(--radius); padding: 24px 28px; }
.equipment h3 { font-size: 1.1rem; }
.equipment-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 28px; }
.equipment-list li { display: flex; gap: 10px; align-items: flex-start; }
.equipment-list .icon { color: var(--accent-dark); margin-top: 4px; width: 1.05em; height: 1.05em; stroke-width: 3; }
@media (max-width: 600px) { .equipment-list { grid-template-columns: 1fr; } }

/* ---------- Services ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 32px 28px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.service-card p { color: var(--muted); margin: 0; }
.service-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 14px; margin-bottom: 20px;
    background: var(--navy); color: var(--accent);
}
.service-icon .icon { width: 28px; height: 28px; }
@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service-points { margin-top: 16px; display: grid; gap: 6px; }
.service-points li { position: relative; padding-inline-start: 18px; font-size: .95rem; }
.service-points li::before {
    content: ""; position: absolute; inset-inline-start: 0; top: .62em;
    width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- How we work ---------- */
.process {
    margin-top: 56px; background: var(--navy); color: rgba(255, 255, 255, .8);
    border-radius: var(--radius); padding: clamp(28px, 4vw, 48px);
}
.process-head { max-width: 640px; margin-bottom: 30px; }
.process-head h3 { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.process-head p { margin: 0; }
.process-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.process-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin-bottom: 12px; border-radius: 50%;
    background: var(--accent-dark); box-shadow: 0 0 0 4px rgba(41, 169, 240, .25);
    color: #fff; font: 700 1rem "Inter", sans-serif;
}
.process-steps strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.process-steps p { margin: 0; font-size: .92rem; line-height: 1.5; }
@media (max-width: 960px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .process-steps { grid-template-columns: 1fr; } }

/* ---------- Project filter buttons ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 36px; }
.filter-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: .55em 1.1em; border-radius: 999px; border: 1px solid var(--border);
    background: #fff; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.filter-btn .icon { width: 1.1em; height: 1.1em; color: var(--accent-dark); }
.filter-btn:hover { border-color: var(--accent-dark); }
.filter-btn[aria-pressed="true"] { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.filter-btn[aria-pressed="true"] .icon { color: #fff; }
.filter-count {
    min-width: 24px; padding: 0 7px; border-radius: 999px; font-size: .8rem; line-height: 1.6;
    background: var(--bg-alt); color: var(--muted); font-family: "Inter", sans-serif;
}
.filter-btn[aria-pressed="true"] .filter-count { background: rgba(255, 255, 255, .2); color: #fff; }
.projects-grid > li[hidden] { display: none; }

/* Phones: tidy grid. "All" on its own row, then the 4 types two by two. */
@media (max-width: 600px) {
    .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 28px; }
    .filter-btn { justify-content: center; padding: .6em .5em; font-size: .9rem; gap: 6px; }
    .filter-btn:first-child { grid-column: 1 / -1; }
    .filter-count { min-width: 22px; padding: 0 6px; }
}

/* ---------- Projects (home page cards, 4 per row) ---------- */
.projects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.project-card {
    display: flex; flex-direction: column; height: 100%;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.project-media { position: relative; }
.project-photo { aspect-ratio: 4 / 3; border-radius: 0; }
.project-photo img { transition: transform .4s ease; }
.project-card:hover .project-photo img { transform: scale(1.05); }
.project-num {
    position: absolute; top: 12px; inset-inline-start: 12px;
    min-width: 40px; padding: 4px 10px; border-radius: 999px;
    background: var(--accent-dark); color: #fff; font: 700 .9rem/1.4 "Inter", sans-serif; text-align: center;
}
.project-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }
.project-category { margin: 0 0 4px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-dark); }
:root[lang="ar"] .project-category { letter-spacing: 0; font-size: .9rem; }
.project-body h3 { margin-bottom: 6px; }
.project-location { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.project-location .icon { width: 1em; height: 1em; }
.project-more { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--navy); }
.project-more .icon { width: 1.1em; height: 1.1em; transition: transform .2s; }
.project-card:hover .project-more { color: var(--accent-dark); }
.project-card:hover .project-more .icon { transform: translateX(3px); }
:root[dir="rtl"] .project-more .icon { transform: scaleX(-1); }
:root[dir="rtl"] .project-card:hover .project-more .icon { transform: scaleX(-1) translateX(3px); }
@media (max-width: 1080px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .projects-grid { grid-template-columns: 1fr; } }

/* ---------- Project page ---------- */
.page-hero {
    position: relative; isolation: isolate; overflow: hidden;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #0b63b6 100%);
    color: #fff; padding-block: clamp(56px, 8vw, 96px);
}
.page-hero h1 { color: #fff; margin-bottom: .4em; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .92rem; color: rgba(255, 255, 255, .7); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: #fff; }
.page-hero-num { margin: 0 0 .3em; font: 700 .9rem/1.4 "Inter", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
:root[lang="ar"] .page-hero-num { font-family: var(--font); letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); font-size: .95rem;
}
.chips .icon { width: 1em; height: 1em; color: var(--accent); }

.project-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.project-description p { color: var(--muted); }
.project-description .lead { color: var(--text); font-weight: 500; }
.project-facts {
    background: var(--bg-alt); border-radius: var(--radius); padding: 28px; display: grid; gap: 20px;
    position: sticky; top: calc(var(--header-h) + 20px);
}
.project-facts h2 { font-size: 1.2rem; margin: 0; }
.project-facts dl { margin: 0; display: grid; gap: 0; }
.project-facts dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.project-facts dt { color: var(--muted); }
.project-facts dd { margin: 0; font-weight: 600; color: var(--navy); text-align: end; }
@media (max-width: 860px) {
    .project-layout { grid-template-columns: 1fr; }
    .project-facts { position: static; }
}

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-open {
    position: relative; display: block; width: 100%; padding: 0; border: 0; background: none;
    cursor: zoom-in; border-radius: var(--radius); font: inherit;
}
.gallery-photo { aspect-ratio: 4 / 3; }
.gallery-photo img { transition: transform .4s ease; }
.gallery-open:hover .gallery-photo img { transform: scale(1.05); }
.project-zoom {
    position: absolute; bottom: 12px; inset-inline-end: 12px;
    display: inline-flex; padding: 8px; border-radius: 50%;
    background: rgba(10, 42, 77, .75); color: #fff; opacity: 0; transition: opacity .25s;
}
.gallery-open:hover .project-zoom, .gallery-open:focus-visible .project-zoom { opacity: 1; }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

.project-pager {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
    padding-bottom: 40px; margin-bottom: 48px; border-bottom: 1px solid var(--border);
}
.project-pager a { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; color: var(--navy); }
.project-pager a:hover { color: var(--accent-dark); }
.project-pager a[rel="next"] { justify-self: end; text-align: end; }
.project-pager small { display: block; font-weight: 500; color: var(--muted); }
.project-pager .icon { width: 28px; height: 28px; }
:root[dir="rtl"] .project-pager .icon { transform: scaleX(-1); }
.pager-all { padding: .5em 1.2em; border: 2px solid var(--navy); border-radius: 999px; }
.pager-all:hover { background: var(--navy); color: #fff !important; }
@media (max-width: 640px) {
    .project-pager { grid-template-columns: 1fr 1fr; }
    .pager-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

.cta-band {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: var(--navy); color: rgba(255, 255, 255, .8); border-radius: var(--radius);
    padding: clamp(28px, 4vw, 44px);
}
.cta-band h2 { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-bottom: .3em; }
.cta-band p { margin: 0; }

.not-found { text-align: center; }

/* ---------- Lightbox ---------- */
.lightbox {
    width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 24px;
    border: 0; background: rgba(8, 18, 30, .94); color: #fff;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; gap: 16px; }
.lightbox::backdrop { background: rgba(8, 18, 30, .6); }
.lb-figure { margin: 0; max-width: min(1100px, 100%); flex: 1; text-align: center; }
.lb-photo { background: transparent; border-radius: 8px; }
.lb-photo img { max-height: 78vh; width: auto; height: auto; margin-inline: auto; object-fit: contain; }
.lb-photo.missing { aspect-ratio: 4 / 3; max-height: 78vh; }
.lb-figure figcaption { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.lb-location { color: rgba(255, 255, 255, .7); }
.lb-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .12); color: #fff; flex-shrink: 0;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-btn .icon { width: 26px; height: 26px; }
.lb-close { position: absolute; top: 16px; inset-inline-end: 16px; }
:root[dir="rtl"] .lb-prev .icon, :root[dir="rtl"] .lb-next .icon { transform: scaleX(-1); }
@media (max-width: 640px) {
    .lightbox[open] { flex-wrap: wrap; align-content: center; }
    .lb-figure { flex-basis: 100%; order: -1; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: start; }
.contact-list { display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list strong { display: block; color: var(--navy); }
.contact-list a:hover { color: var(--accent-dark); }
.contact-line { display: block; }
.contact-list span:not(.contact-icon) { color: var(--muted); }
.contact-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 12px; background: #fff; color: var(--accent-dark);
    box-shadow: var(--shadow);
}
.contact-cta { padding-top: 6px; }
.contact-cta .btn span { color: #fff; }

.contact-form {
    background: #fff; border-radius: var(--radius); padding: clamp(24px, 4vw, 40px);
    box-shadow: var(--shadow); display: grid; gap: 16px;
}
.contact-form h3 { font-size: 1.35rem; margin-bottom: 4px; }
.field { display: grid; gap: 6px; }
.field span { font-weight: 600; font-size: .92rem; color: var(--navy); }
.field input, .field textarea {
    width: 100%; font: inherit; color: var(--text);
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd;
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(11, 99, 182, .18); background: #fff;
}
:root[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { margin: 0; font-size: .9rem; color: var(--muted); }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.alert { padding: 12px 16px; border-radius: 10px; font-weight: 500; }
.alert-success { background: #e7f5ee; color: var(--success); }
.alert-error { background: #fdecea; color: var(--error); }

.map { margin-top: 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

@media (max-width: 860px) {
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .field-row { grid-template-columns: 1fr; }
    .contact-form .btn { justify-self: stretch; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .75); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.brand-footer { display: inline-block; color: #fff; font-weight: 700; font-size: 1.15rem; margin-bottom: 14px; }
.footer-tagline { max-width: 26em; }
.footer-links { display: grid; gap: 10px; }
.footer-links a:hover { color: var(--accent); }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
    display: inline-flex; padding: 10px; border-radius: 50%;
    background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s, color .2s;
}
.socials a:hover { background: var(--accent); color: #fff; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 22px; font-size: .9rem;
}
.footer-bottom p { margin: 0; }
.footer-bottom .lang-switch { color: #fff; }
@media (max-width: 760px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- WhatsApp button ---------- */
.wa-float {
    position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 90;
    display: inline-flex; align-items: center; justify-content: center;
    width: 60px; height: 60px; border-radius: 50%;
    background: #25d366; color: #fff;
    box-shadow: 0 6px 18px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .18);
    transition: transform .2s, box-shadow .2s, background-color .2s;
}
.wa-float:hover { transform: scale(1.08); background: #1ebe5b; box-shadow: 0 10px 26px rgba(37, 211, 102, .55), 0 3px 8px rgba(0, 0, 0, .2); }
.wa-float .icon { width: 32px; height: 32px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

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

/* Contact form: service choice */
.field select {
    width: 100%; font: inherit; color: var(--text);
    padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcfd;
}
.field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(11, 99, 182, .18); background: #fff; }
