/*
Theme Name: Gilcon
Author: EQD
Version: 1.0
*/

/* ========== Tokens ========== */
:root {
  --brand: var(--wp--preset--color--brand, #0F3D5E);
  --accent: var(--wp--preset--color--accent, #1E90FF);
  --cta: var(--wp--preset--color--cta, #0E2A4A);
  --ink: var(--wp--preset--color--ink, #101213);
  --muted: var(--wp--preset--color--muted, #6B7280);
  --surface: var(--wp--preset--color--surface, #fff);
  --highlight: var(--wp--preset--color--highlight, #FF6600);

  --radius: 12px;
  --shadow-sm: 2px 4px 20px rgba(0, 0, 0, 0.1);

  /* Fluid type */
  --step--1: clamp(0.78rem, 0.83rem + 0.2vw, 0.85rem);
  --step-0: clamp(1rem, 0.95rem + 0.3vw, 1rem);
  --step-1: clamp(1.0rem, 1.1rem + 0.8vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.4vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 2.5rem);
  --step-4: clamp(2.2rem, 1.8rem + 2vw, 2.5rem);

    /* Spacing (4px baseline, all rem) */
  --space-1: 0.25rem;  /* 4px  */
  --space-2: 0.5rem;   /* 8px  */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-12: 3rem;    /* 48px */

  /* Footer palette (override later if design updates) */
  --footer-bg: #757575;
  --footer-text: --surface;
  --footer-muted: --muted;
  --footer-link: #FFFFFF;
  --footer-heading: #FFFFFF;
}

/* ========== Base ========== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font: 400 14px/1.6 var(--wp--preset--font-family--roboto, 'Roboto', sans-serif);
}
h1,h2,h3,h4,h5,h6,.brand {
  font-family: var(--wp--preset--font-family--montserrat, 'Montserrat', sans-serif);
}
img { max-width: 100%; height: auto; display: block; border: 0; }
a { color: var(--brand); text-decoration: none; }

a:hover { text-decoration: underline; }
.container { width: min(1200px, 92vw); margin-inline: auto; }
.wysiwyg p { margin: 0 0 1rem; }

/* Accessible skip link */
.skip-link {
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus { position:static; width:auto; height:auto; padding:.5rem 1rem; background:#000; color:#fff; }

/* Buttons */
.btn {
  display:inline-block; background:var(--brand); color:#fff;
  padding:.5rem 1.25rem; border-radius:999px; font-weight:600; border:2px solid var(--brand);
  transition:transform .08s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
.btn--cta { background:var(--cta); border-width: 2px; border-color:var(--accent); }

/* SR-only */
.sr-only{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ========== Header ========== */
.site-header { position:sticky; top:0; background:#fff; border-bottom:1px solid #eaeaea; z-index:50; padding: 1rem 0; border-bottom: solid 1px var(--highlight);}
.header-inner { display:flex; align-items:center; gap:1rem; padding-block:.75rem; }
.brand { display:inline-flex; align-items:center; gap:.5rem; color:var(--brand); font-weight:800; font-size:var(--step-1); text-decoration:none; }
.brand img { height:36px; width:auto; }

/* Desktop nav: menu centered, CTA right */
.primary-nav { flex:1 1 auto; display:flex; justify-content:center; }
.primary-nav .menu { display:flex; gap:24px; list-style:none; margin:0; padding:0; }
.primary-nav .menu > li > a {
  display:inline-block; padding:.5rem .25rem; border-radius:6px; font-weight:600;
  color: var(--accent);                    /* default link color */
}
.primary-nav .menu > li > a:hover,
.primary-nav .menu > li > a:focus,
.primary-nav .menu > li > a[aria-current="page"] {
  color: var(--brand);                     /* hover/active -> brand */
}
@media (min-width: 960px) {
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 2rem; /* left/right padding for entire header */
  }

  .brand {
    flex: 0 0 auto; /* logo fixed width on left */
  }

  .primary-nav {
    flex: 1;
    display: flex;
    justify-content: center; /* center menu between logo and CTA */
  }

  .primary-nav .menu {
    display: flex;
    justify-content: space-evenly; /* even space between items */
    gap: 0; /* no fixed gap */
    width: 100%; /* fill available space */
    max-width: 900px; /* optional cap so it doesn’t stretch too far */
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .primary-nav .menu > li {
    flex: 1;
    text-align: center;
  }

  .header-cta {
    flex: 0 0 auto; /* keep button fixed width on right */
  }
}
.header-cta { flex:0 0 auto; margin-left:auto; }
.nav-toggle { display:none; background:none; border:0; padding:.5rem; }
.nav-toggle__bar { display:block; width:26px; height:2px; background:var(--brand); margin:5px 0; border-radius:2px; }

/* Hide the menu "Contact Us" item on desktop (we use the CTA button) */
.primary-nav .menu .menu-item--contact { display:none; }

/* Mobile header */
@media (max-width: 960px){
  .nav-toggle { display:inline-block; margin-left:auto; } /* hamburger right */
  .header-cta { display:none; }                           /* hide CTA button */
  .primary-nav {
    position:absolute; inset-inline:0; top:calc(100% + 1px);
    background:#fff; border-bottom:1px solid #eee;
    padding:.75rem 1rem; display:none; flex-direction:column; align-items:flex-start;
  }
  .primary-nav.is-open { display:flex; }
  .primary-nav .menu { flex-direction:column; gap:.75rem; width:100%; }
  /* Show plain text Contact link inside menu with extra spacing */
  .primary-nav .menu .menu-item--contact {
    display:block; margin-top:1rem; padding-top:.75rem; border-top:1px solid #eee;
  }
  .primary-nav .menu .menu-item--contact > a {
    display:block; padding:.5rem 0; font-weight:600; color: var(--accent);
  }
}

/* ========== Hero ========== */
.hero { padding-block: clamp(24px, 6vw, 32px); background:#F7FAFC; }
.hero__inner { display:grid; align-items:center; gap:clamp(16px, 3vw, 48px); grid-template-columns:1fr; }
@media (min-width: 960px){ .hero__inner{ grid-template-columns: 1.1fr 1fr; } }
.hero__media img { border-radius:var(--radius); box-shadow:var(--shadow-sm); }
.hero__content { max-width:560px; } /* prevent sprawl; tweak to Figma */
.hero__heading {
  font-size:var(--step-4); line-height:1.1; margin:0 0 .5rem; letter-spacing:-.02em;
  color: var(--hero-heading, var(--brand)); /* from block */
}
.hero__heading strong { color: var(--hero-accent, var(--accent)); font-weight:800; }
.hero__heading br { display:inline; }
.hero__lead { color:var(--muted); font-size:var(--step-0); max-width:60ch; }
.hero__cta { margin-top:1rem; }
.hero__heading-img { display:block; max-width:min(100%, 820px); height:auto; margin:0 0 .5rem; }

/* ========== Services ========== */
.services { padding-block: clamp(28px, 6vw, 64px); }
.section-title { color:var(--brand); font-size:var(--step-2); letter-spacing:.06em; text-transform:uppercase; margin:0 0 1rem; }
.cards { display:grid; gap:clamp(16px, 3vw, 32px); grid-template-columns:1fr; }
@media (min-width: 960px){ .cards{ grid-template-columns:repeat(2,1fr); } }
.card { background:#fff; border-radius:var(--radius); box-shadow:var(--shadow-sm); padding:clamp(16px, 2vw, 24px); }
.card__title { color:var(--brand); font-size:var(--step-2); margin:0 0 .5rem; }
.card__media img { border-radius:var(--radius); }
.card__copy { color:var(--muted); margin:.75rem 0 1rem; }
.link-arrow { font-weight:700; color:var(--accent); }
.link-arrow::after { content:"  ›"; }

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer__inner {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-12);
  grid-template-columns: 1fr;                 /* mobile */
}

/* tablet (2 cols) */
@media (min-width: 720px) {
  .footer__inner { grid-template-columns: 1.2fr 1fr; }
}

/* desktop (3 cols) */
@media (min-width: 960px) {
  .footer__inner { grid-template-columns: 1fr 1fr 0.6fr; }
}

.footer__col { min-width: 0; }

.footer__heading {
  margin: 0 0 var(--space-4);
  color: var(--footer-heading);
  font-family: var(--wp--preset--font-family--montserrat, 'Montserrat', sans-serif);
  font-weight: 800;
  font-size: var(--step-2);
}

/* Quick Links */
.footer__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__menu ul {
  list-style: none;
  margin: 0;      /* <-- add this */
  padding: 0;     /* <-- add this */
}

.footer__menu li {
  margin: 0;
  padding: 0;     /* <-- ensure no li padding either */
}

.footer__menu a {
  color: var(--footer-link);
  text-decoration: none;
  font-weight: normal;
  display: block; /* helps anchor fill li and align flush */
}

.footer__menu a:hover,
.footer__menu a:focus-visible {
  text-decoration: underline;
}

/* Offices */
.footer__office { margin: 0 0 var(--space-6); }
.footer__office:last-child { margin-bottom: 0; }

.footer__office-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
  margin-bottom: var(--space-2);
}

.footer__office-link,
.footer__office-meta a {
  color: var(--footer-link);
  text-decoration: none;
}

.footer__office-meta {
  color: var(--footer-muted);
  display: grid; gap: var(--space-1);
}

/* Social */
.footer__social {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: var(--space-4);
}
.footer__social a { display: inline-flex; }

/* icons as images */
.icon { display:inline-block; vertical-align:middle; }
.icon--pin { width: 1.25rem; height: 1.25rem; }
.icon--social { width: 1.75rem; height: 1.75rem; }

/* ensure links/icons appear white inside footer */
.site-footer .footer__menu a,
.site-footer .footer__office-row, .footer__office-meta,
.site-footer .footer__social a { color: var(--footer-link, #fff); }

/* Legal bar */
.footer__legal, .footer__legal div {
  
  text-align: center;
  color: #fff;
}

.footer__copyright { font-size: var(--step--1); }
.footer__copyright a { color: var(--surface)}
