/* WAF Consultative Group — public site styles */

:root {
  --red: #C41230;
  --red-dark: #9E0E26;
  --red-light: #FDECEF;
  --ink: #14171F;
  --ink-soft: #40454F;
  --gray-50: #F6F7F9;
  --gray-100: #EEF0F3;
  --gray-200: #E2E5EA;
  --gray-400: #9AA0AC;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(20, 23, 31, .18);
  --shadow-sm: 0 4px 14px -6px rgba(20, 23, 31, .12);
  --container: 1180px;
  --font-ar: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --font-en: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-en);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body.lang-ar { font-family: var(--font-ar); }
body.lang-en { font-family: var(--font-en); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 800; }
p { margin: 0 0 1em; color: var(--ink-soft); }

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

.icon svg { width: 100%; height: 100%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: .96rem;
  border: 2px solid transparent; cursor: pointer; transition: all .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: currentColor; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--ink); }
.btn-block { width: 100%; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--gray-200); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 82px; }
.brand img { height: 46px; width: auto; }
.footer-brand img { height: 46px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { font-weight: 600; color: var(--ink-soft); font-size: .96rem; padding-block: 8px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.main-nav a:hover, .main-nav a.active { color: var(--red); border-color: var(--red); }
.main-nav a.nav-cta { background: var(--red); color: var(--white); padding: 10px 22px; border-radius: 999px; border: none; }
.main-nav a.nav-cta:hover { background: var(--red-dark); color: var(--white); }
.main-nav a.lang-switch { color: var(--ink); border: 1px solid var(--gray-200); border-radius: 999px; padding: 8px 16px; font-size: .86rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Hero */
.hero { position: relative; padding: 96px 0 110px; background: linear-gradient(160deg, var(--ink) 0%, #1E2330 55%, var(--red-dark) 150%); color: var(--white); overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 20%, rgba(196,18,48,.35), transparent 55%); }
.hero-inner { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: #FF9BAA; margin-bottom: 20px; }
.eyebrow::before { content: ''; width: 26px; height: 2px; background: #FF9BAA; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); margin-bottom: 20px; }
.hero p.lead { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 560px; }
.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

/* Stats bar */
.stats-bar { background: var(--white); margin-top: -56px; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink); color: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stat-item { padding: 30px 20px; text-align: center; border-inline-start: 1px solid rgba(255,255,255,.12); }
.stat-item:first-child { border-inline-start: none; }
.stat-num { font-size: 2.1rem; font-weight: 800; color: var(--white); }
.stat-label { font-size: .86rem; color: rgba(255,255,255,.65); margin-top: 4px; }

/* Section headers */
.section { padding: 92px 0; }
.section-alt { background: var(--gray-50); }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-tag { display: inline-block; color: var(--red); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); margin-bottom: 14px; }
.section-foot { text-align: center; margin-top: 46px; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 34px 28px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-icon { width: 54px; height: 54px; border-radius: 14px; background: var(--red-light); color: var(--red); padding: 13px; margin-bottom: 22px; }
.service-card h3 { font-size: 1.12rem; margin-bottom: 10px; }
.service-card p { font-size: .95rem; margin-bottom: 0; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.project-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3.1; box-shadow: var(--shadow-sm); }
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover img { transform: scale(1.06); }
.project-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,12,18,.92) 0%, rgba(10,12,18,.15) 55%, transparent 75%); display: flex; flex-direction: column; justify-content: flex-end; padding: 26px; color: var(--white); }
.project-cat { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: #FF9BAA; font-weight: 700; margin-bottom: 6px; }
.project-overlay h3 { font-size: 1.15rem; color: var(--white); }
.project-loc { font-size: .84rem; color: rgba(255,255,255,.75); margin-top: 4px; }
.featured-badge { position: absolute; top: 16px; inset-inline-end: 16px; background: var(--red); color: var(--white); font-size: .72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; z-index: 1; }

/* Clients */
.clients-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--gray-200); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.client-tile { background: var(--white); aspect-ratio: 3/2; display: flex; align-items: center; justify-content: center; padding: 22px; }
.client-tile img { max-height: 64px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.client-tile:hover img { filter: grayscale(0); opacity: 1; }

/* Vision / Mission */
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.vm-card { background: var(--ink); color: var(--white); border-radius: var(--radius); padding: 42px; }
.vm-card:nth-child(2) { background: var(--red); }
.vm-icon { width: 48px; height: 48px; margin-bottom: 20px; color: rgba(255,255,255,.85); }
.vm-card h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 14px; }
.vm-card p { color: rgba(255,255,255,.85); margin-bottom: 0; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--ink), #262B38); color: var(--white); border-radius: var(--radius); padding: 60px 50px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); font-size: 1.8rem; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,.75); margin-bottom: 0; }

/* About page */
.about-hero { background: var(--gray-50); padding: 64px 0; border-bottom: 1px solid var(--gray-200); }
.about-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 12px; }
.about-hero p { font-size: 1.1rem; max-width: 640px; }
.about-content { display: grid; grid-template-columns: 1.3fr .9fr; gap: 60px; }
.about-content .prose p { font-size: 1.02rem; }
.chairman-card { background: var(--gray-50); border-radius: var(--radius); padding: 34px; border: 1px solid var(--gray-200); align-self: start; }
.chairman-card .photo { width: 96px; height: 96px; border-radius: 50%; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 800; margin-bottom: 18px; overflow: hidden; }
.chairman-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.chairman-card h4 { font-size: 1.1rem; }
.chairman-card .role { color: var(--red); font-weight: 700; font-size: .88rem; margin: 4px 0 16px; }

.branches-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 20px; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 30px 22px; text-align: center; }
.team-card .photo { width: 96px; height: 96px; border-radius: 50%; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; margin: 0 auto 18px; overflow: hidden; }
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.team-card .role { color: var(--red); font-weight: 700; font-size: .85rem; margin-bottom: 12px; }
.team-card p { font-size: .88rem; margin-bottom: 0; }
.branch-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 26px; }
.branch-card .icon { width: 40px; height: 40px; color: var(--red); margin-bottom: 14px; }
.branch-card h4 { font-size: 1.02rem; margin-bottom: 6px; }
.branch-card p { font-size: .9rem; margin-bottom: 0; }

/* Articles / news */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.article-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-card__img { position: relative; aspect-ratio: 16/10; background: var(--gray-100); }
.article-card__img img { width: 100%; height: 100%; object-fit: cover; }
.article-play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; background: rgba(20,23,31,.55); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.article-card__body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-date { color: var(--red); font-weight: 700; font-size: .78rem; letter-spacing: .03em; }
.article-card__body h3 { font-size: 1.05rem; margin-bottom: 0; }
.article-card__body p { font-size: .9rem; color: var(--ink-soft); margin-bottom: 0; flex: 1; }
.article-more { font-weight: 700; font-size: .86rem; color: var(--ink); margin-top: 4px; }
.article-card--featured .article-card__img { aspect-ratio: 16/9; }
.article-body { max-width: 820px; margin-inline: auto; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; aspect-ratio: 16/8; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; margin-bottom: 30px; background: var(--ink); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article-source { margin-top: 24px; font-size: .9rem; color: var(--ink-soft); }
.article-source a { color: var(--red); font-weight: 700; }

/* Latest news (homepage) */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; }
.contact-info-item { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.contact-info-item .icon { width: 22px; height: 22px; color: var(--red); flex-shrink: 0; margin-top: 3px; }
.contact-info-item h4 { font-size: .95rem; margin-bottom: 4px; }
.contact-info-item p { margin-bottom: 0; font-size: .94rem; }
.contact-form { background: var(--gray-50); border-radius: var(--radius); padding: 36px; border: 1px solid var(--gray-200); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-group label { font-size: .88rem; font-weight: 700; color: var(--ink); }
.form-group input, .form-group textarea {
  border: 1px solid var(--gray-200); border-radius: 10px; padding: 13px 16px; font-size: .96rem;
  font-family: inherit; background: var(--white); color: var(--ink); resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-light); }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 22px; font-size: .92rem; font-weight: 600; }
.alert-success { background: #E6F6EC; color: #1B7B3F; }
.alert-error { background: var(--red-light); color: var(--red-dark); }
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gray-200); margin-top: 30px; height: 320px; }
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* Page hero (services/projects/clients) */
.page-hero { padding: 70px 0 54px; background: var(--ink); color: var(--white); text-align: center; }
.page-hero .section-tag { color: #FF9BAA; }
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,.78); max-width: 560px; margin-inline: auto; margin-bottom: 0; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-400); font-weight: 600; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-brand > img { height: 40px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-col p { color: rgba(255,255,255,.6); font-size: .92rem; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 18px; }
.footer-col a { display: block; color: rgba(255,255,255,.65); padding-block: 6px; font-size: .92rem; }
.footer-col a:hover { color: var(--white); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); padding: 0; transition: background .15s, color .15s; }
.footer-social a:hover { background: var(--red); color: var(--white); }
.footer-social a svg { width: 22px; height: 22px; stroke-width: 1.9; }
.footer-social a img { width: 20px; height: 20px; object-fit: contain; filter: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; text-align: center; font-size: .84rem; color: rgba(255,255,255,.5); }

/* Admin-uploaded hero background images (optional, on top of the default look) */
.hero.has-hero-image, .page-hero.has-hero-image, .about-hero.has-hero-image { background-size: cover; background-position: center; position: relative; }
.page-hero.has-hero-image::before, .about-hero.has-hero-image::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(13,15,20,.86) 0%, rgba(30,35,48,.72) 55%, rgba(140,15,35,.62) 150%);
}
.page-hero.has-hero-image .container, .about-hero.has-hero-image .container { position: relative; z-index: 1; }
.about-hero.has-hero-image h1, .about-hero.has-hero-image p { color: var(--white); }

/* Page builder sections (custom pages built from /admin/pages) */
.pb-section { padding: 64px 0; }
.pb-section.pb-alt { background: var(--gray-50); }
.pb-heading { text-align: center; margin-bottom: 36px; }
.pb-heading h2 { margin: 0; }
.pb-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.pb-split.pb-reverse .pb-split-media { order: 2; }
.pb-split-media img { width: 100%; border-radius: var(--radius); display: block; }
.pb-split-text { line-height: 1.9; }
.pb-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.pb-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; }
.pb-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.pb-feature-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px 24px; text-align: center; }
.pb-feature-card .icon { width: 48px; height: 48px; margin-inline: auto; margin-bottom: 14px; color: var(--red); }
@media (max-width: 760px) {
  .pb-split { grid-template-columns: 1fr; }
  .pb-split.pb-reverse .pb-split-media { order: 0; }
}

/* Responsive */
@media (max-width: 980px) {
  .services-grid, .projects-grid, .team-grid, .articles-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .clients-grid { grid-template-columns: repeat(3, 1fr); }
  .about-content { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .vm-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(3) { border-inline-start: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; inset-inline-end: 0; top: 82px; max-height: calc(100vh - 82px); height: auto; width: min(320px, 82vw);
    background: var(--white); flex-direction: column; align-items: stretch; gap: 4px; padding: 24px;
    transform: translateX(100%); transition: transform .25s ease; box-shadow: var(--shadow); overflow-y: auto;
  }
  body.lang-ar .main-nav { transform: translateX(-100%); }
  .main-nav.open, body.lang-ar .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 6px; border-bottom: 1px solid var(--gray-100); }
  .main-nav a.nav-cta { text-align: center; margin-top: 8px; }
  .services-grid, .projects-grid, .branches-grid, .team-grid, .articles-grid, .news-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 90px; }
  .cta-band { padding: 40px 26px; flex-direction: column; text-align: center; }
  .section { padding: 60px 0; }
}
