/*
Theme Name: Shutter Glass
Theme URI: https://shutterglass.com
Author: Mohamad Zeibaq (WhatsApp +49 176 61839428)
Author URI: https://wa.me/4917661839428
Description: Modern bilingual (English / Arabic) theme for glass, facades and shutter companies. Auto-detects the visitor language, every home section is editable and can be hidden from the Customizer, built-in contact form, and a masonry gallery managed from the front end by a dedicated Gallery Manager role.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shutterglass
Tags: one-column, custom-logo, custom-colors, rtl-language-support, translation-ready
*/

:root {
  --green-950: #06201A;
  --green-900: #0A2E25;
  --green-800: #0F3D31;
  --green-700: #155443;
  --mint: #7FD1AE;
  --mint-soft: #E4F5EC;
  --sand: #F5F3EE;
  --text: #0B1F19;
  --muted: #5E6B66;
  --line: #E3E7E4;
  --radius: 18px;
  --max: 1240px;
  --font: 'Inter', 'IBM Plex Sans Arabic', system-ui, sans-serif;
}
html[dir="rtl"] { --font: 'IBM Plex Sans Arabic', 'Inter', system-ui, sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: #fff; line-height: 1.75; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.num-font { font-family: 'Inter', sans-serif; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: .25s; cursor: pointer; border: 0; line-height: 1.4; }
.btn-mint { background: var(--mint); color: var(--green-950); }
.btn-mint:hover { background: #fff; }
.btn-line { border: 1px solid rgba(255,255,255,.3); color: #fff; background: transparent; }
.btn-line:hover { background: rgba(255,255,255,.08); }
.btn-dark { background: var(--green-900); color: #fff; }
.btn-dark:hover { background: var(--green-700); }
.btn-light { background: var(--sand); color: var(--text); }
.btn-light:hover { background: var(--line); }
.btn-danger { background: #B42318; color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; }

.tag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--green-700); background: var(--mint-soft); padding: 6px 14px; border-radius: 999px; }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.dark { background: rgba(127,209,174,.12); color: var(--mint); }
.section { padding: 110px 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 56px; flex-wrap: wrap; }
.head h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.25; margin-top: 14px; max-width: 640px; }
.head p { color: var(--muted); max-width: 440px; font-size: 17px; }

/* Header */
.site-header { position: absolute; top: 0; inset-inline: 0; z-index: 50; padding: 22px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(6,32,26,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); border-radius: 999px; padding: 10px 12px; padding-inline-start: 24px; }
.logo { display: flex; align-items: center; gap: 12px; color: #fff; }
.logo img { max-height: 48px; width: auto; }
.logo-mark { width: 48px; height: 48px; border-radius: 12px; background: #fff; color: var(--green-950); display: grid; place-items: center; font-size: 22px; flex: none; padding: 4px; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.logo-tile { display: inline-flex; align-items: center; background: #fff; border-radius: 14px; padding: 5px 8px; overflow: hidden; }
.logo-tile img { max-height: 46px; width: auto; border-radius: 8px; }
.logo-footer .logo-full { width: 150px; max-height: none; }
.logo b { display: block; font-family: 'Inter', sans-serif; letter-spacing: .14em; font-size: 15px; line-height: 1.2; }
.logo span { display: block; font-size: 12px; color: var(--mint); line-height: 1.3; }
.menu { display: flex; gap: 30px; }
.menu a { color: rgba(255,255,255,.75); font-size: 15px; font-weight: 500; }
.menu a:hover, .menu a.current { color: #fff; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.lang-switch { color: #fff; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); }
.lang-switch:hover { background: rgba(255,255,255,.08); }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; }
.menu .lang-switch.mobile-only { display: none; }
.menu.open .lang-switch.mobile-only { display: inline-block; align-self: flex-start; }
.admin-bar .site-header { top: 32px; }

/* Hero */
.hero { position: relative; min-height: 780px; background: var(--green-950); color: #fff; overflow: hidden; display: flex; align-items: center; }
.hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,32,26,.97) 0%, rgba(6,32,26,.88) 42%, rgba(6,32,26,.35) 100%); }
[dir="rtl"] .hero-img::after { background: linear-gradient(270deg, rgba(6,32,26,.97) 0%, rgba(6,32,26,.88) 42%, rgba(6,32,26,.35) 100%); }
.hero .container { position: relative; padding-top: 150px; padding-bottom: 120px; width: 100%; }
.hero-content { max-width: 660px; }
.hero h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.15; margin: 22px 0; font-weight: 700; letter-spacing: -.01em; }
.hero h1 span { color: var(--mint); display: block; }
.hero p { font-size: 19px; color: rgba(255,255,255,.75); max-width: 560px; }
.hero-cta { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.hero-card { position: absolute; inset-inline-end: 24px; bottom: 90px; width: 310px; background: rgba(255,255,255,.1); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 20px; }
.hero-card .row { display: flex; align-items: center; gap: 12px; }
.hero-card i { font-size: 26px; background: var(--mint); color: var(--green-950); border-radius: 12px; padding: 8px; }
.hero-card b { display: block; font-size: 16px; }
.hero-card small { color: rgba(255,255,255,.7); font-size: 13px; }
.hero-card .note { margin-top: 14px; font-size: 13px; color: rgba(255,255,255,.8); display: flex; align-items: center; gap: 8px; }
.hero-card .note i { font-size: 16px; padding: 4px; border-radius: 8px; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: 12px; color: rgba(255,255,255,.5); display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* Stats */
.stats { border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { padding: 48px 28px; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; }
.stat b { display: block; font-size: 44px; line-height: 1.15; color: var(--green-800); font-weight: 700; }
.stat span { color: var(--muted); font-size: 15px; }

/* Services */
.services { background: var(--sand); }
.featured { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.fcard { position: relative; height: 440px; border-radius: var(--radius); overflow: hidden; color: #fff; background: var(--green-800); }
.fcard img { width: 100%; height: 100%; object-fit: cover; transition: .6s; }
.fcard:hover img { transform: scale(1.06); }
.fcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,32,26,.95) 0%, rgba(6,32,26,.1) 60%); }
.fcard .body { position: absolute; inset-inline: 0; bottom: 0; padding: 28px; z-index: 1; }
.fcard .num { font-family: 'Inter', sans-serif; font-size: 13px; color: var(--mint); }
.fcard h3 { font-size: 24px; margin: 4px 0 2px; line-height: 1.35; }
.fcard .alt { font-size: 13px; color: rgba(255,255,255,.6); display: block; }
.fcard p { font-size: 15px; color: rgba(255,255,255,.8); margin-top: 10px; }
.fcard .arrow { position: absolute; top: 22px; inset-inline-end: 22px; z-index: 1; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.15); backdrop-filter: blur(8px); display: grid; place-items: center; font-size: 20px; transition: .3s; }
.fcard:hover .arrow { background: var(--mint); color: var(--green-950); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc { background: #fff; border-radius: var(--radius); padding: 26px; display: flex; gap: 18px; align-items: flex-start; border: 1px solid transparent; transition: .25s; }
.svc:hover { border-color: var(--mint); transform: translateY(-4px); }
.svc > i { font-size: 26px; color: var(--green-700); background: var(--mint-soft); border-radius: 14px; padding: 12px; }
.svc h3 { font-size: 18px; line-height: 1.4; }
.svc .alt { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.svc p { font-size: 14px; color: var(--muted); line-height: 1.7; }
[dir="rtl"] .alt { text-align: right; }

/* Motion */
.motion { background: var(--green-950); color: #fff; overflow: hidden; }
.motion-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.motion h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.25; margin: 14px 0 18px; }
.motion p { color: rgba(255,255,255,.7); font-size: 17px; margin-bottom: 28px; }
.motion ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 32px; }
.motion li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.motion li i { color: var(--mint); font-size: 20px; }
.demo { background: var(--green-900); border: 1px solid rgba(255,255,255,.08); border-radius: 24px; padding: 28px; }
.stage { position: relative; height: 300px; border-radius: 16px; overflow: hidden; background-size: cover; background-position: center; }
.panels { position: absolute; inset: 0; display: flex; direction: ltr; }
.panel { height: 100%; flex: 0 0 auto; border-right: 3px solid rgba(20,40,35,.85); background: linear-gradient(120deg, rgba(200,235,225,.35), rgba(255,255,255,.08) 40%, rgba(200,235,225,.25)); }
.demo-ctrl { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.demo-ctrl span { font-size: 14px; color: rgba(255,255,255,.7); white-space: nowrap; }
.demo-ctrl b { font-family: 'Inter', sans-serif; color: var(--mint); min-width: 48px; }
.demo input[type=range] { flex: 1; accent-color: var(--mint); }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.why { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; transition: .25s; }
.why:hover { background: var(--green-900); color: #fff; }
.why:hover p { color: rgba(255,255,255,.7); }
.why:hover i { background: var(--mint); color: var(--green-950); }
.why i { font-size: 26px; color: var(--green-700); background: var(--mint-soft); border-radius: 14px; padding: 12px; display: inline-block; margin-bottom: 20px; transition: .25s; }
.why h3 { font-size: 18px; margin-bottom: 8px; }
.why p { font-size: 14px; color: var(--muted); transition: .25s; }

/* Process */
.process { background: var(--sand); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { background: #fff; border-radius: var(--radius); padding: 30px 26px; }
.step .n { font-family: 'Inter', sans-serif; font-weight: 700; font-size: 54px; line-height: 1; color: var(--mint-soft); -webkit-text-stroke: 1px var(--mint); }
.step h3 { font-size: 20px; margin: 18px 0 8px; }
.step p { font-size: 15px; color: var(--muted); }

/* Home gallery */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 16px; }
.g { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.g img { width: 100%; height: 100%; object-fit: cover; transition: .6s; }
.g:hover img { transform: scale(1.06); }
.g.w { grid-column: span 2; } .g.t { grid-row: span 2; }
.bento .g.is-extra { display: none; }
.g span { position: absolute; bottom: 14px; inset-inline-start: 14px; background: rgba(6,32,26,.8); backdrop-filter: blur(6px); color: #fff; font-size: 13px; padding: 6px 14px; border-radius: 999px; }

/* Reviews */
.reviews { background: var(--green-900); color: #fff; }
.reviews .head p { color: rgba(255,255,255,.7); }
.r-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.r { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 30px; }
.r .q { font-size: 44px; color: var(--mint); line-height: 1; font-family: Georgia, serif; }
.r p { font-size: 16px; color: rgba(255,255,255,.85); margin: 12px 0 24px; }
.who { display: flex; gap: 12px; align-items: center; }
.av { width: 46px; height: 46px; border-radius: 50%; background: var(--mint); color: var(--green-950); display: grid; place-items: center; font-weight: 700; flex: none; }
.who b { display: block; font-size: 15px; }
.who small { color: rgba(255,255,255,.6); }
.stars { color: #F3C14B; margin-inline-start: auto; font-size: 14px; white-space: nowrap; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; }
.faq-grid h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.25; margin: 14px 0; }
.faq-grid .intro p { color: var(--muted); margin-bottom: 26px; }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary { font-size: 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: 'Inter', sans-serif; font-size: 24px; color: var(--green-700); line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--muted); margin-top: 12px; }

/* Contact */
.contact { background: var(--green-950); color: #fff; border-radius: 32px; margin: 0 24px 0; }
.c-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.contact h2 { font-size: clamp(32px, 4vw, 50px); line-height: 1.25; margin: 14px 0 18px; }
.contact h2 span { color: var(--mint); display: block; }
.contact .lead { color: rgba(255,255,255,.7); font-size: 17px; margin-bottom: 30px; }
.ci { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.ci i { font-size: 22px; background: rgba(127,209,174,.12); color: var(--mint); border-radius: 12px; padding: 11px; }
.ci small { display: block; color: rgba(255,255,255,.6); font-size: 13px; }
.sg-form { background: #fff; color: var(--text); border-radius: 24px; padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sg-form h3 { grid-column: 1 / -1; font-size: 22px; }
.sg-form .full { grid-column: 1 / -1; }
.sg-form label, .sg-modal label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 6px; }
.sg-form input, .sg-form select, .sg-form textarea, .sg-modal input, .sg-modal select { width: 100%; font: inherit; font-size: 15px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--sand); color: var(--text); }
.sg-form input:focus, .sg-form select:focus, .sg-form textarea:focus, .sg-modal input:focus, .sg-modal select:focus { outline: 2px solid var(--mint); border-color: transparent; background: #fff; }
.sg-form textarea { min-height: 100px; resize: vertical; }
.sg-form .btn { width: 100%; justify-content: center; }
.sg-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.form-msg { grid-column: 1 / -1; font-size: 15px; border-radius: 12px; padding: 12px 16px; display: none; }
.form-msg.ok { display: block; background: var(--mint-soft); color: var(--green-800); }
.form-msg.err { display: block; background: #FDECEC; color: #912018; }

/* Footer */
.site-footer { padding: 90px 0 0; }
.f-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.site-footer .logo { color: var(--text); }
.site-footer .logo span { color: var(--green-700); }
.site-footer p { color: var(--muted); margin: 16px 0 20px; max-width: 320px; }
.site-footer h4 { font-size: 16px; margin-bottom: 14px; }
.f-grid a { display: block; color: var(--muted); padding: 4px 0; }
.f-grid a:hover { color: var(--green-700); }
.social { display: flex; gap: 10px; }
.f-grid .social a { width: 42px; height: 42px; border-radius: 12px; background: var(--sand); display: grid; place-items: center; font-size: 20px; color: var(--green-800); padding: 0; }
.f-grid .social a:hover { background: var(--mint); }
.f-bottom { border-top: 1px solid var(--line); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--muted); }
.credit { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); transition: .2s; }
.credit b { color: var(--green-800); font-weight: 600; }
.credit i { font-size: 17px; color: #25D366; }
.credit:hover b { color: var(--green-700); text-decoration: underline; }
.wa-float { position: fixed; inset-inline-end: 24px; bottom: 24px; width: 60px; height: 60px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; font-size: 32px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 60; }

/* Inner pages */
.page-hero { background: var(--green-950); color: #fff; padding: 180px 0 80px; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.2; margin: 16px 0 12px; }
.page-hero p { color: rgba(255,255,255,.72); font-size: 18px; max-width: 620px; }
.entry { padding: 80px 0; }
.entry .container { max-width: 820px; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2, .entry-content h3 { line-height: 1.3; }
.entry-content a { color: var(--green-700); text-decoration: underline; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; }
.post-list { display: grid; gap: 28px; }
.post-list article { border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.post-list h2 { font-size: 26px; }
.pagination { margin-top: 40px; display: flex; gap: 10px; }

/* Gallery page */
.gallery-page { padding: 60px 0 110px; }
.g-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: #fff; color: var(--text); padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; transition: .2s; }
.filters button:hover { border-color: var(--mint); }
.filters button.active { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.manager-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: var(--mint-soft); padding: 10px 10px; padding-inline-start: 18px; border-radius: 999px; font-size: 14px; color: var(--green-800); }
.masonry { columns: 4 260px; column-gap: 16px; }
.m-item { break-inside: avoid; margin: 0 0 16px; position: relative; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--sand); }
.m-item img { width: 100%; transition: .5s; }
.m-item:hover img { transform: scale(1.04); }
.m-item figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 40px 16px 14px; color: #fff; font-size: 14px; font-weight: 500; background: linear-gradient(0deg, rgba(6,32,26,.85), transparent); opacity: 0; transition: .3s; }
.m-item:hover figcaption { opacity: 1; }
.m-item.hidden, .m-item.is-later { display: none; }

/* Loading placeholders: shimmer until the photo is loaded, then fade in (only when JS runs). */
@keyframes sg-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.sg-js .m-item:not(.is-loaded), .sg-js .g:not(.is-loaded) { background: linear-gradient(100deg, var(--sand) 30%, #fbfaf7 50%, var(--sand) 70%) 0 0 / 200% 100%; animation: sg-shimmer 1.4s linear infinite; }
.sg-js .m-item:not(.is-loaded) { min-height: 220px; }
.sg-js .m-item img, .sg-js .g img { opacity: 0; transition: opacity .6s ease, transform .5s; }
.sg-js .m-item.is-loaded img, .sg-js .g.is-loaded img { opacity: 1; }
.g-more { text-align: center; margin-top: 28px; }
.g-more b { font-family: 'Inter', sans-serif; font-weight: 600; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .sg-js .m-item, .sg-js .g { animation: none !important; } }
.m-tools { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; gap: 6px; z-index: 2; }
.m-tools button { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(255,255,255,.92); color: var(--green-900); font-size: 18px; display: grid; place-items: center; cursor: pointer; }
.m-tools button:hover { background: var(--mint); }
.m-tools .m-del:hover { background: #B42318; color: #fff; }
.g-empty { text-align: center; padding: 80px 20px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.g-empty i { font-size: 40px; color: var(--green-700); }
.manager-login { text-align: center; margin-top: 40px; font-size: 13px; }
.manager-login a { color: var(--muted); }

/* Modals & lightbox */
.sg-modal { position: fixed; inset: 0; z-index: 100; background: rgba(6,32,26,.6); display: none; align-items: center; justify-content: center; padding: 20px; }
.sg-modal.open { display: flex; }
.sg-modal .box { background: #fff; border-radius: 20px; padding: 30px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; display: grid; gap: 14px; }
.sg-modal .box h3 { font-size: 20px; display: flex; justify-content: space-between; align-items: center; }
.sg-modal .x { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); }
.sg-modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sg-modal .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.sg-modal .hint { font-size: 13px; color: var(--muted); }
.sg-modal .box-wide { max-width: 680px; }
.cat-head, .cat-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 72px 88px; gap: 8px; align-items: center; }
.cat-head span { font-size: 12px; font-weight: 600; color: var(--muted); }
.cat-list { display: grid; gap: 8px; }
.cat-row input { padding: 10px 12px; font-size: 15px; }
.cat-row .cat-count { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: -4px; }
.cat-new { border-top: 1px dashed var(--line); padding-top: 12px; }
.cat-actions { display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--green-800); font-size: 18px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--mint-soft); border-color: var(--mint); }
.icon-btn.danger:hover { background: #FDECEC; border-color: #F09595; color: #B42318; }
.icon-btn.add { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.icon-btn[disabled] { opacity: .5; cursor: wait; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); cursor: pointer; transition: .2s; }
.drop.over, .drop:hover { border-color: var(--mint); background: var(--mint-soft); }
.drop i { font-size: 32px; color: var(--green-700); display: block; margin-bottom: 6px; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.previews img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.progress { font-size: 14px; color: var(--green-700); font-weight: 600; }
.lightbox { position: fixed; inset: 0; z-index: 110; background: rgba(3,15,12,.94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 82vh; border-radius: 10px; }
.lightbox .cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #fff; font-size: 15px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 24px; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox .lb-close { top: 20px; inset-inline-end: 20px; }
.lightbox .lb-prev { left: 20px; }
.lightbox .lb-next { right: 20px; }

/* Mobile call / WhatsApp / quote bar (hidden on desktop) */
.m-bar { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .menu, .lang-switch.desk { display: none; }
  .burger { display: block; }
  .nav-inner { position: relative; }
  .menu.open { display: flex; flex-direction: column; position: absolute; top: calc(100% + 8px); inset-inline: 0; background: var(--green-950); border: 1px solid rgba(255,255,255,.08); border-radius: 20px; padding: 10px; gap: 2px; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
  .menu.open a { padding: 12px 14px; border-radius: 12px; font-size: 16px; }
  .menu.open a:hover { background: rgba(255,255,255,.06); }
  .featured { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .featured .fcard:first-child { grid-column: 1 / -1; }
  .svc-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .motion-grid, .c-grid, .faq-grid { grid-template-columns: minmax(0,1fr); gap: 40px; }
  .bento { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .f-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .hero-card { display: none; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  body { font-size: 15px; padding-bottom: 72px; }
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }

  /* Header */
  .site-header { padding: 12px 0; }
  .nav-inner { padding: 8px; padding-inline-start: 10px; border-radius: 18px; }
  .logo-mark { width: 42px; height: 42px; border-radius: 10px; }
  .logo-tile { border-radius: 12px; padding: 4px 6px; }
  .logo-tile img { max-height: 40px; }
  .logo b { font-size: 13px; letter-spacing: .1em; }
  .logo span { font-size: 11px; }
  .nav-cta .btn { display: none; }
  .burger { width: 42px; height: 42px; font-size: 24px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.08); }

  /* Headings */
  .head { margin-bottom: 28px; gap: 14px; }
  .head h2, .motion h2, .faq-grid h2, .contact h2 { font-size: 27px; line-height: 1.35; }
  .head p, .motion p, .contact .lead { font-size: 15px; }

  /* Hero */
  .hero { min-height: 100svh; align-items: flex-end; }
  .hero-img::after, [dir="rtl"] .hero-img::after { background: linear-gradient(180deg, rgba(6,32,26,.55) 0%, rgba(6,32,26,.8) 45%, rgba(6,32,26,.97) 100%); }
  .hero .container { padding-top: 110px; padding-bottom: 70px; }
  .hero h1 { font-size: 38px; margin: 16px 0 14px; }
  .hero p { font-size: 15.5px; line-height: 1.8; }
  .hero-cta { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-cta .btn { justify-content: center; padding: 13px 10px; font-size: 14px; }
  .scroll-hint { display: none; }

  /* Numbers: 2x2 cards overlapping the hero */
  .stats { border: 0; margin-top: -34px; position: relative; z-index: 2; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat, .stat:first-child { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; box-shadow: 0 10px 30px rgba(6,32,26,.08); }
  .stat b { font-size: 24px; line-height: 1.3; }
  .lang-ar .stat b { font-size: 22px; }
  .stat span { font-size: 13px; line-height: 1.5; display: block; margin-top: 2px; }

  /* Services */
  .services { padding-top: 56px; }
  .featured { grid-template-columns: minmax(0,1fr); gap: 14px; margin-bottom: 14px; }
  .fcard { height: 300px; }
  .fcard::after { background: linear-gradient(0deg, rgba(6,32,26,.97) 0%, rgba(6,32,26,.7) 40%, rgba(6,32,26,0) 75%); }
  .fcard .body { padding: 20px; }
  .fcard h3 { font-size: 21px; }
  .fcard p { font-size: 14px; margin-top: 6px; }
  .fcard .arrow { width: 40px; height: 40px; top: 16px; inset-inline-end: 16px; font-size: 18px; }
  .svc-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .svc { padding: 16px; gap: 14px; border-radius: 16px; }
  .svc > i { font-size: 22px; padding: 10px; border-radius: 12px; }
  .svc h3 { font-size: 16px; }
  .svc p { font-size: 13.5px; }

  /* Moving facades */
  .motion ul { grid-template-columns: minmax(0,1fr); gap: 10px; margin-bottom: 26px; }
  .motion .btn { width: 100%; justify-content: center; }
  .demo { padding: 12px; border-radius: 20px; }
  .stage { height: 220px; border-radius: 12px; }
  .demo-ctrl { gap: 10px; margin-top: 14px; }
  .demo-ctrl span { font-size: 13px; }
  .demo input[type=range] { min-width: 0; width: 100%; }
  .demo-ctrl b { min-width: 38px; font-size: 14px; }

  /* Why us: compact 2 columns */
  .why-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .why { padding: 16px; border-radius: 16px; }
  .why:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .why i { font-size: 20px; padding: 9px; margin-bottom: 12px; border-radius: 10px; }
  .why h3 { font-size: 15px; margin-bottom: 4px; }
  .why p { font-size: 13px; line-height: 1.6; }

  /* Steps: vertical timeline */
  .steps { grid-template-columns: minmax(0,1fr); gap: 0; }
  .step { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; padding: 0 0 22px; background: none; border-radius: 0; position: relative; }
  .step .n { grid-row: span 2; width: 52px; height: 52px; border-radius: 50%; background: #fff; border: 2px solid var(--mint); display: grid; place-items: center; font-size: 17px; color: var(--green-800); -webkit-text-stroke: 0; position: relative; z-index: 1; }
  .step:not(:last-child)::before { content: ""; position: absolute; top: 52px; bottom: 0; inset-inline-start: 25px; width: 2px; background: var(--mint); opacity: .5; }
  .step h3 { margin: 4px 0 2px; font-size: 17px; }
  .step p { font-size: 14px; }

  /* Gallery preview */
  .bento { grid-auto-rows: 150px; gap: 10px; }
  .g { border-radius: 14px; }
  .g.t { grid-row: span 1; }
  .g span { font-size: 11.5px; padding: 4px 10px; bottom: 8px; inset-inline-start: 8px; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #gallery .head .btn { padding: 10px 16px; font-size: 14px; }

  /* Reviews: swipeable carousel */
  .r-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .r-grid::-webkit-scrollbar { display: none; }
  .r { flex: 0 0 86%; scroll-snap-align: center; padding: 22px; }
  .r p { font-size: 15px; margin: 8px 0 18px; }

  /* FAQ */
  .faq summary { font-size: 16px; }
  .faq details { padding: 18px 0; }

  /* Contact */
  .contact { margin: 0 10px; border-radius: 24px; }
  .contact .container { padding: 0 6px; }
  .ci { margin-bottom: 12px; }
  .ci i { font-size: 20px; padding: 9px; }
  .sg-form { grid-template-columns: minmax(0,1fr); padding: 22px 18px; border-radius: 20px; gap: 12px; }
  .sg-form input, .sg-form select, .sg-form textarea { font-size: 16px; padding: 12px 14px; }

  /* Footer */
  .site-footer { padding: 50px 0 0; }
  .f-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; padding-bottom: 30px; }
  .f-grid > div:first-child { grid-column: 1 / -1; text-align: center; }
  .f-grid > div:first-child .logo { display: inline-flex; }
  .f-grid > div:first-child p { margin: 12px auto 16px; }
  .f-grid > div:first-child .social { justify-content: center; }
  .f-grid > div:last-child { grid-column: 1 / -1; }
  .f-grid a { font-size: 14px; padding: 3px 0; }
  .f-bottom { flex-direction: column; align-items: center; text-align: center; gap: 4px; font-size: 13px; }

  /* Bottom action bar replaces the floating WhatsApp button */
  .m-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; position: fixed; inset-inline: 0; bottom: 0; z-index: 70; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .m-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 46px; border-radius: 12px; font-size: 14px; font-weight: 600; background: var(--sand); color: var(--green-900); }
  .m-bar a i { font-size: 20px; }
  .m-bar .mb-wa { background: #25D366; color: #fff; }
  .m-bar .mb-quote { background: var(--green-900); color: #fff; }
  body.has-m-bar .wa-float { display: none; }
  body:not(.has-m-bar) { padding-bottom: 0; }

  /* Gallery page */
  .page-hero { padding: 120px 0 44px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero p { font-size: 15px; }
  .gallery-page { padding: 24px 0 60px; }
  .g-bar { margin-bottom: 18px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; max-width: calc(100% + 32px); }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { white-space: nowrap; padding: 8px 14px; }
  .masonry { columns: 2; column-gap: 8px; }
  .m-item { margin-bottom: 8px; border-radius: 10px; }
  .m-item figcaption { opacity: 1; font-size: 12px; padding: 24px 10px 8px; }
  .m-tools button { width: 34px; height: 34px; font-size: 16px; }
  .manager-bar { border-radius: 16px; width: 100%; justify-content: space-between; }
  .sg-modal { align-items: flex-end; padding: 0; }
  .sg-modal .box { border-radius: 20px 20px 0 0; max-height: 92vh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .sg-modal .row2 { grid-template-columns: minmax(0,1fr); }
  .cat-head { display: none; }
  .cat-row { grid-template-columns: minmax(0,1fr) auto; background: var(--sand); border-radius: 14px; padding: 10px; }
  .cat-row input[name=name_en], .cat-row input[name=name_ar] { grid-column: 1 / -1; background: #fff; }
  .cat-row .cat-actions { justify-content: flex-end; }
  .cat-new { background: var(--mint-soft); border-top: 0; }
  .lightbox .lb-prev, .lightbox .lb-next { bottom: 70px; top: auto; width: 46px; height: 46px; }
  .lightbox img { max-width: 100vw; border-radius: 0; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 33px; }
  .hero-cta { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .m-bar a span { display: none; }
}
