/* ==========================================================
   Texas Process Servers Academy | Resources & Links
   Page-specific styling. Original CMS HTML and backend intact.
   ========================================================== */

/* HERO */
.tpsa-resources-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 228px;
    overflow: hidden;
    border-bottom: 1px solid #dce9f4;
    background: linear-gradient(90deg, rgba(244,250,255,.99) 0%, rgba(232,245,255,.96) 43%, rgba(237,247,255,.74) 65%, rgba(237,247,255,.20) 100%), url("../images/slide3.jpg") right center / cover no-repeat;
}

    .tpsa-resources-hero::before {
        content: "";
        position: absolute;
        right: -100px;
        top: -175px;
        width: 470px;
        height: 470px;
        border-radius: 50%;
        background: rgba(7,137,249,.045);
        pointer-events: none;
    }

    .tpsa-resources-hero > .container,
    .tpsa-resources-section > .container {
        position: relative;
        width: 100%;
        max-width: 1170px;
        margin-right: auto;
        margin-left: auto;
        padding-right: 15px;
        padding-left: 15px;
    }

    .tpsa-resources-hero > .container {
        z-index: 1;
    }

.tpsa-resources-hero-content {
    max-width: 850px;
    padding: 44px 0;
    animation: tpsaResourcesEnter .7s ease-out both;
}

.tpsa-resources-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: #355d84;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
}

.tpsa-resources-hero h1 {
    margin: 0 0 12px;
    color: #082e62;
    font-size: 43px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.7px;
}

.tpsa-resources-hero p {
    max-width: 720px;
    margin: 0;
    color: #35536f;
    font-size: 17px;
    line-height: 1.65;
}

/* LAYOUT */
.tpsa-resources-section {
    padding: 38px 0 66px;
    background: linear-gradient(180deg, #fff 0%, #fff 72%, #f8fbff 100%);
}

.tpsa-resources-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    align-items: start;
    gap: 24px;
}

/* CMS CONTENT */
.tpsa-resources-document {
    min-width: 0;
    overflow: hidden;
    padding: 0 30px 29px;
    border: 1px solid #dbe8f4;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 14px 43px rgba(12,45,88,.065);
    transition: border-color .3s ease, box-shadow .3s ease;
    animation: tpsaResourcesEnter .72s ease-out .1s both;
}

    .tpsa-resources-document:hover {
        border-color: #bdd8f0;
        box-shadow: 0 20px 47px rgba(12,45,88,.1);
    }

.tpsa-resources-document-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 -30px 0;
    padding: 20px 30px;
    border-bottom: 1px solid #e1edf8;
    background: linear-gradient(115deg, #ebf6ff 0%, #f8fbff 59%, #fff 100%);
}

.tpsa-resources-document-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border: 1px solid #c6e1fa;
    border-radius: 15px;
    background: linear-gradient(145deg, #e2f2ff, #d6eaff);
    color: #1172d3;
    font-size: 23px;
}

.tpsa-resources-document-heading {
    min-width: 0;
}

.tpsa-resources-document-label {
    display: block;
    margin-bottom: 5px;
    color: #4373a0;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.tpsa-resources-document-heading h2 {
    margin: 0;
    color: #082e62;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -.3px;
}

/* RESOURCE FINDER: progressively shown only when the CMS provides searchable links. */
.tpsa-resources-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 22px 0 0;
    padding: 16px 18px;
    border: 1px solid #deebf7;
    border-radius: 12px;
    background: #f7fbff;
}

    .tpsa-resources-toolbar[hidden],
    .tpsa-resources-no-results[hidden] {
        display: none !important;
    }

.tpsa-resources-toolbar-copy {
    min-width: 0;
}

    .tpsa-resources-toolbar-copy strong {
        display: block;
        color: #133c6c;
        font-size: 14px;
        line-height: 1.35;
        font-weight: 800;
    }

    .tpsa-resources-toolbar-copy span {
        display: block;
        margin-top: 3px;
        color: #6a8099;
        font-size: 12px;
    }

.tpsa-resources-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 260px;
    flex: 0 1 260px;
    min-width: 0;
}

    .tpsa-resources-search .fa-search {
        position: absolute;
        left: 13px;
        color: #5681ae;
        pointer-events: none;
    }

    .tpsa-resources-search input {
        display: block;
        width: 100%;
        min-width: 0;
        height: 42px;
        padding: 10px 13px 10px 38px;
        border: 1px solid #d4e3f1;
        border-radius: 10px;
        outline: none;
        background: #fff;
        color: #163d68;
        font: inherit;
        font-size: 13px;
        transition: border-color .25s ease, box-shadow .25s ease;
    }

        .tpsa-resources-search input:focus-visible {
            border-color: #4498ed;
            box-shadow: 0 0 0 3px rgba(41,137,230,.11);
        }

        .tpsa-resources-search input::placeholder {
            color: #8194a9;
        }

.tpsa-resources-no-results {
    margin-top: 18px;
    padding: 24px;
    border: 1px dashed #cddff0;
    border-radius: 12px;
    background: #f8fbff;
    text-align: center;
    color: #496784;
    font-size: 14px;
}

/* Do not rewrite the database HTML: style common elements defensively. */
.tpsa-resources-richtext {
    min-width: 0;
    max-width: 100%;
    padding-top: 22px;
    overflow-wrap: anywhere;
    color: #3b5775;
    font-size: 15px;
    line-height: 1.64;
}

    .tpsa-resources-richtext > :first-child {
        margin-top: 0;
    }

    .tpsa-resources-richtext > :last-child {
        margin-bottom: 0;
    }

    .tpsa-resources-richtext p {
        margin: 0 0 13px;
        color: #3b5775;
        font-size: 15px;
        line-height: 1.64;
    }

    .tpsa-resources-richtext h1,
    .tpsa-resources-richtext h2,
    .tpsa-resources-richtext h3,
    .tpsa-resources-richtext h4 {
        margin: 22px 0 12px;
        color: #082e62;
        line-height: 1.3;
        font-weight: 800;
    }

    .tpsa-resources-richtext h1 {
        font-size: 27px;
    }

    .tpsa-resources-richtext h2 {
        font-size: 23px;
    }

    .tpsa-resources-richtext h3 {
        font-size: 20px;
    }

    .tpsa-resources-richtext h4 {
        font-size: 17px;
    }

    .tpsa-resources-richtext a {
        color: #086ed2;
        font-weight: 700;
        text-decoration: underline;
        text-decoration-color: rgba(8,110,210,.32);
        text-underline-offset: 3px;
        transition: color .26s ease, text-decoration-color .26s ease;
    }

        .tpsa-resources-richtext a:hover,
        .tpsa-resources-richtext a:focus-visible {
            color: #082e62;
            text-decoration-color: #082e62;
        }

    .tpsa-resources-richtext ul,
    .tpsa-resources-richtext ol {
        margin: 12px 0 18px;
        padding-left: 24px;
        list-style-position: outside;
    }

    .tpsa-resources-richtext li {
        margin: 0 0 8px;
        line-height: 1.6;
    }

    .tpsa-resources-richtext ul > li::marker {
        color: #2286ed;
    }

    .tpsa-resources-richtext img,
    .tpsa-resources-richtext iframe,
    .tpsa-resources-richtext video,
    .tpsa-resources-richtext svg {
        max-width: 100%;
        height: auto;
    }

    .tpsa-resources-richtext iframe {
        aspect-ratio: 16 / 9;
    }

    .tpsa-resources-richtext table {
        display: block;
        width: max-content;
        max-width: 100%;
        margin: 20px 0 25px;
        overflow-x: auto;
        border-collapse: collapse;
        font-size: 14px;
    }

    .tpsa-resources-richtext th,
    .tpsa-resources-richtext td {
        padding: 11px 13px;
        border: 1px solid #dfeaf5;
        text-align: left;
        vertical-align: top;
    }

    .tpsa-resources-richtext th {
        background: #eaf5ff;
        color: #173b66;
        font-weight: 800;
    }

    .tpsa-resources-richtext blockquote {
        margin: 22px 0;
        padding: 16px 20px;
        border-left: 4px solid #398cf0;
        border-radius: 0 9px 9px 0;
        background: #f2f8ff;
    }

    .tpsa-resources-richtext hr {
        height: 1px;
        margin: 18px 0;
        border: 0 !important;
        background: #e0ebf6;
    }

    /* Progressive CMS formatting: original links and text remain unchanged. */
    .tpsa-resources-richtext .tpsa-resources-resource-row {
        position: relative;
        display: block;
        min-width: 0;
        margin: 0 0 10px !important;
        padding: 13px 42px 13px 52px !important;
        border: 1px solid #e0eaf5;
        border-radius: 12px;
        background: linear-gradient(120deg, #fff, #fafcff);
        color: #5c7189;
        font-size: 13px !important;
        line-height: 1.5 !important;
        box-shadow: 0 2px 9px rgba(21,67,115,.024);
        transition: background-color .25s ease, border-color .25s ease, box-shadow .25s ease;
    }

        .tpsa-resources-richtext .tpsa-resources-resource-row::before {
            content: "\f0c1";
            position: absolute;
            top: 50%;
            left: 13px;
            transform: translateY(-50%);
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 8px;
            background: #e9f4ff;
            color: #247ad2;
            font-family: FontAwesome;
            font-size: 13px;
            font-weight: normal;
        }

        .tpsa-resources-richtext .tpsa-resources-resource-row::after {
            content: "\f08e";
            position: absolute;
            top: 50%;
            right: 16px;
            transform: translateY(-50%);
            color: #7fa8ce;
            font-family: FontAwesome;
            font-size: 13px;
            font-weight: normal;
        }

        .tpsa-resources-richtext .tpsa-resources-resource-row:hover,
        .tpsa-resources-richtext .tpsa-resources-resource-row:focus-within {
            border-color: #abd0f4;
            background: #f2f8ff;
            box-shadow: 0 6px 18px rgba(27,99,169,.07);
        }

        .tpsa-resources-richtext .tpsa-resources-resource-row[hidden] {
            display: none !important;
        }

        .tpsa-resources-richtext .tpsa-resources-resource-row a {
            display: inline;
            color: #0b67c3 !important;
            font-size: 15px !important;
            line-height: 1.48;
            font-weight: 750;
            text-decoration: none !important;
        }

        .tpsa-resources-richtext .tpsa-resources-resource-row:hover a,
        .tpsa-resources-richtext .tpsa-resources-resource-row:focus-within a {
            color: #082e62 !important;
        }

        .tpsa-resources-richtext .tpsa-resources-resource-row font,
        .tpsa-resources-richtext .tpsa-resources-resource-row span,
        .tpsa-resources-richtext .tpsa-resources-resource-row strong {
            font-size: inherit !important;
        }

    .tpsa-resources-richtext .tpsa-resources-enhanced-list {
        margin: 5px 0 17px !important;
        padding: 0 !important;
        list-style: none !important;
    }

        .tpsa-resources-richtext .tpsa-resources-enhanced-list > li::marker {
            content: none;
        }

    .tpsa-resources-richtext .tpsa-resources-group-title {
        display: block;
        margin: 24px 0 13px !important;
        padding: 10px 13px 10px 15px !important;
        border-left: 3px solid #2c89e8;
        border-radius: 0 8px 8px 0;
        background: linear-gradient(90deg, #eef7ff, #fff);
        color: #123f72 !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
        font-weight: 800 !important;
        letter-spacing: .6px;
        text-transform: uppercase;
    }


        .tpsa-resources-richtext .tpsa-resources-group-title u {
            text-decoration: none;
        }

    .tpsa-resources-richtext.tpsa-resources-searching .tpsa-resources-group-title,
    .tpsa-resources-richtext.tpsa-resources-searching .tpsa-resources-note,
    .tpsa-resources-richtext.tpsa-resources-searching hr {
        display: none !important;
    }

    .tpsa-resources-richtext .tpsa-resources-note {
        position: relative;
        margin: 0 0 18px !important;
        padding: 12px 16px 12px 43px !important;
        border: 1px solid #dcecf9;
        border-radius: 10px;
        background: #f4faff;
        color: #52718e !important;
        font-size: 13px !important;
        line-height: 1.55 !important;
        text-align: left !important;
    }

        .tpsa-resources-richtext .tpsa-resources-note::before {
            content: "\f05a";
            position: absolute;
            top: 13px;
            left: 16px;
            color: #2688e7;
            font-family: FontAwesome;
            font-size: 15px;
        }

        .tpsa-resources-richtext .tpsa-resources-note * {
            font-size: inherit !important;
        }

    .tpsa-resources-richtext .tpsa-resources-empty-space,
    .tpsa-resources-richtext br.tpsa-resources-layout-break {
        display: none !important;
    }

/* QUICK NAVIGATION */
.tpsa-resources-sidebar {
    position: sticky;
    top: 24px;
    min-width: 0;
    overflow: hidden;
    padding: 26px 23px 23px;
    border: 1px solid #d6e5f4;
    border-radius: 19px;
    background: linear-gradient(155deg, #f1f8ff 0%, #fff 68%);
    box-shadow: 0 13px 38px rgba(8,46,98,.065);
    transition: border-color .3s ease, box-shadow .3s ease;
    animation: tpsaResourcesEnter .72s ease-out .2s both;
}

    .tpsa-resources-sidebar::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 5px;
        height: 100%;
        background: linear-gradient(180deg, #0789f9, #6dbaff);
    }

    .tpsa-resources-sidebar:hover {
        border-color: #b6d6f4;
        box-shadow: 0 19px 45px rgba(8,46,98,.1);
    }

.tpsa-resources-sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-bottom: 16px;
    border: 1px solid #cbe1f8;
    border-radius: 16px;
    background: #e5f2ff;
    color: #1678d9;
    font-size: 24px;
}

.tpsa-resources-sidebar-label {
    display: block;
    margin-bottom: 9px;
    color: #4776a5;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.tpsa-resources-sidebar h2 {
    margin: 0 0 11px;
    color: #082e62;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.3px;
}

.tpsa-resources-sidebar > p {
    margin: 0 0 17px;
    color: #4b6884;
    font-size: 14px;
    line-height: 1.7;
}

.tpsa-resources-quicklinks {
    display: grid;
    gap: 9px;
}

.tpsa-resources-quicklink {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 12px;
    padding: 11px;
    border: 1px solid #e1ebf6;
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    color: #24496f;
    text-decoration: none !important;
    transition: border-color .28s ease, background-color .28s ease, box-shadow .28s ease;
}

    .tpsa-resources-quicklink:hover,
    .tpsa-resources-quicklink:focus-visible {
        border-color: #b6d9f8;
        background: #eef7ff;
        box-shadow: 0 7px 16px rgba(16,98,180,.07);
        color: #082e62;
    }

.tpsa-resources-quicklink-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    border-radius: 11px;
    background: #e6f2ff;
    color: #1478d7;
    font-size: 17px;
}

.tpsa-resources-quicklink-text {
    flex: 1;
    min-width: 0;
}

    .tpsa-resources-quicklink-text strong {
        display: block;
        color: #173c65;
        font-size: 13px;
        line-height: 1.4;
        font-weight: 800;
    }

    .tpsa-resources-quicklink-text small {
        display: block;
        margin-top: 3px;
        color: #68809a;
        font-size: 12px;
        line-height: 1.4;
    }

.tpsa-resources-quicklink > .fa-angle-right {
    flex: 0 0 auto;
    color: #3888d8;
    font-size: 17px;
}

.tpsa-resources-quicklink:focus-visible,
.tpsa-resources-richtext a:focus-visible {
    outline: 2px solid #1678df;
    outline-offset: 3px;
}

.tpsa-resources-tip {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 22px;
    padding: 15px 14px;
    border: 1px solid #dcebf9;
    border-radius: 12px;
    background: #edf6ff;
}

    .tpsa-resources-tip > .fa {
        flex: 0 0 20px;
        margin-top: 3px;
        color: #1681dc;
        font-size: 19px;
    }

    .tpsa-resources-tip strong {
        display: block;
        margin-bottom: 5px;
        color: #173b65;
        font-size: 13px;
        font-weight: 800;
    }

    .tpsa-resources-tip p {
        margin: 0;
        color: #486580;
        font-size: 13px;
        line-height: 1.62;
    }

/* Gentle initial-load motion; no moving hover. */
@keyframes tpsaResourcesEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .tpsa-resources-hero {
        min-height: 218px;
    }

    .tpsa-resources-hero-content {
        padding: 40px 0;
    }

    .tpsa-resources-hero h1 {
        font-size: 37px;
    }

    .tpsa-resources-section {
        padding: 38px 0 55px;
    }

    .tpsa-resources-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .tpsa-resources-sidebar {
        position: relative;
        top: auto;
    }
}

@media (max-width: 767px) {
    .tpsa-resources-hero {
        min-height: 200px;
        background: linear-gradient(90deg, rgba(244,250,255,.99) 0%, rgba(232,245,255,.97) 57%, rgba(237,247,255,.80) 100%), url("../images/slide1.jpg") 68% center / cover no-repeat;
    }

        .tpsa-resources-hero > .container,
        .tpsa-resources-section > .container {
            padding-right: 20px;
            padding-left: 20px;
        }

    .tpsa-resources-hero-content {
        padding: 34px 0;
    }

    .tpsa-resources-hero h1 {
        font-size: 32px;
    }

    .tpsa-resources-hero p {
        font-size: 15px;
        line-height: 1.6;
    }

    .tpsa-resources-section {
        padding: 34px 0 45px;
    }

    .tpsa-resources-document {
        padding: 0 23px 25px;
        border-radius: 16px;
    }

    .tpsa-resources-document-header {
        margin: 0 -23px;
        padding: 20px 23px;
    }

    .tpsa-resources-document-heading h2 {
        font-size: 22px;
    }

    .tpsa-resources-richtext,
    .tpsa-resources-richtext p,
    .tpsa-resources-richtext li {
        font-size: 15px;
        line-height: 1.62;
    }

    .tpsa-resources-sidebar {
        padding: 25px 23px 23px;
    }

    .tpsa-resources-toolbar {
        gap: 14px;
        padding: 14px;
    }

    .tpsa-resources-search {
        flex-basis: 230px;
    }
}

@media (max-width: 480px) {
    .tpsa-resources-hero {
        min-height: 185px;
    }

    .tpsa-resources-hero-content {
        padding: 29px 0;
    }

    .tpsa-resources-eyebrow {
        font-size: 12px;
    }

    .tpsa-resources-hero h1 {
        font-size: 29px;
        line-height: 1.17;
    }

    .tpsa-resources-document {
        padding: 0 18px 24px;
    }

    .tpsa-resources-document-header {
        gap: 12px;
        margin: 0 -18px;
        padding: 18px;
    }

    .tpsa-resources-document-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        font-size: 20px;
    }

    .tpsa-resources-document-heading h2 {
        font-size: 19px;
    }

    .tpsa-resources-document-label {
        font-size: 10px;
        letter-spacing: 1.2px;
    }

    .tpsa-resources-sidebar {
        padding: 24px 20px 20px;
    }

        .tpsa-resources-sidebar h2 {
            font-size: 23px;
        }

    .tpsa-resources-toolbar {
        flex-direction: column;
        align-items: stretch;
        margin-top: 16px;
        gap: 10px;
    }

    .tpsa-resources-search {
        width: 100%;
        flex: 0 0 auto;
    }

    .tpsa-resources-richtext .tpsa-resources-resource-row {
        padding: 13px 34px 13px 47px !important;
    }

        .tpsa-resources-richtext .tpsa-resources-resource-row::before {
            left: 10px;
        }

        .tpsa-resources-richtext .tpsa-resources-resource-row::after {
            right: 12px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .tpsa-resources-hero-content,
    .tpsa-resources-document,
    .tpsa-resources-sidebar {
        animation: none;
    }

    .tpsa-resources-document,
    .tpsa-resources-sidebar,
    .tpsa-resources-quicklink,
    .tpsa-resources-richtext a,
    .tpsa-resources-richtext .tpsa-resources-resource-row,
    .tpsa-resources-search input {
        transition: none;
    }
}
