/* ============================================================
   Rome Global — brand stylesheet
   Palette (Brand Manual 2024): #668291 #83a8b4 #93a9b4 #b2b8b6
                                #bbbbb3 #cec1b1 #fbf8ef #58595b
   Typeface: Alexandria (EN + AR)
   ============================================================ */

:root {
    --blue: #668291;
    --blue-light: #83a8b4;
    --blue-soft: #93a9b4;
    --grey-blue: #b2b8b6;
    --grey-warm: #bbbbb3;
    --beige: #cec1b1;
    --cream: #fbf8ef;
    --ink: #58595b;
    --ink-dark: #3f4042;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(88, 89, 91, .14);
    --radius: 14px;
    --container: 1200px;
    --header-h: 118px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Alexandria', 'Segoe UI', Tahoma, sans-serif;
    font-weight: 300;
    color: var(--ink);
    background: var(--white);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s; }
ul { list-style: none; }

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

/* ---------- typography helpers ---------- */
h1, h2, h3, h4 { font-weight: 400; color: var(--ink-dark); line-height: 1.35; }

.kicker {
    display: block;
    font-size: .78rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--blue-light);
    font-weight: 500;
    margin-bottom: 14px;
}

.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 300; margin-bottom: 22px; }
.section-title strong { font-weight: 600; color: var(--blue); }

.lead { max-width: 720px; font-size: 1.02rem; color: var(--ink); }

section { padding: 84px 0; }

/* ---------- buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 38px;
    border: 1px solid var(--blue);
    color: var(--blue);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    transition: all .3s;
    background: transparent;
    cursor: pointer;
}
.btn:hover { background: var(--blue); color: var(--white); }
.btn--solid { background: var(--blue); color: var(--white); }
.btn--solid:hover { background: var(--ink-dark); border-color: var(--ink-dark); }
.btn--light { border-color: var(--cream); color: var(--cream); }
.btn--light:hover { background: var(--cream); color: var(--ink-dark); }

/* ---------- header (modelled on the reference site) ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid rgba(102, 130, 145, .1);
    transition: background .35s ease, border-color .35s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    height: var(--header-h);
}

.logo { display: block; flex-shrink: 0; }
.logo img { height: 88px; width: auto; }
.logo .logo-light { display: none; }

.main-nav { display: flex; align-items: center; gap: 36px; }

.main-nav > li > a {
    position: relative;
    display: block;
    padding: 16px 2px;
    font-size: .82rem;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: lowercase;
    color: var(--ink);
    transition: color .25s;
}
.main-nav > li > a::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 8px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}
.main-nav > li > a:hover::after,
.main-nav > li > a.active::after { transform: scaleX(1); }

/* simple dropdown (services) */
.main-nav > li { position: relative; }
.dropdown {
    position: absolute;
    inset-inline-start: -28px;
    top: 100%;
    min-width: 265px;
    background: var(--white);
    box-shadow: 0 28px 50px rgba(88, 89, 91, .16);
    border-top: 1px solid rgba(102, 130, 145, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: all .3s ease;
    padding: 20px 0;
}
.main-nav li:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
    display: block;
    padding: 9px 28px;
    font-size: .82rem;
    letter-spacing: .05em;
    text-transform: lowercase;
    color: var(--ink);
}
.dropdown a:hover { color: var(--blue); }

/* full-width mega menu (products) */
.main-nav > li.has-mega { position: static; }
.mega {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--white);
    box-shadow: 0 34px 55px rgba(88, 89, 91, .16);
    border-top: 1px solid rgba(102, 130, 145, .08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: all .3s ease;
}
.main-nav li.has-mega:hover .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-grid {
    max-width: var(--container);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    padding: 46px 24px 52px;
}
.mega-head {
    display: block;
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: lowercase;
    color: var(--ink-dark);
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(102, 130, 145, .16);
}
.mega-head:hover { color: var(--blue); }
.mega-col a.sub {
    display: block;
    padding: 6px 0;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: lowercase;
    color: var(--ink);
}
.mega-col a.sub:hover { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 20px; }

.lang-switch {
    display: flex;
    align-items: center;
    padding: 6px 2px;
    transition: opacity .25s;
}
.lang-switch img {
    display: block;
    width: 28px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(88, 89, 91, .15);
}
.lang-switch:hover { opacity: .75; }

.search-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--ink);
    transition: color .25s;
}
.search-toggle:hover { color: var(--blue); }

.search-bar {
    display: none;
    background: var(--white);
    border-top: 1px solid rgba(102, 130, 145, .1);
}
.site-header.search-open .search-bar { display: block; }
.search-bar form { display: flex; align-items: center; gap: 16px; padding: 20px 0; }
.search-bar input {
    flex: 1;
    border: 0;
    border-bottom: 1px solid rgba(102, 130, 145, .35);
    border-radius: 0;
    background: transparent;
    font-size: 1.05rem;
    padding: 10px 2px;
}
.search-bar input:focus { border-bottom-color: var(--blue); }
.search-bar .btn { padding: 11px 28px; }

/* transparent variant over the home hero */
body.home .site-header { position: fixed; inset-inline: 0; top: 0; }
body.home main { padding-top: 0; }
.site-header.transparent:not(.scrolled):not(.search-open) {
    background: transparent;
    border-bottom-color: transparent;
}
.site-header.transparent:not(.scrolled):not(.search-open) .main-nav > li > a,
.site-header.transparent:not(.scrolled):not(.search-open) .lang-switch,
.site-header.transparent:not(.scrolled):not(.search-open) .search-toggle { color: var(--cream); }
.site-header.transparent:not(.scrolled):not(.search-open) .logo .logo-color { display: none; }
.site-header.transparent:not(.scrolled):not(.search-open) .logo .logo-light { display: block; }
.site-header.transparent:not(.scrolled):not(.search-open) .nav-toggle span { background: var(--cream); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--ink); margin: 6px 0; transition: .3s; }

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: min(96vh, 820px);
    padding-top: calc(var(--header-h) + 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--cream);
    background: linear-gradient(rgba(63, 64, 66, .55), rgba(88, 89, 91, .65)), url('../images/texture-11.jpg') center/cover;
    padding: 90px 24px;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../images/symbol-white.png') no-repeat;
    background-position: 88% center;
    background-size: 420px;
    opacity: .07;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 880px; }
.hero h1 {
    color: var(--white);
    font-size: clamp(2.1rem, 5.4vw, 3.9rem);
    font-weight: 300;
    line-height: 1.3;
    margin-bottom: 18px;
}
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--cream); opacity: .92; margin-bottom: 36px; }

/* ---------- home welcome (split intro, modelled on the reference site) ---------- */
.intro-split {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 80px;
    align-items: start;
}
.intro-title {
    font-size: clamp(2.2rem, 4.2vw, 3.4rem);
    font-weight: 250;
    line-height: 1.32;
    color: var(--ink-dark);
}
.intro-mark {
    width: 140px;
    margin-top: 44px;
    opacity: .85;
}
.intro-body .section-title { margin-bottom: 18px; }
.intro-body .section-title strong { color: var(--ink-dark); font-weight: 600; }
.intro-body p { margin-bottom: 18px; font-size: 1.02rem; }
.text-link { color: var(--blue-light); transition: color .25s; }
.text-link:hover { color: var(--blue); text-decoration: underline; }
.intro-btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 14px; }
.btn-arrow { font-size: 1.2em; line-height: 1; }
[dir="rtl"] .btn-arrow { transform: scaleX(-1); }

/* ---------- category cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.cat-card {
    position: relative;
    display: block;
    height: 420px;
    overflow: hidden;
    border-radius: var(--radius);
    color: var(--white);
}
.cat-card img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}
.cat-card:hover img { transform: scale(1.07); }
.cat-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(63, 64, 66, .82), rgba(63, 64, 66, .05) 55%);
}
.cat-card-body {
    position: absolute;
    z-index: 2;
    bottom: 0;
    inset-inline: 0;
    padding: 30px;
}
.cat-card h3 { color: var(--white); font-size: 1.45rem; font-weight: 400; margin-bottom: 6px; }
.cat-card p { font-size: .9rem; opacity: .85; margin-bottom: 12px; }
.cat-card .more {
    font-size: .74rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--beige);
    font-weight: 600;
}

/* ---------- split section (about preview) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split-media::before {
    content: '';
    position: absolute;
    inset-inline-start: -22px;
    top: 22px;
    width: 100%; height: 100%;
    border: 1px solid var(--beige);
    border-radius: var(--radius);
    z-index: -1;
}

/* ---------- values ---------- */
.values { background: var(--cream); }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 50px; }
.value-item { text-align: center; padding: 0 8px; }
.value-item .num {
    font-size: 2.4rem;
    font-weight: 200;
    color: var(--blue-light);
    display: block;
    margin-bottom: 10px;
}
.value-item h4 { font-size: 1.02rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 10px; text-transform: uppercase; }
.value-item p { font-size: .88rem; }

/* ---------- dark green section ---------- */
.green {
    color: var(--cream);
    background: linear-gradient(rgba(102, 130, 145, .93), rgba(88, 89, 91, .93)), url('../images/texture-1.jpg') center/cover fixed;
    text-align: center;
}
.green .kicker { color: var(--beige); }
.green .section-title { color: var(--white); }
.green .lead { margin-inline: auto; color: var(--cream); margin-bottom: 34px; }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 50px; }
.g-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 280px;
    display: block;
    color: var(--white);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.g-item:hover img { transform: scale(1.06); }
.g-item figcaption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 18px 20px;
    background: linear-gradient(to top, rgba(63, 64, 66, .85), transparent);
    font-size: .92rem;
}
.g-item figcaption span { display: block; font-size: .78rem; opacity: .8; }

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--ink-dark);
    color: var(--cream);
    text-align: center;
    background: linear-gradient(rgba(63, 64, 66, .88), rgba(63, 64, 66, .88)), url('../images/texture-9.jpg') center/cover;
}
.cta-band .section-title { color: var(--white); }
.cta-band .lead { margin-inline: auto; margin-bottom: 34px; color: var(--cream); opacity: .92; }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
    background: linear-gradient(rgba(102, 130, 145, .78), rgba(88, 89, 91, .82)), url('../images/texture-3.jpg') center/cover;
    color: var(--cream);
    text-align: center;
    padding: 96px 24px;
}
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 300; }
.page-hero p { max-width: 720px; margin: 14px auto 0; opacity: .92; }
.breadcrumbs { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; opacity: .8; }
.breadcrumbs a:hover { color: var(--beige); }

/* ---------- product detail ---------- */
.product-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 480px; }
.product-hero-text {
    background: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 70px;
}
.product-hero-text .cat-label {
    font-size: .75rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--blue-light);
    font-weight: 600;
    margin-bottom: 18px;
}
.product-hero-text h1 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 300; margin-bottom: 12px; }
.product-hero-text .tagline { font-size: 1.05rem; color: var(--ink); }
.product-hero-media { min-height: 420px; }
.product-hero-media img { width: 100%; height: 100%; object-fit: cover; }

.uses-bar { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.use-chip {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 30px;
    border: 1px solid var(--blue-soft);
    color: var(--blue);
    background: var(--white);
}
.use-chip.eco { border-color: #8aa88a; color: #6d8f6d; }

.prose { max-width: 780px; }
.prose p { margin-bottom: 18px; }

.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.tech-card {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 28px;
}
.tech-card h4 {
    font-size: .78rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 10px;
}
.tech-card p { font-size: .92rem; }

.finishes { background: var(--cream); }
.finish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 46px; }
.finish-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 8px 26px rgba(88,89,91,.08); }
.finish-card img { height: 190px; width: 100%; object-fit: cover; }
.finish-card div { padding: 22px 24px; }
.finish-card h4 { font-size: .95rem; font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; }
.finish-card p { font-size: .87rem; }

/* ---------- product / listing cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 46px; }
.p-card {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 8px 26px rgba(88, 89, 91, .09);
    transition: transform .35s, box-shadow .35s;
}
.p-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.p-card img { height: 230px; width: 100%; object-fit: cover; }
.p-card-body { padding: 24px 26px 28px; }
.p-card h3 { font-size: 1.12rem; font-weight: 500; margin-bottom: 6px; }
.p-card p { font-size: .88rem; margin-bottom: 14px; }
.p-card .more { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--blue); font-weight: 600; }

/* ---------- service detail ---------- */
.check-list { margin-top: 26px; }
.check-list li {
    position: relative;
    padding-inline-start: 34px;
    margin-bottom: 14px;
}
.check-list li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: .5em;
    width: 18px; height: 9px;
    border-inline-start: 2px solid var(--blue-light);
    border-bottom: 2px solid var(--blue-light);
    transform: rotate(-45deg);
}

/* ---------- stats ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: center; }
.stat b { display: block; font-size: 2.6rem; font-weight: 300; color: var(--blue); }
.stat span { font-size: .85rem; letter-spacing: .06em; }

/* ---------- blog ---------- */
.post-meta { font-size: .78rem; letter-spacing: .1em; color: var(--grey-warm); text-transform: uppercase; margin-bottom: 10px; }
article.prose h2 { margin: 30px 0 14px; font-weight: 500; }

/* ---------- contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: .8rem; font-weight: 500; letter-spacing: .06em; margin-bottom: 7px; color: var(--ink-dark); }
input, select, textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(102, 130, 145, .3);
    border-radius: 8px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--ink-dark);
    background: var(--white);
    transition: border-color .3s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { min-height: 150px; resize: vertical; }
.form-error { color: #b0563f; font-size: .8rem; margin-top: 5px; }
.alert-success {
    background: #eef5ee;
    border: 1px solid #b9d4b9;
    color: #4d6d4d;
    padding: 16px 22px;
    border-radius: 10px;
    margin-bottom: 26px;
}

.contact-info h3 { font-weight: 500; margin-bottom: 18px; }
.contact-info li { margin-bottom: 16px; font-size: .95rem; }
.contact-info li b { display: block; font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--blue-light); margin-bottom: 3px; }

/* ---------- footer ---------- */
.site-footer {
    background: var(--ink-dark);
    color: var(--grey-blue);
    padding: 70px 0 0;
    font-size: .9rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 44px; padding-bottom: 50px; }
.site-footer h4 {
    color: var(--cream);
    font-size: .8rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 20px;
}
.site-footer a:hover { color: var(--beige); }
.site-footer li { margin-bottom: 10px; }
.footer-logo img { height: 74px; margin-bottom: 18px; }
.footer-bottom {
    border-top: 1px solid rgba(251, 248, 239, .12);
    padding: 22px 0;
    text-align: center;
    font-size: .78rem;
    letter-spacing: .06em;
}

/* ---------- RTL refinements ---------- */
[dir="rtl"] body, [dir="rtl"] { letter-spacing: 0 !important; }
[dir="rtl"] .main-nav > li > a,
[dir="rtl"] .dropdown a,
[dir="rtl"] .mega-head,
[dir="rtl"] .mega-col a.sub,
[dir="rtl"] .lang-switch,
[dir="rtl"] .kicker,
[dir="rtl"] .btn,
[dir="rtl"] .use-chip,
[dir="rtl"] .more,
[dir="rtl"] .breadcrumbs,
[dir="rtl"] .post-meta,
[dir="rtl"] .site-footer h4,
[dir="rtl"] .tech-card h4,
[dir="rtl"] .cat-label,
[dir="rtl"] label { letter-spacing: 0; }
[dir="rtl"] .hero::after { background-position: 12% center; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
    .card-grid, .gallery-grid, .product-grid, .finish-grid, .tech-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    :root { --header-h: 84px; }
    .logo img { height: 60px; }
    .main-nav {
        position: fixed;
        top: var(--header-h);
        inset-inline: 0;
        bottom: 0;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px;
        gap: 2px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform .35s;
        z-index: 99;
    }
    [dir="rtl"] .main-nav { transform: translateX(-100%); }
    .main-nav.open { transform: translateX(0); }
    .main-nav > li { width: 100%; position: relative; }
    .main-nav > li > a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid rgba(102,130,145,.1); }
    .site-header.transparent:not(.scrolled):not(.search-open) .main-nav > li > a { color: var(--ink); }
    .main-nav > li > a::after { display: none; }
    .dropdown, .mega {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border-top: 0;
        display: none;
        padding: 0 0 10px;
    }
    .main-nav li.open-sub .dropdown,
    .main-nav li.open-sub .mega { display: block; }
    .mega-grid { grid-template-columns: 1fr; gap: 22px; padding: 14px 4px 10px; }
    .nav-toggle { display: block; }
    .split, .contact-layout, .product-hero, .intro-split { grid-template-columns: 1fr; }
    .intro-split { gap: 36px; }
    .intro-mark { margin-top: 20px; width: 110px; }
    .product-hero-text { padding: 46px 28px; }
    section { padding: 60px 0; }
}

@media (max-width: 560px) {
    .card-grid, .gallery-grid, .product-grid, .finish-grid, .tech-grid, .values-grid, .stats-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
    .logo img { height: 48px; }
    .cat-card { height: 320px; }
}
