/* AnySmart Contact Page
   Modern Mobile-First Responsive Design
   ============================================ */

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    background: #ffffff;
    height: 100vh;
    max-height: 100vh;
    padding: 90px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Main Title */
.contact-main-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #666666;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

/* ============================================
   MAIN REGISTRATION SECTION
   ============================================ */
/* The form keeps the full viewport to itself, centred - this is the page's
   primary action and it is deliberately the whole of the first screen. The
   direct contact details are a separate section below it. */
.registration-content {
    background: #ffffff;
    height: 100vh;
    max-height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Add padding to account for fixed header on contact page */
body[data-page="contact"] .registration-content {
    padding-top: 100px !important;
}

.registration-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    text-align: center;
}

/* ============================================
   HEADINGS & TEXT
   ============================================ */
.registration-title {
    font-size: clamp(28px, 6vw, 42px);
    font-weight: 700;
    color: #666666;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    line-height: 1.3;
    word-wrap: break-word;
}

.title-accent {
    color: #03a9f4;
    display: inline-block;
}

.registration-description {
    font-size: clamp(15px, 4vw, 18px);
    color: #666666;
    margin-bottom: 32px;
    line-height: 1.6;
    padding: 0 8px;
}

/* ============================================
   FORM CONTAINER
   ============================================ */
.form-wrapper {
    background: #ffffff;
    border: 2px solid #e9e9e9;
    border-radius: 16px;
    padding: 24px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: formFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FORM STRUCTURE
   ============================================ */
.registration-form {
    text-align: left;
}

.form-group {
    margin-bottom: 24px;
}

/* ============================================
   FORM LABELS
   ============================================ */
.form-group label {
    display: block;
    color: #666666;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.required {
    color: #03a9f4;
    font-weight: 700;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: #ffffff;
    border: 2px solid #e9e9e9;
    border-radius: 10px;
    color: #666666;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.form-group input::placeholder {
    color: #999999;
}

.form-group input:focus {
    outline: none;
    border-color: #03a9f4;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(3, 169, 244, 0.12);
}

.form-group input:hover:not(:focus) {
    border-color: #03a9f4;
    background: #fafafa;
}

/* Field note */
.field-note {
    color: #999999;
    font-size: 13px;
    margin-top: 6px;
    font-style: italic;
    line-height: 1.5;
}

/* hCaptcha */
.hcaptcha-container {
    margin-top: 8px;
}

.hcaptcha-container .h-captcha {
    transform: scale(0.98);
    transform-origin: 0 0;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: #03a9f4;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;    
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.submit-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-btn:active::after {
    width: 300px;
    height: 300px;
}

.submit-btn:hover:not(:disabled) {
    background: #0292d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(3, 169, 244, 0.4);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Loading spinner */
.btn-loader {
    display: inline-block;
    vertical-align: middle;
}

.spinner {
    animation: spinRotate 2s linear infinite;
    width: 18px;
    height: 18px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: spinDash 1.5s ease-in-out infinite;
}

@keyframes spinRotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinDash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ============================================
   MESSAGE BOXES
   ============================================ */
.message {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    animation: messageSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-msg {
    background: #e8e8e8;
    border: 2px solid #03a9f4;
}

.error-msg {
    background: rgba(244, 67, 54, 0.18);
    border: 2px solid rgba(244, 67, 54, 0.5);
}

.message-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    align-self: center;
}

.success-msg .message-icon {
    fill: #03a9f4;
}

.error-msg .message-icon {
    fill: #f44336;
}

.message-content {
    flex: 1;
}

.message-content h3 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 600;
}

.message-content p {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.success-msg .message-content h3 {
    color: #03a9f4;
}

.success-msg .message-content p {
    color: #555555;
}

.message-content a {
    color: #c25b31;
    text-decoration: none;
    font-weight: 600;
    word-break: break-word;
}

.message-content a:hover {
    text-decoration: underline;
    color: #d66a3d;
}

/* ============================================
   TABLET BREAKPOINT (600px+)
   ============================================ */
@media screen and (min-width: 600px) {
    .registration-container {
        max-width: 640px;
    }

    .form-wrapper {
        padding: 32px 28px;
        border-radius: 18px;
    }

    .form-group {
        margin-bottom: 26px;
    }

    .form-group input {
        padding: 15px 18px;
    }

    .submit-btn {
        padding: 17px 28px;
        font-size: 16px;
    }

    .message {
        flex-direction: row;
        gap: 16px;
        padding: 22px;
    }

    .message-icon {
        width: 38px;
        height: 38px;
        align-self: flex-start;
    }

    .message-content h3 {
        font-size: 19px;
    }

    .message-content p {
        font-size: 15px;
    }
}

/* ============================================
   DESKTOP BREAKPOINT (900px+)
   ============================================ */
@media screen and (min-width: 900px) {
    .registration-container {
        max-width: 700px;
    }

    .registration-title {
        margin-bottom: 16px;
    }

    .registration-description {
        margin-bottom: 40px;
    }

    .form-wrapper {
        padding: 40px 36px;
        border-radius: 20px;
    }

    .form-group {
        margin-bottom: 28px;
    }

    .form-group label {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .form-group input {
        padding: 16px 18px;
        font-size: 16px;
    }

    .field-note {
        font-size: 14px;
        margin-top: 8px;
    }

    .submit-btn {
        padding: 18px 32px;
        font-size: 16px;
        letter-spacing: 1.2px;
        margin-top: 16px;
    }

    .message {
        padding: 24px;
        margin-top: 24px;
    }

    .message-icon {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   LARGE DESKTOP (1200px+)
   ============================================ */
@media screen and (min-width: 1200px) {
    .registration-container {
        max-width: 750px;
    }

    .form-wrapper {
        padding: 44px 40px;
    }
}

/* ============================================
   ACCESSIBILITY & UTILITIES
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-group input {
        border-width: 3px;
    }

    .submit-btn {
        border: 2px solid #ffffff;
    }
}

/* Focus visible for keyboard navigation */
.form-group input:focus-visible,
.submit-btn:focus-visible {
    outline: 3px solid #c25b31;
    outline-offset: 2px;
}


/* ===========================================================================
   DIRECT CONTACT DETAILS

   Its own segment, below the form's full-height section. Three columns on a
   desktop, stacked on a phone. The number is the one that looks like a call to
   action rather than a line of text, because it is the fastest route to a
   quote and the thing this page previously did not offer at all.
   =========================================================================== */
/* --light-gray (#e9e9e9) is the site's section band: it is what sits behind
   the six product cards on /services/ and behind the card actions on the home
   page. Using it here rather than a tint of the brand blue keeps this section
   reading as one of the site's own bands. */
.contact-details {
    background: var(--light-gray, #e9e9e9);
    padding: 4rem 1.5rem 4.5rem;
}

.contact-details-container {
    max-width: 1100px;
    margin: 0 auto;
}

.contact-details-title {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    font-weight: 600;
    color: #1f262c;
    text-align: center;
    margin: 0 0 2.5rem;
}

.contact-direct {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.contact-direct li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    background: #ffffff;
    border-radius: 8px;
    /* The resting card shadow from theme.css, so these sit in the band the way
       the service cards sit in theirs, rather than being outlined boxes. */
    box-shadow: 0 1px 2px rgba(20, 28, 36, 0.06), 0 2px 8px rgba(20, 28, 36, 0.06);
    padding: 1.5rem 1.5rem 1.6rem;
}

.contact-direct svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    color: var(--primary-blue, #03a9f4);
    margin-bottom: 0.35rem;
}

.contact-direct-label {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #6b7682;
}

.contact-direct-value {
    color: #1f262c;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.45;
    border-bottom: 1px solid transparent;
}

.contact-direct li:first-child .contact-direct-value {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--primary-blue, #03a9f4);
}

.contact-direct-value:hover,
.contact-direct-value:focus-visible {
    border-bottom-color: currentColor;
}

@media (max-width: 480px) {
    .contact-details {
        padding: 3rem 1.25rem 3.5rem;
    }

    .contact-direct li {
        padding: 1.25rem;
    }

    .contact-direct li:first-child .contact-direct-value {
        font-size: 1.3rem;
    }
}
