/* =====================================================
   Al Aman Contracting & Services — main stylesheet
   Brand colors derived from the company logo:
   navy #292F6E (primary) / steel gray #5E5F5F (secondary)
   ===================================================== */

:root {
  --navy: #292F6E;
  --navy-dark: #1E2352;
  --navy-deep: #161A3E;
  --navy-soft: #3B4290;
  --steel: #5E5F5F;
  --ink: #23242A;
  --body: #4A4B52;
  --line: #E4E6EC;
  --bg: #FFFFFF;
  --bg-alt: #F5F6F9;
  --white: #FFFFFF;

  --font-head: "Barlow", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 10px;
  --shadow: 0 6px 24px rgba(41, 47, 110, 0.08);
  --shadow-hover: 0 12px 32px rgba(41, 47, 110, 0.14);
  --container: 1140px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-soft); }

:focus-visible {
  outline: 3px solid var(--navy-soft);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.8em 2em;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}
.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo { width: 44px; height: auto; flex-shrink: 0; }

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name strong {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.brand-name small {
  font-size: 0.72rem;
  color: var(--steel);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: 6px;
  transition: color 0.2s, background-color 0.2s;
}
.nav-menu a:hover { color: var(--navy); background: var(--bg-alt); }
.nav-menu a.is-active { color: var(--navy); }
.nav-menu a.is-active:not(.nav-cta) {
  box-shadow: inset 0 -2px 0 var(--navy);
  border-radius: 6px 6px 0 0;
}
/* The CTA pill keeps white text when it is the active page link */
.nav-menu a.nav-cta.is-active { color: var(--white); }

.nav-menu .nav-cta {
  background: var(--navy);
  color: var(--white);
  margin-left: 8px;
  padding: 10px 20px;
}
.nav-menu .nav-cta:hover { background: var(--navy-dark); color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  color: #292F6E; /* hamburger line color; hex fallback in case CSS variables are stripped in production */
  color: var(--navy, #292F6E);
}
.site-header .nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #292F6E;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(88vh, 760px);
  padding: 96px 0;
  color: var(--white);
  overflow: hidden;
  background: var(--navy-deep);
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(22, 26, 62, 0.82), rgba(41, 47, 110, 0.72)),
    url("https://images.pexels.com/photos/3105242/pexels-photo-3105242.jpeg?auto=compress&cs=tinysrgb&w=1920");
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  max-width: 780px;
  text-align: center;
}

.hero-logo {
  width: 92px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.35));
}

.hero-kicker {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
}

.hero h1 { color: var(--white); margin-bottom: 0.5em; }

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 620px;
  margin: 0 auto 2em;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-kicker {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head p:last-child { margin-bottom: 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.about-text .btn { margin-top: 8px; }

.about-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
}

/* ---------- Services ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: rgba(41, 47, 110, 0.08);
  color: var(--navy);
  margin-bottom: 20px;
  transition: background-color 0.25s, color 0.25s;
}
.card:hover .card-icon { background: var(--navy); color: var(--white); }
.card-icon svg { width: 26px; height: 26px; }

.card h3 { margin-bottom: 0.4em; }
.card p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- Industries ---------- */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.industry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 28px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ink);
  transition: box-shadow 0.25s, transform 0.25s;
}
.industry:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.industry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(41, 47, 110, 0.08);
  color: var(--navy);
}
.industry-icon svg { width: 24px; height: 24px; }

/* ---------- Why choose us ---------- */
.section-navy {
  background: linear-gradient(160deg, var(--navy-dark), var(--navy));
  color: rgba(255, 255, 255, 0.85);
}
.section-navy h2 { color: var(--white); }
.section-navy .section-kicker { color: #A9B0E8; }

/* Balanced 3 + 2 arrangement: three cards on the first row,
   two centered on the second. */
.why-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.why-item { grid-column: span 2; }
.why-item:nth-child(4) { grid-column: 2 / 4; }
.why-item:nth-child(5) { grid-column: 4 / 6; }

.why-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: background-color 0.25s;
}
.why-item:hover { background: rgba(255, 255, 255, 0.1); }

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  margin-bottom: 16px;
}
.why-icon svg { width: 22px; height: 22px; }

.why-item h3 { color: var(--white); font-size: 1.05rem; margin-bottom: 0.4em; }
.why-item p { font-size: 0.9rem; margin: 0; color: rgba(255, 255, 255, 0.75); }

/* ---------- Contact ---------- */
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(41, 47, 110, 0.08);
  color: var(--navy);
}
.contact-icon svg { width: 20px; height: 20px; }

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.contact-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }

.contact-card .contact-icon { margin-bottom: 18px; }

.contact-card h3 { margin-bottom: 0.3em; }
.contact-card p { margin: 0; font-size: 0.95rem; }
.contact-card a { font-weight: 600; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.site-footer .brand-name strong { color: var(--white); }
.site-footer .brand-name small { color: rgba(255, 255, 255, 0.55); }

.footer-nav {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}
.footer-nav a:hover { color: var(--white); }

.footer-copy { margin: 0; font-size: 0.85rem; }

/* ---------- Sub-page hero band ---------- */
.page-hero {
  background:
    linear-gradient(160deg, rgba(22, 26, 62, 0.92), rgba(41, 47, 110, 0.85)),
    var(--navy-deep) center / cover no-repeat;
  color: var(--white);
  padding: 88px 0;
  text-align: center;
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 0.35em;
}
.page-hero .section-kicker { color: #A9B0E8; }
.page-hero p:last-child {
  max-width: 620px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Service detail rows (services page) ---------- */
.service-detail { padding: 44px 0; }
.service-detail:first-of-type { padding-top: 88px; }
.service-detail:last-of-type { padding-bottom: 88px; }

.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  scroll-margin-top: 96px;
}
.service-row.reverse .service-media { order: 2; }

.service-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  background: var(--bg-alt);
}

.service-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--navy);
  opacity: 0.7;
  margin-bottom: 8px;
}

.service-text h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.service-text p:last-child { margin-bottom: 0; }

/* ---------- Card link (home services grid) ---------- */
.card-link {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
}
.card-link::after { content: " \2192"; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(160deg, var(--navy-dark), var(--navy));
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 80px 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p {
  max-width: 560px;
  margin: 0 auto 2em;
}
.cta-band .btn-primary {
  background: var(--white);
  color: var(--navy);
}
.cta-band .btn-primary:hover { background: #E8EAF4; color: var(--navy-dark); }
.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Industry photo cards (industries page) ---------- */
.industry-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.industry-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.industry-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

.industry-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg-alt);
}

.industry-card-body { padding: 24px 26px 28px; }
.industry-card-body h3 { margin-bottom: 0.35em; }
.industry-card-body p { margin: 0; font-size: 0.92rem; }

/* ---------- Product showcase (products page) ---------- */
.product-category { padding: 72px 0; }

.category-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.category-head h2 { margin-bottom: 0.3em; }
.category-head p { margin: 0; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }

.product-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--bg-alt);
}

.product-card-body { padding: 20px 22px 24px; }
.product-card-body h3 { font-size: 1.02rem; margin-bottom: 0.35em; }
.product-card-body p { margin: 0; font-size: 0.88rem; line-height: 1.55; }

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  color: var(--white);
}
.whatsapp-float svg { width: 30px; height: 30px; }

/* ---------- Scroll fade-in ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  .btn, .card, .industry { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .industries-grid { grid-template-columns: repeat(3, 1fr); }
  .industry-cards { grid-template-columns: repeat(2, 1fr); }
  .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }

  /* Why us: 2 + 2 + 1 centered */
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .why-item,
  .why-item:nth-child(4) { grid-column: span 2; }
  .why-item:nth-child(5) { grid-column: 2 / 4; }
}

@media (max-width: 820px) {
  .section { padding: 72px 0; }

  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu .nav-cta { margin-left: 0; text-align: center; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-media { order: -1; }

  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .industries-grid { grid-template-columns: repeat(2, 1fr); }

  .service-row { grid-template-columns: 1fr; gap: 28px; }
  .service-row.reverse .service-media { order: 0; }
  .service-detail { padding: 32px 0; }
  .service-detail:first-of-type { padding-top: 64px; }
  .service-detail:last-of-type { padding-bottom: 64px; }

  .page-hero { padding: 64px 0; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .product-category { padding: 56px 0; }

  /* Why us: single column */
  .why-grid { grid-template-columns: 1fr; }
  .why-item,
  .why-item:nth-child(4),
  .why-item:nth-child(5) { grid-column: auto; grid-row: auto; }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .cards-grid { grid-template-columns: 1fr; }
  .industries-grid { grid-template-columns: 1fr; }
  .industry-cards { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .hero { padding: 72px 0; }
  .hero-actions .btn,
  .cta-actions .btn { width: 100%; }
  .whatsapp-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}
