/*
Theme Name: Tectum
Theme URI: https://tectum.org.uk
Author: Tectum Consultancy Ltd
Description: Clean professional theme for Tectum Procurement.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: tectum
*/

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

:root {
  --bg:         #F7F5F1;
  --white:      #FFFFFF;
  --navy:       #1A2B3C;
  --navy-light: #2C4059;
  --gold:       #C9963A;
  --gold-light: #E8B96A;
  --muted:      #6B7A8A;
  --border:     #E0DDD7;
  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'Jost', sans-serif;
  --max:        1140px;
  --radius:     4px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--navy);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
}

.section        { padding: 6rem 0; }
.section--tight { padding: 4rem 0; }
.section--cream { background: #EFEDE7; }
.text-center { text-align: center; }

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

/* =============================================
   HEADER & NAV
   ============================================= */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.site-logo img  { height: 36px; width: auto; }
.site-logo span { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--navy); }

.site-nav { display: flex; align-items: center; gap: 0; list-style: none; }

.site-nav li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  padding: 0.5rem 1rem;
  display: block;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav li a:hover,
.site-nav li.current-menu-item > a {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.site-nav li.menu-cta > a {
  margin-left: 1rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  border-bottom: none;
}

.site-nav li.menu-cta > a:hover { background: var(--navy-light); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 2rem 1.5rem;
  }
  .site-nav.open { display: flex; }
  .site-nav li a { border-bottom: none; padding: 0.6rem 0; }
  .site-nav li.menu-cta > a { margin-left: 0; margin-top: 0.5rem; }
}

/* =============================================
   HERO (homepage)
   ============================================= */
.hero {
  background: var(--navy);
  padding: 7rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 500px; height: 500px;
  border: 1px solid rgba(201,150,58,0.15);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero .section-label { color: var(--gold); }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,0.65); max-width: 560px; }

/* =============================================
   PAGE HERO (inner pages)
   ============================================= */
.page-hero { background: var(--navy); padding: 4rem 0 3.5rem; }
.page-hero .section-label { color: var(--gold); }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-hero .page-hero-sub { color: rgba(255,255,255,0.6); font-size: 1.05rem; margin-top: 0.75rem; margin-bottom: 0; }

/* =============================================
   HOMEPAGE COMPONENTS (hardcoded sections)
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
}

.service-icon {
  width: 44px; height: 44px;
  background: rgba(201,150,58,0.1);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}

.service-icon svg { width: 22px; height: 22px; stroke: var(--gold); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.service-card h3 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.service-card p  { font-size: 0.95rem; color: var(--muted); margin: 0; }

.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

@media (max-width: 768px) { .about-strip { grid-template-columns: 1fr; gap: 2.5rem; } }

.about-lead { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.6; margin-bottom: 1.5rem; }

.stat-row { display: flex; gap: 3rem; margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--border); }
.stat-number { font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; color: var(--gold); display: block; line-height: 1; }
.stat-label  { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.4rem; display: block; }

.cat-mini-list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.cat-mini-list li { font-size: 0.9rem; color: var(--muted); padding: 0.4rem 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.5rem; }
.cat-mini-list li::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }

.clients-grid { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: center; margin-top: 2rem; }
.clients-grid img { height: 50px; width: auto; filter: grayscale(100%) opacity(0.5); }

/* =============================================
   ENTRY CONTENT — styles WP editor output
   ============================================= */
.entry-content { max-width: 820px; }

.entry-content p {
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.entry-content p:last-child { margin-bottom: 0; }

.entry-content a { color: var(--gold); }
.entry-content a:hover { color: var(--gold-light); }

.entry-content ul,
.entry-content ol {
  margin: 0.75rem 0 1.5rem 1.5rem;
}

.entry-content ul li,
.entry-content ol li {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.2rem 0;
  line-height: 1.7;
}

.entry-content strong { color: var(--navy); font-weight: 600; }

/* Callout / highlight box — use WP quote block */
.entry-content blockquote {
  background: var(--white);
  border-left: 3px solid var(--gold);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}

.entry-content blockquote p {
  color: var(--navy);
  font-size: 1rem;
  margin: 0;
}

/* =============================================
   SERVICES PAGE — entry-content styled as
   numbered service items via CSS counters
   ============================================= */
.services-entry { counter-reset: service-counter; }

.services-entry h2 {
  counter-increment: service-counter;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 2rem;
  align-items: baseline;
  margin-top: 3.5rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border);
  font-size: 1.3rem;
}

.services-entry h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.services-entry h2::before {
  content: "0" counter(service-counter);
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  display: block;
}

.services-entry p,
.services-entry ul {
  margin-left: calc(100px + 2rem);
}

.services-entry p {
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.services-entry ul {
  list-style: disc;
  margin-bottom: 1.5rem;
}

.services-entry ul li {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.2rem 0;
}

@media (max-width: 768px) {
  .services-entry h2 {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .services-entry h2::before { font-size: 2rem; }
  .services-entry p,
  .services-entry ul { margin-left: 0; }
}

/* =============================================
   CATEGORIES PAGE — entry-content styled as
   category cards via h2 + ul combos
   ============================================= */
.categories-entry { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; align-items: start; }

.categories-entry h2 {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  margin: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.categories-entry ul {
  list-style: none;
  padding: 1.25rem 1.5rem;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

.categories-entry ul li {
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
}

.categories-entry ul li:last-child { border-bottom: none; }

/* Wrap each h2+ul pair in a card — achieved with CSS grid flow */
.categories-entry h2 + ul { break-inside: avoid; }

/* =============================================
   TENDERS PAGE
   ============================================= */
.tender-item {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.tender-item h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.tender-item p  { color: var(--muted); font-size: 0.9rem; margin: 0; }

.tender-badge { flex-shrink: 0; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.35rem 0.9rem; border-radius: 20px; background: rgba(201,150,58,0.12); color: var(--gold); }
.tender-badge--closed { background: rgba(107,122,138,0.12); color: var(--muted); }
.no-tenders { text-align: center; padding: 4rem 2rem; color: var(--muted); }

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 5rem; align-items: start; }

@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.contact-detail { display: flex; gap: 1rem; align-items: flex-start; margin-top: 1.75rem; }
.contact-detail svg { width: 20px; height: 20px; stroke: var(--gold); fill: none; stroke-width: 1.75; flex-shrink: 0; margin-top: 2px; }
.contact-detail span { font-size: 0.95rem; color: var(--muted); }
.contact-detail a { color: var(--navy); }
.contact-detail a:hover { color: var(--gold); }

.contact-form { background: var(--white); padding: 2.5rem; border-radius: var(--radius); border: 1px solid var(--border); }
.contact-form h3 { font-size: 1.2rem; margin-bottom: 1.75rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy); margin-bottom: 0.5rem; }
.form-group input,
.form-group textarea { width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-body); font-size: 0.95rem; color: var(--navy); background: var(--bg); }
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 130px; }

.btn-submit { width: 100%; background: var(--navy); color: #fff; font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.85rem 2rem; border-radius: var(--radius); border: none; cursor: pointer; }
.btn-submit:hover { background: var(--navy-light); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--navy); padding: 3rem 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-logo { font-family: var(--font-head); font-size: 1.25rem; color: #fff; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; list-style: none; }
.footer-links li a { font-size: 0.875rem; color: rgba(255,255,255,0.5); }
.footer-links li a:hover { color: var(--gold); }
.footer-copy { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* Alert */
.alert-success { background: rgba(201,150,58,0.1); border: 1px solid var(--gold); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.95rem; color: var(--navy); }
