/*
Theme Name: JDGS Holdings
Description: Bespoke lightweight theme for JDGS Holdings — a privately owned group building specialist businesses across life science, agriculture and technology.
Version: 1.0.0
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:        #17171a;
  --grey-900:   #2a2a2e;
  --grey-700:   #4a4a4f;
  --grey-500:   #767680;
  --grey-300:   #c8c8ce;
  --grey-100:   #e9e9ec;
  --grey-bg:    #f5f5f7;
  --white:      #ffffff;
  --line:       #e2e2e6;
  --accent:     #00BF63;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', -apple-system, sans-serif;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }

/* ===== NAV ===== */
.jdgs-nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  height: 72px;
  display: flex; align-items: center;
  position: sticky; top: 0; z-index: 100;
}
.jdgs-nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.jdgs-brand { font-family: 'Libre Baskerville', serif; font-size: 18px; font-weight: 700; color: var(--ink); text-decoration: none; }
.jdgs-nav-links { display: flex; gap: 2.25rem; list-style: none; }
.jdgs-nav-links a { color: var(--grey-700); text-decoration: none; font-size: 15px; transition: color 0.2s; }
.jdgs-nav-links a:hover, .jdgs-nav-links a.active { color: var(--ink); }
.jdgs-nav-cta { color: var(--white); background: var(--ink); padding: 10px 20px; border-radius: 4px; font-size: 14px; text-decoration: none; transition: background 0.2s; }
.jdgs-nav-cta:hover { background: var(--grey-900); }
.jdgs-nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 4px; width: 40px; height: 40px; align-items: center; justify-content: center; color: #658D1B; }

/* ===== HERO ===== */
.jdgs-hero { padding: 6rem 0 5rem; border-bottom: 1px solid var(--line); }
.jdgs-hero-inner { max-width: 760px; margin: 0; }
.jdgs-hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: stretch; }
.jdgs-hero-grid .jdgs-hero-inner { max-width: none; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.jdgs-hero-image { min-height: 100%; background: var(--grey-bg); border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--grey-300); }
.jdgs-hero-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.jdgs-eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey-500); font-weight: 600; margin-bottom: 1.25rem; display: block; }

/* ===== CONTENT + IMAGE SPLIT (contact, etc.) ===== */
.jdgs-content-image-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.jdgs-content-image { aspect-ratio: 4 / 3; background: var(--grey-bg); border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--grey-300); }
.jdgs-content-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.jdgs-content-image-grid--stretch { align-items: stretch; }
.jdgs-content-image-grid--stretch .jdgs-content-image { aspect-ratio: auto; min-height: 100%; }
.jdgs-hero h1 { font-family: 'Libre Baskerville', serif; font-size: clamp(28px, 4.2vw, 46px); font-weight: 700; line-height: 1.25; margin-bottom: 1.5rem; max-width: 16ch; }
.jdgs-hero p { color: var(--grey-700); font-size: 17px; line-height: 1.8; max-width: 60ch; margin-bottom: 2rem; }
.jdgs-btn { display: inline-block; background: var(--ink); color: var(--white); padding: 13px 26px; border-radius: 4px; font-size: 14px; letter-spacing: 0.02em; text-decoration: none; transition: background 0.2s; }
.jdgs-btn:hover { background: var(--grey-900); }
.jdgs-btn-ghost { display: inline-block; background: transparent; color: var(--ink); padding: 12px 26px; border-radius: 4px; font-size: 14px; text-decoration: none; border: 1px solid var(--grey-300); transition: border-color 0.2s; margin-left: 12px; }
.jdgs-btn-ghost:hover { border-color: var(--ink); }

/* ===== SECTIONS ===== */
.jdgs-section { padding: 5rem 0; }
.jdgs-section--alt { background: var(--grey-bg); }
.jdgs-section-head { max-width: 720px; margin: 0 0 3rem; text-align: left; }
.jdgs-section h2 { font-family: 'Libre Baskerville', serif; font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin-bottom: 1rem; line-height: 1.3; }
.jdgs-section-head p { color: var(--grey-700); font-size: 16px; line-height: 1.75; max-width: 65ch; }
.jdgs-section-head--wide { max-width: none; }
.jdgs-section-head--wide p { max-width: none; }

/* ===== PORTFOLIO GRID ===== */
.jdgs-portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.jdgs-portfolio-grid--two { grid-template-columns: repeat(2, 1fr); }
.jdgs-portfolio-card { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 2rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: border-color 0.2s, transform 0.2s; }
.jdgs-portfolio-card:hover { border-color: var(--grey-500); transform: translateY(-2px); }
.jdgs-portfolio-label { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey-500); margin-bottom: 0.75rem; }
.jdgs-portfolio-card h3 { font-family: 'Libre Baskerville', serif; font-size: 19px; font-weight: 700; margin-bottom: 0.5rem; }
.jdgs-portfolio-card p { color: var(--grey-700); font-size: 14px; line-height: 1.65; margin-bottom: 1.25rem; flex: 1; }
.jdgs-portfolio-link { font-size: 13px; font-weight: 600; color: var(--ink); }

/* ===== NEWS ===== */
.jdgs-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.jdgs-news-card { text-decoration: none; color: inherit; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.jdgs-news-thumb { aspect-ratio: 2 / 1; border-radius: 6px; overflow: hidden; margin-bottom: 1.25rem; background: var(--grey-100); }
.jdgs-news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.jdgs-news-card:hover .jdgs-news-thumb img { transform: scale(1.045); }
.jdgs-news-date { font-size: 12px; color: var(--grey-500); margin-bottom: 0.5rem; display: block; }
.jdgs-news-card h3 { font-family: 'Libre Baskerville', serif; font-size: 17px; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.jdgs-news-card p { color: var(--grey-700); font-size: 14px; line-height: 1.6; }

.jdgs-news-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 2.5rem; }
.jdgs-news-filters a { color: var(--grey-700); text-decoration: none; font-size: 14px; padding: 8px 16px; border: 1px solid var(--grey-300); border-radius: 999px; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.jdgs-news-filters a:hover { border-color: var(--ink); color: var(--ink); }
.jdgs-news-filters a.active { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ===== ARTICLE ===== */
.jdgs-article-image { padding: 0 0 2.5rem; }
.jdgs-article-image img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 6px; }
.jdgs-article-content h2 { font-family: 'Libre Baskerville', serif; font-size: 22px; font-weight: 700; margin: 2.5rem 0 1rem; line-height: 1.35; }
.jdgs-article-content h2:first-child { margin-top: 0; }
.jdgs-article-content p { margin-bottom: 1.25rem; }

.jdgs-tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.jdgs-tag { font-size: 13px; color: var(--grey-700); text-decoration: none; padding: 6px 14px; border: 1px solid var(--grey-300); border-radius: 999px; transition: border-color 0.2s, color 0.2s; }
.jdgs-tag:hover { border-color: var(--ink); color: var(--ink); }

/* ===== TEAM ===== */
.jdgs-team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 1056px; }
.jdgs-team-card { border: 1px solid var(--line); border-radius: 6px; padding: 1.75rem; display: flex; flex-direction: column; height: 100%; }
.jdgs-team-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.jdgs-team-card h3 { font-family: 'Libre Baskerville', serif; font-size: 18px; font-weight: 700; margin-bottom: 0.5rem; }
.jdgs-team-card p { color: var(--grey-700); font-size: 15px; line-height: 1.65; }
.jdgs-team-links { margin-top: auto; padding-top: 0.75rem; font-size: 13px; }
.jdgs-team-links a { color: var(--ink); font-weight: 600; text-decoration: none; }
.jdgs-team-links a:hover { text-decoration: underline; }

/* ===== FAQ ACCORDION ===== */
.jdgs-faq-list { display: flex; flex-direction: column; gap: 0; max-width: 760px; }
.jdgs-faq-item { border-top: 1px solid var(--line); padding: 1.25rem 0; }
.jdgs-faq-item:last-child { border-bottom: 1px solid var(--line); }
.jdgs-faq-item summary { font-family: 'Libre Baskerville', serif; font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 28px; }
.jdgs-faq-item summary::-webkit-details-marker { display: none; }
.jdgs-faq-item summary::after { content: '+'; position: absolute; right: 0; top: 0; font-size: 20px; color: var(--grey-500); font-weight: 400; }
.jdgs-faq-item[open] summary::after { content: '\2212'; }
.jdgs-faq-item p { color: var(--grey-700); font-size: 15px; line-height: 1.7; margin-top: 0.85rem; }

/* ===== SEARCH ===== */
.jdgs-search-toggle { background: none; border: none; cursor: pointer; padding: 6px; display: flex; align-items: center; color: var(--grey-700); }
.jdgs-search-toggle:hover { color: var(--ink); }
.jdgs-search-form { position: absolute; top: 72px; right: 0; left: 0; background: var(--white); border-bottom: 1px solid var(--line); padding: 1.25rem 0; display: none; }
.jdgs-search-form.open { display: block; }
.jdgs-search-form .container { display: flex; gap: 10px; }
.jdgs-search-form input[type="search"] { flex: 1; padding: 12px 16px; border: 1px solid var(--grey-300); border-radius: 4px; font-size: 15px; font-family: inherit; }
.jdgs-search-form button { background: var(--ink); color: var(--white); border: none; padding: 0 22px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.jdgs-search-form button:hover { background: var(--grey-900); }

/* ===== FOOTER ===== */
.jdgs-footer { background: var(--ink); border-top: 3px solid var(--accent); padding: 4.5rem 0 2rem; }
.jdgs-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 3rem; }
.jdgs-footer .jdgs-brand { color: var(--white); font-size: 26px; }
.jdgs-footer-tag { color: var(--grey-300); font-size: 14px; line-height: 1.6; margin-top: 1rem; max-width: 32ch; }
.jdgs-footer-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.jdgs-footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.jdgs-footer-links a { color: var(--grey-300); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.jdgs-footer-links a:hover { color: var(--accent); }
.jdgs-footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; font-size: 12px; color: var(--grey-500); }
.jdgs-footer-bottom a { color: var(--grey-300); text-decoration: underline; }
.jdgs-footer-bottom a:hover { color: var(--accent); }
.jdgs-footer-bottom a:hover { color: var(--white); }

@media (max-width: 860px) {
  .jdgs-nav-links { display: none; }
  .jdgs-nav-cta { display: none; }
  .jdgs-nav-toggle { display: flex; }
  body.jdgs-menu-open .jdgs-nav-links {
    display: flex; flex-direction: column; gap: 1.5rem;
    position: fixed; inset: 72px 0 0 0; background: var(--white);
    padding: 2rem; z-index: 99;
  }
  body.jdgs-menu-open .jdgs-nav-links a { font-size: 20px; }
  .jdgs-portfolio-grid, .jdgs-news-grid, .jdgs-portfolio-grid--two { grid-template-columns: 1fr; }
  .jdgs-footer-grid { grid-template-columns: 1fr 1fr; }
  .jdgs-hero-grid { grid-template-columns: 1fr; }
  .jdgs-content-image-grid { grid-template-columns: 1fr; }
  .jdgs-content-image { order: -1; aspect-ratio: 16 / 9; }
  .jdgs-hero-image { order: -1; aspect-ratio: 16 / 9; }
  .jdgs-team-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .jdgs-footer-grid { grid-template-columns: 1fr; }
  .jdgs-hero { padding: 3.5rem 0 3rem; }
  .jdgs-btn-ghost { margin-left: 0; margin-top: 10px; display: block; width: fit-content; }
}

/* ── Article Q&A: collapsible accordion ── */
details.jdgs-qa {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}
details.jdgs-qa:first-of-type { border-top: 1px solid var(--line); }
details.jdgs-qa summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.5;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
details.jdgs-qa summary::-webkit-details-marker { display: none; }
details.jdgs-qa summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--grey-500);
}
details.jdgs-qa[open] summary::after { content: "\2212"; }
details.jdgs-qa p {
  margin: 0.8rem 0 0;
  color: var(--grey-700);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ===== COOKIEADMIN — match plugin accent to the site's brand green =====
   Extra-specific selectors (body-prefixed, doubled classes) because the
   plugin's own stylesheet loads after ours and wins plain !important ties
   on lower-specificity selectors. */
body .cookieadmin_btn.cookieadmin_accept_btn,
body .cookieadmin_btn.cookieadmin_save_btn,
body button.cookieadmin_re_consent.cookieadmin_re_consent {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
}
body .cookieadmin_remark,
body .cookieadmin_remark.cookieadmin_act {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
