/* ==========================================================================
   Utility pages: Contact + Register redesign (2026-07-31)
   Brand: navy #0D2240 · gold #C8952B
   ========================================================================== */

/* Hide YOOtheme sidebar on register (guest User Menu is noise) */
body.cll-register-page #tm-sidebar,
body:has(.cll-register-layout) #tm-sidebar {
    display: none !important;
}
body.cll-register-page .uk-grid > .uk-width-expand\@m,
body:has(.cll-register-layout) .uk-grid > .uk-width-expand\@m {
    width: 100% !important;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    flex: none !important;
}

/* Contact: full-width content column when nested in default grids */
body.cll-contact-page .uk-grid > .uk-width-expand\@m,
body:has(.cll-contact-layout) main .uk-container > .uk-grid > .uk-width-expand\@m {
    width: 100% !important;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

/* Shared hero */
.cll-util-hero {
    background: linear-gradient(135deg, #0D2240 0%, #132a4a 55%, #1a3558 100%);
    color: #fff;
    border-radius: 14px;
    padding: 28px 28px 30px;
    margin: 0 0 28px;
    position: relative;
    overflow: hidden;
}
.cll-util-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(200, 149, 43, 0.12);
    pointer-events: none;
}
.cll-util-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 40rem;
}
.cll-util-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(200, 149, 43, 0.95);
}
.cll-util-title {
    margin: 0 0 10px !important;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff !important;
}
.cll-util-lead {
    margin: 0 0 14px;
    font-size: 15.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}
.cll-util-badge {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    color: #0D2240;
    background: #C8952B;
    border-radius: 999px;
    padding: 5px 12px;
    line-height: 1.3;
}
.cll-util-hero-meta {
    margin: 12px 0 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}
.cll-util-hero-link {
    color: #C8952B !important;
    font-weight: 700;
    text-decoration: none;
}
.cll-util-hero-link:hover {
    color: #e0b24a !important;
    text-decoration: underline;
}

/* Cards */
.cll-util-card {
    background: #fff;
    border: 1px solid #E5E9EF;
    border-radius: 12px;
    padding: 24px 22px 22px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(13, 34, 64, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cll-util-card:hover {
    border-color: rgba(200, 149, 43, 0.35);
    box-shadow: 0 6px 20px rgba(13, 34, 64, 0.06);
}
.cll-util-card-title {
    margin: 0 0 10px !important;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0D2240 !important;
    line-height: 1.3;
}
.cll-util-card-title--light {
    color: #fff !important;
}
.cll-util-card-desc {
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.6;
    color: #3D4A55;
}
.cll-util-card-desc a {
    color: #C8952B;
    font-weight: 600;
}

/* Buttons */
.cll-util-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.cll-util-btn--gold,
.cll-util-btn.cll-util-btn--gold,
button.cll-util-btn--gold {
    background: #C8952B !important;
    color: #0D2240 !important;
    border: none !important;
}
.cll-util-btn--gold:hover,
button.cll-util-btn--gold:hover {
    background: #b8860b !important;
    color: #0D2240 !important;
}
.cll-util-btn--block {
    width: 100%;
}
.cll-util-btn--outline-light {
    background: transparent !important;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
}
.cll-util-btn--outline-light:hover {
    border-color: #C8952B !important;
    color: #C8952B !important;
}

/* Forms */
.cll-util-form .control-group,
.cll-util-form .form-group {
    margin-bottom: 1rem;
}
.cll-util-form label,
.cll-util-form .control-label label {
    font-size: 13.5px;
    font-weight: 600;
    color: #0D2240;
    margin-bottom: 6px;
}
.cll-util-form .form-control,
.cll-util-form .form-select,
.cll-util-form input[type="text"],
.cll-util-form input[type="email"],
.cll-util-form input[type="password"],
.cll-util-form select,
.cll-util-form textarea {
    border: 1px solid #D5DCE5 !important;
    border-radius: 8px !important;
    min-height: 44px;
    padding: 10px 12px !important;
    font-size: 15px;
    color: #0D2240;
    background: #fff;
    width: 100%;
    max-width: 100%;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cll-util-form textarea {
    min-height: 140px;
    resize: vertical;
}
.cll-util-form .form-control:focus,
.cll-util-form .form-select:focus,
.cll-util-form input:focus,
.cll-util-form select:focus,
.cll-util-form textarea:focus {
    border-color: #C8952B !important;
    box-shadow: 0 0 0 3px rgba(200, 149, 43, 0.2) !important;
    outline: none;
}
.cll-util-form .star,
.cll-util-form .required .star,
.cll-req {
    color: #C8952B;
}
.cll-util-form fieldset,
.cll-util-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
.cll-util-form legend {
    display: none;
}
.cll-util-form .form-text,
.cll-util-form .form-text.cll-contact-topic-hint {
    font-size: 13px !important;
    color: #5A6570 !important;
    margin-top: 6px !important;
}
.cll-util-form .form-text a,
.cll-contact-topic-hint a {
    color: #C8952B;
    font-weight: 600;
}
.cll-util-submit {
    margin-top: 8px;
}
.cll-util-form .controls {
    margin: 0;
}
/* Stack form-horizontal to vertical on utility pages */
.cll-contact-layout .form-horizontal .control-label,
.cll-register-layout .form-horizontal .control-label,
.cll-contact-layout .form-horizontal .controls,
.cll-register-layout .form-horizontal .controls {
    float: none;
    width: 100%;
    text-align: left;
    display: block;
    padding: 0;
    margin: 0;
}
.cll-contact-layout .form-horizontal .control-group::after,
.cll-register-layout .form-horizontal .control-group::after {
    display: none;
}

/* Name + email side-by-side when structure allows (contact) */
@media (min-width: 640px) {
    .cll-contact-form fieldset.cll-util-fieldset {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 14px;
    }
    .cll-contact-form fieldset.cll-util-fieldset > .control-group:nth-child(n+3),
    .cll-contact-form fieldset.cll-util-fieldset > div:nth-child(n+3) {
        grid-column: 1 / -1;
    }
}

/* ---------- Contact grid ---------- */
.cll-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
}
@media (min-width: 960px) {
    .cll-contact-grid {
        grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
        gap: 24px;
    }
    .cll-contact-aside {
        position: sticky;
        top: 88px;
    }
}
.cll-contact-form-card {
    padding: 28px 24px 24px;
}
.cll-contact-cta-card,
.cll-register-lawyer-card {
    background: linear-gradient(135deg, #0D2240 0%, #1a3558 100%);
    border-color: transparent;
    color: #fff;
}
.cll-contact-cta-card:hover,
.cll-register-lawyer-card:hover {
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(13, 34, 64, 0.18);
}
.cll-contact-cta-text {
    margin: 0 0 16px;
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
}
.cll-contact-position {
    margin: -4px 0 14px;
    font-size: 13px;
    color: #5A6570;
}
.cll-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cll-contact-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-top: 1px solid #EEF1F5;
}
.cll-contact-list li:first-child {
    border-top: 0;
    padding-top: 0;
}
.cll-contact-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(200, 149, 43, 0.12);
    color: #C8952B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cll-contact-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7A8694;
    margin-bottom: 2px;
}
.cll-contact-list a {
    color: #0D2240;
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}
.cll-contact-list a:hover {
    color: #C8952B;
}
.cll-contact-address {
    font-size: 14.5px;
    line-height: 1.5;
    color: #3D4A55;
}
.cll-contact-help {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cll-contact-help li {
    position: relative;
    padding: 7px 0 7px 18px;
    font-size: 14px;
    line-height: 1.45;
    color: #3D4A55;
    border-top: 1px solid #EEF1F5;
}
.cll-contact-help li:first-child {
    border-top: 0;
    padding-top: 0;
}
.cll-contact-help li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-radius: 50%;
    background: #C8952B;
}
.cll-contact-disclaimer {
    margin: 8px 4px 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: #7A8694;
}

/* Hide leftover default contact chrome */
.cll-contact-layout .contact-name,
.cll-contact-layout .com-contact__container,
.cll-contact-layout .com-contact__miscinfo,
.cll-contact-layout h2.contact-name {
    display: none !important;
}

/* ---------- Register grid ---------- */
.cll-register-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 32px;
}
@media (min-width: 960px) {
    .cll-register-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
        gap: 24px;
    }
    .cll-register-aside {
        position: sticky;
        top: 88px;
    }
}
.cll-register-form-card {
    padding: 28px 24px 24px;
    max-width: 560px;
}
@media (min-width: 960px) {
    .cll-register-form-card {
        max-width: none;
    }
}
.cll-register-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cll-register-benefits li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 0;
    border-top: 1px solid #EEF1F5;
    font-size: 14.5px;
    line-height: 1.45;
    color: #3D4A55;
}
.cll-register-benefits li:first-child {
    border-top: 0;
    padding-top: 0;
}
.cll-register-check {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(200, 149, 43, 0.15);
    color: #C8952B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.cll-register-steps-list {
    margin: 0;
    padding: 0 0 0 1.15rem;
    color: #3D4A55;
    font-size: 14.5px;
    line-height: 1.55;
}
.cll-register-steps-list li {
    padding: 4px 0;
}
.cll-register-steps-list strong {
    color: #0D2240;
}
.cll-register-terms {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: #7A8694;
    text-align: center;
}
.cll-register-terms a {
    color: #C8952B;
    font-weight: 600;
}
.cll-register-login-foot {
    margin: 4px 4px 0;
    font-size: 13.5px;
    color: #5A6570;
}
.cll-register-login-foot a {
    color: #C8952B;
    font-weight: 700;
}

/* Password rules block polish */
.cll-register-layout .password-group,
.cll-register-layout #jform_password1-desc,
.cll-register-layout .form-text {
    font-size: 13px;
    color: #5A6570;
}

/* Suppress duplicate page heading when component also prints H1 outside override (rare) */
body.cll-register-page .page-header:not(.cll-util-hero) > h1,
body.cll-contact-page > h1:first-child {
    /* hero owns the title inside override */
}

/* Mobile spacing */
@media (max-width: 639px) {
    .cll-util-hero {
        border-radius: 12px;
        padding: 22px 18px 24px;
        margin-bottom: 18px;
    }
    .cll-util-card {
        padding: 20px 16px 18px;
    }
    .cll-contact-form-card,
    .cll-register-form-card {
        padding: 22px 16px 18px;
    }
    /* Lawyer CTA first on mobile for contact: reverse via order */
    .cll-contact-grid {
        display: flex;
        flex-direction: column;
    }
    .cll-contact-aside .cll-contact-cta-card {
        order: -1;
    }
    .cll-contact-aside {
        display: contents;
    }
    .cll-contact-main {
        order: 0;
    }
    /* with display:contents, children join parent flex — re-order cards */
    .cll-contact-grid > .cll-contact-aside > .cll-contact-cta-card {
        order: -1;
    }
}

/* Captcha breathing room */
.cll-util-form altcha-widget,
.cll-util-form .control-group:has(altcha-widget) {
    margin-top: 4px;
}

/* Register: hide redundant "Required field" spacer legend noise */
.cll-register-layout .com-users-registration__form > fieldset:first-of-type > legend,
.cll-register-layout fieldset legend {
    display: none !important;
}
/* Joomla often renders required note as first control-group with only a label */
.cll-register-layout .control-group:has(> .controls:empty),
.cll-register-layout .control-group:has(.spacer) {
    display: none;
}
