/*
Theme Name: Stetson Law 2026
Theme URI: https://www.stetson.edu/law/
Description: WordPress design that mirrors the production site rebrand.
Version: 2.2.2
Author: Stetson Web Team
Text Domain: stetson-law-production
*/

/* --- BRAND DESIGN VARIABLES --- */
:root {
    --brand-dark: #1d5c41;
    --brand-mid: #439539;
    --brand-mid-ada: #3a8131;
    --brand-light: #c4d600;
    --brand-offwhite: #faf9f6;
    --base-font-size: 18px;
}

body {
    -webkit-font-smoothing: antialiased;
    color: #000000;
    font-family: 'Open Sans', 'Arial', sans-serif;
    font-size: var(--base-font-size);
    font-weight: normal;
    line-height: 1.6;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

@media (max-width: 767px) {
    body {
        font-size: 16px;
    }
}

/* --- TYPOGRAPHY ENGINE --- */
h1, .brand-h1 {
    color: var(--brand-mid);
    font-size: 3em;
    line-height: 1.25;
    margin: 0.25em 0;
}
h2, .brand-h2 {
    color: #000000;
    font-size: 2em;
    line-height: 1.3;
    margin: 0.25em 0;
}
h3, h4, h5, h6, .brand-h3, .brand-h4, .brand-h5, .brand-h6 {
    color: #000000;
    font-weight: bold;
    line-height: 1.4;
}
h3, .brand-h3 {
    color: var(--brand-dark);
    font-size: 1.5em;
}
h4, .brand-h4 { font-size: 1.25em; }
h5, .brand-h5 { font-size: 1.125em; }
h6, .brand-h6 { font-size: 1.125em; font-style: italic; }

/* --- CORE UTILITIES --- */
.bg-brand-dark { background-color: var(--brand-dark) !important; }
.bg-brand-mid { background-color: var(--brand-mid) !important; }
.bg-brand-mid-ada { background-color: var(--brand-mid-ada) !important; }
.bg-brand-light { background-color: var(--brand-light) !important; }
.bg-brand-offwhite { background-color: var(--brand-offwhite) !important; }

.text-brand-dark { color: var(--brand-dark) !important; }
.text-brand-mid { color: var(--brand-mid-ada) !important; }
.text-brand-light { color: var(--brand-light) !important; }

/* --- LINK EFFECTS --- */
.link-brand-dark, h3 a { color: var(--brand-dark) !important; }
.link-brand-dark:hover, h3 a:hover { color: var(--brand-mid-ada) !important; }

.link-brand-mid, a { color: var(--brand-mid-ada) !important; }
.link-brand-mid:hover, a:hover { color: var(--brand-dark) !important; }

.link-brand-light { 
    color: var(--brand-light) !important; 
}
.link-brand-light:hover { 
    color: #ffffff !important; 
    text-decoration: underline !important; 
}

.link-brand-white { color: #ffffff !important; }
.link-brand-white:hover { color: var(--brand-light) !important; }

.link-brand-black, h2 a, h4 a, h5 a, h6 a { color: #000000 !important; }
.link-brand-black:hover, h2 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { color: var(--brand-dark) !important; }

.link-brand-hover { text-decoration: none; }
.link-brand-hover:hover { text-decoration: underline; }

/* --- INTERACTIVE BUTTONS --- */
.button, .button-brand-dark, .button-brand-mid, .button-brand-light {
    border-radius: 5px;
    display: inline-block;
    font-weight: bold;
    margin: 10px 0px;
    min-width: 100px;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}
.button-sm {
    border-radius: 5px;
    font-size: 0.875em;
    font-weight: normal;
    padding: 6px 12px;
}
.button-brand-dark, .button {
    background-color: var(--brand-dark);
    border: 1px solid #ffffff;
    color: #ffffff !important;
}
.button-brand-dark:hover, .button:hover {
    background-color: var(--brand-mid-ada);
    color: #ffffff !important;
}
.button-brand-mid {
    background-color: var(--brand-mid-ada);
    border: 1px solid #ffffff;
    color: #ffffff !important;
}
.button-brand-mid:hover {
    background-color: var(--brand-light);
    color: var(--brand-dark) !important;
}
.button-brand-light {
    background-color: var(--brand-light);
    border: 1px solid var(--brand-dark);
    color: var(--brand-dark) !important;
}
.button-brand-light:hover {
    background-color: var(--brand-dark);
    color: var(--brand-light) !important;
}

/* --- BOOTSTRAP ACCORDIONS --- */
.accordion-item {
    border-width: 1px 0px;
    border-radius: 0px;
}
.accordion-item:first-child { border-top: 0px; }
.accordion-item:last-child { border-bottom: 0px; }
.accordion-button {
    color: var(--brand-dark);
    font-weight: 600;
    line-height: 1.4;
    font-size: 24px;
}
.accordion-button:not(.collapsed) {
    background-color: var(--brand-offwhite);
    color: #000000;
    box-shadow: inset 0 -1px 0 #cccccc;
}
.accordion-button:focus {
    box-shadow: none;
    border-color: #cccccc;
}
.accordion-body {
    background-color: transparent;
    padding-top: 0px;
}
.accordion-button::after { display: none; }
.accordion-button::before {
    flex-shrink: 0;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    margin-right: 1rem;
    content: "";
    border-top: 0.5rem solid transparent;
    border-bottom: 0.5rem solid transparent;
    border-left: 0.6rem solid #212529;
    transition: transform 0.2s ease-in-out;
}
.accordion-button:not(.collapsed)::before {
    transform: rotate(90deg);
}

/* --- ACCESSIBILITY AND FOCUS STATES --- */
:focus-visible {
    outline-color: var(--brand-light) !important;
}
.btn:focus:not(:focus-visible), .btn:active, .ui-accordion-header:focus:not(:focus-visible), .ui-accordion-header:active {
    box-shadow: none !important;
    outline: none !important;
}
.btn:focus-visible, .ui-accordion-header:focus-visible {
    outline-color: var(--brand-light) !important;
}
a.visually-hidden-focusable:focus {
    position: absolute;
    z-index: 1052;
}

/* --- STRUCTURAL LAYOUT COMPONENT OVERRIDES --- */
#banner img {
    filter: brightness(0) saturate(100%) invert(26%) sepia(42%) saturate(604%) hue-rotate(104deg) brightness(91%) contrast(95%);
}
#nav-primary {
    background-image: linear-gradient(var(--brand-mid), var(--brand-dark));
    border-top: 3px solid var(--brand-light);
}
#nav-primary a.nav-link:hover {
    color: var(--brand-light) !important;
}
.mega-menu {
    width: 100% !important;
    z-index: 1051 !important;
}
.mega-menu ul { list-style-type: square; }
.mega-menu p, .mega-menu ul li a {
    font-size: var(--base-font-size);
}

/* --- REPLICATED SIDEBAR CUSTOM MENU MATCH ENGINE --- */
#sidebar-menu {
    background-color: var(--brand-offwhite);
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--brand-mid);
    border-bottom: 4px solid var(--brand-mid);
}
#sidebar-menu ul li {
    border-bottom: 1px solid #e2e8f0;
    background-color: var(--brand-offwhite);
}
#sidebar-menu ul li:last-child {
    border-bottom: none;
}
#sidebar-menu ul li a {
    display: block;
    color: var(--brand-dark) !important;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 12px 18px;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}
#sidebar-menu ul li a::before {
    content: '\00BB';
    font-weight: bold;
    color: var(--brand-dark);
    margin-right: 0.5em;
    display: inline-block;
}
#sidebar-menu ul li a:hover {
    background-color: #f1f5f9;
    color: var(--brand-mid-ada) !important;
}

.aside-submenu-toggle::before {
    content: '\00BB';
    font-weight: bold;
    margin-right: 0.4em;
    display: inline-block;
    transition: transform 0.2s;
}
.aside-submenu-toggle[aria-expanded="true"]::before {
    transform: rotate(90deg);
}
.aside-submenu ul { border-width: 0px; }

#side-menu-toggle {
    background-color: var(--brand-dark);
    border: none;
    color: #ffffff;
    font-size: 1em;
    font-weight: bold;
    line-height: 1;
    padding: 8px 10px;
}
#side-menu-toggle:hover { background-color: var(--brand-mid); }

footer {
    background-image: linear-gradient(var(--brand-dark), var(--brand-mid));
}
#nav-footer .border-end {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* --- SIDEBAR WIDGET ACCESSIBILITY CONTROLS --- */
.widget, .widget h2, .widget h3, .widget h4 {
    color: #000000;
}
.widget a, .widget .comment-author-link a, .widget ul li a {
    color: var(--brand-dark) !important;
    text-decoration: underline;
    font-weight: 600;
}
.widget a:hover, .widget ul li a:hover {
    color: var(--brand-mid-ada) !important;
    text-decoration: none;
}
.widget .recentcomments {
    color: #ffffff !important;
    padding: 8px 12px;
    background-color: var(--brand-dark);
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 0.95em;
    line-height: 1.4;
}
.widget .recentcomments a {
    color: #ffffff !important;
    display: inline;
    padding: 0;
    text-decoration: underline;
}
.widget .recentcomments a:hover {
    color: var(--brand-light) !important;
}

/* --- BREAKPOINT CONTROLS --- */
@media (min-width: 992px) {
    #mega-menus .dropdown-toggle::after {
        display: none;
    }
    .mega-menu {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
    }
    aside .sticky-top { top: 20px; }
    #side-menu { display: block !important; }
    .border-lg-top-0 { border-top: 0 !important; }
    .border-bottom-lg-0 { border-bottom: 0 !important; }
    .border-start-lg {
        border-left: 1px solid var(--bs-border-color) !important;
    }
    .w-lg-50 { width: 50% !important; }
}
@media (max-width: 575px) {
    .mega-menu .border-start {
        border-left: 0 !important;
    }
}
@media (max-width: 991px) {
    .bi-search { font-size: 1.5em; vertical-align: middle; }
    .bi-list { font-size: 1.9em; vertical-align: middle; }
}

/* --- PRINT UTILITIES --- */
@media print {
    a[href]:after {
        content: none;
    }
}
/* ==========================================================================
   Gutenberg Header Injection Fixes
   ========================================================================== */
header .w-100.bg-brand-dark {
    position: relative;
    z-index: 1050;
    display: block !important;
    clear: both;
    width: 100% !important;
}

/* Strips out the core WordPress container margins that push the bar down */
header .w-100.bg-brand-dark > .wp-block-html,
header .w-100.bg-brand-dark > div {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Force the main content block to drop below the fixed header structure */
#content {
    clear: both;
    display: flex;
    width: 100%;
}