/* The directory's own base styles, header and footer (plan decision 10). Nothing here comes from WordPress:
   the values that matter for parity (Mulish, text colour, heading sizes) are copied from the coho.life theme. */

@font-face { font-family: 'Mulish'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/mulish-latin-400.woff2) format('woff2'); }
@font-face { font-family: 'Mulish'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/mulish-latin-500.woff2) format('woff2'); }
@font-face { font-family: 'Mulish'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/mulish-latin-600.woff2) format('woff2'); }
@font-face { font-family: 'Mulish'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/mulish-latin-700.woff2) format('woff2'); }

:root {
  --hd-navy: #2a3b5d;
  --hd-magenta: #cb0a73;
  --hd-text: #2d2d2d;
  --hd-muted: #5f5f5f;
  --hd-font: Mulish, "Trebuchet MS", Helvetica, sans-serif;
  /* Space either side of the content, as measured on coho.life: 5vw on desktop, 58px up to 1100px, 30px on phones. */
  --hd-gutter: 5vw;
}
@media (max-width: 1100px) { :root { --hd-gutter: 58px; } }
@media (max-width: 560px) { :root { --hd-gutter: 30px; } }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--hd-font);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--hd-text);
  background: #fff;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--hd-font);
  font-weight: 500;
  color: var(--hd-text);
  margin-top: 0;
}
/* margin-top is Avada's: the space above each directory page title. */
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.12; letter-spacing: -0.045em; margin-top: 0.67em; margin-bottom: 0.67em; }
h2 { font-size: clamp(30px, 4vw, 54px); line-height: 1.14; letter-spacing: -0.036em; margin-bottom: 1.1em; }
h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
h4 { font-size: 26px; }

a { color: var(--hd-text); }
a:hover, a:focus { color: var(--hd-magenta); }

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

/* The theme's page padding above the directory band (Avada's main padding is 60px). */
main.coho-directory { padding-top: 60px; }
main.coho-directory .coho-directory__section { padding-left: var(--hd-gutter); padding-right: var(--hd-gutter); }

/* The theme's text inputs (the directory search box). */
input[type="text"], input[type="search"], input[type="email"] {
  height: 60px;
  padding: 0 15px;
  font-family: var(--hd-font);
  font-size: 18px;
  font-weight: 400;
  color: var(--hd-text);
  background: #fff;
  border: 1px solid #ededed;
  border-radius: 10px;
  outline: 0;
}
input::placeholder { color: var(--hd-text); opacity: 1; }

/* Logos and owner photos are the original uploads (WordPress served cropped copies), so size them here. */
.coho-directory-card-logo img { width: 150px; height: 150px; object-fit: contain; }
.coho-directory-profile-logo img,
.coho-directory-profile-owner__image img { width: 300px; height: 300px; object-fit: contain; }
.coho-directory-profile-owner__image img { object-fit: cover; }

/* ---- Header ------------------------------------------------------------------------------------------- */

.hd-skip {
  position: absolute; left: -9999px; top: 0; padding: 8px 16px; background: #fff; z-index: 100;
}
.hd-skip:focus { left: 8px; top: 8px; }

.hd-topbar {
  background: var(--hd-navy);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.hd-topbar__inner,
.hd-mainbar__inner,
.hd-footer__inner {
  /* The same box as the directory content, so the logo and buttons line up with it at every width. */
  width: min(100vw - 2 * var(--hd-gutter), 1240px);
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hd-topbar__inner { min-height: 40px; }
.hd-topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.hd-topbar a:hover, .hd-topbar a:focus { color: #fff; text-decoration: underline; }
.hd-topbar__right { display: flex; gap: 24px; align-items: center; }

.hd-mainbar { background: #fff; border-bottom: 1px solid #e6e8ec; }
.hd-mainbar__inner { min-height: 88px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.hd-brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--hd-navy); }
.hd-brand:hover, .hd-brand:focus { color: var(--hd-navy); }
.hd-brand img { display: block; width: 150px; height: auto; }

.hd-buttons { display: flex; gap: 12px; align-items: center; }
.hd-button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  border: 2px solid var(--hd-magenta);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.hd-button--primary { background: var(--hd-magenta); color: #fff; }
.hd-button--primary:hover, .hd-button--primary:focus { background: #a8085f; border-color: #a8085f; color: #fff; }
.hd-button--secondary { background: #fff; color: var(--hd-magenta); }
.hd-button--secondary:hover, .hd-button--secondary:focus { background: #fdf0f7; color: var(--hd-magenta); }

.hd-signed-in [data-hd-signed-out] { display: none; }

@media (max-width: 640px) {
  .hd-topbar__phone { display: none; }
  .hd-brand img { width: 110px; }
  .hd-buttons { width: 100%; }
  .hd-button { flex: 1; text-align: center; padding: 10px 12px; }
}

/* ---- Footer (the app's focus-mode footer) ------------------------------------------------------------- */

.hd-footer {
  border-top: 1px solid #e6e8ec;
  color: var(--hd-muted);
  font-size: 14px;
  line-height: 1.5;
}
.hd-footer__inner { min-height: 64px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.hd-footer p { margin: 0; }
.hd-footer__links { display: flex; gap: 24px; }
.hd-footer a { color: var(--hd-muted); }
.hd-footer a:hover, .hd-footer a:focus { color: var(--hd-magenta); }
