/* ══════════════════════════════════════════
   Contact Page
══════════════════════════════════════════ */

/*
 * .section-contact-main — Outermost wrapper for the Contact page body content.
 * White background keeps the form area clean and distinct from the site header.
 * Generous vertical padding (64px top, 80px bottom) creates breathing room
 * around the two-column layout inside.
 */
.section-contact-main {
    padding: 64px 24px 80px;
    background: #ffffff;
}

/*
 * .ct-container — Centred inner wrapper that constrains the page content width.
 * The 1100px max-width prevents the layout from stretching too wide on large
 * screens, while auto side margins keep it horizontally centred.
 */
.ct-container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Two-column layout ── */

/*
 * .ct-layout — CSS Grid container that splits the page into two columns:
 * a flexible left column for the heading and form, and a fixed 420px right
 * column for the contact info panel. A 64px gap gives the columns space to
 * breathe, and align-items: start stops the shorter column from stretching
 * to match the taller one.
 */
.ct-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 64px;
    align-items: start;
}

/* ══════════════════════════════════════════
   Left — Heading + Form
══════════════════════════════════════════ */

/*
 * .ct-heading — Primary page heading displayed above the contact form.
 * The large weight (800) and brand blue (#1C48AA) make it the focal point
 * of the left column. A tight line-height (1.15) keeps multi-line headings
 * compact without awkward gaps.
 */
.ct-heading {
    font-size: 2.75rem;
    font-weight: 800;
    color: #1C48AA;
    line-height: 1.15;
    margin: 0 0 16px;
}

/*
 * .ct-subtext — Short descriptive paragraph beneath the main heading.
 * The muted grey colour and relaxed line-height (1.7) signal secondary
 * information. max-width: 480px prevents the text from running too wide
 * and becoming hard to scan.
 */
.ct-subtext {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 480px;
}

/* ── Success / error banners ── */

/*
 * .ct-success, .ct-error — Shared base styles for form submission feedback banners.
 * Flex layout with a gap lets an SVG icon sit inline with the message text.
 * Rounded corners and generous padding (16px 20px) give the banners a
 * card-like prominence without dominating the form.
 */
.ct-success,
.ct-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

/*
 * .ct-success — Success state banner shown after a form submits correctly.
 * A soft green background (#ecfdf5) with a matching border and dark-green
 * text creates an immediately recognisable "all good" visual signal.
 */
.ct-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

/*
 * .ct-success svg — Icon inside the success banner.
 * Stroked in mid-green (#059669) to complement the banner's palette.
 * flex-shrink: 0 prevents the icon from collapsing when text is long,
 * and a 1px top margin aligns it optically with the first line of text.
 */
.ct-success svg {
    stroke: #059669;
    flex-shrink: 0;
    margin-top: 1px;
}

/*
 * .ct-error — Error state banner shown when form submission fails.
 * A light red background with matching border and deep-red text mirrors
 * the success banner's pattern while communicating urgency.
 */
.ct-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/*
 * .ct-error a — Inline links within the error banner (e.g. "try again" links).
 * Inherits the banner's dark-red colour so links blend into the message,
 * with added bold weight to make them recognisable as interactive.
 */
.ct-error a {
    color: #991b1b;
    font-weight: 600;
}

/* ── Form fields ── */

/*
 * .ct-field — Wrapper for a single form field (label + input or textarea).
 * Column flex layout stacks the label directly above its input with a 5px
 * gap. The 16px bottom margin keeps successive fields comfortably spaced.
 */
.ct-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

/*
 * .ct-field label — Label text displayed above each form input.
 * Small size (0.8rem) and medium weight keep labels compact and secondary
 * to the input values below, while the dark grey ensures they remain legible.
 */
.ct-field label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
}

/*
 * .ct-req — Required-field asterisk marker appended to a label's text.
 * Red colour draws attention to mandatory fields without additional copy.
 */
.ct-req {
    color: #dc2626;
}

/*
 * .ct-field input, .ct-field textarea — Text entry controls inside a field wrapper.
 * Full-width with border-box sizing so padding never causes overflow.
 * The subtle border and rounded corners follow a clean, modern input style.
 * A smooth transition on border-color and box-shadow provides tactile
 * feedback as the user interacts with each field.
 */
.ct-field input,
.ct-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #111827;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/*
 * .ct-field input::placeholder, .ct-field textarea::placeholder — Placeholder
 * text shown before the user types. The muted grey (#9ca3af) is visually
 * distinct from entered text, preventing confusion about whether a field
 * has been filled.
 */
.ct-field input::placeholder,
.ct-field textarea::placeholder {
    color: #9ca3af;
}

/*
 * .ct-field input:focus, .ct-field textarea:focus — Active/focused state for
 * text inputs and textareas. The blue border and soft blue glow ring clearly
 * indicate which field is currently active while reinforcing the brand colour.
 * outline: none removes the default browser focus ring in favour of the
 * custom box-shadow treatment.
 */
.ct-field input:focus,
.ct-field textarea:focus {
    outline: none;
    border-color: #1C48AA;
    box-shadow: 0 0 0 3px rgba(0, 70, 190, 0.1);
}

/*
 * .ct-field--invalid input, .ct-field--invalid textarea — Validation error state
 * applied to the field wrapper when a required field is empty or has invalid
 * input. Swapping the border to red gives immediate visual feedback without
 * requiring the user to look for an error message.
 */
.ct-field--invalid input,
.ct-field--invalid textarea {
    border-color: #dc2626;
}

/*
 * .ct-field textarea — Overrides for the multi-line message textarea.
 * resize: vertical lets users make the box taller if they want to write
 * more, but prevents horizontal resizing which could break the layout.
 * min-height: 160px provides a comfortable starting writing surface.
 */
.ct-field textarea {
    resize: vertical;
    min-height: 160px;
}

/*
 * .ct-field-error — Inline error message displayed beneath an invalid input.
 * The small font size and red colour echo the invalid-border treatment.
 * min-height: 1em reserves space so that the layout does not shift when an
 * error message appears or disappears.
 */
.ct-field-error {
    font-size: 0.78rem;
    color: #dc2626;
    min-height: 1em;
}

/* ── Email + Phone row ── */

/*
 * .ct-field-row — Two-column grid that places the email and phone fields
 * side-by-side. A 12px gap keeps them close together to signal they belong
 * to the same logical group, and the 16px bottom margin aligns with the
 * single-column fields above and below.
 */
.ct-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

/*
 * .ct-field-row .ct-field — Removes the default bottom margin from fields
 * inside the side-by-side row. The row's own margin-bottom handles spacing,
 * preventing double gaps between this row and the next element.
 */
.ct-field-row .ct-field {
    margin-bottom: 0;
}

/* ── Consent ── */

/*
 * .ct-consent — Container for the marketing consent checkbox row.
 * Bottom margin creates separation between the consent area and the
 * submit button below it.
 */
.ct-consent {
    margin-bottom: 24px;
}

/*
 * .ct-consent-label — Flex row containing the checkbox and its accompanying
 * consent text. align-items: flex-start ensures the checkbox aligns with the
 * first line of multi-line consent copy rather than stretching to the middle.
 * cursor: pointer extends the clickable feel to the entire label element.
 */
.ct-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
    cursor: pointer;
}

/*
 * .ct-consent-label input[type="checkbox"] — The checkbox inside the consent row.
 * accent-color applies the brand blue to the checked state.
 * flex-shrink: 0 and a fixed 16x16px size prevent the checkbox from being
 * squished by long label text. A 2px top margin nudges it into optical
 * alignment with the first line of consent copy.
 */
.ct-consent-label input[type="checkbox"] {
    accent-color: #1C48AA;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

/* ── Submit ── */

/*
 * .ct-submit-btn — Primary form submission button.
 * Solid brand blue fill with white text makes it the most prominent
 * interactive element on the form. A smooth background and lift transition
 * on hover gives clear interactive feedback.
 */
.ct-submit-btn {
    display: inline-block;
    padding: 13px 36px;
    background: #1C48AA;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

/*
 * .ct-submit-btn:hover — Hover state for the submit button.
 * Darkens the background to a deeper blue and lifts the button 1px
 * to reinforce that it is interactive and about to be activated.
 */
.ct-submit-btn:hover {
    background: #1C48AA;
    transform: translateY(-1px);
}

/* ── Honeypot ── */

/*
 * .ct-pot-wrap — Invisible honeypot field used for spam prevention.
 * Positioned far off-screen (left: -9999px) with near-zero dimensions so
 * real users never see or interact with it, but basic bots that fill every
 * visible field will populate it, flagging the submission as spam.
 */
.ct-pot-wrap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ══════════════════════════════════════════
   Right — Contact Info Panel
══════════════════════════════════════════ */

/*
 * .ct-info-side — Flex column that stacks the individual contact-info cards
 * in the right panel. A 12px gap between cards keeps them visually grouped
 * without merging into one block.
 */
.ct-info-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/*
 * .ct-info-card — Individual contact detail card (phone, email, store, etc.).
 * A light border and rounded corners define each card as a discrete unit.
 * The flex row with align-items: flex-start lines up the icon and text body
 * so the icon anchors to the top of multi-line content.
 */
.ct-info-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #ffffff;
}

/*
 * .ct-info-card--store — Variant of the info card used for the store locator entry.
 * A tinted blue background and slightly deeper border distinguish this card
 * from the plain white utility cards, drawing attention to the physical
 * store as a featured contact option.
 */
.ct-info-card--store {
    background: #f0f4fd;
    border-color: #c7d8f5;
}

/*
 * .ct-info-icon — Square icon container displayed to the left of card content.
 * Fixed 36x36px size with soft rounded corners creates a consistent "chip"
 * shape. Light blue background with centred flex content frames the SVG
 * icon neatly. flex-shrink: 0 ensures it never compresses on narrow viewports.
 */
.ct-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #edf2fb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/*
 * .ct-info-icon svg — SVG icon rendered inside the icon chip.
 * Stroked in brand blue so every card icon shares the same visual language.
 */
.ct-info-icon svg {
    stroke: #1C48AA;
}

/*
 * .ct-info-card--store .ct-info-icon — Icon chip variant for the store card.
 * A slightly deeper blue tint on the chip background reinforces the card's
 * highlighted treatment compared to the standard white cards.
 */
.ct-info-card--store .ct-info-icon {
    background: #dce8fb;
}

/*
 * .ct-info-body — Flex column that stacks the title, primary link, and helper
 * text within a card. A 3px gap keeps these elements tightly grouped so they
 * read as a single piece of contact information.
 */
.ct-info-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/*
 * .ct-info-title — Label text at the top of each contact card (e.g. "Phone", "Email").
 * Bold weight and near-black colour make it the clearest text in the card,
 * acting as a short heading for the contact detail below.
 */
.ct-info-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    display: block;
}

/*
 * .ct-info-primary — The main contact value within a card, typically a linked
 * phone number or email address. Brand blue and no underline by default
 * signal interactivity while keeping the card visually clean.
 */
.ct-info-primary {
    font-size: 0.875rem;
    color: #1C48AA;
    text-decoration: none;
    line-height: 1.5;
}

/*
 * .ct-info-primary:hover — Hover state for contact value links.
 * Adding an underline on hover confirms to the user that the text is
 * a clickable link and not just styled text.
 */
.ct-info-primary:hover {
    text-decoration: underline;
}

/*
 * .ct-info-helper — Secondary descriptive text beneath the primary contact value
 * (e.g. business hours or a short instruction). Smaller size and grey colour
 * mark it as supplementary information that supports but does not compete
 * with the primary contact detail.
 */
.ct-info-helper {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.5;
}

/*
 * .ct-store-btn — "Find a Store" call-to-action button inside the store card.
 * Solid brand blue with white text mirrors the main submit button style.
 * align-self: flex-start prevents the button from stretching full-width
 * inside the flex column, keeping it sized to its content.
 */
.ct-store-btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: 10px;
    padding: 10px 22px;
    background: #1C48AA;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s ease;
    width: auto;
}

/*
 * .ct-store-btn:hover — Hover state for the store button.
 * Darkens the background to the same deeper blue used on the submit button,
 * providing consistent hover feedback across all primary CTAs on the page.
 */
.ct-store-btn:hover {
    background: #1C48AA;
}

/* ══════════════════════════════════════════
   Responsive
══════════════════════════════════════════ */

/*
 * @media (max-width: 900px) — Tablet and narrow desktop breakpoint.
 * Collapses the two-column grid to a single column so the form and info
 * panel stack vertically. The heading is also reduced slightly to fit the
 * narrower viewport without feeling oversized.
 */
@media (max-width: 900px) {
    .ct-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ct-heading {
        font-size: 2.1rem;
    }
}

/*
 * @media (max-width: 768px) — Standard mobile breakpoint.
 * Reduces the section's vertical padding to reclaim screen real estate on
 * smaller devices. The heading shrinks further and the subtext max-width
 * is removed so it uses the full available column width.
 */
@media (max-width: 768px) {
    .section-contact-main {
        padding: 40px 20px 60px;
    }

    .ct-heading {
        font-size: 1.9rem;
    }

    .ct-subtext {
        max-width: 100%;
    }
}

/*
 * @media (max-width: 600px) — Small phone breakpoint.
 * Adjusts section padding for very small screens. The heading reduces to its
 * smallest size, the side-by-side email/phone row collapses to a single column,
 * and the submit button expands to full width for an easier tap target.
 */
@media (max-width: 600px) {
    .section-contact-main {
        padding: 48px 20px 64px;
    }

    .ct-heading {
        font-size: 1.8rem;
    }

    .ct-field-row {
        grid-template-columns: 1fr;
    }

    .ct-submit-btn {
        width: 100%;
        text-align: center;
    }
}
