/* ============================================================
   S.T Contracts Ltd - Contact Page Stylesheet
   Two-column layout: form (left) + contact cards (right).
   Merges contact-main.css + page-form.css.
   The form (.st-contact-*) classes are preserved and restyled
   so includes/page-form.php and form-scripts.php work unchanged
   (posting + redirect untouched). New layout uses the
   st-contracts-contact-* prefix.
   ============================================================ */

/* ---- Design tokens -------------------------------------- */
:root {
    --st-orange:       #F28823;
    --st-orange-hover: #d8731a;
    --st-orange-deep:  #c4640f;
    --st-orange-soft:  rgba(242,136,35,.10);

    --st-charcoal:   #23282d;

    --st-ink:    #23282d;
    --st-body:   #4a5159;
    --st-muted:  #828a93;
    --st-line:   #e7e9ec;

    --st-surface:     #ffffff;
    --st-surface-alt: #f5f6f8;

    --st-container: 1180px;
    --st-pad:       clamp(1.1rem, 4vw, 1.75rem);
    --st-section-y: clamp(3.5rem, 6vw, 6rem);

    --st-radius-sm: 8px;
    --st-radius:    14px;
    --st-radius-lg: 20px;
    --st-pill:      999px;

    --st-shadow-sm: 0 2px 12px rgba(20,26,32,.06);
    --st-shadow:    0 14px 40px rgba(20,26,32,.10);

    --st-fast: .2s ease;
    --st-ease: .35s cubic-bezier(.2,.7,.3,1);

    --st-fs-h1:   clamp(2rem, 1.4rem + 2.4vw, 2.9rem);
    --st-fs-lead: clamp(1.02rem, .96rem + .35vw, 1.15rem);
}

* { box-sizing: border-box; }

/* ============================================================
   LAYOUT
   ============================================================ */
.st-contracts-contact-wrap {
    background: var(--st-surface-alt);
    padding: var(--st-section-y) 0;
    font-family: 'Mulish', sans-serif;
}
.st-contracts-contact-container { max-width: var(--st-container); margin-inline: auto; padding-inline: var(--st-pad); }

/* ---- Thin hero strip ------------------------------------ */
.st-contracts-contact-hero {
    position: relative;
    background: var(--st-charcoal);
    border-top: 3px solid var(--st-orange);
    padding: clamp(2.25rem, 4vw, 3rem) 0;
    font-family: 'Mulish', sans-serif;
    overflow: hidden;
}
.st-contracts-contact-hero::after {
    content: '';
    position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(ellipse at 100% 0%, rgba(242,136,35,.16) 0%, transparent 55%);
}
.st-contracts-contact-hero .st-contracts-contact-container { position: relative; z-index: 1; }
.st-contracts-contact-hero-eyebrow {
    display: inline-flex; align-items: center; gap: .6rem;
    font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
    color: #fcc78a; margin: 0 0 .6rem;
}
.st-contracts-contact-hero-eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--st-orange); border-radius: 2px; }
.st-contracts-contact-hero-title {
    font-size: clamp(1.7rem, 1.2rem + 1.9vw, 2.4rem);
    font-weight: 800; color: #fff; margin: 0; letter-spacing: -.02em; line-height: 1.1;
}
.st-contracts-contact-hero-sub {
    font-size: var(--st-fs-lead); color: rgba(255,255,255,.74); margin: .65rem 0 0; max-width: 56ch;
}

.st-contracts-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, .9fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

/* ---- Form column header (our own heading) --------------- */
.st-contracts-contact-formhead { margin-bottom: 2rem; }
.st-contracts-contact-formhead h2 {
    font-size: var(--st-fs-h1);
    font-weight: 800;
    color: var(--st-ink);
    letter-spacing: -.02em;
    line-height: 1.1;
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    position: relative;
}
.st-contracts-contact-formhead h2::after {
    content: '';
    position: absolute; left: 0; bottom: 0;
    width: 56px; height: 3px;
    background: var(--st-orange); border-radius: 2px;
}
.st-contracts-contact-formhead p {
    font-size: var(--st-fs-lead);
    line-height: 1.7;
    color: var(--st-body);
    margin: 0;
    max-width: 60ch;
}

/* ============================================================
   CONTACT CARDS (right column)
   ============================================================ */
.st-contracts-contact-aside { display: flex; flex-direction: column; gap: 1.25rem; }
.st-contracts-contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .45rem;
    padding: 2rem 1.5rem;
    background: var(--st-surface);
    border: 1px solid var(--st-line);
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-sm);
    text-decoration: none;
    transition: transform var(--st-ease), box-shadow var(--st-ease), border-color var(--st-ease);
}
a.st-contracts-contact-card:hover { transform: translateY(-4px); box-shadow: var(--st-shadow); border-color: transparent; }
.st-contracts-contact-card-icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: var(--st-radius);
    background: var(--st-orange-soft);
    color: var(--st-orange);
    font-size: 1.35rem;
    margin-bottom: .35rem;
    transition: background var(--st-ease), color var(--st-ease), transform var(--st-ease);
}
a.st-contracts-contact-card:hover .st-contracts-contact-card-icon { background: var(--st-orange); color: #fff; transform: scale(1.05); }
.st-contracts-contact-card-title { font-size: 1.12rem; font-weight: 800; color: var(--st-ink); }
.st-contracts-contact-card-value { font-size: 1rem; font-weight: 700; color: var(--st-ink); word-break: break-word; line-height: 1.4; }
.st-contracts-contact-card-sub { font-size: .85rem; color: var(--st-muted); line-height: 1.5; }

/* ============================================================
   FORM  (page-form.php) - classes preserved, restyled flat/light
   ============================================================ */
.st-contact-section { background: none; padding: 0; position: relative; }
.st-contact-section-inner { max-width: none; margin: 0; position: relative; }

/* Built-in intro + alt-contact pill hidden (we use our own heading
   and the contact cards instead) */
.st-contact-intro { display: none; }
.st-contact-alt { display: none; }

/* Badge style retained for completeness (lives inside the hidden intro) */
.st-contact-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(242,136,35,.15); color: #fff;
    padding: .6rem 1.1rem; border-radius: var(--st-pill);
    font-size: .85rem; font-weight: 700; margin-bottom: 1.1rem;
}
.st-contact-badge i { color: var(--st-orange); }

.st-contact-form-card {
    background: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    position: relative;
    overflow: visible;
}

.st-contact-form { display: flex; flex-direction: column; }
.st-contact-form-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-bottom: 1.25rem; }
.st-contact-field { display: flex; flex-direction: column; gap: .5rem; }
.st-contact-field-full { grid-column: 1 / -1; }
.st-contact-field label { font-size: 14px; font-weight: 800; color: var(--st-ink); }
.st-contact-field input,
.st-contact-field textarea {
    width: 100%;
    padding: 15px 16px;
    background: #fff;
    border: 1px solid #dfe3e7;
    border-radius: var(--st-radius-sm);
    color: var(--st-ink);
    font-size: 16px;
    font-family: 'Mulish', sans-serif;
    transition: border-color var(--st-fast), box-shadow var(--st-fast);
}
.st-contact-field input::placeholder,
.st-contact-field textarea::placeholder { color: #9aa1a9; }
.st-contact-field input:focus,
.st-contact-field textarea:focus {
    outline: none;
    border-color: var(--st-orange);
    box-shadow: 0 0 0 4px rgba(242,136,35,.12);
}
.st-contact-field textarea { resize: none; min-height: 170px; }

/* Validation states */
.st-contact-field input.error,
.st-contact-field textarea.error { border-color: #e53935; background: #fff7f7; }
.st-contact-field input.error:focus,
.st-contact-field textarea.error:focus { border-color: #e53935; box-shadow: 0 0 0 4px rgba(229,57,53,.12); }
.st-contact-field input.success,
.st-contact-field textarea.success { border-color: #43a047; }

/* Error summary */
.st-error-messages {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-radius: var(--st-radius-sm);
    padding: 15px 18px;
    margin-bottom: 1.25rem;
    color: #fff;
}
.st-error-messages ul { margin: 0; padding: 0; list-style: none; }
.st-error-messages li { margin-bottom: 8px; position: relative; padding-left: 22px; font-size: 14px; line-height: 1.5; }
.st-error-messages li::before {
    content: '!'; position: absolute; left: 0; top: 1px;
    width: 15px; height: 15px; background: rgba(255,255,255,.22); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800;
}
.st-error-messages li:last-child { margin-bottom: 0; }

/* Submit (solid orange, sits left like the reference) */
.st-contact-submit {
    align-self: flex-start;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    padding: 16px 36px;
    background: var(--st-orange);
    border: 2px solid var(--st-orange);
    border-radius: var(--st-pill);
    color: #fff;
    font-size: 16px; font-weight: 800; font-family: 'Mulish', sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(242,136,35,.32);
    transition: background var(--st-fast), border-color var(--st-fast), transform var(--st-fast), box-shadow var(--st-fast);
}
.st-contact-submit:hover { background: var(--st-orange-hover); border-color: var(--st-orange-hover); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(242,136,35,.42); }
.st-contact-submit i { transition: transform var(--st-fast); }
.st-contact-submit:hover i { transform: translateX(4px); }
.st-contact-submit:disabled { background: #cbd0d5; border-color: #cbd0d5; cursor: not-allowed; transform: none; box-shadow: none; }
.st-contact-submit:disabled:hover { transform: none; box-shadow: none; }

/* Loading overlay (JS toggles display) */
.st-contact-overlay {
    position: absolute; inset: 0; z-index: 100;
    background: rgba(245,246,248,.97);
    display: none; justify-content: center; align-items: center;
    border-radius: var(--st-radius);
}
.st-contact-overlay-content { text-align: center; }
.st-contact-spinner {
    width: 48px; height: 48px;
    border: 4px solid #e6e8eb; border-top: 4px solid var(--st-orange);
    border-radius: 50%; animation: st-spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes st-spin { to { transform: rotate(360deg); } }
.st-contact-overlay-content p { font-size: 16px; font-weight: 800; color: var(--st-ink); margin: 0; }

/* Kept defined in case page-form.php still renders the pill (hidden above) */
.st-contact-phone {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--st-ink); background: #fff; text-decoration: none;
    font-size: 17px; font-weight: 800;
    padding: 13px 28px; border-radius: var(--st-pill);
    box-shadow: 0 4px 15px rgba(0,0,0,.12);
}
.st-contact-phone i { color: var(--st-orange); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .st-contracts-contact-grid { grid-template-columns: 1fr; }
    .st-contracts-contact-aside {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 1.1rem;
    }
}

@media (max-width: 767px) {
    .st-contact-field textarea { min-height: 150px; }
    .st-contact-submit { align-self: stretch; width: 100%; }
}

@media (max-width: 480px) {
    .st-contracts-contact-aside { grid-template-columns: 1fr; }
}

/* ============================================================
   MAP (full width, below contact block)
   ============================================================ */
.st-contracts-contact-map { display: block; line-height: 0; }
.st-contracts-contact-map iframe {
    width: 100%;
    height: 460px;
    border: 0;
    display: block;
    filter: grayscale(8%);
}
@media (max-width: 767px) {
    .st-contracts-contact-map iframe { height: 360px; }
}
