﻿/* main.css
   Main site styling + branding overrides (Bootstrap loaded from CDN).
*/

/* =========================
   Brand tokens
   ========================= */
:root {
    --brand-primary: #0b2f55;
    --brand-primary-dark: #07213d;
    --brand-accent: #1f4e79;
    --brand-accent-dark: #163a5b;
    --brand-light: #f8f9fa;
    --surface: #ffffff;
    --text-dark: #111827;
    --text-muted: #374151;
    --focus-light: #1d4ed8;
    --focus-dark: #ffffff;
    /* Backward-compatible names */
    --brand-gold: var(--brand-primary);
    --brand-purple: var(--brand-accent);
    --brand-purple-dark: var(--brand-accent-dark);
}

/* =========================
   Bootstrap overrides (brand colors)
   ========================= */
.bg-primary {
    background-color: var(--brand-primary) !important;
    color: #fff !important;
}

.bg-secondary {
    background-color: var(--brand-accent) !important;
    color: #fff !important;
}

.text-secondary {
    color: var(--brand-accent) !important;
}

/* Primary buttons */
.btn-primary {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary.active {
        background: var(--brand-primary-dark) !important;
        border-color: var(--brand-primary-dark) !important;
        color: #fff !important;
        text-decoration: underline;
    }

/* =========================
   Heading Divider
   ========================= */
.divider-custom {
    margin: 1.25rem auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.divider-custom-line {
    height: 3px;
    width: 120px;
    background: currentColor;
    opacity: .9;
}

.divider-light {
    color: #fff;
}

/* =========================
   Container Size
   ========================= */
@media (min-width:1200px) {
    .container {
        max-width: 1400px;
    }
}

/* =========================
   Footer / copyright
   ========================= */
.copyright {
    background-color: var(--brand-primary) !important;
    color: #fff !important;
}

    .copyright a {
        color: #fff !important;
        text-decoration: underline;
    }

/* =========================
   Accessibility (focus)
   ========================= */
/* One consistent focus rule */
:focus {
    outline: 3px solid var(--focus-light);
    outline-offset: 3px;
    border-radius: 4px;
}
/* On dark backgrounds, white focus ring is more visible */
.bg-secondary :focus,
.bg-primary :focus,
.modal-header :focus,
.modal-footer :focus,
#mainNav :focus {
    outline-color: var(--focus-dark);
}

/* =========================
   Links (contrast on light backgrounds)
   ========================= */
main a {
    color: var(--brand-primary);
}

    main a:hover {
        color: var(--brand-primary-dark);
        text-decoration: underline;
    }
/* Accent links in special areas */
.modal-body a,
.panel-body a {
    color: var(--brand-primary);
    font-weight: 700;
    text-decoration: underline;
}

/* =========================
   Navbar
   ========================= */
@media (min-width: 992px) {
    #mainNav .navbar-nav .nav-item:not(:last-child)::after {
        content: "";
        display: inline-block;
        height: 20px;
        width: 1px;
        margin: 0 12px;
        background-color: rgba(255,255,255,0.5);
        vertical-align: middle;
    }

    #mainNav .navbar-nav .nav-item {
        display: flex;
        align-items: center;
    }
}
.navbar-nav .nav-item .nav-link {
    text-transform: none !important;
    font-size: 15px;
}

@media (min-width:576px) {
    .navbar-nav .nav-item .nav-link {
        font-size: 16px;
    }
}

@media (min-width:768px) {
    .navbar-nav .nav-item .nav-link {
        font-size: 17px;
    }
}

@media (min-width:992px) {
    .navbar-nav .nav-item .nav-link {
        font-size: 18px;
    }
}

@media (min-width:1200px) {
    .navbar-nav .nav-item .nav-link {
        font-size: 19px;
    }
}

#mainNav .navbar-nav .nav-link {
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}

    #mainNav .navbar-nav .nav-link:hover,
    #mainNav .navbar-nav .nav-link:focus {
        background-color: rgba(255,255,255,.08);
        color: #fff !important;
        text-decoration: underline;
    }

    #mainNav .navbar-nav .nav-link.active {
        color: #fff !important;
        text-decoration: underline;
    }

@media (min-width:992px) {
    #mainNav .navbar-nav > li.nav-item > a.nav-link.active {
        background-color: transparent !important;
    }
}

/* =========================
   Branding row text
   ========================= */
p.text-pg {
    margin-right: 20px;
    color: #fff;
    text-transform: none;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-style: italic;
}

@media (max-width:768px) {
    .text-pg {
        width: 100%;
        text-align: center;
        margin-top: .5rem;
    }
}

/* =========================
   Masthead image
   ========================= */
.bg-primary-2 {
    background: url(../img/carousel.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 400px;
}

/* =========================
   Layout helpers
   ========================= */
.row-wide {
    margin-right: 5em;
    margin-left: 5em;
}

@media (max-width:768px) {
    .row-wide {
        margin-right: 1rem;
        margin-left: 1rem;
    }
}

.col-md-3, .col-lg-4, .col-sm-12, .col-md-4 {
    padding-right: .50rem;
    padding-left: .50rem;
}

/* =========================
   Panels / announcements
   ========================= */
.panel-heading {
    background-color: var(--brand-accent);
    color: #fff;
}

.panel-heading-2 {
    background: #e5e7eb;
    color: var(--brand-primary);
}

.panel-sections-searching-footer {
    background: var(--brand-accent);
    color: #fff;
}

.panel-body {
    color: var(--text-dark) !important;
    background-color: #eef2f7 !important;
}

@media (max-width:500px) {
    div.panel-body ul.list-simple-item {
        list-style: none;
        padding-left: 0;
    }
}

@media (max-width:360px) {
    .panel-body, .panel-heading, .panel-footer {
        width: 200px !important;
    }
}

div.page-breaker {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Remove global heading centering (it breaks modals/cards)
   Center only what you actually want centered */
.page-section-heading,
.page-section h3,
.page-section h5 {
    text-align: center;
}

/* =========================
   Modals
   ========================= */
.modal-content {
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.22);
    overflow: hidden;
}

.modal-header {
    background: var(--brand-primary);
    color: #fff;
    border-bottom: 1px solid rgba(0,0,0,.50);
    padding: 1rem 1.25rem;
    align-items: center;
}

.modal-title {
    font-weight: 900;
    letter-spacing: .2px;
    margin: 0;
    color: #fff;
}

.modal-body {
    padding: 1.5rem;
    line-height: 1.55;
    background: #fff;
    color: #212529;
}

    .modal-body.modal-scroll {
        max-height: 70vh;
        overflow: auto;
    }

.modal-footer {
    background: var(--brand-primary);
    border-top: 1px solid rgba(0,0,0,.50);
    padding: .9rem 1.25rem;
}

.modal-header .close {
    background-color: #fff;
    color: #000;
    border-radius: .25rem;
    opacity: 1;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    margin: -0.25rem -0.5rem -0.25rem auto;
}

/* Links and lists inside modals */
.modal-body a:not(.court-link-card) {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.modal-body ul {
    padding-left: 1.25rem;
}

.modal-body hr {
    border-top: 1px solid rgba(0,0,0,.10);
}

.modal-body h5 {
    font-weight: 900;
    margin-bottom: .75rem;
}

.modal-body p strong {
    font-weight: 900;
}

/* Make modal wider on desktop */
@media (min-width:992px) {
    .modal-lg {
        max-width: 1000px;
    }
}

/* =========================
   Court Modal Card Links
   ========================= */
.court-link-grid {
    display: grid;
    gap: 1rem;
    width: 100%;
}

@media (min-width:768px) {
    .court-link-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.court-link-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 0 rgba(0,0,0,.03);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .court-link-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0,0,0,.12);
        text-decoration: none;
    }

    .court-link-card:visited {
        color: inherit;
        text-decoration: none;
    }

    .court-link-card .court-name {
        text-decoration: none;
        color: #0b2a5b;
    }

    .court-link-card:hover .court-name,
    .court-link-card:focus-visible .court-name {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .court-link-card .court-arrow {
        font-size: 1.2rem;
        font-weight: 900;
        color: #0b2a5b;
        transition: transform .15s ease;
    }

    .court-link-card:hover .court-arrow,
    .court-link-card:focus-visible .court-arrow {
        transform: translateX(4px);
    }

/* =========================
   Results blocks (search)
   ========================= */
.appellate-result,
.docket-result,
.opinion-result {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,.10);
}

    .appellate-result:last-child,
    .docket-result:last-child,
    .opinion-result:last-child {
        border-bottom: none;
    }

/* Buttons */
.btn-outline-secondary {
    background-color: #fff;
    color: #212529;
    border-color: rgba(0,0,0,.25);
}

    .btn-outline-secondary:hover {
        background-color: #f8f9fa;
    }

/* =========================
   Cards / 
    s / buttons
   ========================= */
div.card {
    border: solid var(--brand-accent) 1px;
    border-radius: 2px;
    width: 100%;
}

    div.card.bg-3 {
        background: var(--brand-primary);
        color: #fff !important;
        border: #fff solid;
    }

        div.card.bg-3 .card-header,
        div.card.bg-3 .card-header h1,
        div.card.bg-3 .card-header h2,
        div.card.bg-3 .card-header h3,
        div.card.bg-3 .btn-link,
        div.card.bg-3 .btn-link:hover,
        div.card.bg-3 .btn-link:focus {
            color: #fff !important;
            text-decoration: underline;
        }

div.card-header {
    padding: 0;
}

    div.card-header h1,
    div.card-header h2 {
        font-size: 4rem;
        color: #fff;
    }

.btn-link,
.btn-link:hover,
.btn-link:focus {
    color: var(--brand-primary);
    font-size: 1rem;
    text-decoration: underline;
}

.btn-link2,
.btn-link2:hover,
.btn-link2:focus {
    color: #fff;
    font-size: 1rem;
    text-decoration: underline;
}

.court-link {
    background: var(--brand-accent);
    color: #fff;
    padding: 10px;
}

.court-accordian {
    color: var(--brand-primary);
}

button.btn.btn-link.collapsed {
    color: var(--brand-primary);
}

button.btn.btn-link2.collapsed {
    color: #fff !important;
}

#heading1.card-header {
    border: none;
}

div.card-body {
    background: #fff;
    color: var(--text-dark);
}

/* Small screen text sizing */
@media (max-width:360px) {
    .page-section-heading {
        font-size: 2rem !important;
    }

    .btn-link {
        font-size: .75rem !important;
    }
}

/* =========================
   Embedded documents / bios
   ========================= */
.embed-bg {
    font-family: "Lato",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
    text-align: left;
}

object.embed-bg {
    max-width: 1100px;
    height: 600px;
}

h2.bio-header {
    text-align: center;
}

h5.min-header {
    text-align: left;
}

p.bio-para,
p.bio-para-2 {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
    text-align: left;
}

p.bio-para {
    text-indent: 25px;
}

div.judges-space {
    padding-bottom: 20px;
}

/* =========================
   Page section layout
   ========================= */
div.row.page-section .col-md-4 {
    margin-bottom: 50px;
}

    div.row.page-section .col-md-4 h3 {
        text-align: center;
    }

    div.row.page-section .col-md-4 .btn-primary,
    div.row.page-section .col-md-6 .btn-primary {
        width: 100%;
        margin-bottom: 10px;
    }

.page-section {
    padding: 3.5rem 0;
    margin-top: 2rem;
    margin-bottom: 4rem;
    justify-content: center;
}

    .page-section .col-md-12 {
        max-width: 520px;
        margin: 0 auto 4rem;
        text-align: center;
        background: #f8f9fa;
        padding: 2rem;
        border-radius: .75rem;
        box-shadow: 0 .25rem .75rem rgba(0,0,0,.05);
    }

    .page-section .btn-singular {
        display: block;
        width: 100%;
        font-size: 1.1rem;
        font-weight: 700;
        padding: .9rem 1rem;
        border-radius: .5rem;
        letter-spacing: .5px;
    }

        .page-section .btn-singular:hover,
        .page-section .btn-singular:focus {
            background-color: var(--brand-primary-dark) !important;
            color: #fff !important;
            text-decoration: underline;
        }

.btn-singular {
    width: 100% !important;
}

/* =========================
   Tabs
   ========================= */
.nav-tabs {
    margin-top: 20px;
    border-bottom: 2px solid var(--brand-accent);
}

    .nav-tabs .nav-item,
    .nav-tabs > li {
        margin-bottom: -2px;
        margin-right: 5px;
    }

    .nav-tabs .nav-link {
        color: var(--brand-primary);
        background-color: #eef2f7;
        padding: 10px 20px;
        border-radius: 0;
        border: 2px solid var(--brand-accent);
        border-bottom: none;
        font-weight: 700;
        transition: background-color .3s ease, color .3s ease;
    }

        .nav-tabs .nav-link:hover,
        .nav-tabs .nav-link:focus {
            background-color: #dbe5f0;
            color: var(--brand-primary-dark);
            text-decoration: underline;
        }

        .nav-tabs .nav-link.active {
            background-color: var(--brand-primary);
            color: #fff;
            border-color: var(--brand-accent);
            border-bottom: 2px solid var(--brand-primary);
        }

.tab-content {
    border: 2px solid var(--brand-accent);
    background-color: #fff;
    color: var(--text-dark);
    padding: 15px;
    border-radius: 0 0 5px 5px;
}

.tab-link {
    background: var(--brand-accent);
    color: #fff;
    font-weight: 800;
    width: 100%;
    margin-right: 10px;
}

/* =========================
   Carousel
   ========================= */
.carousel-container {
    max-width: 900px;
    margin: 0 auto;
    border: 2px solid var(--brand-accent);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.carousel-inner img {
    height: auto;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
}

@media (max-width:768px) {
    .carousel-inner img {
        max-height: 300px;
    }
}

/* =========================
   Minor utilities
   ========================= */
li.list-simple-item {
    float: left;
}

/* =========================
   History Viewer
   ========================= */
.history-viewer {
    border: 2px solid var(--brand-accent);
    border-radius: 12px;
    background: #fff;
    padding: 1rem;
}

.history-iframe {
    width: 100%;
    height: 700px;
    border: 0;
}

@media (max-width:768px) {
    .history-iframe {
        height: 500px;
    }
}

/* =========================
   Target size of 44px AAA (WCAG 2.5.5)
   ========================= */
.btn,
.btn-primary {
    min-width: 44px;
    min-height: 44px;
    padding: .75rem 1rem;
    line-height: 1.2;
}

/* =========================
   Heading and Decorative Lines
   ========================= */
.page-section-heading {
    position: relative;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

    .page-section-heading::before,
    .page-section-heading::after {
        content: "";
        flex: 1;
        height: 3px;
        background-color: var(--brand-primary);
    }

/* =========================
   Skip link (ADA) - keep once
   ========================= */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: .75rem 1rem;
    background: #000;
    color: #fff;
    border-radius: .25rem;
}

    .skip-link:focus {
        left: 1rem;
        top: 1rem;
    }


/* =========================
   Back to Top Button
   ========================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
    display: none; /* hidden by default */
    min-width: 44px;
    min-height: 44px;
    border-radius: 50px;
    padding: 0.75rem 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
    background-color: var(--brand-primary)
}

    .back-to-top:hover {
        transform: translateY(-2px);
    }