/* ============================================================
   Pediatric Critical Care Calculators — main.css
   ============================================================ */

/* ----- Reset / Base ----- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Source Sans 3 — crisp, legible, renders at full weight on all
   platforms including macOS Retina. Weights 400 (normal) and
   600 (semi-bold) cover all UI needs.                          */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

/* @font-face {
    font-family: "Open Sans";
    src: url(chrome-extension://aefalnopbcachhkjnihfjgglnjdegicg/InAppCsh/style/open-sans/fonts/Light/OpenSans-Light.woff) 
    format("woff"), url(chrome-extension://aefalnopbcachhkjnihfjgglnjdegicg/InAppCsh/style/open-sans/fonts/Light/OpenSans-Light.ttf) 
    format("truetype");
    font-style: normal;
} */

body {
    margin: 0;
    font-family: 'Source Sans 3', Arial, sans-serif;
    background: #f7f7f7;
	line-height: 1.66667;
    color: #333;
    font-size: 15px;
}

/* ----- Headings ----- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Sans 3', Arial, sans-serif;
    color: #b31b1b;
    margin-top: 0;
}

/* ----- WCM Global Top Nav Bar ----- */
.wcm-topnav {
    background: #CF4520;
    display: flex;
    align-items: center;
    padding: 12 20px;
    height: 60px;
    gap: 0;
}

.wcm-topnav a {
    color: #fff;
    display: flex;
    border-right: 1px solid #e7751d;
    align-items: center; 
    height: 70%; 
    text-decoration: none;
    font-size: 15px;
    padding: 0 20px;
    opacity: 0.9;
    white-space: nowrap;
}

.wcm-topnav a:hover {
    background: #b31b1b;
    height: 100%; 
    opacity: 1;
    text-decoration: none;
}

/* ----- Site Header (banner image) ----- */
.site-header {
    background: #fff;
    display: flex;
    height: 120px;
	align-items: center;
    /* line-height: 0; collapse whitespace under inline image */
}

.header-image {
    display: block;
    height: 80px;
	margin-left: 36px;
}

/* ----- Calculator Category Nav ----- */
.main-nav {
    background: #c05621;
    display: flex;
    align-items: center;
    padding: 0;
    height: 60px;
    gap: 0;
    position: relative;
    z-index: 100;
    isolation: isolate;          /* fixes transparency over page content */
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;     /* anchor for the dropdown panel */
}

.main-nav a {
    display: flex;
    border-right: 1px solid #e7751d;
    align-items: center; 
    color: #fff;
    text-decoration: none;
    padding: 16px 20px;
    font-size: 15px;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active,
.main-nav li.has-dropdown.open > a {
    background: #a04010;
}

.main-nav a.active { font-weight: bold; }

/* ----- Dropdown Panel ----- */
.nav-dropdown {
    display: none;                   /* hidden by default */
    position: absolute;
    top: 100%;                       /* flush under the nav bar */
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid #ddd;
    border-top: 3px solid #c05621;  /* accent stripe matches nav */
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 8px 0;
    z-index: 200;
}

/* Show when parent li has .open */
.main-nav li.has-dropdown.open .nav-dropdown {
    display: block;
}

.nav-dropdown a {
    display: block;
    color: #b31b1b;
    text-decoration: none;
    padding: 7px 18px;
    font-size: 12px;
    white-space: nowrap;
    background: transparent;
}

.nav-dropdown a:hover {
    background: #fdf5f5;
    text-decoration: underline;
}

/* ----- Page Body Layout ----- */
.main-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

/* ----- Left Sidebar ----- */
.left-nav {
    width: 240px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 14px 0 20px;
    min-height: calc(100vh - 140px); /* keeps sidebar full-height */
}

.left-nav .sidebar-label {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 14px 8px;
}

.left-nav a {
    display: block;
    font-size: 15px;
    color: #b31b1b;
    text-decoration: none;
    padding: 3px 14px;
    line-height: 1.5;
}

.left-nav a:hover {
    text-decoration: underline;
    background: #fdf5f5;
}

/* ----- Main Content Area ----- */
.container {
    flex: 1;
    min-width: 0;
    padding: 28px 30px;
    max-width: 900px;
}

.container h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

/* ----- Disclaimer ----- */
.disclaimer {
    font-size: 15px;
    color: #666;
    background: #fff8f0;
    border-left: 3px solid #c05621;
    padding: 8px 14px;
    margin-bottom: 24px;
    border-radius: 0 4px 4px 0;
    line-height: 1.6;
    max-width: 560px;
    width: 100%; 
    display: inline-block; 
}

/* ----- Category Card Grid ----- */
.category-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.category-card {
    background: #fff;
    border-radius: 6px;
    padding: 18px 20px;
    border: 1px solid #e4e4e4;
}

.category-card h2 {
    font-size: 18px;
    font-weight: 700;
    color: #b31b1b;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0d0d0;
}

.category-card a {
    display: block;
    margin: 6px 0;
    font-size: 15px;
    color: #b31b1b;
    text-decoration: none;
    line-height: 1.4;
}

.category-card a:hover {
    text-decoration: underline;
}

.card-hint {
    font-size: 10px;
    color: #aaa;
    margin-top: 8px;
}

/* Single-category landing pages — card expands to fill the container */
.category-grid.single-card {
    grid-template-columns: 1fr;
    max-width: 560px;
}

/* ----- Calculator page content area ----- */
.calc-title {
    font-size: 20px;
    color: #b31b1b;
    margin-bottom: 6px;
}

.calc-category {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

/* ----- Footer ----- */
footer {
    text-align: center;
    padding: 20px;
    background: #eee;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #ddd;
    margin-top: 30px;
}

/* ============================================================
   Hamburger button — left-nav toggle
   Always injected by nav.js; CSS shows/hides per breakpoint.
   ============================================================ */
.nav-hamburger {
    display: none;               /* hidden on desktop */
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: none;
    border: none;
    border-right: 1px solid #e7751d;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.nav-hamburger:hover { background: #a04010; }

/* ============================================================
   Left-nav overlay — always in DOM, off-screen on desktop
   ============================================================ */
.left-nav-overlay {
    position: fixed;
    top: 0;
    left: -280px;                /* off-screen by default */
    width: 260px;
    height: 100%;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    box-shadow: 3px 0 16px rgba(0,0,0,0.18);
    z-index: 500;
    overflow-y: auto;
    padding: 14px 0 40px;
    transition: left 0.22s ease;
}

.left-nav-overlay.open { left: 0; }

.left-nav-overlay .overlay-close {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 14px 10px;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    line-height: 1;
}

.left-nav-overlay .overlay-close:hover { color: #333; }

.left-nav-overlay .sidebar-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 14px 8px;
}

.left-nav-overlay a {
    display: block;
    font-size: 15px;
    color: #b31b1b;
    text-decoration: none;
    padding: 5px 14px;
    line-height: 1.5;
}

.left-nav-overlay a:hover {
    background: #fdf5f5;
    text-decoration: underline;
}

.left-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 499;
}

.left-nav-backdrop.open { display: block; }

/* ============================================================
   Mobile styles
   ============================================================ */
@media (max-width: 800px), (pointer: coarse) {

    /* Hide desktop sidebar */
    .left-nav { display: none; }

    /* Show hamburger */
    .nav-hamburger { display: flex; }

    /* Main-nav: horizontal scroll container */
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar { display: none; }

    /* Prevent items from wrapping — scroll instead */
    .main-nav ul {
        flex-wrap: nowrap;
        padding-right: 12px;
    }

    /* Disable dropdowns on touch */
    .nav-dropdown { display: none !important; }

    /* Remove chevron cue */
    .main-nav li.has-dropdown > a::after { content: ''; }

    /* Content takes full width */
    .container { padding: 16px 14px; }

    /* WCM topnav: smaller on mobile */
    .wcm-topnav { height: 44px; }

    .wcm-topnav a {
        font-size: 12px;
        padding: 0 10px;
    }

    /* Site header: shorter on mobile */
    .site-header { height: 80px; }
    .header-image { height: 52px; margin-left: 16px; }
}
