/* =========================================================
   Contact (contact.html) · page-only styles, prefix ct-
   ========================================================= */


/* ---------- Helpful pages ----------
   Shared by "arrows" and "tiles": one list, each item a link with a title and one line.
   Divi: one Text module per item (title as a link, line under it), in a row with 2 columns (3 for tiles). */
.ct-index { display: grid; list-style: none; margin: 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; border-top: 2px solid var(--ink); }
.ct-index li { border-bottom: 1px solid var(--line); }
.ct-index a { display: grid; gap: 4px; padding: 22px 0; text-decoration: none; color: inherit; }
.ct-index b { justify-self: start; font: 600 20px/1.3 var(--font-head); color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--red) 55%, transparent); text-underline-offset: 4px; transition: color .2s; }
.ct-index span { color: var(--muted); font-size: 16px; }
.ct-index a:hover b { color: var(--red); }

/* "arrows": the whole row is the link, an arrow on the right, no underline */
html[data-ct-guide-look="arrows"] .ct-index a { position: relative; padding-right: 48px; }
html[data-ct-guide-look="arrows"] .ct-index b { text-decoration: none; }
html[data-ct-guide-look="arrows"] .ct-index a::after { content: "→"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 500 22px/1 var(--font-body); color: var(--red); transition: transform .25s var(--ease); }
html[data-ct-guide-look="arrows"] .ct-index a:hover::after { transform: translate(4px, -50%); }

/* "tiles": bordered link boxes, 3 x 2 (Divi: 2 rows with 3 columns; each column has a border) */
html[data-ct-guide-look="tiles"] .ct-index { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; border-top: 0; }
html[data-ct-guide-look="tiles"] .ct-index li { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .2s; }
html[data-ct-guide-look="tiles"] .ct-index li:hover { border-color: var(--red); }
html[data-ct-guide-look="tiles"] .ct-index a { height: 100%; align-content: start; padding: 26px 28px 28px; }
html[data-ct-guide-look="tiles"] .ct-index b { text-decoration: none; }
html[data-ct-guide-look="tiles"] .ct-index b::after { content: " →"; color: var(--red); }


/* ---------- Contact form (page option "ct-form-look") ----------
   These rules will target Divi's Contact Form markup on the real site. */
.ct-box { max-width: 820px; margin-inline: auto; }
.ct-box__head { margin-bottom: 32px; text-align: center; }
.ct-box__head .eyebrow { justify-content: center; }
.ct-box__head h2 { margin: 0; }
.ct-todo { max-width: 820px; margin: 28px auto 0; }

.ct-form { display: grid; gap: 24px; }
.ct-field { display: grid; gap: 8px; min-width: 0; }
.ct-field label { font-size: 15px; font-weight: 600; color: var(--ink); }
.ct-req { color: var(--red); }
.ct-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ct-form input, .ct-form textarea, .ct-form select {
  width: 100%; box-sizing: border-box; padding: 13px 14px; font: 400 16px/1.4 var(--font-body); color: var(--ink);
  background: var(--white); border: 1px solid #B9BFC8; border-radius: 4px; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.ct-form select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.ct-form textarea { resize: vertical; min-height: 170px; }
.ct-form input:hover, .ct-form textarea:hover, .ct-form select:hover { border-color: var(--muted); }
.ct-form input:focus, .ct-form textarea:focus, .ct-form select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-tint); }
.ct-form__bottom { display: flex; justify-content: flex-end; padding-top: 4px; }
.ct-submit { font-family: var(--font-body); }


/* "lined": no panel; each field is one bottom line on the gray section */
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-box { max-width: 760px; }
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-form { gap: 34px; }
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-field label { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-form :is(input, textarea, select) { padding: 10px 0; background-color: transparent; border: 0; border-bottom: 1.5px solid #9AA1AC; border-radius: 0; font-size: 17px; }
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-form select { background-position: calc(100% - 6px) 52%, calc(100% - 1px) 52%; }
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-form textarea { min-height: 120px; }
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-form :is(input, textarea, select):focus { border-bottom-color: var(--red); box-shadow: 0 1.5px 0 0 var(--red); }
html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-form__bottom { justify-content: center; }


/* "raised": white panel, red top edge, soft shadow; fields filled light gray */
html:is([data-ct-form-look="raised"], [data-ct-form-look="raised-side"]) .ct-form { padding: 44px 48px; background: var(--white); border-top: 4px solid var(--red); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-card); }
html:is([data-ct-form-look="raised"], [data-ct-form-look="raised-side"]) .ct-form :is(input, textarea, select) { background-color: var(--surface); border-color: transparent; }
html:is([data-ct-form-look="raised"], [data-ct-form-look="raised-side"]) .ct-form :is(input, textarea, select):hover { border-color: var(--line); }
html:is([data-ct-form-look="raised"], [data-ct-form-look="raised-side"]) .ct-form :is(input, textarea, select):focus { background-color: var(--white); border-color: var(--red); }

/* "-side": heading on the left, the form on the right (Divi: row with 2 columns, 2/5 + 3/5) */
html:is([data-ct-form-look="raised-side"], [data-ct-form-look="lined-side"]) .ct-box { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 72px; align-items: start; }
html:is([data-ct-form-look="raised-side"], [data-ct-form-look="lined-side"]) .ct-box__head { margin: 0; padding-top: 8px; text-align: left; position: sticky; top: 120px; }
html:is([data-ct-form-look="raised-side"], [data-ct-form-look="lined-side"]) .ct-box__head .eyebrow { justify-content: flex-start; }
html:is([data-ct-form-look="raised-side"], [data-ct-form-look="lined-side"]) .ct-todo { max-width: none; }
html[data-ct-form-look="lined-side"] .ct-form__bottom { justify-content: flex-start; }

/* ---------- Topic field (page option "ct-topic": chips or select) ----------
   "chips": Divi's Radio Buttons field; the round dots are hidden and each label becomes a pill.
   On the real site the rules target .et_pb_contact_field_radio input + label. */
.ct-topic { display: none; }
html[data-ct-topic="chips"] .ct-topic--chips, html[data-ct-topic="select"] .ct-topic--select { display: grid; }
.ct-topic--chips { margin: 0; padding: 0; border: 0; min-width: 0; }
.ct-topic--chips legend { padding: 0; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
html[data-ct-form-look^="lined"] .ct-topic--chips legend { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ct-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ct-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ct-chips label { padding: 9px 18px; border: 1.5px solid #B9BFC8; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink); background: transparent; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s; }
.ct-chips label:hover { border-color: var(--ink); }
html .ct-form .ct-chips label { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
html .ct-form .ct-chips input:checked + label { border-color: var(--red); background: var(--red); color: #fff; }
.ct-chips input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 2px; }
/* ---------- Topic dropdown (page option "ct-select-look": menu, slim or circle) ----------
   Our own arrow (a small SVG drawn in the CSS) replaces the browser's. "Choose a topic" shows in gray until a topic is picked.
   On the real site the rules target .et_pb_contact_select. */
html[data-ct-topic="select"] .ct-form select {
  padding-right: 36px; background-repeat: no-repeat; background-size: 13px 8px; background-position: right 4px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 8'%3E%3Cpath d='M1 1.2l5.5 5.4 5.5-5.4' fill='none' stroke='%23BA0C2F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-ct-topic="select"] .ct-form select:has(option[value=""]:checked) { color: var(--muted); }
html[data-ct-topic="select"] .ct-form select option { color: var(--ink); }
html[data-ct-select-look="circle"] .ct-form select {
  padding-right: 48px; background-size: 30px 30px; background-position: right 0 center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='15' fill='%23FBECEF'/%3E%3Cpath d='M10 13l5 5 5-5' fill='none' stroke='%23BA0C2F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
html[data-ct-select-look="circle"] .ct-form select:hover { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Ccircle cx='15' cy='15' r='15' fill='%23BA0C2F'/%3E%3Cpath d='M10 13l5 5 5-5' fill='none' stroke='%23FFFFFF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* "menu": the open list styled to match the form (Chrome and Edge only; other browsers keep their normal list) */
@supports (appearance: base-select) {
  html[data-ct-select-look="menu"] .ct-form select { appearance: base-select; }
  html[data-ct-select-look="menu"] .ct-form select::picker-icon { display: none; }
  html[data-ct-select-look="menu"] .ct-form select::picker(select) {
    appearance: base-select; margin-top: 6px; padding: 6px 0; background: var(--white); border: 0; border-top: 2px solid var(--ink);
    border-radius: 0 0 4px 4px; box-shadow: 0 14px 32px rgba(27, 30, 35, .14);
    position-try-order: normal; /* open below like the normal list; only flip up when there isn't room below */
  }
  html[data-ct-select-look="menu"] .ct-form select option { padding: 11px 18px; font: 400 16px/1.4 var(--font-body); color: var(--ink); }
  html[data-ct-select-look="menu"] .ct-form select option[value=""] { display: none; }
  html[data-ct-select-look="menu"] .ct-form select option:is(:hover, :focus-visible) { background: var(--red-tint); color: var(--red); outline: none; }
  html[data-ct-select-look="menu"] .ct-form select option:checked { font-weight: 600; color: var(--red); background: transparent; }
  html[data-ct-select-look="menu"] .ct-form select option::checkmark { display: none; }
}

@media (max-width: 980px) {
  html:is([data-ct-form-look="raised-side"], [data-ct-form-look="lined-side"]) .ct-box { grid-template-columns: 1fr; gap: 28px; max-width: 760px; }
  html:is([data-ct-form-look="raised-side"], [data-ct-form-look="lined-side"]) .ct-box__head { position: static; }
  .ct-index { column-gap: 32px; }
  html[data-ct-guide-look="tiles"] .ct-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  html[data-ct-guide-look="arrows"] .ct-index a { padding-right: 40px; }
  .ct-index b { font-size: 19px; }
  html[data-ct-form-look^="raised"] .ct-form { padding: 28px 20px; gap: 20px; }
  .ct-index, html[data-ct-guide-look="tiles"] .ct-index { grid-template-columns: 1fr; }
  .ct-index a { padding: 18px 0; }
  html[data-ct-guide-look="tiles"] .ct-index { gap: 12px; }
  html[data-ct-guide-look="tiles"] .ct-index a { padding: 20px 22px; }
  .ct-field-row { grid-template-columns: 1fr; gap: 20px; }
  .ct-form__bottom, html:is([data-ct-form-look="lined"], [data-ct-form-look="lined-side"]) .ct-form__bottom { justify-content: stretch; }
  .ct-submit { width: 100%; justify-content: center; }
}
