/* =========================================================
   TEXAS PROCESS SERVERS ACADEMY / CONTACT PAGE
   All selectors are unique to the contact page.
   Existing site.css styles are not overridden.
   ========================================================= */

.tpsa-contact-hero {
    position: relative;
    min-height: 245px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(90deg,rgba(244,250,255,.99) 0%,rgba(232,245,255,.96) 42%,rgba(237,247,255,.72) 62%,rgba(237,247,255,.18) 100%), url("../images/slide3.jpg") right center/cover no-repeat;
    border-bottom: 1px solid #dce9f4;
}

    .tpsa-contact-hero::before {
        content: "";
        position: absolute;
        right: -90px;
        top: -170px;
        width: 480px;
        height: 480px;
        border-radius: 50%;
        background: rgba(7,137,249,.045);
        pointer-events: none;
    }

    .tpsa-contact-hero::after {
        content: "";
        position: absolute;
        right: 170px;
        bottom: -180px;
        width: 360px;
        height: 360px;
        border: 1px solid rgba(7,137,249,.10);
        border-radius: 50%;
        pointer-events: none;
    }

    .tpsa-contact-hero > .container {
        position: relative;
        z-index: 2;
        width: 100%;
        max-width: 1170px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 15px;
        padding-right: 15px;
    }

.tpsa-contact {
    padding: 66px 0 88px;
    background: radial-gradient(circle at 16% 12%, rgba(62, 145, 235, .065), transparent 31%), radial-gradient(circle at 87% 72%, rgba(35, 107, 199, .045), transparent 27%), linear-gradient(180deg, #f1f7fd 0%, #f8fbfe 52%, #ffffff 100%);
}

.tpsa-contact-intro {
    max-width: 760px;
    margin: 0;
    padding: 45px 0;
    text-align: left;
    animation: tpsaContactIntroEnter .68s cubic-bezier(.2, .7, .2, 1) both;
}

.tpsa-contact-eyebrow {
    display: block;
    margin-bottom: 11px;
    color: #355d84;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.tpsa-contact-intro h1 {
    margin: 0 0 12px;
    color: #082e62;
    font-size: 44px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.7px;
}

.tpsa-contact-intro p {
    max-width: 680px;
    margin: 0;
    color: #35536f;
    font-size: 17px;
    line-height: 1.65;
}

.tpsa-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 1fr);
    align-items: stretch;
    gap: 26px;
}

.tpsa-contact-panel,
.tpsa-contact-info {
    min-width: 0;
    border-radius: 22px;
    box-shadow: 0 18px 55px rgba(14, 43, 80, .065);
    backface-visibility: hidden;
}

.tpsa-contact-panel {
    position: relative;
    padding: 36px;
    border: 1px solid #dce9f5;
    background: #fff;
    transition: border-color .38s ease, box-shadow .38s ease;
    animation: tpsaContactPanelEnter .76s cubic-bezier(.2, .7, .2, 1) .10s both;
}

    /* A fine accent along the existing form card, not another hover rule. */
    .tpsa-contact-panel::before {
        content: "";
        position: absolute;
        inset: 0 20px auto;
        height: 3px;
        border-radius: 0 0 6px 6px;
        background: linear-gradient(90deg, #3e8ef5, #58bce9);
        opacity: .85;
        pointer-events: none;
    }

    .tpsa-contact-panel:hover {
        border-color: #bbdaf4;
        box-shadow: 0 22px 65px rgba(14, 43, 80, .10);
    }

.tpsa-contact-panel-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tpsa-contact-icon {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    border-radius: 15px;
    color: #0679e4;
    background: linear-gradient(145deg, #e7f3ff, #d9edff);
    font-size: 24px;
    box-shadow: inset 0 0 0 1px rgba(40, 130, 230, .055);
}

.tpsa-contact-panel-header h2 {
    margin: 0 0 5px;
    color: #183765;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
}

.tpsa-contact-panel-header p {
    margin: 0;
    color: #6d8098;
    font-size: 14px;
}

.tpsa-contact-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 21px 18px;
}

.tpsa-contact-field {
    min-width: 0;
}

.tpsa-contact-field-full {
    grid-column: 1 / -1;
}

.tpsa-contact-field label {
    display: block;
    margin-bottom: 8px;
    color: #294365;
    font-size: 14px;
    font-weight: 700;
    transition: color .25s ease;
}

.tpsa-contact-field:focus-within label {
    color: #0877d6;
}

.tpsa-contact-input,
.tpsa-contact-textarea {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 13px 15px;
    border: 1px solid #d6e2ef;
    border-radius: 11px;
    outline: none;
    color: #183765;
    background: #f9fcff;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    box-shadow: none;
    transition: border-color .28s ease, box-shadow .28s ease, background-color .28s ease;
}

.tpsa-contact-input {
    min-height: 50px;
}

.tpsa-contact-textarea {
    min-height: 152px;
    resize: vertical;
}

    .tpsa-contact-input::placeholder,
    .tpsa-contact-textarea::placeholder {
        color: #93a5b8;
    }

    .tpsa-contact-input:hover:not(:focus),
    .tpsa-contact-textarea:hover:not(:focus) {
        border-color: #b5cde8;
    }

    .tpsa-contact-input:focus,
    .tpsa-contact-textarea:focus {
        border-color: #1884e9;
        background: #fff;
        box-shadow: 0 0 0 4px rgba(24, 132, 233, .11);
    }

.tpsa-contact-validation {
    display: block;
    margin: 0 0 20px;
    padding: 12px 16px;
    border: 1px solid #f5c2c7;
    border-radius: 9px;
    color: #b42318;
    background: #fff3f3;
    font-size: 14px;
}

    .tpsa-contact-validation ul {
        margin: 6px 0 0;
        padding-left: 20px;
    }

.tpsa-contact-form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 25px;
}

.tpsa-contact-submit {
    display: inline-flex;
    min-width: 180px;
    min-height: 52px;
    justify-content: center;
    align-items: center;
    padding: 13px 26px;
    border: 1px solid #147fea;
    border-radius: 11px;
    color: #fff;
    background: #3485f1;
    box-shadow: 0 9px 22px rgba(32, 111, 224, .15);
    appearance: none;
    font: inherit;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    transition: background-color .32s ease, border-color .32s ease, box-shadow .32s ease;
}

    .tpsa-contact-submit:hover,
    .tpsa-contact-submit:focus-visible {
        background: #116bcd;
        border-color: #116bcd;
        box-shadow: 0 12px 26px rgba(32, 111, 224, .24);
    }

    .tpsa-contact-submit:focus-visible {
        outline: 3px solid rgba(40, 132, 245, .25);
        outline-offset: 3px;
    }

.tpsa-contact-privacy {
    margin: 0;
    color: #8394a8;
    font-size: 12px;
    line-height: 1.5;
}

.tpsa-contact-info {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 38px 33px;
    border: 1px solid rgba(85, 142, 213, .14);
    color: #fff;
    background: linear-gradient(152deg, #123e77 0%, #082d60 56%, #092347 100%);
    transition: box-shadow .38s ease, border-color .38s ease;
    animation: tpsaContactPanelEnter .76s cubic-bezier(.2, .7, .2, 1) .21s both;
}

    .tpsa-contact-info:hover {
        border-color: rgba(96, 169, 244, .32);
        box-shadow: 0 24px 65px rgba(14, 43, 80, .14);
    }

    .tpsa-contact-info::before {
        content: "";
        position: absolute;
        top: -110px;
        right: -130px;
        width: 330px;
        height: 330px;
        border: 1px solid rgba(255, 255, 255, .09);
        border-radius: 50%;
        box-shadow: 0 0 0 66px rgba(255, 255, 255, .025), 0 0 0 135px rgba(255, 255, 255, .018);
        pointer-events: none;
    }

.tpsa-contact-info-heading {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 43px;
    color: #c3dcfc;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
    letter-spacing: .55px;
    text-transform: uppercase;
}

.tpsa-contact-info-mark {
    display: grid;
    width: 37px;
    height: 37px;
    flex: 0 0 37px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
    font-size: 17px;
}

.tpsa-contact-info h2 {
    position: relative;
    margin: 0 0 13px;
    color: #fff;
    font-size: 31px;
    font-weight: 800;
    line-height: 1.23;
}

.tpsa-contact-info-lead {
    position: relative;
    margin: 0 0 36px;
    color: #c2d4eb;
    font-size: 15px;
    line-height: 1.75;
}

.tpsa-contact-info-list {
    position: relative;
    display: grid;
    gap: 30px;
}

.tpsa-contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-radius: 12px;
}

.tpsa-contact-info-icon {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    color: #e7f4ff;
    background: rgba(255, 255, 255, .095);
    font-size: 19px;
    transition: background-color .3s ease, border-color .3s ease;
}

.tpsa-contact-info-item:hover .tpsa-contact-info-icon {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .26);
}

.tpsa-contact-info-item h3 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 15px;
    font-weight: 750;
}

.tpsa-contact-info-item address,
.tpsa-contact-info-item a {
    display: block;
    margin: 0;
    color: #c9def4;
    font-size: 14px;
    font-style: normal;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.tpsa-contact-info-item a {
    text-decoration: none;
    text-underline-offset: 4px;
    transition: color .28s ease;
}

    .tpsa-contact-info-item a:hover,
    .tpsa-contact-info-item a:focus-visible {
        color: #fff;
        text-decoration: underline;
    }

.tpsa-contact-info-bottom {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: auto;
    padding: 34px 0 0;
    color: #b3c9e3;
    font-size: 13px;
    line-height: 1.7;
}

    .tpsa-contact-info-bottom i {
        margin-top: 3px;
        color: #76c4ff;
        font-size: 17px;
    }


/* =========================================================
   POST-SUBMISSION CONFIRMATION
   New, page-scoped selectors; existing rules remain untouched.
   ========================================================= */

.tpsa-contact-panel-complete .tpsa-contact-panel-header {
    display: none;
}

.tpsa-contact-success:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 390px;
    padding: 38px 16px 32px;
    text-align: center;
    outline: none;
    animation: tpsaContactSuccessEnter .58s ease-out both;
}

.tpsa-contact-success-icon {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    margin-bottom: 25px;
    border: 2px solid #c5e9d5;
    border-radius: 50%;
    color: #14834e;
    background: radial-gradient(circle, #f7fef9 30%, #e0f6e9 100%);
    box-shadow: 0 10px 34px rgba(20, 131, 78, .11);
    font-size: 36px;
}

.tpsa-contact-success-label {
    display: inline-block;
    margin-bottom: 12px;
    color: #138051;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 1.15px;
    text-transform: uppercase;
}

.tpsa-contact-success h2 {
    margin: 0 0 14px;
    color: #183765;
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 800;
    line-height: 1.25;
}

.tpsa-contact-success p {
    max-width: 480px;
    margin: 0 0 28px;
    color: #5c718b;
    font-size: 15px;
    line-height: 1.85;
}

.tpsa-contact-success-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 46px;
    padding: 11px 20px;
    border: 1px solid #c3d9f2;
    border-radius: 10px;
    color: #1769be;
    background: #f0f7ff;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
    transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

    .tpsa-contact-success-action:hover,
    .tpsa-contact-success-action:focus-visible {
        border-color: #7db4ef;
        background: #e4f1ff;
        box-shadow: 0 6px 18px rgba(35, 105, 180, .09);
    }

    .tpsa-contact-success-action:focus-visible {
        outline: 3px solid rgba(40, 132, 245, .25);
        outline-offset: 3px;
    }

@keyframes tpsaContactSuccessEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tpsa-contact-success:not([hidden]) {
        animation: none;
    }

    .tpsa-contact-success-action {
        transition: none;
    }
}

/* =========================================================
   CONTACT SUBMISSION ERROR / PARTIAL-DELIVERY NOTICE
   These are new component selectors, not overrides of existing rules.
   ========================================================= */

.tpsa-contact-failure:not([hidden]) {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    padding: 18px 19px;
    border: 1px solid #f3c7c7;
    border-left: 4px solid #d94242;
    border-radius: 13px;
    color: #8c3030;
    background: linear-gradient(135deg, #fff6f6 0%, #fffafa 100%);
    outline: none;
    animation: tpsaContactFeedbackEnter .38s ease-out both;
}

.tpsa-contact-failure-partial:not([hidden]) {
    border-color: #f2ddaa;
    border-left-color: #d49a25;
    color: #82591a;
    background: linear-gradient(135deg, #fffbef 0%, #fffdf8 100%);
}

.tpsa-contact-failure-icon {
    display: grid;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 11px;
    background: rgba(217, 66, 66, .10);
    font-size: 21px;
}

.tpsa-contact-failure-partial .tpsa-contact-failure-icon {
    background: rgba(212, 154, 37, .13);
}

.tpsa-contact-failure-content {
    min-width: 0;
}

.tpsa-contact-failure-label {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.tpsa-contact-failure h3 {
    margin: 0 0 7px;
    color: inherit;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.tpsa-contact-failure p {
    margin: 0;
    color: inherit;
    font-size: 14px;
    line-height: 1.65;
}

@keyframes tpsaContactFeedbackEnter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tpsa-contact-failure:not([hidden]) {
        animation: none;
    }
}

/* Page-load motion only: hover effects never translate the cards. */
@keyframes tpsaContactIntroEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes tpsaContactPanelEnter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 991px) {
    .tpsa-contact-hero {
        min-height: 220px;
    }

    .tpsa-contact-intro {
        padding: 40px 0;
    }

        .tpsa-contact-intro h1 {
            font-size: 38px;
        }

    .tpsa-contact {
        padding: 48px 0 66px;
    }

    .tpsa-contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tpsa-contact-info {
        padding: 32px;
    }

    .tpsa-contact-info-heading {
        margin-bottom: 25px;
    }

    .tpsa-contact-info-bottom {
        margin-top: 25px;
    }
}

@media (max-width: 767px) {
    .tpsa-contact-hero {
        min-height: 200px;
        background: linear-gradient(90deg,rgba(244,250,255,.99) 0%,rgba(232,245,255,.97) 58%,rgba(237,247,255,.78) 100%), url("../images/slide1.jpg") 68% center/cover no-repeat;
    }

        .tpsa-contact-hero > .container {
            padding-left: 20px;
            padding-right: 20px;
        }

    .tpsa-contact-intro {
        padding: 34px 0;
    }

        .tpsa-contact-intro h1 {
            margin-bottom: 10px;
            font-size: 34px;
        }

        .tpsa-contact-intro p {
            font-size: 15px;
            line-height: 1.6;
        }
}

@media (max-width: 575px) {
    .tpsa-contact-hero {
        min-height: 185px;
    }

    .tpsa-contact {
        padding: 36px 0 54px;
    }

    .tpsa-contact-intro {
        padding: 30px 0;
    }

    .tpsa-contact-eyebrow {
        margin-bottom: 8px;
        font-size: 12px;
    }

    .tpsa-contact-intro h1 {
        font-size: 31px;
    }

    .tpsa-contact-grid {
        gap: 18px;
    }

    .tpsa-contact-panel,
    .tpsa-contact-info {
        padding: 24px 19px;
        border-radius: 16px;
    }

    .tpsa-contact-panel-header {
        align-items: flex-start;
    }

        .tpsa-contact-panel-header h2 {
            font-size: 20px;
        }

    .tpsa-contact-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
    }

    .tpsa-contact-form-footer {
        align-items: stretch;
    }

    .tpsa-contact-submit {
        width: 100%;
    }

    .tpsa-contact-info h2 {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tpsa-contact-intro,
    .tpsa-contact-panel,
    .tpsa-contact-info {
        animation: none;
    }

    .tpsa-contact-panel,
    .tpsa-contact-info,
    .tpsa-contact-field label,
    .tpsa-contact-input,
    .tpsa-contact-textarea,
    .tpsa-contact-submit,
    .tpsa-contact-info-icon,
    .tpsa-contact-info-item a {
        transition: none;
    }
}
