/* ── GHF Front-End Form Styles v1.0.1 ───────────────────────────────────── */

:root {
    --ghf-font-size-base:    14px;
    --ghf-font-size-label:   12px;
    --ghf-font-size-section: 11px;
    --ghf-font-size-btn:     15px;
    --ghf-primary:      #1a6b9a;
    --ghf-primary-dark: #145580;
    --ghf-primary-light:#e8f2f8;
    --ghf-accent:       #e8a020;
    --ghf-success:      #2d8a4e;
    --ghf-danger:       #c0392b;
    --ghf-text:         #1e2d3d;
    --ghf-text-light:   #5d6d7e;
    --ghf-border:       #d0d7de;
    --ghf-border-focus: #1a6b9a;
    --ghf-bg:           #f5f7fa;
    --ghf-white:        #ffffff;
    --ghf-radius:       7px;
    --ghf-radius-sm:    4px;
    --ghf-font:         'Georgia', 'Times New Roman', serif;
    --ghf-font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

.ghf-wrap {
    font-family: var(--ghf-font-sans);
    color: var(--ghf-text);
    max-width: 940px;
    margin: 0 auto;
    padding: 0 16px 70px;
}

/* ── Header ── */
.ghf-header {
    text-align: center;
    padding: 44px 24px 30px;
}
.ghf-header::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--ghf-primary);
    margin: 18px auto 0;
    border-radius: 2px;
}
.ghf-org {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ghf-text-light);
    margin: 0 0 8px;
}
.ghf-title {
    font-family: var(--ghf-font);
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--ghf-primary);
    margin: 0;
    letter-spacing: -.01em;
    line-height: 1.15;
}

/* ── Notices ── */
.ghf-notice {
    border-radius: var(--ghf-radius);
    padding: 14px 18px 14px 46px;
    margin-bottom: 28px;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    line-height: 1.5;
}
.ghf-notice::before { position: absolute; left: 16px; top: 14px; font-size: 18px; }
.ghf-notice--error   { background: #fdf2f2; border: 1px solid #f5c2c7; color: var(--ghf-danger); }
.ghf-notice--error::before { content: '\26A0'; }
.ghf-notice--success { background: #f0faf5; border: 1px solid #a3d9b7; color: var(--ghf-success); }
.ghf-notice--success::before { content: '\2713'; }

/* ── Sections ── */
.ghf-section {
    margin-bottom: 24px;
    background: var(--ghf-white);
    border: 1px solid var(--ghf-border);
    border-radius: var(--ghf-radius);
    padding: 24px 26px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.ghf-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.ghf-section__line {
    flex: 1;
    height: 1px;
    background: var(--ghf-border);
}
.ghf-section__title {
    font-size: var(--ghf-font-size-section);
    font-weight: 700;
    color: var(--ghf-primary);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0;
    white-space: normal;       /* allow wrapping */
    text-align: center;
    line-height: 1.4;
    max-width: 70%;            /* keeps lines from touching the decorative lines */
}

/* ── Fields grid ── */
.ghf-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 18px;
}
.ghf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.ghf-field--full    { width: 100%; }
.ghf-field--half    { width: calc(50% - 9px); }
.ghf-field--third   { width: calc(33.333% - 12px); }
.ghf-field--quarter { width: calc(25% - 14px); }

@media (max-width: 700px) {
    .ghf-field--half,
    .ghf-field--third,
    .ghf-field--quarter { width: 100%; }
}
@media (min-width: 481px) and (max-width: 700px) {
    .ghf-field--third { width: calc(50% - 9px); }
}

/* ── Labels ── */
.ghf-label {
    font-size: var(--ghf-font-size-label);
    font-weight: 600;
    color: var(--ghf-text-light);
    line-height: 1.35;
    letter-spacing: .01em;
}
.ghf-required { color: var(--ghf-danger); margin-left: 2px; }

/* ── Text inputs ── */
.ghf-input,
.ghf-textarea,
.ghf-select {
    width: 100%;
    padding: 10px 12px;
    font-size: var(--ghf-font-size-base);
    font-family: var(--ghf-font-sans);
    color: var(--ghf-text);
    background: var(--ghf-white);
    border: 1.5px solid var(--ghf-border);
    border-radius: var(--ghf-radius-sm);
    transition: border-color .18s, box-shadow .18s;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    line-height: 1.4;
}
.ghf-input:hover, .ghf-textarea:hover, .ghf-select:hover { border-color: #a8b5c0; }
.ghf-input:focus, .ghf-textarea:focus, .ghf-select:focus {
    border-color: var(--ghf-border-focus);
    box-shadow: 0 0 0 3px rgba(26,107,154,.12);
}
.ghf-input::placeholder, .ghf-textarea::placeholder { color: #b0bec5; }
.ghf-textarea { resize: vertical; min-height: 88px; }
.ghf-select {
    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 d='M1 1l5 5 5-5' stroke='%235d6d7e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}

/* ── Radio Y/N — inline pill toggle ── */
.ghf-fieldset { border: none; padding: 0; margin: 0; }

.ghf-fieldset legend.ghf-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ghf-text);
    line-height: 1.45;
}

.ghf-radio-group {
    display: inline-flex;
    border: 1.5px solid var(--ghf-border);
    border-radius: 50px;
    overflow: hidden;
    background: var(--ghf-white);
}

.ghf-radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.ghf-radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ghf-radio-label span {
    display: inline-block;
    padding: 8px 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ghf-text-light);
    transition: background .15s, color .15s;
    white-space: nowrap;
    min-width: 56px;
    text-align: center;
}

.ghf-radio-label:first-child span { border-right: 1.5px solid var(--ghf-border); }

/* Checked: Yes = green, No = red */
.ghf-radio-label:first-child input[type="radio"]:checked ~ span,
.ghf-radio-label:first-child input[type="radio"]:checked + span {
    background: var(--ghf-success);
    color: #fff;
}
.ghf-radio-label:last-child input[type="radio"]:checked ~ span,
.ghf-radio-label:last-child input[type="radio"]:checked + span {
    background: #c0392b;
    color: #fff;
}

.ghf-radio-label:hover span { background: var(--ghf-primary-light); color: var(--ghf-primary); }
.ghf-radio-label input[type="radio"]:focus + span { outline: 2px solid var(--ghf-primary); outline-offset: -2px; }

/* ── Checkbox ── */
.ghf-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    cursor: pointer;
    background: var(--ghf-bg);
    border: 1.5px solid var(--ghf-border);
    border-radius: var(--ghf-radius-sm);
    padding: 12px 14px;
    transition: border-color .18s, background .18s;
}
.ghf-checkbox-label:hover {
    border-color: var(--ghf-primary);
    background: var(--ghf-primary-light);
}
.ghf-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--ghf-primary);
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}
.ghf-checkbox-text { font-size: 13px; line-height: 1.6; color: var(--ghf-text); }

/* ── reCAPTCHA ── */
.ghf-recaptcha-wrap { margin: 20px 0; }

/* ── Submit ── */
.ghf-submit-wrap {
    display: flex;
    justify-content: center;
    margin-top: 36px;
    padding-top: 32px;
    border-top: 1px solid var(--ghf-border);
}
.ghf-btn--submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 52px;
    font-family: var(--ghf-font-sans);
    font-size: var(--ghf-font-size-btn);
    font-weight: 700;
    letter-spacing: .03em;
    color: var(--ghf-white);
    background: var(--ghf-primary);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 18px rgba(26,107,154,.32);
}
.ghf-btn--submit:hover {
    background: var(--ghf-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 7px 24px rgba(26,107,154,.4);
}
.ghf-btn--submit:active { transform: translateY(0); }
.ghf-btn--submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ── Conditional ── */
.ghf-field--hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .ghf-section { padding: 18px 14px 16px; }
    .ghf-header { padding: 30px 16px 22px; }
    .ghf-btn--submit { width: 100%; justify-content: center; padding: 14px 32px; }
}
