/*
Theme Name: City Services Consultancy
Theme URI: https://www.cityservices.ae
Author: City Services Consultancy LLC
Description: Theme for cityservices.ae. Edit text and contact details under Appearance > Customize > City Services site.
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: csc
*/

/* City Services Consultancy: palette and type */
:root {
  --ink: #101820;
  --slate: #26323f;
  --mist: #eef1f4;
  --line: #d5dbe1;
  --paper: #ffffff;
  --text: #1b2530;
  --muted: #55626f;
  --red: #d92b20;
  --red-dark: #b8231a;
  --blue: #007acc;
  --radius: 4px;
  --font-head: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Public Sans", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 800; letter-spacing: 0.02em;
  border-radius: var(--radius);
}
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; line-height: 1.05; }
.brand-name span { display: block; font-weight: 600; color: var(--muted); font-size: 0.95rem; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a { display: block; padding: 10px 12px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.98rem; border-radius: var(--radius); }
.nav a:hover { background: var(--mist); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red-dark); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.nav .nav-cta { background: var(--ink); color: #fff; margin-left: 8px; }
.nav .nav-cta:hover { background: var(--red); color: #fff; }

.has-sub { position: relative; }
.has-sub > .sub {
  display: none; position: absolute; top: 100%; left: 0; min-width: 270px; flex-direction: column; align-items: stretch;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; gap: 0;
  box-shadow: 0 10px 30px rgba(16, 24, 32, 0.12);
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: flex; }

.menu-btn {
  display: none; background: var(--ink); color: #fff; border: 0; padding: 10px 16px; font: 600 0.95rem var(--font-body); border-radius: var(--radius); cursor: pointer;
}

/* Hero: the toll-free number is the visual */
.hero { background: var(--ink); color: #fff; padding: clamp(48px, 8vw, 104px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero h1 { color: #fff; max-width: 14ch; }
.lede { color: #c9d3dc; font-size: 1.2rem; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-line { border-left: 4px solid var(--red); padding-left: clamp(20px, 3vw, 40px); }
.hero-line-label { color: #9fb0bf; margin: 0 0 4px; font-weight: 500; }
.hero-number {
  display: block; color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 800;
  font-size: clamp(2.6rem, 7.2vw, 5.6rem); line-height: 0.95; letter-spacing: -0.03em;
}
.hero-number:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 5px; }
.hero-line-alt { font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; color: #c9d3dc; margin: 10px 0 0; }

/* Buttons */
.btn { display: inline-block; padding: 13px 22px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 2px solid transparent; font-family: var(--font-body); font-size: 1rem; cursor: pointer; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { border-color: #52606d; color: #fff; background: transparent; }
.btn-ghost:hover { border-color: #fff; color: #fff; }

/* Sections */
.band-light { background: var(--mist); }
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.cap { padding: 32px 28px 24px; border-left: 1px solid var(--line); }
.cap:first-child { border-left: 0; padding-left: 0; }
.cap h2 { font-size: 1.3rem; }
.cap p { color: var(--muted); margin: 0; }

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tint { background: var(--mist); }
.section-title { margin-bottom: 0.8em; }
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.big-p { font-size: 1.25rem; line-height: 1.55; }
.text-link { font-weight: 600; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.ticks li { padding-left: 30px; position: relative; font-weight: 500; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 16px; height: 9px;
  border-left: 3px solid var(--red); border-bottom: 3px solid var(--red); transform: rotate(-45deg);
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: 24px; color: var(--text); text-decoration: none; display: flex; flex-direction: column; }
.card:hover { border-top-color: var(--red); color: var(--text); box-shadow: 0 8px 24px rgba(16, 24, 32, 0.1); }
.card img { margin-bottom: 14px; border-radius: var(--radius); }
.card p { color: var(--muted); flex: 1; }
.card-more { color: var(--red-dark); font-weight: 600; }

.news-teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 24px; }
.teaser h3 { font-size: 1.15rem; }
.date { color: var(--muted); font-size: 0.92rem; font-weight: 600; margin-bottom: 6px; }

.cta-band { background: var(--red); color: #fff; padding: 40px 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { margin: 0; color: #fff; }
.cta-band .btn-primary { background: var(--ink); }
.cta-band .btn-primary:hover { background: #000; }

/* Inner pages */
.page-head { background: var(--ink); color: #fff; padding: clamp(36px, 5vw, 64px) 0; border-bottom: 4px solid var(--red); }
.page-head h1 { color: #fff; margin: 0; font-size: clamp(2rem, 4.2vw, 3rem); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 64px); align-items: start; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.side { position: sticky; top: 96px; }
.side-img { border-radius: var(--radius); margin-bottom: 24px; width: 100%; }
.side-nav { background: var(--mist); padding: 20px; border-radius: var(--radius); margin-bottom: 24px; }
.side-nav h2 { font-size: 1.05rem; margin-bottom: 0.6em; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav li { margin-bottom: 8px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px; }
.member img, .avatar { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; }
.avatar { display: grid; place-items: center; background: var(--slate); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 3.4rem; }
.member h2 { font-size: 1.25rem; margin-bottom: 0.15em; }
.role { color: var(--muted); font-weight: 600; margin-bottom: 0.4em; }

.news-list { max-width: 860px; }
.news-item { display: grid; grid-template-columns: auto 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.news-item:first-child { padding-top: 0; }
.news-item img { width: 140px; height: auto; align-self: start; }
.news-item:not(:has(img)) { grid-template-columns: 1fr; }
.news-item h2 { font-size: 1.4rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.gallery-grid figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); }
.small-h { font-size: 1.4rem; }
.form .field { margin-bottom: 18px; }
.form label { display: block; font-weight: 600; margin-bottom: 6px; }
.form input[type="text"], .form input[type="email"], .form textarea, .form input:not([type]) {
  width: 100%; padding: 12px 14px; border: 1px solid #aab4be; border-radius: var(--radius); font: inherit; background: #fff; color: var(--text);
}
.form input:focus, .form textarea:focus { border-color: var(--blue); }
.err { color: var(--red-dark); font-weight: 600; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { background: #e6f4ea; border-left: 4px solid #1e7d3a; padding: 14px 18px; margin: 20px 0 0; font-weight: 500; }
address { font-style: normal; margin-bottom: 1em; }
.contact-list { list-style: none; margin: 0 0 1.4em; padding: 0; }
.contact-list li { margin-bottom: 6px; }
.map { width: 100%; height: 300px; border: 0; border-radius: var(--radius); background: var(--mist); }

/* Footer */
.foot { background: var(--ink); color: #c9d3dc; padding-top: 56px; }
.foot a { color: #fff; }
.foot a:hover { color: #ffb4ae; }
.foot h2 { color: #fff; font-size: 1.05rem; margin-bottom: 0.8em; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 7px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 36px; }
.foot-brand { color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; margin-bottom: 0.3em; }
.foot-note { max-width: 32ch; }
.social { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; }
.foot-bottom { border-top: 1px solid #2d3a47; margin-top: 44px; padding: 20px 0; font-size: 0.92rem; }
.foot-bottom p { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); }
  .has-sub > .sub { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .hero-grid, .split, .page-grid, .contact-grid { grid-template-columns: 1fr; }
  .caps, .news-teasers { grid-template-columns: 1fr; }
  .cap { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .cap:first-child { border-top: 0; }
  .side { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ticks { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
  .brand-name span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* WordPress additions */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal; }
.admin-bar .top { top: 32px; }
@media (max-width: 782px) { .admin-bar .top { top: 46px; } }
.brand-logo { height: 40px; width: auto; }
.page-grid-single { grid-template-columns: 1fr; }
.prose-wide { max-width: none; }
.prose img { height: auto; border-radius: var(--radius); }
.prose .wp-block-gallery { gap: 16px; }
.prose figure { margin: 0 0 1.2em; }
.prose figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 6px; }
.news-item .wp-block-image, .news-item img { max-width: 140px; }
.news-item h2 a { color: var(--ink); text-decoration: none; }
.news-item h2 a:hover { color: var(--red-dark); text-decoration: underline; }
.notice-error { background: #fdecea; border-left-color: var(--red); }
.pagination { display: flex; gap: 8px; margin-top: 32px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { margin-inline: auto; }
