﻿/*
 * JPG Insurance Theme - Modern, Mobile-First, SEO-Optimized
 * Updated: 2026
 *
 * Design Goals:
 * - Mobile-first responsive design
 * - Modern, clean aesthetic
 * - Accessibility-first (WCAG 2.1)
 * - Performance optimized
 * - SEO-friendly semantic HTML support
 */

:root {
    --brand-blue: #095aa5;
    --brand-blue-light: #0f6fc6; /* Accessible hover blue: 5.1:1 on white. */
    --brand-blue-dark: #074883;
    --brand-gray: #f1f1f1;
    --brand-gray-light: #fafafa;
    --brand-dark: #222;
    --brand-light: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --border-color: #d4d4d4;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition-fast: 150ms ease-out;
    --transition-normal: 250ms ease-out;
}

/* ==================== Base Styles ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background: var(--brand-light);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--brand-blue-light);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ==================== Typography ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: "Raleway", sans-serif;
    margin: 0 0 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 300;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

p {
    margin: 0 0 1rem;
}

/* ==================== Utilities ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==================== Skip Link ==================== */
.skip-to-content {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    background: #fff;
    color: var(--brand-blue);
    z-index: 1000;
    font-weight: 600;
}

.skip-to-content:focus {
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    position: fixed;
    top: 10px;
    left: 10px;
    border: 2px solid var(--brand-blue);
    border-radius: 4px;
}

/* ==================== Header ==================== */
.header-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    width: 100%;
    margin: 0 !important;
    display: block;
    box-sizing: border-box;
}

.masthead {
    padding: 0;
    box-sizing: border-box;
}

.header-inner {
    display: flex;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.header-logo {
    min-width: 0;
    flex-shrink: 0;
}

.header-logo img {
    max-width: 260px;
    width: 100%;
    height: auto;
    display: block;
}

.header-contact {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.phone-number {
    font-size: 3rem !important;
    color: var(--brand-blue);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    font-weight: 700;
}

.phone-number .fa-stack {
    font-size: 2.625rem;
}

.phone-link {
    color: inherit;
    font-weight: 700;
    white-space: nowrap;
    font-size: inherit;
    text-decoration: none;
}

.phone-link:hover {
    text-decoration: underline;
}

.header-quote-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 2px solid var(--brand-blue);
    border-radius: 4px;
    background: var(--brand-blue);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.header-quote-button:hover,
.header-quote-button:focus {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    color: #fff;
}

/* ==================== Navigation ==================== */
.primary-nav {
    position: relative;
    margin-left: auto;
    padding-right: 16px;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: transparent;
    color: var(--brand-blue);
    border: 2px solid var(--brand-blue);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.7rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    border-radius: 8px;
    min-height: 44px;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus {
    background: var(--brand-blue);
    color: #fff;
    outline: none;
}

.nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border: 2px solid var(--brand-blue);
    border-radius: 8px;
    overflow: hidden;
    min-width: 220px;
    z-index: 1000;
    margin-top: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-menu li:hover > .sub-menu {
    display: flex;
}

.nav-menu .sub-menu .menu-item-has-children {
    position: relative;
}

.nav-menu .sub-menu .menu-item-has-children > .sub-menu {
    top: -2px;
    left: 100%;
    margin-top: 0;
    margin-left: -2px;
}

.nav-menu .sub-menu a {
    background: transparent;
    color: var(--brand-blue);
    text-transform: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0;
    padding: 12px 16px;
    min-height: auto;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    transition: background var(--transition-fast);
}

.nav-menu .sub-menu a:hover {
    background: var(--brand-blue);
    color: #fff;
}

.menu a:hover,
.menu a:focus {
    background: var(--brand-gray-light);
}

.menu li:last-child a {
    border-bottom: 1px solid var(--border-color);
}

.menu-item-has-children > a::after {
    content: " ▾";
    font-size: 0.7rem;
    margin-left: auto;
}

.menu li.open > .sub-menu {
    display: grid;
}

.sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--brand-gray);
}

.sub-menu li a {
    text-transform: none;
    font-size: 0.8rem;
}

.nav-open .menu {
    display: flex;
}

/* ==================== Home Rotating Banner ==================== */
.home-banner-section {
    position: relative;
    width: 100%;
    height: max(356.4px, 36.45vw);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dfeaf6;
}

.home-banner-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.home-banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.home-banner-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    filter: brightness(1) saturate(1);
}

.home-banner-slide picture,
.home-banner-image {
    display: block;
    width: 100%;
    height: 100%;
}

.home-banner-image {
    object-fit: cover;
    object-position: var(--hero-position, center);
}

.home-banner-slide--benefits { --hero-position: 50% 20%; }
.home-banner-slide--lawyers { --hero-position: 52% 42%; }
.home-banner-slide--cranes { --hero-position: 48% 25%; }
.home-banner-slide--medical { --hero-position: 76% 0%; }
.home-banner-slide--property { --hero-position: 40% 15%; }

.home-banner-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0.12) 100%);
}

.home-banner-slide.active {
    opacity: 1;
}

@media (max-width: 600px) {
    .home-banner-section {
        height: clamp(320px, 90vw, 420px);
        background: linear-gradient(135deg, #0b4a7c 0%, #1273c9 100%);
    }

    .home-banner-slide {
        display: none;
    }

    .home-banner-content {
        background: rgba(9, 90, 165, 0.18);
    }
}

.home-banner-slide.fade {
    animation: fadeEffect 1s ease-in-out;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.home-banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.08);
    text-align: center;
    padding: 40px 20px;
}

.home-banner-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 30px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: "Raleway", sans-serif;
}

.home-banner-cta {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: transparent;
    color: #fff;
    font-size: 1.7rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid #fff;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    min-height: 44px;
    white-space: nowrap;
    cursor: pointer;
    font-family: "Raleway", sans-serif;
}

.home-banner-cta:hover {
    background: #fff;
    color: var(--brand-blue);
}

.home-banner-cta:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Keeps the white hero headline readable over every photo: 82% brand blue gives ~4.7:1 even over pure white. */
@media (min-width: 601px) {
    .home-banner-title {
        background: rgba(9, 90, 165, 0.82);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        padding: 10px 24px;
        border-radius: 10px;
    }

    /* Frosted brand-blue quote button matching the headline panel; hover uses the navigation's light-blue style. */
    .home-banner-cta {
        background: rgba(9, 90, 165, 0.82);
        border-color: transparent;
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }

    .home-banner-cta:hover,
    .home-banner-cta:focus-visible {
        background: #cfe3f8;
        border-color: #cfe3f8;
        color: var(--brand-blue-dark);
    }
}

/* Responsive */
@media (max-width: 768px) {
    
    .home-banner-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .home-banner-cta {
        padding: 12px 32px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    
    .home-banner-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .home-banner-cta {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* ==================== Hero Banner ==================== */
.banner-wrapper {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: var(--brand-dark);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

@media (max-width: 768px) {
    .banner-wrapper {
        background-attachment: scroll;
        min-height: 45vh;
    }
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 90, 165, 0.65);
    transition: background var(--transition-normal);
}

.banner-content {
    position: relative;
    z-index: 1;
    padding: 40px 16px;
    max-width: 800px;
}

.hero-title {
    color: #fff;
    margin-bottom: 12px;
}

.hero-subtitle {
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 1.5;
    margin-bottom: 24px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-blue);
    color: #fff;
    background: var(--brand-blue);
    padding: 12px 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: 4px;
    min-height: 44px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn:hover {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-outline:hover {
    background: var(--brand-blue);
    color: #fff;
}

.btn-banner {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.btn-banner:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-primary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-primary:hover {
    background: var(--brand-blue-light);
}

.btn-success {
    background: #2ecc71;
    border-color: #2ecc71;
}

.btn-success:hover {
    background: #27ae60;
    border-color: #27ae60;
}

/* Banner Scroll Button */
.banner-down {
    position: absolute;
    bottom: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1;
    padding: 10px;
    transition: transform var(--transition-normal);
    animation: bounce 2s infinite;
}

.banner-down:hover,
.banner-down:focus {
    transform: translateY(4px);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* ==================== Quick Quote Section ==================== */
.qq-horizontal {
    background: var(--brand-blue);
    color: #fff;
    padding: 24px 0;
}

.qq-horizontal form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.qq-horizontal input,
.qq-horizontal select,
.qq-horizontal textarea {
    border: none;
    border-bottom: 2px solid #fff;
    background: transparent;
    color: #fff;
    padding: 12px 0;
    font-weight: 600;
    font-size: 0.95rem;
    min-height: 44px;
}

.qq-horizontal input::placeholder {
    color: #d4e6f7;
}

.qq-horizontal input:focus,
.qq-horizontal select:focus,
.qq-horizontal textarea:focus {
    outline: none;
    border-bottom-color: #fff;
}

/* ==================== Insurance Lines Cards ==================== */
.buttons-wrapper {
    padding: 40px 0;
    background: var(--brand-light);
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.button-card {
    border: 2px solid var(--brand-blue);
    border-radius: 6px;
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.button-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.button-card-header {
    font-size: 1.5rem;
    color: var(--brand-blue);
    margin-bottom: 12px;
    font-weight: 600;
    margin-top: 0;
}

.button-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.button-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* ==================== Content Section ==================== */
.content-wrapper {
    padding: 40px 0;
    background: var(--brand-light);
}

.section-title {
    text-align: center;
    margin-bottom: 36px;
    color: var(--text-primary);
    margin-top: 0;
}

/* ==================== Service Grid ==================== */
.lines-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.lines-grid-line {
    position: relative;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.lines-grid-line:hover {
    box-shadow: var(--shadow-md);
}

.lines-grid-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    padding: 20px;
    text-align: center;
    gap: 12px;
    backdrop-filter: blur(2px);
}

.lines-grid-title {
    background: rgba(9, 90, 165, 0.9);
    color: #fff;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 4px;
    margin: 0;
}

.lines-grid-more {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.lines-grid-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.lines-grid-buttons .btn {
    font-size: 0.8rem;
    padding: 10px 16px;
}

/* ==================== Slogan Section ==================== */
.slogan-wrapper {
    background: var(--brand-blue);
    color: #fff;
    text-align: center;
    padding: 36px 16px;
    font-size: 1.1rem;
    line-height: 1.5;
}

.slogan-text {
    margin: 0;
}

/* ==================== Page Hero ==================== */
.page-hero {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: #fff;
    padding: 40px 16px;
    border-bottom: 4px solid var(--brand-blue-light);
}

.page-hero h1 {
    color: #fff;
    margin-bottom: 8px;
    margin-top: 0;
}

.page-subtitle {
    font-size: 1.05rem;
    color: #e8f1fa;
    margin: 0;
    line-height: 1.4;
}

/* ==================== Content Sections ==================== */
.page-content {
    background: var(--brand-light);
}

.resource-page .page-content {
    max-width: 960px;
    margin: 0 auto;
}

.resource-page-hero .container {
    max-width: 960px;
}

.resource-body {
    font-size: 1.35rem;
    line-height: 1.75;
}

.resource-body h2,
.resource-body h3,
.resource-body h4 {
    color: var(--brand-blue);
    margin-top: 2rem;
}

.resource-body h3[id] {
    scroll-margin-top: 150px;
}

.resource-page-privacy .page-content {
    max-width: 900px;
}

.resource-page-privacy .resource-body {
    font-size: 1.5rem;
    line-height: 1.8;
}

.resource-page-privacy .resource-body > p {
    margin-bottom: 1.35rem;
}

.resource-page-privacy .resource-body > p > strong:only-child {
    display: block;
    margin-top: 2rem;
    margin-bottom: 0.35rem;
    color: var(--brand-blue);
    font-size: 1.2em;
}

.resource-page-privacy .privacy-brand-name {
    display: inline;
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: var(--brand-blue);
    font-weight: 700;
}

.resource-page-privacy .resource-body > p:first-child {
    margin-top: 0;
    margin-bottom: 1.35rem;
}

.resource-page-privacy .resource-body ul {
    margin-bottom: 1.5rem;
}

.resource-body img {
    max-width: 100%;
    height: auto;
}

.resource-body .oc-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.resource-body .oc-carrier {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.resource-body .oc-carrier img {
    display: block;
    width: 100%;
    max-width: 180px;
    max-height: 76px;
    object-fit: contain;
}

.resource-body .pac-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.resource-body .pac-carrier {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.resource-body .pac-logo {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.resource-body .pac-logo img {
    display: block;
    width: 100%;
    max-width: 160px;
    max-height: 70px;
    object-fit: contain;
}

.resource-body .pac-title {
    min-height: 44px;
    color: var(--brand-blue);
    font-weight: 700;
    line-height: 1.3;
}

.resource-body .pac-carrier p {
    margin: auto 0 0;
    font-size: 1.15rem;
    line-height: 1.6;
}

.resource-body .pac-carrier p a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 8px;
    border: 1px solid var(--brand-blue);
    border-radius: 4px;
    background: var(--brand-blue);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.resource-body .pac-icon {
    display: none;
}

.resource-body .pac-carrier p a:hover,
.resource-body .pac-carrier p a:focus {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    color: #fff;
    text-decoration: none;
}

.resource-body .pac-carrier p a:nth-of-type(2) {
    background: transparent;
    color: var(--brand-blue);
}

.resource-body .pac-carrier p a:nth-of-type(2):hover,
.resource-body .pac-carrier p a:nth-of-type(2):focus {
    background: var(--brand-blue);
    color: #fff;
}

.resource-body .pac-carrier p .pac-website {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--brand-blue);
    font-size: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.resource-body .pac-carrier p .pac-website:hover,
.resource-body .pac-carrier p .pac-website:focus {
    background: transparent;
    border-color: transparent;
    color: var(--brand-blue-light);
    text-decoration: underline;
}

.resource-body .pac-phone {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.resource-body .hl-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row;
    justify-content: stretch;
    gap: 16px;
    width: 100%;
}

.resource-body .hl-list > br {
    display: none !important;
}

.resource-body .hl-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 210px;
    width: 100%;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    text-align: center;
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.resource-body .hl-card:hover,
.resource-body .hl-card:focus {
    border-color: var(--brand-blue-light);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

.resource-body .hl-logo {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.resource-body .hl-logo img {
    display: block;
    width: 100%;
    max-width: 160px;
    max-height: 70px;
    object-fit: contain;
}

.resource-body .hl-title {
    min-height: 48px;
    color: var(--brand-blue);
    font-size: 0.95rem;
    line-height: 1.35;
}

.resource-body .hl-card-action {
    margin-top: auto;
    color: var(--brand-blue);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: underline;
}

.resource-body ul,
.resource-body ol {
    margin: 0 0 1.25rem 1.5rem;
}

.resource-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #fff;
}

.resource-body th,
.resource-body td {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

.resource-body th {
    background: var(--brand-gray-light);
    color: var(--brand-blue);
}

.resource-body .panel-group {
    display: grid;
    gap: 12px;
}

.resource-body .panel {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.resource-body .panel-heading {
    background: var(--brand-gray-light);
    padding: 14px 16px;
}

.resource-body .panel-title {
    margin: 0;
    font-size: 1.35rem;
}

.resource-body .panel-title a {
    display: block;
    color: var(--brand-blue);
    font-weight: 700;
}

.resource-body .panel-body {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.resource-link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.resource-link-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-blue);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.resource-link-card:hover,
.resource-link-card:focus {
    border-color: var(--brand-blue-light);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-2px);
}

.resource-link-card strong {
    color: var(--brand-blue);
    font-size: 1.4rem;
}

.resource-link-card span {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.sitemap-section {
    padding: 0;
}

.sitemap-section:first-child {
    grid-column: 1 / -1;
}

.sitemap-section h2 {
    margin-top: 0;
    color: var(--brand-blue);
    font-size: 1.35rem;
}

.sitemap-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.sitemap-list li {
    margin: 0;
}

.sitemap-list li:first-child {
    margin-top: 0;
}

.sitemap-list .sitemap-link {
    display: flex;
    width: auto;
    min-height: 44px;
    padding: 10px 12px;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    text-align: center;
    text-transform: none;
}

.sitemap-list .sitemap-link:hover {
    color: #fff;
}

@media (max-width: 600px) {
    .resource-body {
        font-size: 1.25rem;
    }

    .resource-body table {
        display: block;
        overflow-x: auto;
    }

    .resource-body .oc-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .resource-body .pac-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .resource-body .hl-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .resource-link-grid {
        grid-template-columns: 1fr;
    }

    .sitemap-grid {
        grid-template-columns: 1fr;
    }

    .sitemap-section:first-child {
        grid-column: auto;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .resource-body .oc-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .resource-body .pac-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .resource-body .hl-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.service-grid,
.staff-grid,
.resource-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.service-card,
.staff-card,
.resource-card,
.contact-card {
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.service-card:hover,
.staff-card:hover,
.resource-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.service-card h3,
.staff-card h3,
.resource-card h3 {
    margin-top: 0;
}

.service-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.staff-photo {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 12px;
}

.staff-title {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.staff-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 20px;
}

/* ==================== Forms ==================== */
.quote-form-wrapper {
    margin-bottom: 30px;
    border: 2px solid var(--brand-blue);
    border-radius: 6px;
    padding: 24px;
    background: var(--brand-gray-light);
}

.jpg-form {
    display: grid;
    gap: 14px;
}

.form-field {
    display: grid;
    gap: 4px;
}

.form-field label {
    font-weight: 600;
    display: block;
    margin: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.jpg-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.jpg-form input,
.jpg-form select,
.jpg-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
}

.jpg-form input:focus,
.jpg-form select:focus,
.jpg-form textarea:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(9, 90, 165, 0.1);
}

.jpg-form textarea {
    min-height: 120px;
    resize: vertical;
}

.jpg-form .honeypot,
.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-message {
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 4px;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== Contact Modal ==================== */
.contact-modal .quote-modal-content { max-width: 680px; }
.contact-form-field-full { grid-column: 1 / -1; }
.contact-message-status { min-height: 24px; margin: 16px 0 0; color: var(--brand-blue); font-weight: 600; }
.refer-friend-field-full { grid-column: 1 / -1; }
.refer-friend-status { min-height: 24px; margin: 16px 0 0; color: var(--brand-blue); font-weight: 600; }

.web-agent { position: fixed; right: 24px; bottom: 88px; z-index: 10000; display: flex; flex-direction: column-reverse; align-items: flex-end; max-height: calc(100vh - 112px); max-height: calc(100dvh - 112px); font-size: 16px; }
.web-agent-launcher { display: inline-flex; flex-shrink: 0; align-items: center; gap: 24px; min-height: 136px; max-width: calc(100vw - 32px); padding: 32px 52px; border: 4px solid var(--brand-blue); border-radius: 68px; background: #fff; color: var(--brand-blue); box-shadow: var(--shadow-lg); cursor: pointer; font-size: 2.5rem; font-weight: 700; transition: all var(--transition-fast); }
.web-agent-launcher i { font-size: 3.6rem; }
.web-agent-launcher:hover, .web-agent-launcher:focus { background: var(--brand-gray-light); color: var(--brand-blue-light); border-color: var(--brand-blue-light); transform: translateY(-2px); box-shadow: 0 12px 36px rgba(9, 90, 165, 0.25); }
.web-agent-panel { display: flex; flex: 1 1 auto; flex-direction: column; width: min(460px, calc(100vw - 32px)); min-height: 0; height: min(620px, calc(100vh - 190px)); height: min(620px, calc(100dvh - 190px)); margin-bottom: 10px; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--border-color); }
.web-agent-panel[hidden] { display: none; }
.web-agent-header { position: sticky; top: 0; z-index: 2; display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--brand-blue); color: #fff; }
.web-agent-header div { display: grid; gap: 3px; }
.web-agent-header span { font-size: 16px; opacity: .95; }
.web-agent-close { display: inline-flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -7px -8px -7px 0; border: 0; border-radius: 4px; background: transparent; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.web-agent-close:hover, .web-agent-close:focus { background: rgba(255, 255, 255, 0.18); outline: 2px solid #fff; outline-offset: -2px; }
.web-agent-messages { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; background: var(--brand-gray-light); }
.web-agent-message { max-width: 88%; padding: 14px 16px; border-radius: 8px; line-height: 1.55; word-break: break-word; font-size: 18px; }
.web-agent-message a,
.web-agent-link {
    display: inline-block;
    max-width: 100%;
    margin-top: 4px;
    color: var(--brand-blue);
    font-weight: 800;
    text-decoration: underline;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.web-agent-message-visitor a,
.web-agent-message-visitor .web-agent-link { color: #fff; }
.web-agent-message-bot { align-self: flex-start; background: #fff; border: 1px solid var(--border-color); color: var(--text-primary); }
.web-agent-message-visitor { align-self: flex-end; background: var(--brand-blue); color: #fff; }
.web-agent-message-agent { align-self: flex-start; background: #e8f4fd; border: 1px solid #bce0fd; color: #074883; box-shadow: var(--shadow-sm); }
.bot-sender-tag { display: block; margin-bottom: 4px; color: var(--brand-blue); font-size: 15px; font-weight: 700; }
.agent-sender-tag { font-size: 15px; font-weight: 700; color: #095aa5; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.web-agent-question {
    display: flex;
    gap: 8px;
    padding: 14px 14px 4px;
    align-items: center;
}

.web-agent-question input {
    min-width: 0;
    flex: 1;
    min-height: 44px;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.05rem;
    font-family: inherit;
    color: var(--text-primary);
    background: #fff;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.web-agent-question input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(9, 90, 165, 0.15);
}

.web-agent-question button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-blue);
    border-radius: 6px;
    background: var(--brand-blue);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.web-agent-question button:hover,
.web-agent-question button:focus {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.web-agent-actions, .web-agent-callback { display: grid; gap: 8px; padding: 14px; }
.web-agent-actions[hidden], .web-agent-callback[hidden] { display: none; }
.web-agent-actions button, .web-agent-actions a, .web-agent-callback button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border: 2px solid var(--brand-blue);
    border-radius: 6px;
    background: #fff;
    color: var(--brand-blue);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all var(--transition-fast);
}

.web-agent-actions button:hover, .web-agent-actions a:hover {
    background: var(--brand-blue);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.web-agent-callback button {
    background: var(--brand-blue);
    color: #fff;
    text-transform: uppercase;
}

.web-agent-callback button:hover, .web-agent-callback button:focus {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.web-agent-callback label { font-weight: 600; font-size: 1rem; margin-top: 4px; }
.web-agent-callback input, .web-agent-callback select {
    min-height: 44px;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font: inherit;
    font-size: 1.05rem;
    transition: border-color var(--transition-fast);
}

.web-agent-callback input:focus, .web-agent-callback select:focus {
    outline: none;
    border-color: var(--brand-blue);
}

.web-agent-status { min-height: 20px; margin: 0; color: var(--brand-blue); font-weight: 600; }
@media (max-width: 600px) {
    .web-agent { right: 8px; bottom: 72px; left: 8px; max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); }
    .web-agent-panel { width: 100%; height: calc(100vh - 158px); height: calc(100dvh - 158px); max-height: 620px; }
    .web-agent-launcher { min-height: 116px; padding: 24px 40px; font-size: 2.1rem; }
}

/* ==================== Footer ==================== */
.staff-message-modal .quote-modal-content {
    max-width: 760px;
}

.staff-message-modal .quote-form-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-message-modal .quote-form-field-full {
    grid-column: 1 / -1;
}

.staff-message-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.staff-message-status {
    min-height: 24px;
    margin: 16px 0 0;
    color: var(--brand-blue);
    font-weight: 600;
}

@media (max-width: 600px) {
    .staff-message-modal .quote-form-fields {
        grid-template-columns: 1fr;
    }

    .staff-message-modal .quote-form-field-full {
        grid-column: auto;
    }
}

/* ==================== Footer ==================== */
.site-footer {
    background: var(--brand-blue);
    color: #fff;
    padding: 20px 0;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--brand-blue);
    color: #fff;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition-fast), visibility var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
    background: var(--brand-blue-light);
    color: #fff;
    outline: 2px solid var(--brand-blue-light);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 20px;
}

.footer-column-title {
    margin-bottom: 12px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 8px;
}

.footer-menu a {
    color: #e8f1fa;
    transition: color var(--transition-fast);
}

.footer-menu a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-contact,
.footer-cities,
.footer-copyright {
    text-align: center;
    font-size: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    word-wrap: break-word;
    white-space: normal;
    overflow: visible;
    display: block;
    width: 100%;
    max-width: none;
    line-height: 1.6;
}

.footer-contact a {
    color: #fff;
    text-decoration: underline;
}

.footer-copyright {
    margin-top: 10px;
    padding-bottom: 0;
}

#main {
    flex: 1;
    width: 100%;
    margin-top: 0;
}

/* ==================== Responsive Design ==================== */

/* Extra small devices */
@media (max-width: 479px) {
    .header-contact {
        flex-direction: row;
        gap: 4px;
        font-size: 0.9rem;
    }

    .phone-number {
        font-size: 3rem !important;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Small devices */
@media (min-width: 480px) {
    .qq-horizontal form {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices */
@media (min-width: 640px) {
    .button-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lines-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-grid,
    .staff-grid,
    .resource-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .staff-detail-grid {
        grid-template-columns: 300px 1fr;
    }

    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet */
@media (min-width: 768px) {
    .header-contact {
        flex-direction: row;
        gap: 16px;
        align-items: center;
        font-size: 1rem;
    }

    .nav-toggle {
        display: none;
    }

    .menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0;
        margin: 0;
        justify-content: flex-end;
    }

    .menu a {
        border: none;
        background: transparent;
        padding: 14px 10px;
        border-bottom: 3px solid transparent;
    }

    .menu a:hover {
        background: transparent;
        border-bottom-color: var(--brand-blue);
    }

    .menu li:hover > .sub-menu,
    .menu li:focus-within > .sub-menu {
        display: grid;
    }

    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        padding: 10px;
        min-width: 240px;
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 0;
        border: 1px solid var(--border-color);
        z-index: 20;
        box-shadow: var(--shadow-md);
    }

    .sub-menu li a {
        border: 1px solid #efefef;
        padding: 10px 12px;
    }

    .lines-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .service-grid,
    .staff-grid,
    .resource-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-columns {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .lines-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .service-grid,
    .staff-grid,
    .resource-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==================== Breadcrumbs ==================== */
.breadcrumbs {
    padding: 12px 16px;
    background: var(--brand-gray-light);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-list li::after {
    content: "/";
    margin-left: 8px;
    color: var(--text-secondary);
}

.breadcrumb-list li:last-child::after {
    content: "";
}
    * {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==================== Print ==================== */
@media print {
    .header-wrapper,
    .primary-nav,
    .banner-down,
    .button-actions,
    .lines-grid-buttons,
    .site-footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        text-decoration: underline;
    }
}
:root {
    --brand-blue: #095aa5;
    --brand-blue-light: #0f6fc6; /* Accessible hover blue: 5.1:1 on white. */
    --brand-blue-dark: #074883;
    --brand-gray: #f1f1f1;
    --brand-gray-light: #fafafa;
    --brand-dark: #222;
    --brand-light: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --border-color: #d4d4d4;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --transition-fast: 150ms ease-out;
    --transition-normal: 250ms ease-out;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background: var(--brand-light);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--brand-blue-light);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: "Raleway", sans-serif;
    margin: 0 0 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 300;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
}

p {
    margin: 0 0 1rem;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.skip-to-content {
    position: absolute;
    top: -999px;
    left: -999px;
    background: #fff;
    color: var(--brand-blue);
    padding: 10px 14px;
    border: 2px solid var(--brand-blue);
    z-index: 1000;
    border-radius: 4px;
}

.skip-to-content:focus {
    top: 10px;
    left: 10px;
}

/* Masthead - see line 148 for main masthead styles */
/* ==================== Navigation ==================== */
/* Navigation */
.primary-nav {
    position: relative;
    margin-left: auto;
    padding-right: 16px;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-blue);
    color: #fff;
    border: none;
    padding: 10px 16px;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    min-height: 44px;
    transition: background var(--transition-fast);
}

.nav-toggle:hover,
.nav-toggle:focus {
    background: var(--brand-blue-light);
    outline: none;
}

.menu {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: none;
    flex-direction: column;
    gap: 0;
}

.menu li {
    position: relative;
}

.menu a {
    display: block;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-bottom: none;
    color: var(--brand-blue);
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background var(--transition-fast);
    min-height: 44px;
    display: flex;
    align-items: center;
}

.menu a:hover,
.menu a:focus {
    background: var(--brand-gray-light);
}

.menu li:last-child a {
    border-bottom: 1px solid var(--border-color);
}

.menu-item-has-children > a::after {
    content: " ▾";
    font-size: 0.7rem;
    margin-left: auto;
}

.menu li.open > .sub-menu {
    display: grid;
}

.sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
    background: var(--brand-gray);
}

.sub-menu li a {
    text-transform: none;
    font-size: 0.8rem;
}

.nav-open .menu {
    display: flex;
}

/* Hero Banner */
.banner-wrapper {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background: var(--brand-dark);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

@media (max-width: 768px) {
    .banner-wrapper {
        background-attachment: scroll;
    }
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 90, 165, 0.65);
    transition: background var(--transition-normal);
}

.banner-content {
    position: relative;
    z-index: 1;
    padding: 40px 16px;
    max-width: 800px;
}

.hero-title {
    color: #fff;
    margin-bottom: 12px;
}

.hero-subtitle {
    color: #fff;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 1.5;
    margin-bottom: 24px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-blue);
    color: #fff;
    background: var(--brand-blue);
    padding: 12px 20px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: 4px;
    min-height: 44px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn:hover {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-outline:hover {
    background: var(--brand-blue);
    color: #fff;
}

.btn-banner {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.btn-banner:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-primary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-success {
    background: #2ecc71;
    border-color: #2ecc71;
}

.btn-success:hover {
    background: #27ae60;
    border-color: #27ae60;
}

.banner-down {
    position: absolute;
    bottom: 20px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1;
    padding: 10px;
    transition: transform var(--transition-normal);
    animation: bounce 2s infinite;
}

.banner-down:hover,
.banner-down:focus {
    transform: translateY(4px);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Quick Quote Section */
.qq-horizontal {
    background: var(--brand-blue);
    color: #fff;
    padding: 24px 0;
}

.qq-horizontal form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.qq-horizontal input,
.qq-horizontal select,
.qq-horizontal textarea {
    border: none;
    border-bottom: 2px solid #fff;
    background: transparent;
    color: #fff;
    padding: 12px 0;
    font-weight: 600;
    font-size: 0.95rem;
    min-height: 44px;
}

.qq-horizontal input::placeholder {
    color: #d4e6f7;
}

.qq-horizontal input:focus,
.qq-horizontal select:focus,
.qq-horizontal textarea:focus {
    outline: none;
    border-bottom-color: #fff;
    box-shadow: 0 2px 0 transparent;
}

/* Insurance Lines Cards */
.buttons-wrapper {
    padding: 40px 0;
    background: var(--brand-light);
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.button-card {
    border: 2px solid var(--brand-blue);
    border-radius: 6px;
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.button-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.button-card-header {
    font-size: 1.5rem;
    color: var(--brand-blue);
    margin-bottom: 12px;
    font-weight: 600;
}

.button-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.button-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

/* Content Section */
.content-wrapper {
    padding: 40px 0;
    background: var(--brand-light);
}

.section-title {
    text-align: center;
    margin-bottom: 36px;
    color: var(--text-primary);
}

/* Service Grid */
.lines-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.lines-grid-line {
    position: relative;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.lines-grid-line:hover {
    box-shadow: var(--shadow-md);
}

.lines-grid-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    padding: 20px;
    text-align: center;
    gap: 12px;
    backdrop-filter: blur(2px);
}

.lines-grid-title {
    background: rgba(9, 90, 165, 0.9);
    color: #fff;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 4px;
    margin-bottom: 4px;
}

.lines-grid-more {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lines-grid-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.lines-grid-buttons .btn {
    font-size: 0.8rem;
    padding: 10px 16px;
}

/* Slogan Section */
.slogan-wrapper {
    background: var(--brand-blue-light);
    color: #fff;
    text-align: center;
    padding: 36px 16px;
}

.page-hero {
    background: var(--brand-blue);
    color: #fff;
    padding: 30px 0;
}

.page-hero h1 {
    color: #fff;
}

.page-content {
    background: #fff;
}

.service-grid,
.staff-grid,
.resource-list {
    display: grid;
    gap: 20px;
}

.service-card,
.staff-card,
.resource-card,
.contact-card {
    border: 1px solid #d4d4d4;
    padding: 20px;
    border-radius: 6px;
    background: #fff;
}

.service-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.service-breadcrumbs { margin: 0 0 28px; color: #526577; font-size: 0.95rem; }
.service-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.service-breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #7b8793; }
.service-breadcrumbs a { font-weight: 600; }
.related-services { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border-color); }
.related-services h2 { font-size: 1.5rem; }
.related-services ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; margin: 18px 0 0; padding: 0; list-style: none; }
.related-services a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.service-faqs { max-width: 920px; margin-top: 44px; }
.service-faqs details { border-top: 1px solid var(--border-color); }
.service-faqs details:last-of-type { border-bottom: 1px solid var(--border-color); }
.service-faqs summary { padding: 18px 4px; color: var(--brand-blue); font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.service-faqs details p { margin: 0; padding: 0 4px 18px; }
.service-faqs-note { margin-top: 18px; color: var(--text-secondary); font-size: 0.95rem; }
@media (max-width: 700px) { .related-services ul { grid-template-columns: 1fr; } }

.staff-photo {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.staff-title {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.staff-detail-grid {
    display: grid;
    gap: 20px;
    align-items: start;
}

.contact-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.quote-form-wrapper {
    margin-bottom: 30px;
    border: 2px solid var(--brand-blue);
    border-radius: 6px;
    padding: 20px;
}

/* ==================== Quote Modal ==================== */
.quote-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10010; /* above the chat launcher (10000) so it can't cover modal buttons */
    padding: 20px;
}

.quote-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    animation: fadeIn 250ms ease-out;
}

.quote-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 300ms ease-out;
    z-index: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.quote-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
    z-index: 2;
}

.quote-modal-close:hover {
    background: var(--brand-gray-light);
    color: var(--text-primary);
}

.quote-modal-header {
    padding: 32px 24px 24px;
    border-bottom: 2px solid var(--brand-gray-light);
    text-align: center;
}

.quote-modal-header h2 {
    margin: 0 0 8px;
    color: var(--brand-blue);
    font-size: 1.8rem;
}

.quote-modal-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.quote-form {
    padding: 24px;
}

.quote-form-step {
    animation: fadeIn 250ms ease-out;
}

.quote-form-step h3 {
    margin: 0 0 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.quote-form-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.quote-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quote-option:hover {
    border-color: var(--brand-blue);
    background: rgba(9, 90, 165, 0.05);
}

.quote-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--brand-blue);
}

.quote-option input[type="radio"]:checked + .quote-option-label {
    font-weight: 600;
    color: var(--brand-blue);
}

.quote-option-label {
    margin: 0;
    font-size: 0.95rem;
    cursor: pointer;
    flex: 1;
}

.quote-form-select-wrapper {
    margin-bottom: 24px;
}

.quote-form-select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color var(--transition-fast);
    min-height: 44px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.quote-form-select-wrapper select:hover {
    border-color: var(--brand-blue);
}

.quote-form-select-wrapper select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(9, 90, 165, 0.1);
}

.quote-form-fields {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.quote-form-field {
    display: grid;
    gap: 6px;
}

.quote-form-field label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
}

.quote-form-field input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
}

.quote-form-field input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(9, 90, 165, 0.1);
}

.quote-form-field input::placeholder {
    color: #999;
}

.quote-field-helper {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.quote-consent-checkbox {
    background: #f9fafb;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
}

.quote-checkbox-label {
    display: flex;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.quote-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--brand-blue);
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.quote-checkbox-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.quote-consent-link {
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--transition-fast);
}

.quote-consent-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.quote-success-message {
    text-align: center;
    padding: 40px 24px;
}

.quote-success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    font-weight: bold;
    animation: scaleIn 300ms ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.quote-success-message h3 {
    margin: 0 0 12px;
    color: var(--brand-blue);
    font-size: 1.5rem;
}

.quote-success-message > p {
    margin: 0 0 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.quote-legal-notice {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    text-align: left;
}

.quote-legal-notice p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.quote-close-success-btn {
    padding: 12px 32px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 6px;
    border: 2px solid var(--brand-blue);
    background: var(--brand-blue);
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.quote-close-success-btn:hover {
    background: var(--brand-blue-dark);
    border-color: var(--brand-blue-dark);
}

.quote-recaptcha-notice {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 16px 0 0;
    line-height: 1.4;
}

.quote-recaptcha-notice a {
    color: var(--brand-blue);
}

.quote-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.quote-next-btn,
.quote-back-btn,
.quote-submit-btn {
    flex: 1;
    padding: 12px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    border-radius: 6px;
    border: 2px solid var(--brand-blue);
    background: var(--brand-blue);
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.quote-back-btn {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.quote-next-btn:hover,
.quote-submit-btn:hover {
    background: var(--brand-blue-light);
    border-color: var(--brand-blue-light);
    transform: translateY(-2px);
}

.quote-back-btn:hover {
    background: var(--brand-gray-light);
    border-color: var(--text-secondary);
}

.quote-form-status {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: center;
}

.quote-form-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.quote-form-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.quote-form-status.loading {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* Responsive */
@media (max-width: 480px) {
    .quote-modal-content {
        max-width: 100%;
        border-radius: 8px;
    }

    .quote-form-options {
        grid-template-columns: 1fr;
    }

    .quote-modal-header {
        padding: 20px 16px;
    }

    .quote-form {
        padding: 16px;
    }

    .quote-form-header h2 {
        font-size: 1.4rem;
    }
}

.site-footer {
    background: var(--brand-blue);
    color: #fff;
    padding: 40px 0;
}

.footer-columns {
    display: grid;
    gap: 20px;
}

.footer-column-title {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.3rem;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 6px;
}

.footer-menu a {
    color: #fff;
}

.footer-contact,
.footer-cities,
.footer-copyright {
    text-align: center;
    font-size: 16px;
    margin-top: 20px;
}

.form-message {
    font-weight: 700;
    margin-bottom: 10px;
}

.form-message.success {
    color: #0a7a0a;
}

.form-message.error {
    color: #b00020;
}

.jpg-form {
    display: grid;
    gap: 12px;
}

.jpg-form label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.jpg-form input,
.jpg-form select,
.jpg-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    font-size: 1rem;
}

.jpg-form textarea {
    min-height: 120px;
    resize: vertical;
}

.jpg-form .honeypot {
    display: none;
}

@media (min-width: 768px) {
    .header-contact {
        justify-content: flex-end;
        align-items: flex-end;
        text-align: right;
    }

    .nav-toggle {
        display: none;
    }

    .menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        margin: 0;
        justify-content: flex-end;
    }

    .menu a {
        border: none;
        background: transparent;
        padding: 12px 8px;
    }

    .menu li:hover > .sub-menu,
    .menu li:focus-within > .sub-menu {
        display: grid;
    }

    .sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        padding: 10px;
        min-width: 240px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        border: 1px solid #d7d7d7;
        z-index: 20;
    }

    .sub-menu li a {
        border: 1px solid #efefef;
        padding: 8px 10px;
    }

    .button-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lines-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .service-grid,
    .staff-grid,
    .resource-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-columns {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .staff-detail-grid {
        grid-template-columns: 1fr 2fr;
    }
}

@media (min-width: 1024px) {
    .lines-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .service-grid,
    .staff-grid,
    .resource-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==================== Companies Streaming Banner ==================== */
.companies-banner {
    background: white !important;
    padding: 0 !important;
    border-top: 1px solid var(--border-color);
    margin-top: 0;
    overflow: hidden !important;
    width: 100% !important;
}

.companies-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin: 0 0 40px 0;
    padding: 0 16px;
    font-family: "Raleway", sans-serif;
}

.companies-scroll {
    overflow: hidden !important;
    background: white !important;
    width: 100% !important;
    height: auto !important;
}

.companies-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 40px !important;
    padding: 30px 16px !important;
}

.companies-track:hover {
    animation-play-state: paused;
}

.company-logo {
    flex: 0 0 120px !important;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: 80px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: white !important;
    border-radius: 0;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.company-logo:hover {
    background: white !important;
}

.company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-logo:hover img {
}

@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-120px * 51 - 40px * 51));
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .companies-banner {
        padding: 40px 16px;
        margin-top: 60px;
    }

    .companies-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .companies-scroll {
        padding: 20px 0;
    }

    .companies-track {
        gap: 25px;
        animation: scroll-infinite-tablet 80s linear infinite;
    }

    .company-logo {
        width: 100px;
        height: 70px;
    }

    @keyframes scroll-infinite-tablet {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

@media (max-width: 480px) {
    .companies-title {
        font-size: 1.25rem;
        margin-bottom: 25px;
    }

    .company-logo {
        width: 80px;
        height: 60px;
    }

    .companies-track {
        gap: 15px;
        animation: scroll-infinite-mobile 80s linear infinite;
    }

    @keyframes scroll-infinite-mobile {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

/* Footer review and Facebook links. */
.footer-connect {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 28px 48px;
    padding-bottom: 24px;
    text-align: center;
}
.footer-review-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(100%, 520px);
    color: #fff;
    text-decoration: none;
}
.footer-review-link img {
    display: block;
    width: 100%;
    height: auto;
}
.footer-review-link span {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.footer-facebook p {
    margin: 0 0 14px;
    font-weight: 600;
}
.footer-facebook a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    border: 2px solid #fff;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.footer-facebook .fa-facebook-square {
    font-size: 24px;
}
.footer-connect a:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-facebook a:hover {
    background: rgba(255, 255, 255, 0.12);
}
.footer-connect a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 5px;
}

/* Company story and staff directory. */
.jpg-about-company { max-width: 960px; margin: 0 auto; font-size: 17px; line-height: 1.8; }
.jpg-about-company p { margin-bottom: 22px; }
.jpg-about-team { margin-top: 48px; }
.jpg-about-team > h2, .jpg-team-location { text-align: center; }
.jpg-team-location { color: #526577; margin-bottom: 28px; }
.jpg-team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.jpg-team-card { display: flex; flex-direction: column; padding: 26px; background: #fff; border: 1px solid #dce5ee; border-top: 4px solid var(--brand-blue); border-radius: 10px; }
.jpg-team-card h3 { margin: 0 0 10px; color: var(--brand-blue); font-size: 22px; }
.jpg-team-role { color: #435467; min-height: 48px; margin-bottom: 12px; }
.jpg-team-phone { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.jpg-team-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: auto; padding-top: 18px; }
.jpg-team-actions a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.jpg-team-photo { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center top; border-radius: 6px; margin-bottom: 22px; }
.staff-detail-grid { display: flex; align-items: flex-start; gap: 32px; }
.staff-detail-photo { flex: 0 0 260px; }
.staff-detail-photo img { width: 100%; height: auto; }
.staff-detail-content { flex: 1; max-width: 900px; font-size: 17px; line-height: 1.8; }
.jpg-staff-back { margin-top: 24px; }
@media (max-width: 991px) { .jpg-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .jpg-team-grid { grid-template-columns: 1fr; } .staff-detail-grid { flex-direction: column; } .staff-detail-photo { flex-basis: auto; max-width: 260px; } }

/* Keep the header usable on smaller screens without the social column. */
@media (max-width: 1399px) {
    .header-inner { flex-wrap: wrap; }
    .header-contact { margin-left: auto; }
    .primary-nav { flex: 0 0 100%; padding-right: 0; }
    .nav-menu { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    .header-wrapper { padding: 10px 16px; }
    .header-inner { justify-content: center; gap: 8px; }
    .header-contact { margin-left: 0; }
    .header-contact .phone-number { font-size: 2rem !important; }
    .header-contact .fa-stack { font-size: 1.5rem; }
    .nav-menu { justify-content: center; gap: 6px; }
    .nav-menu > li > a { font-size: 1.2rem; padding: 8px 10px; }
    .nav-menu .sub-menu { min-width: 210px; max-height: 65vh; max-height: 65dvh; overflow-y: auto; transform: translateX(-8px); }
    .nav-menu li.open > .sub-menu { display: block; }
    .nav-menu > li:nth-child(n+4) > .sub-menu { left: auto; right: 0; }
    .nav-menu > li > a[href*="/customer-resources/"] + .sub-menu { right: auto; left: 0; transform: none; }
}

/* Full insurance catalog dropdowns. */
@media (min-width: 768px) {
    .nav-menu > li.menu-item-has-children > .sub-menu {
        right: 0;
        left: auto;
        width: min(760px, calc(100vw - 32px));
        max-height: calc(100vh - 150px);
        max-height: calc(100dvh - 150px);
        grid-template-columns: repeat(3, minmax(210px, 1fr));
        overflow-x: hidden;
        overflow-y: auto;
    }
    .nav-menu > li.menu-item-has-children:hover > .sub-menu,
    .nav-menu > li.menu-item-has-children:focus-within > .sub-menu {
        display: grid;
    }
    .nav-menu > li.menu-item-has-children > .sub-menu a { padding: 9px 12px; font-size: 0.9rem; }
}

/* Clean dropdown lists: no per-item grid lines or link underlines. */
.nav-menu .sub-menu li > a,
.nav-menu .sub-menu li > a:hover,
.nav-menu .sub-menu li > a:focus {
    border: 0 !important;
    border-bottom: 0 !important;
    min-height: 44px;
    font-size: 1.25rem !important;
    line-height: 1.35;
    text-decoration: none !important;
    white-space: normal;
}

@media (min-width: 768px) {
    .nav-menu > li > a[href*="/customer-resources/"] + .sub-menu {
        width: min(320px, calc(100vw - 32px));
        grid-template-columns: 1fr;
    }
}

/* Human Resources service lists (formerly text images) */
.hr-services-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; margin: 24px 0; }
.hr-services-list section { background: var(--brand-gray-light); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; }
.hr-services-list h3 { font-size: 18px; color: var(--brand-blue-dark); margin-bottom: 12px; }
.hr-services-list ul { margin: 0; padding-left: 20px; }
.hr-services-list li { margin-bottom: 6px; }

/*
 * Readable minimum text sizes.
 * Bootstrap 3 sets html { font-size: 10px }, so theme rem values render about 37% smaller
 * than a 16px root. These px sizes replace rem sizes that fell below 12px.
 */
.btn { font-size: 15px; }
.page-subtitle { font-size: 18px; }
.service-breadcrumbs { font-size: 14px; }
.service-faqs summary { font-size: 17px; }
.service-faqs-note { font-size: 14px; }
.staff-title { font-size: 16px; }
.resource-body .pac-carrier p { font-size: 16px; }
.resource-body .pac-carrier p a,
.resource-body .pac-phone { font-size: 14px; }
.resource-body .hl-title { font-size: 16px; }
/* 16px prevents iOS from zooming the page when a field receives focus. */
.jpg-form input,
.jpg-form select,
.jpg-form textarea { font-size: 16px; }

@media (max-width: 768px) {
    .home-banner-cta { font-size: 16px; }
}

/* Keeps content images within the viewport on small screens. */
.page-body img,
.page-content img,
.service-body img { max-width: 100%; height: auto; }
/* Comfortable touch targets (at least 24px tall) for footer and cookie-notice links. */
.footer-contact a { display: inline-block; padding: 4px 0; }

/* 404 page recovery links */
.not-found-lead { font-size: 18px; }
.not-found-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 24px; margin: 16px 0 28px; padding-left: 20px; }
.not-found-links a { display: inline-block; padding: 6px 0; font-weight: 600; }
.not-found-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.form-privacy-note { font-size: 14px; color: #4a5560; margin: 8px 0 12px; }

/* Links inside sentences need a non-color cue (WCAG 1.4.1). */
main p a:not(.btn):not(.quote-consent-link),
.form-privacy-note a { text-decoration: underline; text-underline-offset: 2px; }

/* Service card titles link to the service page; keep the heading styling. */
.service-card h3 a { color: inherit; text-decoration: none; }
.service-card h3 a:hover,
.service-card h3 a:focus { color: var(--brand-blue); text-decoration: underline; }

/* Glossary A-Z jump links sit in running text; underline them (WCAG 1.4.1). */
.txt_gterms a { text-decoration: underline; text-underline-offset: 2px; }

/*
 * Header navigation: soft tabs instead of outlined buttons.
 * Hover gets a light tint; the current page (or the section containing it) gets a stronger
 * blue-gray highlight. Keyboard focus keeps a visible ring.
 */
.nav-menu > li > a,
.nav-menu > li > a:focus {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--brand-blue);
}

/* The background highlight is the hover cue; no underline on tabs or dropdown items. */
.nav-menu a,
.nav-menu a:hover,
.nav-menu a:focus {
    text-decoration: none;
}

.nav-menu > li > a:hover,
.nav-menu > li:hover > a,
.nav-menu > li > a:focus-visible {
    background: #cfe3f8;
    color: var(--brand-blue-dark);
    box-shadow: 0 2px 8px rgba(9, 90, 165, 0.18);
}

.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a,
.nav-menu > li.current-menu-parent > a,
.nav-menu > li.current_page_item > a,
.nav-menu > li.current_page_ancestor > a {
    background: #dde8f3;
    color: var(--brand-blue-dark);
}

/* Hovering the current tab still shows the blue hover state. */
.nav-menu > li.current-menu-item:hover > a,
.nav-menu > li.current-menu-ancestor:hover > a,
.nav-menu > li.current-menu-parent:hover > a,
.nav-menu > li.current_page_item:hover > a,
.nav-menu > li.current_page_ancestor:hover > a {
    background: #cfe3f8;
}

/* No dropdown arrow after tab labels. */
.nav-menu .menu-item-has-children > a::after {
    content: none;
}

.nav-menu > li > a:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

/* Dropdown items use the same blue hover tint rather than a solid blue fill. */
.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu li > a:focus-visible {
    background: #cfe3f8;
    color: var(--brand-blue-dark);
}

.nav-menu .sub-menu li.current-menu-item > a {
    background: #dde8f3;
    color: var(--brand-blue-dark);
}

/* Our Companies intro above the carrier logos */
.oc-intro { max-width: 820px; margin: 0 auto 32px; text-align: center; font-size: 17px; line-height: 1.7; }
.oc-intro h2 { color: var(--brand-blue-dark); margin-bottom: 12px; }
