/* Hagimo Holdings, LLC - Main Stylesheet */
/* Design Language: Authoritative & Scholarly (RAND/Brookings-inspired) */

/* ============================================
   Google Fonts
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800;900&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS Variables & Base Styles
   ============================================ */
:root {
    --primary-color: #003366;
    --primary-light: #0A4A7A;
    --primary-dark: #002244;
    --accent-color: #4A7B9D;
    --accent-hover: #3A6585;
    --accent-gold: #C4A962;
    --accent-gold-light: #D4BC7A;
    --text-color: #2C2C2C;
    --text-light: #5A6670;
    --bg-light: #FAFAF7;
    --bg-warm: #E8E4DE;
    --bg-dark: #002244;
    --white: #ffffff;
    --border-color: #D5D0C8;
    --shadow-sm: 0 1px 3px rgba(0,51,102,0.06);
    --shadow-md: 0 4px 12px rgba(0,51,102,0.08);
    --shadow-lg: 0 8px 24px rgba(0,51,102,0.12);
    --transition: all 0.25s ease;
    --font-main: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-light);
    max-width: 100%;
    margin: 0;
    padding: 0;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Header & Navigation
   WHITE header with dark text (institutional)
   ============================================ */
header {
    background: var(--bg-light);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 var(--border-color);
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
}

#logo {
    display: inline-block;
    z-index: 1000;
    margin: 0;
    padding: 10px 20px;
}

#logo img {
    max-height: 50px;
    transition: var(--transition);
    display: block;
}

#logo img:hover {
    transform: scale(1.03);
    opacity: 0.85;
}

/* Navigation Menu */
nav {
    padding: 0 20px;
    flex: 1;
    margin: 0;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Utility container for content alignment */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 2px;
}

.menu > li {
    position: relative;
}

.menu > li > a {
    display: block;
    padding: 16px 16px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.88em;
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.menu > li > a:hover,
.menu > li:hover > a {
    color: var(--primary-color);
    background-color: rgba(0,51,102,0.04);
    border-bottom-color: var(--accent-gold);
    text-decoration: none;
}

/* Dropdown Menus */
.menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 270px;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0,51,102,0.12);
    list-style: none;
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--transition);
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    margin-top: 0;
    padding-top: 10px;
    border-top: 2px solid var(--accent-gold);
}

.menu ul::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.menu li:hover > ul,
.menu ul:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    font-size: 0.88em;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 0.01em;
}

.menu ul li a:hover {
    background-color: rgba(0,51,102,0.04);
    color: var(--primary-color);
    padding-left: 24px;
    text-decoration: none;
}

/* Nested Dropdowns */
.menu ul ul {
    top: 240px;
    left: 100%;
    border-radius: 4px;
    margin-top: 0;
    padding-top: 6px;
    margin-left: -20px;
    padding-left: 20px;
}

/* Hamburger Menu Toggle (dark lines on white header) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    gap: 5px;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: rgba(0,51,102,0.05);
    transform: none;
    box-shadow: none;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    border-radius: 1px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Modal Link Container */
#modal-link-container {
    position: static;
    margin-left: auto;
    padding-right: 20px;
    text-align: right;
}

#button_ModalLogin {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-main);
    transition: var(--transition);
    font-size: 0.8em;
    white-space: nowrap;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#button_ModalLogin:hover {
    background: var(--primary-light);
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--primary-light) 40%, var(--accent-color) 100%);
    padding: 100px 0;
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.015) 40px,
        rgba(255,255,255,0.015) 41px
    );
    pointer-events: none;
}

.hero .container { padding: 0 20px; }

.hero-content {
    max-width: 1100px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.8em;
    font-weight: 700;
    margin-bottom: 22px;
    line-height: 1.25;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: 1.15em;
    opacity: 0.88;
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    letter-spacing: 0.03em;
}

/* Page Banner (for subpages) */
.page-banner {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--primary-light) 40%, var(--accent-color) 100%);
    padding: 70px 40px;
    text-align: center;
    color: var(--white);
    display: flex;
    justify-content: center;
}

.page-banner-content {
    max-width: 1100px;
    width: 100%;
}

.page-banner h1 {
    font-family: var(--font-heading);
    font-size: 2.3em;
    font-weight: 700;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.1);
    letter-spacing: -0.01em;
}

.page-banner p {
    font-size: 1.1em;
    opacity: 0.85;
    margin: 0;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* Page-specific banner images */
.page-banner.banner-clinical-trials {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--primary-light) 40%, var(--accent-color) 100%);
}

.page-banner.banner-legal {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--primary-light) 40%, var(--accent-color) 100%);
}

.page-banner.banner-data {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--primary-light) 40%, var(--accent-color) 100%);
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-hero {
    display: inline-block;
    padding: 14px 36px;
    background: var(--accent-gold);
    color: var(--white);
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(196,169,98,0.3);
    border: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--font-main);
}

.btn-hero:hover {
    background: var(--accent-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(196,169,98,0.4);
    text-decoration: none;
    color: var(--white);
}

.btn-hero-outline {
    display: inline-block;
    padding: 14px 36px;
    background: transparent;
    color: var(--white);
    font-weight: 600;
    font-size: 0.88rem;
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: var(--font-main);
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--white);
}

/* ============================================
   Unified Grid Layout (Desktop Optimized)
   ============================================ */
.unified-grid {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    width: 100%;
    background: var(--bg-warm);
}

.unified-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    width: 100%;
}

/* Cards: Clean white with subtle left border (navy) */
.grid-card {
    background: var(--white);
    padding: 32px;
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 3px solid var(--primary-color);
    border-top: none;
    display: flex;
    flex-direction: column;
}

.grid-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent-gold);
}

.grid-card h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.15em;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.grid-card > p:first-of-type {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 0.93em;
}

.grid-card a {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.88em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.grid-card a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Legacy highlights section (kept for backwards compatibility) */
.highlights {
    display: none;
}

/* ============================================
   Company Overview Section
   ============================================ */
.company-overview {
    background: var(--white);
    padding: 64px 40px;
    max-width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--border-color);
}

.overview-content {
    max-width: 840px;
    width: 100%;
    text-align: center;
}

.company-overview h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.85em;
    font-weight: 700;
    margin-bottom: 28px;
    line-height: 1.3;
    position: relative;
    display: inline-block;
}

.company-overview h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
    margin: 16px auto 0;
    border-radius: 2px;
}

.company-overview p {
    color: var(--text-color);
    font-size: 1.05em;
    line-height: 1.85;
    margin-bottom: 18px;
    text-align: left;
}

/* Legacy overlay styles (for subpages) */
.overlay_3,
.overlay_5 {
    background: rgba(0, 51, 102, 0.92);
    color: var(--white);
    padding: 30px 40px;
    border-radius: 4px;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
}

.overlay_3 h2,
.overlay_5 h2 {
    font-family: var(--font-heading);
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--white);
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 10px;
}

.overlay_3 ul,
.overlay_5 ul {
    margin-left: 20px;
    margin-top: 10px;
}

.overlay_3 li,
.overlay_5 li {
    margin-bottom: 8px;
}

/* Image Banner (for subpages) */
.image-banner {
    width: 100%;
    min-height: 320px;
    padding: 80px 40px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.image-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, rgba(0,51,102,0.88) 0%, rgba(74,123,157,0.7) 100%);
}

.image-banner-tall {
    width: 100%;
    min-height: 380px;
    padding: 80px 40px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 25px;
}

.image-banner-tall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, rgba(0,51,102,0.88) 0%, rgba(74,123,157,0.7) 100%);
}

.overlay_title {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 2.2em;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.15);
    text-align: center;
    padding: 25px 30px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.overlay_generic_middle {
    position: relative;
    z-index: 1;
    color: var(--white);
    text-align: center;
    padding: 20px 50px;
    max-width: 900px;
    line-height: 1.8;
    font-size: 1.1em;
    letter-spacing: 0.02em;
    font-weight: 300;
}

/* ============================================
   Main Content Area
   ============================================ */
main {
    min-height: 60vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* Restore paragraph spacing */
.page-content p,
.page-content-wrapper p {
    margin-bottom: 1.15rem;
    line-height: 1.8;
}

.page-content p:last-child,
.page-content-wrapper p:last-child {
    margin-bottom: 0;
}

.page-content {
    padding: 50px 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.page-content-wrapper {
    max-width: 1100px;
    width: 100%;
    font-size: 1.05em;
    line-height: 1.8;
}

/* Standard Typography Classes */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.15em;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.75em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5em;
}

h4 {
    font-family: var(--font-heading);
    margin-top: 1.5em;
    margin-bottom: 0.25em;
    font-size: 1.08em;
    font-weight: 700;
    color: var(--primary-color);
}

.page-content-wrapper ul,
.page-content-wrapper ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.page-content-wrapper li {
    margin-bottom: 0.5em;
}

/* Two-column table layout standardization */
.content-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 20px 0;
}

.content-table td {
    vertical-align: top;
    width: 50%;
}

.div_HeaderText {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent-gold);
}

/* Column Layouts */
.column-set {
    display: block;
    margin-top: 30px;
}

.left-column {
    float: left;
    width: 30%;
    padding-right: 30px;
    margin-bottom: 20px;
}

.right-column {
    overflow: hidden;
}

.large-column {
    flex: 1;
    width: 100%;
}

.right-column img,
.left-column img {
    max-width: 300px;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    margin-bottom: 15px;
}

/* Content Sections */
.content-section {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--white);
    border-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.content-section h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.unified-grid .content-section {
    margin-bottom: 0;
}

.unified-grid .content-section h3 {
    font-size: 1.15em;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
    display: block;
}

.unified-grid .content-section > p {
    margin: 0 0 18px 0;
    color: var(--text-light);
    font-size: 0.93em;
    line-height: 1.7;
}

/* Legacy index-nav-sections (hidden) */
.index-nav-sections {
    display: none;
}

.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.link-list li {
    margin: 0;
}

.link-list a {
    font-weight: 500;
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    padding: 6px 0;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.95em;
}

.link-list a:before {
    content: "\203A";
    margin-right: 8px;
    opacity: 0.4;
    transition: var(--transition);
    font-weight: 700;
}

.link-list a:hover {
    color: var(--primary-color);
    padding-left: 4px;
}

.link-list a:hover:before {
    opacity: 1;
}

.consulting-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.consulting-links h4 {
    font-size: 0.95em;
    color: var(--primary-color);
    margin-bottom: 10px;
    margin-top: 0;
    font-weight: 700;
}

#industries,
#services,
#consulting,
#data {
    scroll-margin-top: 120px;
}

/* Lists */
ul {
    margin-left: 20px;
}

li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* ============================================
   Modal Dialog
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,51,102,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--white);
    margin: 10% auto;
    padding: 36px 40px;
    border-radius: 6px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
    border-top: 3px solid var(--accent-gold);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    font-family: var(--font-heading);
    font-size: 1.4em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-gold);
}

.modal h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* ============================================
   Footer
   ============================================ */
footer {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--bg-dark) 100%);
    color: var(--white);
    padding: 56px 40px 24px;
    margin-top: 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1em;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-gold);
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.footer-section p {
    margin-bottom: 8px;
    color: #B0BEC5;
    line-height: 1.75;
    font-size: 0.93em;
}

.footer-section a {
    display: block;
    margin-bottom: 8px;
    transition: var(--transition);
}

.link-white {
    color: #81B4D8 !important;
    font-size: 0.93em;
}

.link-white:hover {
    color: var(--white) !important;
    padding-left: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 28px;
    margin-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    color: #6B8299;
    font-size: 0.85em;
    letter-spacing: 0.03em;
}

/* ============================================
   Buttons & Forms
   ============================================ */
button,
input[type="submit"],
input[type="button"],
.btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.92em;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.04em;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--accent-gold);
}

.btn-secondary:hover {
    background: var(--accent-gold-light);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 11px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    font-family: var(--font-main);
    transition: var(--transition);
    margin-bottom: 15px;
    background: var(--white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74,123,157,0.12);
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.hidden { display: none; }
.visible { display: block; }

/* ============================================
   Responsive Design
   ============================================ */
@media screen and (max-width: 1024px) {
    .column-set {
        flex-direction: column;
    }

    .left-column,
    .right-column {
        padding: 0;
    }

    .hero h1 {
        font-size: 2.2em;
    }

    .highlights {
        padding: 40px 20px;
    }

    .index-nav-sections {
        padding: 0 20px;
    }

    .content-table {
        border-spacing: 10px 0;
    }
}

@media screen and (max-width: 768px) {
    /* Header & Navigation */
    header {
        flex-direction: column;
        position: sticky;
    }

    .header-inner {
        flex-wrap: wrap;
        padding: 0 12px;
    }

    .menu-toggle {
        display: flex;
    }

    #logo {
        padding: 12px 8px;
    }

    nav {
        width: 100%;
        padding: 0;
        display: none;
        order: 10;
        background: var(--white);
        border-top: 1px solid var(--border-color);
    }

    nav.active {
        display: block;
    }

    .menu {
        flex-direction: column;
        width: 100%;
        padding-bottom: 8px;
    }

    .menu > li {
        width: 100%;
    }

    .menu > li > a {
        padding: 14px 16px;
        text-align: left;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
        font-size: 0.88em;
        color: var(--primary-color);
    }

    .menu ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0,51,102,0.03);
        min-width: 100%;
        padding: 0;
        border-top: none;
        border-radius: 0;
        margin-top: 0;
        padding-top: 0;
        display: none;
    }

    .menu li.dropdown-open > ul {
        display: block;
    }

    .menu ul li a {
        color: var(--text-color);
        text-align: left;
        padding: 12px 16px 12px 32px;
        font-size: 0.86em;
    }

    .menu ul li a:hover {
        background-color: rgba(0,51,102,0.05);
        padding-left: 36px;
    }

    /* Nested dropdowns on mobile */
    .menu ul ul {
        position: static;
        left: 0;
        top: 0;
        margin-left: 0;
        padding-left: 0;
    }

    .menu ul ul li a {
        padding-left: 48px;
    }

    #modal-link-container {
        display: none;
    }

    /* Hero */
    .hero {
        padding: 60px 20px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 1.8em;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        font-size: 1em;
        margin-bottom: 24px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .btn-hero,
    .btn-hero-outline {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    /* Grid */
    .unified-grid {
        padding: 30px 16px;
    }

    .unified-grid-wrapper {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .grid-card {
        padding: 24px 20px;
    }

    /* Page Banners */
    .page-banner {
        padding: 50px 20px;
    }

    .page-banner h1 {
        font-size: 1.6em;
    }

    /* Content */
    .page-content {
        padding: 30px 16px;
    }

    .page-content-wrapper {
        font-size: 1em;
    }

    /* Tables -> stacked */
    .content-table {
        display: block;
        border-spacing: 0;
    }

    .content-table tbody {
        display: block;
    }

    .content-table tr {
        display: block;
        margin-bottom: 20px;
    }

    .content-table td {
        display: block;
        width: 100% !important;
        padding: 0;
        margin-bottom: 16px;
    }

    .content-table td img {
        display: block;
        margin: 0 auto 16px auto;
        max-width: 150px;
    }

    /* Float columns -> stacked */
    .left-column {
        float: none;
        width: 100%;
        padding-right: 0;
        margin-bottom: 24px;
    }

    .right-column {
        overflow: visible;
    }

    .right-column img,
    .left-column img {
        float: none !important;
        display: block;
        margin: 0 auto 16px auto !important;
        max-width: 100%;
    }

    /* Column header text */
    .div_HeaderText {
        font-size: 1.35em;
        margin-bottom: 24px;
    }

    /* Image banners */
    .image-banner {
        min-height: 200px;
        padding: 50px 20px;
    }

    .image-banner-tall {
        min-height: 260px;
        padding: 50px 20px;
    }

    .overlay_title {
        font-size: 1.5em;
        padding: 16px 20px;
    }

    .overlay_generic_middle {
        padding: 16px 20px;
        font-size: 1em;
    }

    /* Overlays */
    .overlay_3,
    .overlay_5 {
        max-width: 100%;
        padding: 24px 20px;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        gap: 30px;
    }

    .footer-section {
        text-align: center;
        min-width: auto;
    }

    .footer-section h3 {
        display: inline-block;
    }

    footer {
        padding: 40px 20px 16px;
    }

    /* Modal */
    .modal-content {
        margin: 5% auto;
        padding: 24px 20px;
        width: 94%;
    }

    /* Links */
    .highlights {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        gap: 20px;
    }

    .index-nav-sections {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        margin: 40px auto 0;
        gap: 30px;
    }

    .link-list {
        grid-template-columns: 1fr;
    }

    /* Company overview */
    .company-overview {
        padding: 40px 20px;
    }

    .overview-content {
        text-align: left;
    }

    .company-overview h2 {
        font-size: 1.5em;
    }
}

@media screen and (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .hero {
        padding: 40px 16px;
    }

    .hero h1 {
        font-size: 1.5em;
    }

    .hero-subtitle {
        font-size: 0.95em;
    }

    .page-banner {
        padding: 36px 16px;
    }

    .page-banner h1 {
        font-size: 1.35em;
    }

    .grid-card {
        padding: 20px 16px;
    }

    .page-content {
        padding: 24px 12px;
    }

    .overlay_title {
        font-size: 1.25em;
    }

    footer {
        padding: 30px 16px 12px;
    }
}

/* ============================================
   Fallback for Missing Images
   ============================================ */
.image-banner,
.slide {
    background-color: var(--primary-color);
}

/* If background image fails, show a gradient */
.slide:not([style*="url"]),
.image-banner:not([style*="url"]) {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

/* Placeholder styling for missing images */
img[src$=".svg"] {
    background: linear-gradient(160deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    header, footer, #prev, #next, .modal, .menu-toggle {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
