/* ==========================================================================
   1. CORE HEADER STRUCTURE
   ========================================================================== */
header.cover {
  height: 310px !important; 
  min-height: 310px !important;
  background-color: #314784 !important; 
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: visible;
  background-size: auto 260px !important; 
  background-position: center top !important; 
  background-repeat: no-repeat !important;
}

header.cover h1 { display: none !important; }

/* ==========================================================================
   2. VERTICAL "BOOK SPINE" LOGO
   ========================================================================== */
.vertical-logo {
  position: absolute;
  top: 0;
  left: 0;
  height: 260px;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  pointer-events: none;
  border-left: 2px solid rgba(255, 255, 255, 0.4);
  border-right: 2px solid rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.05);
}

.vertical-logo-text {
  transform: rotate(-90deg) scale(1.35);
  font-family: 'IBM Plex Serif', serif !important;
  white-space: nowrap;
  color: #cce6ff;
}

.vertical-logo-text strong:first-of-type { color: #e8c15c; font-weight: 700; }
.vertical-logo-text strong:last-of-type { color: #ffffff; font-weight: 600; }

.vertical-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  pointer-events: auto;
  text-decoration: none;
}

/* ==========================================================================
   3. THE NAVIGATION SHELF (Desktop)
   ========================================================================== */
nav[role="navigation"] {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px; 
  background-color: #1a274a; 
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

nav[role="navigation"] a {
  margin: 0 0.25rem;
  font-family: 'IBM Plex Serif', serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white !important;
  text-decoration: none;
}

nav[role="navigation"] a:hover { color: #e8c15c !important; }

/* ==========================================================================
   4. MOBILE HAMBURGER LOGIC
   ========================================================================== */

/* DESKTOP RESETS: Explicitly hide mobile elements on large screens */
#menu-toggle, 
.hamburger-label, 
.mobile-nav-container { 
    display: none !important; 
}

@media screen and (max-width: 74em) {
    header.cover { 
        height: 260px !important; 
        min-height: 260px !important; 
    }

    /* Hide Desktop Nav Shelf */
    nav[role="navigation"] { 
        display: none !important; 
    }

    /* THE FORCE-SHOW ICON (Mobile Only) */
    .hamburger-label {
        display: block !important; 
        position: fixed;        /* Stays on top during scroll */
        top: 15px;             
        right: 15px;           
        cursor: pointer;
        font-size: 32px;
        color: #e8c15c !important; 
        z-index: 9999;         
        line-height: 1;
        /* background: #1a274a;   /* Solid Brand Navy */
        /* THE FIX: 85% opacity Navy background */
        background: rgba(26, 39, 74, 0.85) !important;
        padding: 10px 14px;
        border: 2px solid #e8c15c; 
        border-radius: 8px;
    }

    /* The Mobile Dropdown */
    .mobile-nav-container {
        display: none;          /* Hidden until toggle */
        position: fixed;        /* Floats with the button — absolute positioned it at the document top, so it opened off-screen when scrolled */
        top: 84px;              /* Just below the fixed hamburger button (15px offset + ~56px tall + gap) */
        left: 0;
        width: 100%;
        max-height: calc(100vh - 100px);  /* Never runs off the bottom of short screens */
        overflow-y: auto;
        background: #1a274a; 
        flex-direction: column;
        z-index: 9000;
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    }

    .mobile-nav-container a {
        display: block;
        padding: 20px 30px;
        color: white !important;
        text-decoration: none;
        font-family: 'IBM Plex Serif', serif;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 1.2rem;
    }

    /* THE TOGGLE ENGINE */
    #menu-toggle:checked ~ .mobile-nav-container {
        display: flex !important;
    }

    /* Visual feedback for the button when open */
    #menu-toggle:checked ~ .hamburger-label {
        /* background: #e8c15c; */
        /* A slightly translucent gold so it still feels modern */
        background: rgba(232, 193, 92, 0.95) !important;
        color: #1a274a !important;
    }
}

/* ==========================================================================
   5. HUB CARD GRID & CONTENT STYLING
   ========================================================================== */
.hub-card-grid ul {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 1.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 2rem 0 !important;
}

.hub-card-grid ul li {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hub-card-grid ul li a::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10;
}

.hub-card-grid ul li a {
    text-decoration: none !important;
    color: #314784 !important;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: block;
}

.hub-card-grid ul li:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(49, 71, 132, 0.12);
    border-color: #314784;
}

.hub-card-grid ul li:hover a { color: #e8c15c !important; }

/* The "Architect's Fix" Blockquotes */
.content blockquote {
    background: #f1f5f9;
    border-left: 4px solid #e8c15c !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0 8px 8px 0;
    font-style: normal !important;
    color: #334155;
    margin: 1rem 0 !important;
}

.content blockquote p { margin: 0 !important; font-size: 0.95rem; line-height: 1.4 !important; }

/* Mission Divider */
.mission-divider {
    height: 1px;
    margin: 2.5rem auto;
    width: 80%;
    background: linear-gradient(to right, rgba(49, 71, 132, 0) 0%, rgba(232, 193, 92, 0.6) 50%, rgba(49, 71, 132, 0) 100%);
    border: none;
}

/* Security Banner Styling */
.security-banner {
    background: #f8f9fa;
    border: 1px solid #dee2e6; /* Standard Border */
    padding: 10px 15px;
    border-radius: 6px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

/* Active State: Border Color Change + Pulse */
.security-banner.alert-active {
    border-color: #d9534f;
    background: #fff5f5;
    /* Box shadow creates the pulse without moving the layout */
    animation: border-pulse 2s infinite;
}

/* Status Dot */
.status-dot {
    height: 10px;
    width: 10px;
    background-color: #007bff; /* Pleasant Blue for old alerts */
    border-radius: 50%;
    margin-right: 12px;
}

.alert-active .status-dot {
    background-color: #d9534f; /* Alert Red */
}

/* Pulse Animation: Just the Border Glow */
@keyframes border-pulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(217, 83, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 83, 79, 0); }
}

/* ==========================================================================
   6. GLOBAL CONTENT CONTAINER FIX (Mobile Padding)
   ========================================================================== */
.container {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.navlink {
  max-width: 45%;
  display: flex;          /* ← key change */
  gap: .25rem;            /* spacing between arrow + text */
  line-height: 1.3;
}

.navlink .arrow {
  flex-shrink: 0;         /* arrow never wraps */
}

.navlink .title {
  white-space: normal;    /* title wraps naturally */
}
