/* ============================================================
   SMS PERSONNEL — contact-page.css
   Enqueue from functions.php:
   wp_enqueue_style( 'smsp-contact', $uri.'/assets/contact-page.css', ['smsp-main'], $v );

   Mirrors every ct- class used in page-contact-us.php and
   the prototype sms-layouts.html contact page exactly.
============================================================ */

/* ── HERO ────────────────────────────────────────────────────
   Single whole-image banner. Same pattern as sp-hero / ip-hero.
   Gray placeholder (#b2b2b2) + diagonal texture + gradient overlay.
   Text left-aligned, vertically centred.
─────────────────────────────────────────────────────────────*/
.ct-hero {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    background: #b2b2b2;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.ct-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        135deg,
        rgba(0,0,0,.04) 0px, rgba(0,0,0,.04) 1px,
        transparent 1px, transparent 28px
    );
    pointer-events: none;
}
.ct-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(14,14,14,.88) 30%,
        rgba(14,14,14,.55) 65%,
        rgba(14,14,14,.15) 100%
    );
}
.ct-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 60px;
    width: 100%;
}
.ct-hero-content h1 {
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.12;
    letter-spacing: -.02em;
}
.ct-hero-content p {
    font-size: 16px;
    color: rgba(255,255,255,.65);
    font-style: italic;
    margin: 0;
}

/* ── PAGE BACKGROUND ─────────────────────────────────────────*/
.ct-page-bg {
    background: #eef3f7;
    padding: 48px 60px;
}

/* ── MAIN 2-COL LAYOUT ───────────────────────────────────────
   Left (contact details + map) | Right (form card)
   Max-width 1200px, aligned to page container standard.
─────────────────────────────────────────────────────────────*/
.ct-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ── CONTACT DETAILS ─────────────────────────────────────────*/
.ct-details {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}
.ct-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.ct-detail-item:last-child { border-bottom: none; }

.ct-detail-ico {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}
.ct-detail-ico--loc { background: #388E3C; }

.ct-detail-label {
    font-size: 12px;
    color: #555555;
    margin-bottom: 3px;
    font-weight: 500;
}
.ct-detail-value {
    font-size: 14.5px;
    font-weight: 600;
    color: #111111;
    text-decoration: none;
    display: block;
    line-height: 1.5;
}
a.ct-detail-value:hover { color: #4CAF50; }

/* ── MAP ─────────────────────────────────────────────────────
   Whole gray image placeholder.
   Small "View on Google Maps" badge bottom-right corner.
   Entire block clickable → Google Maps new tab.
─────────────────────────────────────────────────────────────*/
.ct-map-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow .2s, transform .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    position: relative;
}
.ct-map-link:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    transform: translateY(-2px);
}

/* Real map image (when uploaded via Customizer) */
.ct-map-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Gray placeholder — same texture as other image placeholders */
.ct-map-placeholder {
    width: 100%;
    height: 220px;
    background: #c8c8c8;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.ct-map-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        135deg,
        rgba(0,0,0,.03) 0px, rgba(0,0,0,.03) 1px,
        transparent 1px, transparent 20px
    );
}
/* Green pin at centre */
.ct-map-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50% 50% 50% 0;
    transform: translate(-50%, -50%) rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* Small badge — bottom-right corner */
.ct-map-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255,255,255,.92);
    border-radius: 4px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: #111111;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    transition: background .15s;
}
.ct-map-link:hover .ct-map-badge { background: #fff; }
.ct-map-badge i { color: #4CAF50; font-size: 11px; }

/* ── FORM CARD ───────────────────────────────────────────────*/
.ct-form-card {
    background: #fff;
    border-radius: 10px;
    padding: 36px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
.ct-form-title {
    font-size: 22px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 24px;
}

/* ── FORM LAYOUT ─────────────────────────────────────────────*/
.ct-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ct-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.ct-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ct-field--full { grid-column: 1 / -1; }

.ct-field label {
    font-size: 13px;
    font-weight: 500;
    color: #333333;
}
.ct-required {
    color: #e53935;
    margin-left: 2px;
}

/* Input + textarea */
.ct-field input,
.ct-field textarea {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #111111;
    background: #fff;
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    -webkit-appearance: none;
}
.ct-field input::placeholder,
.ct-field textarea::placeholder { color: #aaa; }
.ct-field input:hover,
.ct-field textarea:hover { border-color: #b5c9b5; }
.ct-field input:focus,
.ct-field textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,.12);
}
.ct-field textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

/* Submit button — full width green */
.ct-submit {
    width: 100%;
    height: 46px;
    background: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background .2s, transform .2s;
    letter-spacing: .02em;
}
.ct-submit:hover { background: #388E3C; transform: translateY(-1px); }
.ct-submit:active { transform: none; }

/* reCAPTCHA notice */
.ct-captcha-notice {
    font-size: 12.5px;
    color: #555555;
    line-height: 1.6;
    margin: 0;
}
.ct-captcha-notice a { color: #4CAF50; text-decoration: none; }
.ct-captcha-notice a:hover { text-decoration: underline; }

/* Success message */
.ct-form-success {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 20px;
}
.ct-form-success i { font-size: 22px; color: #4CAF50; flex-shrink: 0; margin-top: 1px; }
.ct-form-success p { font-size: 14.5px; color: #2e7d32; font-weight: 500; margin: 0; }

/* Error messages */
.ct-form-errors {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 14px 18px;
}
.ct-form-errors p { font-size: 13.5px; color: #c62828; margin: 4px 0; }
.ct-form-errors p:first-child { margin-top: 0; }
.ct-form-errors p:last-child  { margin-bottom: 0; }
.ct-form-errors i { margin-right: 5px; }

/* ── TABLET ≤ 1024px ─────────────────────────────────────────*/
@media (max-width: 1024px) {
    .ct-hero-content      { padding: 0 28px; }
    .ct-page-bg           { padding: 32px 28px; }
    .ct-layout            { gap: 24px; }
    .ct-form-card         { padding: 28px; }
    .ct-map-placeholder   { height: 200px; }
}

/* ── MOBILE ≤ 768px ──────────────────────────────────────────*/
@media (max-width: 768px) {
    /* Hero */
    .ct-hero              { min-height: 220px; }
    .ct-hero-content      { padding: 0 16px; max-width: 100%; }
    .ct-hero-content h1   { font-size: clamp(24px, 7vw, 32px); }
    .ct-hero-content p    { font-size: 14px; }

    /* Layout — single column */
    .ct-page-bg           { padding: 24px 16px; }
    .ct-layout            { grid-template-columns: 1fr; gap: 24px; }

    /* Form rows collapse to single column */
    .ct-form-row          { grid-template-columns: 1fr; gap: 14px; }

    .ct-form-card         { padding: 22px; }
    .ct-form-title        { font-size: 20px; margin-bottom: 18px; }
    .ct-map-placeholder   { height: 170px; }
}

/* ── SMALL MOBILE ≤ 480px ────────────────────────────────────*/
@media (max-width: 480px) {
    .ct-hero-content      { padding: 0 14px; }
    .ct-page-bg           { padding: 16px 14px; }
    .ct-form-card         { padding: 18px; }
    .ct-form-title        { font-size: 18px; }
    .ct-map-placeholder   { height: 150px; }
}

/* ── WPFORMS OVERRIDES ───────────────────────────────────────
   Normalise WPForms Lite output to match site design tokens.
   All rules scoped to .ct-wpforms-wrap to avoid bleed.
─────────────────────────────────────────────────────────────*/
.ct-wpforms-wrap .wpforms-form .wpforms-field-label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #333333 !important;
    margin-bottom: 6px !important;
}
.ct-wpforms-wrap .wpforms-form input[type="text"],
.ct-wpforms-wrap .wpforms-form input[type="email"],
.ct-wpforms-wrap .wpforms-form input[type="tel"],
.ct-wpforms-wrap .wpforms-form textarea {
    border: 1px solid #e0e0e0 !important;
    border-radius: 6px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    color: #111111 !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color .2s, box-shadow .2s !important;
    width: 100% !important;
}
.ct-wpforms-wrap .wpforms-form input:focus,
.ct-wpforms-wrap .wpforms-form textarea:focus {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,.12) !important;
    outline: none !important;
}
.ct-wpforms-wrap .wpforms-form textarea {
    min-height: 130px !important;
    resize: vertical !important;
    line-height: 1.6 !important;
}

/* Checkbox group */
.ct-wpforms-wrap .wpforms-form .wpforms-field-checkbox label {
    font-size: 13.5px !important;
    color: #333 !important;
    font-weight: 400 !important;
}

/* Submit button */
.ct-wpforms-wrap .wpforms-form .wpforms-submit {
    width: 100% !important;
    height: 46px !important;
    background: #4CAF50 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    cursor: pointer !important;
    transition: background .2s, transform .2s !important;
    letter-spacing: .02em !important;
}
.ct-wpforms-wrap .wpforms-form .wpforms-submit:hover {
    background: #388E3C !important;
    transform: translateY(-1px) !important;
}
.ct-wpforms-wrap .wpforms-form .wpforms-submit:active {
    transform: none !important;
}

/* Submit container — remove default WPForms margin */
.ct-wpforms-wrap .wpforms-form .wpforms-submit-container {
    padding: 0 !important;
    text-align: left !important;
}

/* Remove WPForms default outer padding/border */
.ct-wpforms-wrap .wpforms-container {
    padding: 0 !important;
}
.ct-wpforms-wrap .wpforms-form .wpforms-field {
    padding: 0 0 16px !important;
}

/* Confirmation message */
.ct-wpforms-wrap .wpforms-confirmation-container-full {
    background: #e8f5e9 !important;
    border: 1px solid #a5d6a7 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    font-size: 14.5px !important;
    color: #2e7d32 !important;
    font-weight: 500 !important;
}

/* Error messages */
.ct-wpforms-wrap .wpforms-form .wpforms-error-container,
.ct-wpforms-wrap .wpforms-form label.wpforms-error {
    color: #c62828 !important;
    font-size: 12.5px !important;
}
