/* ============================================================
   مجموعة أم القرى – Group Landing Page
   Plain CSS, no framework, no build step.
   ============================================================ */

/* ===========================
   CUSTOM PROPERTIES
   =========================== */
:root {
  --bg:             #FBF8F1;
  --white:          #FFFFFF;
  --green-dark:     #145A36;
  --green:          #1E7B45;
  --gold:           #D9B25F;
  --gold-light:     #E8C77A;
  --gold-bg:        #F3EEDF;
  --gold-ring:      rgba(217, 178, 95, 0.12);
  --text:           #1F2A24;
  --text-muted:     #4A554E;
  --text-subtle:    #5B665F;
  --card-border:    #EADFC6;
  --amber:          #8A5A12;
  --footer-bg:      #13432B;
  --footer-text:    #D6E6DC;
  --footer-dim:     #A9C7B6;
  --footer-divider: #2A5E44;
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: 'Tajawal', Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  /* direction comes from lang/dir attributes on <html> */
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--green-dark);
}
a:hover {
  color: var(--amber);
}

/* Visible focus ring for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 12px;
  text-decoration: none;
  font-family: 'Tajawal', Tahoma, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  transition: opacity 0.15s ease;
}
.btn:hover {
  opacity: 0.88;
  color: inherit;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}
.btn-outline {
  background: var(--white);
  color: var(--green-dark);
  border: 1.5px solid var(--gold);
}
.btn-soft {
  background: var(--gold-bg);
  color: var(--green-dark);
}

/* ===========================
   HEADER
   =========================== */
header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  padding: 0 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-link img {
  width: 74px;
  height: 60px;
  object-fit: contain;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--green-dark);
}
.logo-tagline {
  font-size: 13px;
  color: var(--text-subtle);
}

nav[aria-label="القائمة الرئيسية"] {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.navlink {
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 4px;
}
.navlink:hover {
  color: var(--green);
}

/* ===========================
   HERO
   =========================== */
.hero {
  padding: 72px 24px 120px;
  background-color: var(--white);
}

.pattern-bg {
  background-image: url(assets/pattern.svg);
  background-size: 80px 80px;
}

.hero-card {
  /* The design sizes this card without a box-sizing reset: 1000px of content
     plus padding and border (about 1068px wide on desktop). */
  box-sizing: content-box;
  max-width: 1000px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: 48px;
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  box-shadow: 0 0 0 10px var(--gold-ring);
}

.hero-logo {
  width: 220px;
  height: 180px;
  object-fit: contain;
}

.hero-card h1 {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4.5vw, 52px);
  line-height: 1.3;
  color: var(--green-dark);
}

.hero-lead {
  font-size: 19px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

/* ===========================
   SERVICES
   =========================== */
.services-section {
  padding: 0 24px 80px;
  margin-top: -60px;
}

.services-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  /* min(300px, 100%) keeps the min below the container width on very narrow screens */
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  position: relative;
}
.card img {
  object-fit: contain;
}
.card h2 {
  font-family: 'Cairo', sans-serif;
  font-size: 24px;
  color: var(--green-dark);
}
.card p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-muted);
  flex: 1;
}

.card--featured {
  border: 2px solid var(--green);
  box-shadow: 0 18px 40px rgba(20, 90, 54, 0.14);
}

.badge {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--green);
  color: var(--white);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

/* ===========================
   ABOUT
   =========================== */
.about-section {
  padding: 16px 24px 80px;
}

.about-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 40px;
  align-items: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-eyebrow {
  color: var(--amber);
  font-weight: 700;
  font-size: 16px;
}
.about-text h2 {
  font-family: 'Cairo', sans-serif;
  font-size: 34px;
  line-height: 1.35;
  color: var(--green-dark);
}
.about-text p {
  font-size: 18px;
  line-height: 1.9;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat-tile {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--gold);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
}
.stat-number {
  font-family: 'Cairo', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--green);
}
.stat-label {
  font-size: 15px;
  color: var(--text-muted);
}

/* ===========================
   FOOTER / CONTACT
   =========================== */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 56px 24px 28px;
  border-top: 4px solid var(--gold);
}

.footer-cols {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-brand-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--white);
}
.footer-brand span:not(.footer-brand-name) {
  font-size: 15px;
  line-height: 1.8;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}
.footer-heading {
  color: var(--gold-light);
  font-weight: 700;
}
.footer-col a[href^="tel"] {
  color: var(--white);
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  text-align: right;
}
.footer-col a[href^="tel"]:hover {
  color: var(--gold-light);
}

.footer-copy {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--footer-divider);
  font-size: 14px;
  color: var(--footer-dim);
}
