/* components stylesheet (per-project)
 * --------------------------------------------------------------------------
 * Hand-authored stylesheet for page components used by this build.
 *
 * SOURCE OF TRUTH: this file (wp-pages/styles/components.css).
 * DEPLOYED TO:     <child-theme>/theme-components.css on the WP host,
 *                  enqueued by the theme-css-bridge mu-plugin on every
 *                  front-end page.
 *
 * Workflow:
 *   1.  python wp-pages/sync_css.py pull   # before editing
 *   2.  edit this file
 *   3.  python wp-pages/sync_css.py push   # to deploy
 *
 * Conventions (per-project):
 *   - Every new component class is prefixed `populi-` for this project.
 *     A different client project would pick its own prefix.
 *   - Use brand tokens defined below; do not hard-code brand hex elsewhere.
 *   - Keep specificity flat (single class) so components compose cleanly.
 * --------------------------------------------------------------------------
 */

:root {
  /* Primary — drawn from Blocksy's palette (set in Customizer → Colors).
   * Fallback hex matches brand-colors.md so styles still work if the
   * theme variable is unset. Editing the palette in Blocksy propagates
   * everywhere these tokens are used. */
  --populi-blue:    var(--theme-palette-color-2,  #002060);
  --populi-green:   var(--theme-palette-color-9,  #09803F);
  --populi-yellow:  var(--theme-palette-color-10, #FFC824);

  /* DISC — every slot is in the Blocksy palette. */
  --populi-disc-d:  var(--theme-palette-color-14, #A7131D);
  --populi-disc-i:  var(--theme-palette-color-10, #FFC824);
  --populi-disc-s:  var(--theme-palette-color-9,  #09803F);
  --populi-disc-c:  var(--theme-palette-color-15, #3065B0);

  /* DISC tints (hand-picked, not in palette) */
  --populi-disc-d-tint: #F0D2D2;
  --populi-disc-i-tint: #FFF4D8;
  --populi-disc-s-tint: #CCE5D8;
  --populi-disc-c-tint: #D8DFEE;

  /* Accent — drawn from Blocksy palette slots 11–13. */
  --populi-purple:  var(--theme-palette-color-11, #663498);
  --populi-orange:  var(--theme-palette-color-12, #FF9900);
  --populi-pink:    var(--theme-palette-color-13, #E65580);

  /* Neutral — body text follows the theme's text color. */
  --populi-warm-bg: #F4F1EA;
  --populi-gray:    var(--theme-text-color, #3A4F66);
}

.section-padded {
	padding: 75px 0;
}

.populi-btn {
	font-size: 16px;
	padding: 15px 20px;
}

.populi-btn-primary {
	font-size: 16px;
	padding: 15px 20px;
	background-color: var(--theme-palette-color-2,  #002060);
	color: #FFF;
	font-weight: bold;
	border-radius: 15px;
	transition: filter 0.3s ease;
}

.populi-btn-primary:hover {
	color: #FFF;
	filter: brightness(130%);
}

.populi-btn-primary span {
	color: #FFF;
}

.populi-btn-secondary {
	font-size: 16px;
	padding: 12px 17px;
	background-color: transparent;
	border-color: var(--theme-palette-color-2,  #002060);
	border-width: 3px;
	border-style: solid;
	color: var(--theme-palette-color-2,  #002060);
	font-weight: bold;
	border-radius: 15px;
	transition: filter 0.3s ease;
}

.populi-btn-secondary:hover {
	color: var(--theme-palette-color-2,  #002060);
	filter: brightness(130%);
}

.populi-btn-secondary span {
	color: #FFF;
}


.populi-contact-form {
  font-family: 'Inter', sans-serif;
}

/* Two-column rows that collapse on narrow screens */
.populi-contact-form .pf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}
@media (max-width: 600px) {
  .populi-contact-form .pf-grid-2 {
    grid-template-columns: 1fr;
  }
}

.populi-contact-form p {
  margin: 0 0 1.25rem;
}

.populi-contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2D2D2D;
}

/* Accent-orange required asterisk */
.populi-contact-form .pf-req {
  color: #F2994A;
}

/* Helper + consent text */
.populi-contact-form .pf-help,
.populi-contact-form .pf-consent {
  display: block;
  font-size: 13px;
  color: #555555;
  margin-top: 4px;
}
.populi-contact-form .pf-consent {
  margin-top: 8px;
}

/* Inputs */
.populi-contact-form input[type="text"],
.populi-contact-form input[type="email"],
.populi-contact-form input[type="tel"],
.populi-contact-form select,
.populi-contact-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  color: #2D2D2D;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0;            /* sharp corners on fields — matches the mockup */
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.populi-contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

/* Selects — override Blocksy's fixed 40px height that clips the option text.
   Extra class (.wpcf7-select) raises specificity to win over cf-7.min.css. */
.populi-contact-form select.wpcf7-select {
  height: auto;                 /* kill Blocksy's fixed height */
  min-height: 48px;
  line-height: 1.4;
  padding: 12px 40px 12px 16px; /* room on the right for the arrow */
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* Green focus state */
.populi-contact-form input:focus,
.populi-contact-form select:focus,
.populi-contact-form textarea:focus {
  outline: none;
  border-color: #09803F;
  box-shadow: 0 0 0 2px rgba(9, 128, 63, 0.25);
}

/* Submit button — nicely rounded green */
.populi-contact-form .wpcf7-submit {
  display: inline-block;
  background: #09803F;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 32px;
  border: none;
  border-radius: 8px;          /* rounded button */
  cursor: pointer;
  transition: background-color 0.2s;
}
.populi-contact-form .wpcf7-submit:hover {
  background: #06602F;
}
.populi-contact-form .wpcf7-submit:focus-visible {
  outline: 2px solid #09803F;
  outline-offset: 2px;
}

/* CF7 status messages */
.populi-contact-form .wpcf7-not-valid-tip {
  color: #b00020;
  font-size: 13px;
}
.populi-contact-form .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}



/* Timeline */
.populi-timeline{
  /* To drive these from your Blocksy global palette instead, replace with e.g.
     --p-navy: var(--theme-palette-color-1);  --p-green: var(--theme-palette-color-4);
     --p-gold: var(--theme-palette-color-6);  --p-gray:  var(--theme-palette-color-10);
     (confirm the exact variable names in your install). */
  --p-navy:#002060;
  --p-green:#09803F;
  --p-gold:#FFC824;
  --p-gray:#555555;
  --p-line:rgba(9,128,63,.3);
  --p-border:#e5e7eb;

  border-left:2px solid var(--p-line);
  padding-left:1.5rem;
  max-width:64rem;          /* readable width, matches the mockup; remove for full width */
}
@media (min-width:768px){ .populi-timeline{ padding-left:2.5rem; } }

/* spacing between year groups (tightened) */
.populi-timeline .pt-year + .pt-year{ margin-top:2rem; }
@media (min-width:768px){ .populi-timeline .pt-year + .pt-year{ margin-top:2.75rem; } }

/* year heading + its rail node */
.populi-timeline .year{
  position:relative; margin:0 0 1rem;
  font-weight:800; color:var(--p-navy); font-size:1.25rem; line-height:1.1;
}
@media (min-width:768px){ .populi-timeline .year{ font-size:1.5rem; } }
.populi-timeline .year::before{
  content:""; position:absolute; top:.25em; left:-34px;
  width:20px; height:20px; border-radius:9999px;
  background:var(--p-navy); box-shadow:0 0 0 4px #fff;
}
@media (min-width:768px){ .populi-timeline .year::before{ left:-50px; } }

/* milestone list + rail dots */
.populi-timeline .milestones{ list-style:none; margin:0; padding:0; }
.populi-timeline .milestone{ position:relative; }
.populi-timeline .milestone + .milestone{ margin-top:1.25rem; }
.populi-timeline .milestone::before{
  content:""; position:absolute; top:.4em; left:-31px;
  width:14px; height:14px; border-radius:9999px;
  background:var(--p-green); box-shadow:0 0 0 4px #fff;
}
@media (min-width:768px){ .populi-timeline .milestone::before{ left:-47px; } }

/* final milestone = gold accent */
.populi-timeline .milestone.is-final::before{
  background:var(--p-gold); width:16px; height:16px; left:-32px;
}
@media (min-width:768px){ .populi-timeline .milestone.is-final::before{ left:-48px; } }

/* milestone text */
.populi-timeline .date{
  display:inline-block; font-size:.75rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.18em; color:var(--p-green);
}
.populi-timeline .title{
  margin:.2rem 0 0; font-weight:700; color:var(--p-navy);
  font-size:1rem; line-height:1.3;
}
@media (min-width:768px){ .populi-timeline .title{ font-size:1.125rem; } }
.populi-timeline .detail{
  margin:.2rem 0 0; font-size:.875rem; color:var(--p-gray); line-height:1.5;
}

/* milestones WITH a photo: text + image grid that collapses on mobile */
.populi-timeline .has-photo{ display:grid; gap:1rem; align-items:start; }
@media (min-width:768px){
  .populi-timeline .has-photo{ grid-template-columns:1fr 20rem; gap:1.5rem; }
}
.populi-timeline .m-photo{
  width:100%; height:13rem; object-fit:cover; border:1px solid var(--p-border); display:block;
}
@media (min-width:768px){ .populi-timeline .m-photo{ height:14rem; } }
