  /*
Theme Name: OGS Pro
Author: Joshua Reichard
Description: Academic theme for OGS. Integrated responsive logo scaling, left-alignment, and custom menu fixes.
Version: 1.9.4
*/
@import "wp_colors.css";
@import "body_styles.css";

/* --- 1. GLOBAL RESET & BOX MODEL --- */
*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, ul, li, article, aside, footer, header, nav, section {
    margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline;
}
body { 
    line-height: 1.7; background: #fff; color: #333; 
    font-family: 'Segoe UI', Roboto, Arial, sans-serif; 
    overflow-x: hidden; 
	font-size: 1rem;
}

h1 { font-size: 2.5rem; line-height: 1.2; margin: 20px; }
h2 { font-size: 2rem; line-height: 1.2; margin: 15px; }
h3 { font-size: 1.75rem; }
p { margin: 15px; }

/* Global List Resets (Ensures no bullets unless in article content) */
ul { list-style: none; }

body article { padding: 10px; }
body article p { margin-bottom: 20px; }
body article ul {
    list-style-type: disc;
    list-style-position: outside; /* Bullet stays in the margin */
    margin-left: 50px;             /* Overall push from the left */
    padding-left: 20px;            /* Space specifically for the bullet */
    margin-bottom: 20px;
}

body article ul li {
    margin-bottom: 15px;
    text-indent: 0;                /* Remove indent to keep text aligned */
    padding-left: 5px;             /* Small gap between bullet and text */
}

body article h1,h2,h3 { margin: 0px; }


/* --- 2. VARIABLES --- */
:root {
    --ogs-navy: #00214A;          
    --ogs-navy-dark: #001229;    
    --ogs-wine: #872152;          
    --ogs-gray: #55565A;          
    --ogs-bg: #F4F4F4;    
    --ogs-gold: #e8be4c;
    --ogs-green: #568226;
}

/* --- 3. LAYOUT & CONTAINERS --- */
.container {
    max-width: 1400px; /* Increased from 1240px */
    margin: 0 auto;
    padding: 0 30px;   /* Reduced from 50px */
    width: 100%;
}

.page-container {
    display: grid;
    grid-template-columns: 250px 1fr; /* Slightly narrower sidebar */
    gap: 40px; /* Reduced gap to bring content closer to sidebar */
    padding: 60px 0;
}

.page-container.has-sidebar { grid-template-columns: 280px 1fr; }
.page-container.no-sidebar { 
    display: block; 
    max-width: 900px; /* Allow the container to be wide */
    margin: 0 auto; 
}

/* Keep the text column centered when no sidebar is present */
.page-container.no-sidebar .main-content article .entry-content > p,
.page-container.no-sidebar .main-content article .entry-content > ul {
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 900px) {
    .page-container.no-sidebar .wp-block-image.alignwide,
    .page-container.no-sidebar .wp-block-cover.alignwide {
        margin-left: -50px;
        margin-right: -50px;
        width: calc(100% + 100px);
        max-width: none;
    }
}

/* --- 4. TYPOGRAPHY & LINKS --- */

/* Limit text width for readability (~65-75 chars) */
.main-content article .entry-content > p,
.main-content article .entry-content > ul,
.main-content article .entry-content > ol,
.main-content article .entry-content > blockquote {
    max-width: 50em; 
    margin-left: 0;
    margin-right: auto;
}

/* Allow full-width for non-text blocks (Images, Galleries, Grids) */
.main-content article .entry-content > .wp-block-image,
.main-content article .entry-content > .ogs-feature-grid,
.main-content article .entry-content > .ogs-people-grid,
.main-content article .entry-content > .wp-block-group.has-background {
    max-width: 100%;
}


h1, h2, h3, h4, h5, h6, .nav-bar ul li a, .entry-title, .ogs-sidebar-nav h3, .logo-text {
    font-family: "Tw Cen MT", "Twentieth Century", "Century Gothic", AppleGothic, sans-serif;
    font-weight: normal;
    letter-spacing: -0.5px;
}

article h1 { line-height: 1em; }
article h2 { font-size: 2em; color: var(--ogs-wine); line-height: 1em; padding-bottom: 12px; padding-top: 12px; }
article h3 { font-size: 1.5em; color: var(--ogs-navy); border-bottom: 1px solid; line-height: 1em; margin-bottom: 15px; }

a { color: var(--ogs-wine); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ogs-navy); text-decoration: underline; }

/* --- 5. HEADER & NAVIGATION --- */
.utility-bar { background: var(--ogs-navy-dark); padding: 8px 0; }
.utility-nav { display: flex; justify-content: flex-end; list-style: none; }
.utility-nav li { margin-left: 20px; }
.utility-nav li a { color: #fff; font-size: 11px; text-transform: uppercase; opacity: 0.8; text-decoration: none !important; }

.main-header-wrap { background: var(--ogs-navy); padding: 25px 0; }
.main-header { display: flex; justify-content: space-between; align-items: center; }

.logo-text { display: block; max-width: 70%; line-height: 0; }
.logo-text img {
    display: block; width: auto; max-width: 100%; max-height: 80px; height: auto;
}

.nav-bar { 
    background: var(--ogs-navy-dark); 
    position: sticky; top: 0; z-index: 9999; 
}
.nav-bar .container { position: relative; }
.nav-bar ul { display: flex; list-style: none; }
.nav-bar ul li { position: relative; list-style: none; } 

.nav-bar ul li a { 
    color: #fff; 
    padding: 18px 18px; 
    display: block; 
    text-transform: uppercase; 
    font-size: 16px;
    text-decoration: none !important;
    font-weight: normal;
    letter-spacing: -.15px;
}

.nav-bar ul li:hover > a { 
    background: var(--ogs-navy); 
    color: var(--ogs-gold) !important; 
}

/* HAMBURGER TOGGLE: Strictly hidden on Desktop */
.menu-toggle { display: none !important; }

/* Desktop Dropdown Stylings */
.nav-bar ul li ul,
.nav-bar ul li .sub-menu {
    display: none; 
    position: absolute; top: 100%; left: 0; 
    background: #fff; min-width: 280px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.15); 
    border-top: 4px solid var(--ogs-wine); 
    flex-direction: column; z-index: 10001;
    padding: 0; margin: 0;
}

.nav-bar ul li:hover > ul,
.nav-bar ul li:hover > .sub-menu { display: flex !important; }

.nav-bar ul li ul li a,
.nav-bar ul li .sub-menu li a { 
    color: var(--ogs-navy) !important; 
    padding: 12px 15px; border-bottom: 1px solid #eee; 
    text-transform: none; letter-spacing: normal; 
    font-size: 14px; font-weight: normal;
    font-family: 'Segoe UI', sans-serif;
}

.nav-bar ul li ul li:hover > a,
.nav-bar ul li .sub-menu li:hover > a {
    background: var(--ogs-navy) !important; color: #ffffff !important;
}

/* --- 5.1 UTILITY BAR DROPDOWNS (REFINED) --- */

/* Force the sub-menu to be hidden initially */
.utility-nav li ul.sub-menu,
.utility-nav li ul {
    display: none !important; /* Explicitly hide */
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--ogs-navy-dark);
    min-width: 250px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    border-top: 2px solid var(--ogs-gold);
    z-index: 99999;
    padding: 10px 0;
    transition: opacity 0.2s ease;
}

/* Show ONLY on hover */
.utility-nav li:hover > ul.sub-menu,
.utility-nav li:hover > ul {
    display: block !important;
    visibility: visible;
    opacity: 1;
}

/* Ensure the parent li doesn't clip the dropdown */
.utility-bar, 
.utility-bar .container {
    overflow: visible !important;
}

.utility-nav li {
    position: relative;
    padding-bottom: 5px; /* Creates a small bridge so the menu doesn't close when moving mouse */
}

/* Style the links inside the utility dropdown */
.utility-nav li ul li a {
    padding: 10px 20px !important;
    text-align: right;
    font-size: 11px !important;
    line-height: 1.2;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    opacity: 1 !important;
    text-transform: none !important; /* Usually looks classier for sub-links */
}

.utility-nav li ul li:last-child a {
    border-bottom: none;
}

/* --- 5.2 MULTI-LEVEL FLY-OUTS (Desktop Only) --- */
@media (min-width: 993px) {

    /* Target the third level (the sub-menu of a sub-menu) */
    .nav-bar ul li ul li ul,
    .nav-bar ul li .sub-menu li .sub-menu {
        top: 0 !important;      /* Align the top with the parent item */
        left: 100% !important;  /* Push it to the right of the parent item */
        margin-top: -4px;       /* Aligns with the border-top of your dropdowns */
    }

    /* Add a small arrow indicator for items with a fly-out menu */
    .nav-bar ul li ul li.menu-item-has-children > a::after {
        content: '\f105';       /* Font Awesome Angle Right */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        float: right;
        margin-left: 10px;
        opacity: 0.5;
    }
}

/* Prevent off-screen menus on the far right */
.nav-bar ul li.edge-menu ul li ul {
    left: auto !important;
    right: 100% !important; /* Fly-out to the left instead */
}

/* --- 6. SIDEBAR & CONTENT --- */
.entry-title {
    color: var(--ogs-navy); text-transform: uppercase; font-weight: 500; font-size: 2.8rem;
    position: relative; padding-bottom: 15px; margin-bottom: 30px; letter-spacing: -1.5px;
}
.entry-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 80px; height: 6px; background: var(--ogs-wine); }

.breadcrumb-bar { background: var(--ogs-bg); padding: 12px 0; font-size: 13px; border-bottom: 1px solid #ddd; }
.breadcrumb-bar a { color: var(--ogs-gray); text-transform: uppercase; text-decoration: none; }
.breadcrumb-bar a:hover { color: var(--ogs-navy); text-decoration: underline; }

.ogs-sidebar-nav h3 { 
    font-size: 22px; color: var(--ogs-navy); text-transform: uppercase; 
    border-bottom: 4px solid var(--ogs-wine); padding-bottom: 10px; margin-bottom: 20px; font-weight: normal;
}

.ogs-sidebar-nav ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.ogs-sidebar-nav ul li { list-style-type: none !important; margin: 0 !important; padding: 0 !important; background-image: none !important; }

.ogs-sidebar-nav ul li a { 
    display: block; padding: 12px 15px; color: var(--ogs-gray); 
    border-left: 4px solid transparent; text-decoration: none !important; transition: all 0.2s ease;
}

.ogs-sidebar-nav ul li.current_page_item a { 
    color: var(--ogs-wine); font-weight: bold; border-left: 4px solid var(--ogs-wine); background: #fafafa; 
}

.ogs-sidebar-nav ul li a:hover { background: var(--ogs-bg); color: var(--ogs-navy); }

/* --- 7. BUTTONS & FOOTER --- */
.btn-cta { background: var(--ogs-wine); color: #fff; padding: 12px 14px; font-weight: bold; text-transform: uppercase; font-size: 14px; display: inline-block; text-decoration: none !important; }
.btn-cta:hover { color: var(--ogs-gold); }

footer { background: var(--ogs-navy-dark); color: #fff; padding: 80px 0 40px; margin-top: 40px; }

/* --- 8. RESPONSIVE --- */
@media (max-width: 992px) {
    .container { padding: 0 25px; }
    
    .page-container { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 40px; 
    }
    
    .main-content { order: 1 !important; width: 100% !important; }

	.utility-nav {
			justify-content: center;
			flex-wrap: wrap;
		}
		
		.utility-nav li {
			margin: 0 10px;
		}
		
		.utility-nav li ul.sub-menu {
			position: static;
			box-shadow: none;
			border: none;
			background: rgba(255,255,255,0.05);
			display: block;
		}
    
    .ogs-sidebar-nav { 
        order: 2 !important; 
        width: 100% !important;
        border-top: 1px solid #eee; 
        padding-top: 30px; 
    }
    
    .main-header { 
        flex-direction: column; 
        gap: 20px; 
        align-items: flex-start; 
        text-align: left; 
    }
    
    .logo-text { max-width: 100%; }
    .logo-text img { max-width: 90%; height: auto; }

    .menu-toggle {
        display: flex !important;
        align-items: center;
        background: none;
        border: none;
        padding: 15px 0;
        cursor: pointer;
        color: #fff;
    }

    .hamburger-line {
        display: block;
        width: 22px;
        height: 2px;
        background-color: #fff;
        margin: 4px 0;
    }

	.hamburger-icon { margin-right: 5px; }

    .nav-bar ul.main-menu {
        display: none; 
        flex-direction: column;
        width: 100%;
        background: var(--ogs-navy-dark);
    }

    .nav-bar.toggled ul.main-menu {
        display: flex !important;
    }

    /* --- MOBILE SUB-MENU FIX (Surgical Approach) --- */
    
    /* 1. Parent LI setup */
    .nav-bar .main-menu li.menu-item-has-children {
        position: relative;
    }

	/* Target the links inside the expanded mobile submenu */
	.nav-bar .main-menu .menu-item-has-children.sub-menu-open ul.sub-menu li a,
	.nav-bar .main-menu .menu-item-has-children.sub-menu-open ul li a {
		color: #ffffff !important; /* Changed to White */
		font-size: 13px; 
		padding: 10px 20px;
	}

    /* 2. Create the "Hit Box" for the Plus sign using ::before */
    /* This makes a 50px clickable area on the far right that won't block the link */
    .nav-bar .main-menu li.menu-item-has-children::before {
        content: '+';
        position: absolute;
        right: 0;
        top: 0;
        width: 50px;
        height: 52px; /* Matches standard link height */
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 20px;
        border-left: 1px solid rgba(255,255,255,0.1);
        z-index: 5;
        cursor: pointer;
    }

    .nav-bar .main-menu li.menu-item-has-children.sub-menu-open::before {
        content: '−';
    }

    /* 3. Ensure links don't overlap the plus sign area */
    .nav-bar .main-menu li.menu-item-has-children > a {
        padding-right: 60px !important;
    }

    /* 4. Hide/Show Submenu */
    .nav-bar .main-menu .menu-item-has-children ul.sub-menu {
        display: none !important;
        position: static !important;
        width: 100% !important;
        background: rgba(0,0,0,0.2) !important;
        padding-left: 20px !important;
    }

    .nav-bar .main-menu .menu-item-has-children.sub-menu-open > ul.sub-menu {
        display: block !important;
    }
}

