/* ==========================================================================
   Law Header
   ========================================================================== */

.law_theme,
.law_theme header {
    background: var(--color-section);
}

.law_theme header {
    margin-bottom: 1rem;
}

.law_theme header h1 .logo {
    background: url("https://web.library.wisc.edu/libguides/images/law_banner.jpg") no-repeat;
    height: 185px;
    background-size: auto 100%;
    display: block;
}

@media (max-width: 768px) {
    .law_theme header h1 .logo {
        height: 120px;
        background-size: auto 100%;
    }
}

.law_theme header h1 a:focus {
    outline: 5px auto -webkit-focus-ring-color;
}

.law_theme .sub_banner {
    background: #B70105;
}

.law_theme .sub_banner .container {
    padding-left: 0;
    padding-right: 0;
}

#s-lg-guide-desc-container {
    display: block;
}

.law_theme #app_header h1 {
    margin: 0;
    display: block;
}

.law_theme #s-lg-guide-header-info {
    margin-top: 0;
}

.law_theme #s-lg-guide-header-info h1 {
    margin-top: 0;
}


/* ==========================================================================
   Law Main Nav
   ========================================================================== */

.law_theme .main_nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-8);
    background: transparent;
}

/* h1 stretches to fill available space, links inside vertically centered */
.law_theme .main_nav h1 {
    flex: 1 1 auto;
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.law_theme .main_nav ul {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    list-style: none;
}

/* h1 link — same appearance as nav links */
.law_theme .main_nav h1 a.lib_home {
    padding: 10px 7px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    color: #fff;
}

.law_theme .main_nav h1 a.lib_home:hover,
.law_theme .main_nav h1 a.lib_home:focus {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
}

/* Nav links — override global animated underline with simple background hover */
.law_theme .main_nav ul li a {
    color: #fff;
}

.law_theme .main_nav ul li a::after {
    display: none;
}

.law_theme .main_nav ul li a:hover,
.law_theme .main_nav ul li a:focus {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

/* Responsive — stack h1 and ul vertically on small screens */
@media (max-width: 768px) {
    .law_theme .main_nav {
        padding: var(--space-3) var(--space-4);
        gap: var(--space-1);
    }

    .law_theme .main_nav h1,
    .law_theme .main_nav ul {
        flex: 1 1 100%;
    }

    .law_theme .main_nav ul {
        justify-content: flex-start;
        padding-bottom: var(--space-2);
    }

    .law_theme .main_nav h1 a.lib_home {
        white-space: normal;
    }
}


/* ==========================================================================
   Law Side Nav — active color overrides only.
   All other nav styles inherit from nav.css via #s-lg-tabs-container.
   ========================================================================== */

.law_theme #s-lg-guide-tabs > ul.nav > li > a.active {
    background: #B70105 !important;
    color: #fff !important;
}

.law_theme #s-lg-guide-tabs > ul.nav > li > a.active:hover {
    background: #8e0202 !important;
}

.law_theme #s-lg-guide-tabs ul.s-lg-subtab-ul li.active a {
    color: #B70105 !important;
    font-weight: 700;
}


/* ==========================================================================
   Law Content
   ========================================================================== */

.law_theme #col2 .margin-bottom-xlg {
    margin-top: 2em;
    border-top: 1px solid #ccc;
    padding-top: 1.5em;
}

.law_theme #col2 .margin-bottom-xlg:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}


/* ==========================================================================
   Law Footer
   ========================================================================== */

.law_theme footer {
    margin-top: 2rem;
    padding: 2rem 0;
    background-color: #282728;
    border-top: 5px solid #c5050c;
}

.law_theme footer p {
    text-align: center;
    color: #fff !important;
}