/* Blue Synergy Group - Main Stylesheet */

:root {
    --primary-dark: #0e213a;
    --primary-cyan: #0fcce9;
    --text-dark: #2c3e50;
    --text-light: #ecf0f1;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation — sticky at the top, gently shrinks once the user scrolls */
.site-header {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.25s ease, box-shadow 0.25s ease;
}
.site-header .logo svg,
.site-header .tagline {
    transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease, max-height 0.25s ease;
}
.site-header .tagline {
    max-height: 24px;
    overflow: hidden;
    opacity: 1;
}
.site-header.scrolled {
    padding: 0.45rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.site-header.scrolled .logo svg {
    width: 34px !important;
    height: 38px !important;
}
.site-header.scrolled .tagline {
    max-height: 0;
    opacity: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;             /* breathing room between brand + actions */
    position: relative;
}
.navbar .logo {
    min-width: 0;            /* allow brand text to truncate if needed */
    flex: 1 1 auto;
}

/* Hamburger button */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.1); }
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-light);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Flash message positioning */
.flash-container { padding: 1rem 20px 0; }

.logo a {
    text-decoration: none;
    color: var(--text-light);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--primary-cyan);
}

.logo .tagline {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.25rem;
    align-items: center;
}

.nav-menu li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0.85rem;
    border-radius: 4px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-cyan) !important;
    background-color: rgba(15, 204, 233, 0.1);
}

.nav-icon-link {
    color: var(--text-light);
    text-decoration: none;
}

/* Nav action buttons — shared sizing */
.btn-login,
.btn-register {
    padding: 0.55rem 1.35rem !important;
    border-radius: 4px;
    border: 1.5px solid var(--primary-cyan);
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Secondary nav action — Client Login (outline) */
.btn-login {
    background-color: transparent;
    color: var(--primary-cyan) !important;
}

.btn-login:hover {
    background-color: var(--primary-cyan);
    color: var(--primary-dark) !important;
}

/* Primary nav action — Get in Touch (filled) */
.btn-register {
    background-color: var(--primary-cyan);
    color: var(--primary-dark) !important;
}

.btn-register:hover {
    background-color: #0bb4d1 !important;
    border-color: #0bb4d1 !important;
}

/* Flash Messages / Alerts */
.alert {
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info);
}

.close-alert {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.close-alert:hover {
    opacity: 1;
}

/* Main Content */
main {
    min-height: calc(100vh - 300px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a3a5a 100%);
    color: var(--text-light);
    padding: 5rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-cyan);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-cyan);
    color: var(--primary-dark);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0bb4d1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 204, 233, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-cyan);
    border: 2px solid var(--primary-cyan);
}

.btn-secondary:hover {
    background-color: var(--primary-cyan);
    color: var(--primary-dark);
}

/* Services Section */
.services-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--primary-cyan);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.service-card h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-dark);
    line-height: 1.8;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(15, 204, 233, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
.site-footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.footer-col p,
.footer-col ul {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--primary-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Shield-numbered service cards */
.service-card-numbered {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-color);
}

.service-card-numbered:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.shield-number {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Services page — left-aligned shield detail cards */
.service-card-numbered.service-detail {
    text-align: left;
}
.service-card-numbered.service-detail .shield-number {
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}
.service-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.service-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
    line-height: 1.6;
    color: var(--text-dark);
}
.service-detail-list li i {
    color: var(--primary-dark);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Hero Full */
.hero-full {
    position: relative;
    min-height: 500px;
}

/* Google Maps container */
.map-container {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Fade-in-up animation for cards */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-toggle { display: flex; }

    .nav-menu {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        background-color: var(--primary-dark);
        flex-direction: column;
        gap: 0;
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3);
        padding: 0.5rem 0;
        z-index: 100;
        border-top: 2px solid var(--primary-cyan);
    }
    .nav-menu.open { display: flex; }
    .nav-menu li { width: 100%; }
    .nav-menu li a {
        display: block;
        padding: 0.85rem 1.5rem !important;
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .nav-menu li:last-child a { border-bottom: none; }

    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .hero-full h1 { font-size: 2.2rem !important; }
    .hero-full p { font-size: 1rem !important; }
    .hero-full { padding: 5rem 1.5rem !important; }

    section > div > div[style*="grid-template-columns: 1fr 1fr"],
    section > div > div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    .footer-content { grid-template-columns: 1fr !important; }
    .map-container { height: 220px; }

    .hero-cta-group { flex-direction: column; align-items: stretch; }
    .hero-cta-group a { text-align: center; }
}
/* Building Safer Spaces — two portrait cutouts onto the SAME underlying
   access-control photo. Both windows render the photo at the SAME pixel
   size (750 × 500) so the gate bar lines up at the same page Y across
   the gap between them. Window 1 sits elevated at top-left; window 2 is
   offset down-right and reveals the keypad. On narrow screens the trick
   can't scale (different aspect ratio) so we fall back to a single full
   image (`.image-windows-mobile`). */
.image-windows {
    position: relative;
    width: 100%;
    max-width: 760px;
    height: 500px;
    margin: 0 auto;
}

.image-window {
    position: absolute;
    width: 350px;
    height: 440px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    background-size: 750px 500px;   /* shared scale — must be identical on both */
    background-repeat: no-repeat;
}

.image-window-1 {
    top: 0;
    left: 0;
    background-position: 0 0;
}

.image-window-2 {
    bottom: 0;
    right: 0;
    /* Y-shift (-60) exactly equals window 2's top offset so the horizontal
       gate bar lines up at the same page Y as it does in window 1. */
    background-position: -400px -60px;
}

/* Single-image fallback for narrow screens */
.image-windows-mobile { display: none; }

@media (max-width: 820px) {
    .image-windows { max-width: 100%; height: auto; }
    .image-window-1, .image-window-2 { display: none; }
    .image-windows-mobile {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    }
}

/* Accordion FAQ styles */
.faq-accordion {
    margin-bottom: 1rem;
}

.faq-question {
    background-color: var(--bg-light);
    padding: 1.5rem 4rem 1.5rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    border-left: 4px solid var(--primary-cyan);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: #e8eef2;
}

.faq-question h3 {
    color: var(--primary-dark);
    margin: 0;
    font-size: 1.2rem;
}

.faq-toggle {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-color: var(--primary-cyan);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 2rem;
}

.faq-answer.active {
    max-height: 500px;
    padding: 1.5rem 2rem;
}

.faq-answer p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Layered photo — a sharp image with a washed-out "ghost" copy offset behind it,
   plus cyan accent dots above and below. Each .image-with-border must set --img. */
.image-with-border {
    position: relative;
    display: block;
    padding: 22px 22px 0 0;
}

.image-with-border img {
    display: block;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Washed-out "ghost" copy, offset up and to the right */
.image-with-border::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 22px;
    bottom: 22px;
    background-image: linear-gradient(rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.58)), var(--img);
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    filter: saturate(0.3) brightness(1.22);
    opacity: 0.5;
    box-shadow: 0 0 0 1.5px rgba(15, 204, 233, 0.4);
    z-index: 1;
    pointer-events: none;
}

/* Cyan accent dot — top, centered on the photo */
.image-with-border::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% - 11px);
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background-color: var(--primary-cyan);
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
}

/* Cyan accent dot — bottom, centered on the photo */
.image-with-border .border-dot-2 {
    position: absolute;
    bottom: -7px;
    left: calc(50% - 11px);
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background-color: var(--primary-cyan);
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .image-with-border { padding: 16px 16px 0 0; }
    .image-with-border::before { left: 16px; bottom: 16px; }
    .image-with-border::after { top: 9px; left: calc(50% - 8px); }
    .image-with-border .border-dot-2 { left: calc(50% - 8px); }
}

/* Decorative cyan "corner bracket + dots" frame for plain photos.
   Use one variant per image so placement varies across the site:
     .photo-frame--tl   bracket top-left
     .photo-frame--tr   bracket top-right
     .photo-frame--bl   bracket bottom-left
     .photo-frame--br   bracket bottom-right
   Each variant also positions two cyan dots around the photo edges so the
   accents peek out at different points along the border. */
.photo-frame {
    position: relative;
    display: block;
    max-width: 580px;
    margin: 0 auto;
}
.photo-frame > img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 2;
}
.photo-frame::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border: 2.5px solid var(--primary-cyan);
    pointer-events: none;
    z-index: 1;
}
.photo-frame::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--primary-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}
.photo-frame__dot {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--primary-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* Variant — bracket top-right */
.photo-frame--tr::before {
    top: -16px; right: -16px;
    border-left: none; border-bottom: none;
    border-top-right-radius: 14px;
}
.photo-frame--tr::after { top: -7px; left: 32px; }
.photo-frame--tr .photo-frame__dot { bottom: -7px; right: 30%; }

/* Variant — bracket top-left */
.photo-frame--tl::before {
    top: -16px; left: -16px;
    border-right: none; border-bottom: none;
    border-top-left-radius: 14px;
}
.photo-frame--tl::after { top: -7px; right: 32px; }
.photo-frame--tl .photo-frame__dot { bottom: -7px; left: 30%; }

/* Variant — bracket bottom-left */
.photo-frame--bl::before {
    bottom: -16px; left: -16px;
    border-right: none; border-top: none;
    border-bottom-left-radius: 14px;
}
.photo-frame--bl::after { bottom: -7px; right: 32px; }
.photo-frame--bl .photo-frame__dot { top: -7px; left: 30%; }

/* Variant — bracket bottom-right */
.photo-frame--br::before {
    bottom: -16px; right: -16px;
    border-left: none; border-top: none;
    border-bottom-right-radius: 14px;
}
.photo-frame--br::after { bottom: -7px; left: 32px; }
.photo-frame--br .photo-frame__dot { top: -7px; right: 30%; }

@media (max-width: 1024px) {
    .photo-frame { max-width: 100%; }
}

/* ── Nav icon buttons (messages + notifications) ─────────────────────────── */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    position: relative;
    flex-shrink: 0;          /* never compress the icon row */
}

/* SBVault-style compass tour button — subtle, transparent, semi-white */
.nav-tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}
.nav-tour-btn:hover {
    color: var(--primary-cyan);
    background: rgba(15, 204, 233, 0.10);
}

.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1.5px solid var(--primary-cyan);
    border-radius: 4px;
    color: var(--primary-cyan);
    cursor: pointer;
    position: relative;
    text-decoration: none;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-icon-btn:hover {
    background-color: rgba(15, 204, 233, 0.14);
    color: var(--primary-cyan);
}

.nav-notif-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background-color: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    padding: 0 3px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 276px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 160;
    display: none;
    overflow: hidden;
}
.notif-dropdown.open {
    display: block;
}
.notif-dropdown-header {
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-dark);
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}
.notif-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s ease;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background-color: var(--bg-light); }
.notif-item-icon {
    color: var(--primary-cyan);
    font-size: 0.95rem;
    flex-shrink: 0;
}
.notif-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    color: #888;
    font-size: 0.875rem;
}
.notif-empty i { margin-right: 0.4rem; color: #4caf50; }

/* App drawer (logged-in user menu) — hamburger button + right-side slide-in
   drawer with user info, quick-actions, settings, and sign-out. Mirrors the
   pattern from the CTG repo. */
.app-menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1.5px solid var(--primary-cyan);
    border-radius: 4px;
    cursor: pointer;
    padding: 0 !important;
    transition: background-color 0.2s ease;
}
.app-menu-btn:hover {
    background-color: rgba(15, 204, 233, 0.12);
}
.app-menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--primary-cyan);
    border-radius: 1px;
}

.app-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.app-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.app-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 90vw;
    background: var(--bg-white);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}
.app-drawer-overlay.open .app-drawer {
    transform: translateX(0);
}

.app-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a3a5a 100%);
    color: var(--text-light);
}
.app-drawer-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.app-drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    border: 2px solid var(--primary-cyan);
    overflow: hidden;
}
img.app-drawer-avatar { padding: 0; }
.app-drawer-user-info strong {
    display: block;
    font-size: 1rem;
    line-height: 1.2;
    color: var(--text-light);
}
.app-drawer-user-info small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}
.app-drawer-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}
.app-drawer-close:hover { color: var(--primary-cyan); }

.app-drawer-nav {
    padding: 1rem;
    flex: 1;
}
.app-drawer-section-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin: 0.5rem 0.6rem 0.5rem;
    font-weight: 700;
}
.app-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.15s ease;
}
.app-drawer-link:hover,
.app-drawer-link:focus {
    background-color: var(--bg-light);
    color: var(--primary-dark);
}
.app-drawer-link i {
    width: 20px;
    text-align: center;
    color: var(--primary-cyan);
}
.app-drawer-link--logout { color: var(--warning); }
.app-drawer-link--logout i { color: var(--warning); }
.app-drawer-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

body.no-scroll { overflow: hidden; }

/* Dashboard calendar widget */
.cal-nav {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg-light);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-dark);
    font-size: 1.3rem;
    font-weight: 700;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.cal-nav:hover { background: var(--primary-cyan); color: var(--primary-dark); }

.cal-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.cal-grid th {
    padding: 0.5rem 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #999;
    text-align: center;
    text-transform: uppercase;
}
.cal-day {
    height: 48px;
    text-align: center;
    vertical-align: middle;
    border-radius: 6px;
    padding: 0;
}
.cal-day-num {
    display: inline-block;
    font-size: 0.88rem;
    color: var(--text-dark);
    line-height: 1.1;
}
.cal-day--other .cal-day-num { color: #ccc; }
.cal-day--today { background: var(--primary-dark); }
.cal-day--today .cal-day-num { color: var(--primary-cyan); font-weight: 700; }
.cal-day--has-events .cal-day-num { font-weight: 700; color: var(--primary-dark); }
.cal-day--has-events.cal-day--today .cal-day-num { color: var(--primary-cyan); }
.cal-day-dot {
    display: block;
    width: 5px;
    height: 5px;
    background: var(--primary-cyan);
    border-radius: 50%;
    margin: 3px auto 0;
}
.cal-day--today .cal-day-dot { background: var(--bg-white); }

/* Contact & footer icons use Font Awesome (see base.html / contact.html) */



/* ════════════════════════════════════════════════════════════════════
   Blue — BSG Virtual Assistant chat widget.
   1:1 visual mirror of SBVault's Julie widget
   (skillbreed-vault/client/chatbot-widget.js injected styles).
   Only the brand-blue gradient (#2563EB → #1E40AF) is swapped for
   BSG navy (#0a1e3d → #1a3a5a). Class names preserved verbatim
   (vcb-*) to keep the mapping obvious.
   ════════════════════════════════════════════════════════════════════ */

@keyframes vcb-slideIn {
    from { opacity: 0; transform: scale(0.92) translateY(16px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

@keyframes vcb-msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

@keyframes vcb-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.85); }
    50%      { opacity: 1;   transform: scale(1);    }
}

@keyframes vcb-ping {
    75%, 100% { transform: scale(1.6); opacity: 0; }
}

/* ---- Container ---- */
#vcb-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

/* ---- Launcher button ---- */
#vcb-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid #0a1e3d;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    position: relative;
    padding: 0;
    background: transparent;
}

#vcb-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

#vcb-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

#vcb-online-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 2;
    animation: vcb-pulse 2s ease-in-out infinite;
}

#vcb-online-badge svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: white;
    stroke-width: 1.5;
}

/* Hide launcher when chat is open */
#vcb-container.chat-open #vcb-button { display: none !important; }
#vcb-container.chat-open #vcb-tooltip { display: none !important; }

/* Hover tooltip */
#vcb-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    background: #1f2937;
    color: white;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

#vcb-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 1.5rem;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #1f2937;
}

#vcb-button:hover + #vcb-tooltip,
#vcb-button:hover ~ #vcb-tooltip { opacity: 1; }

/* ---- Chat window ---- */
#vcb-window {
    position: fixed;
    bottom: 0;
    right: 1rem;
    width: 400px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: vcb-slideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 9999;
    box-sizing: border-box;
}

#vcb-window.open { display: flex; }

/* ---- Header ---- */
.vcb-header {
    background: linear-gradient(135deg, #0a1e3d 0%, #1a3a5a 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.vcb-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vcb-header-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.vcb-header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.vcb-header-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
}

.vcb-header-avatar-fallback {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.vcb-header-name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.vcb-header-sub {
    margin: 3px 0 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

.vcb-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
}

.vcb-close-btn:hover { background: rgba(255,255,255,0.3); }

/* ---- Messages area ---- */
.vcb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.vcb-messages::-webkit-scrollbar { width: 4px; }
.vcb-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ---- Message rows ---- */
.vcb-msg-row {
    display: flex;
    gap: 9px;
    animation: vcb-msgIn 0.25s ease;
}

.vcb-msg-row.bot  { justify-content: flex-start; align-items: flex-end; }
.vcb-msg-row.user { justify-content: flex-end;   align-items: flex-end; }

.vcb-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.vcb-msg-avatar-fallback {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0a1e3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    color: white;
}

/* ---- Bubbles ---- */
.vcb-bubble {
    max-width: 85%;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
}

.vcb-bubble.bot {
    background: white;
    color: #1a1a1a;
    border-radius: 16px 16px 16px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    font-weight: 400;
}

.vcb-bubble.user {
    background: linear-gradient(135deg, #0a1e3d 0%, #1a3a5a 100%);
    color: #FFFFFF;
    border-radius: 20px 20px 4px 20px;
    box-shadow: 0 2px 8px rgba(10,30,61,0.3);
    font-weight: 500;
}

/* Markdown inside bubbles */
.vcb-bubble strong { font-weight: 700; }
.vcb-bubble em     { font-style: italic; }
.vcb-bubble a {
    color: #0a1e3d;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.vcb-bubble.user a { color: #cfeefb; }
.vcb-bubble a:hover { text-decoration: none; }

/* ---- Typing indicator ---- */
.vcb-typing-bubble {
    background: white;
    border-radius: 16px 16px 16px 4px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    display: flex;
    gap: 5px;
    align-items: center;
}

.vcb-typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: vcb-pulse 1.4s ease-in-out infinite;
}

.vcb-typing-dot:nth-child(2) { animation-delay: 0.22s; }
.vcb-typing-dot:nth-child(3) { animation-delay: 0.44s; }

/* ---- Quick Actions ---- */
.vcb-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    animation: vcb-msgIn 0.25s ease;
    padding: 0.25rem 0;
}

.vcb-quick-actions-label {
    width: 100%;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.vcb-quick-btn {
    background: white;
    border: 1.5px solid #0a1e3d;
    color: #0a1e3d;
    border-radius: 24px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.vcb-quick-btn:hover {
    background: #0a1e3d;
    color: white;
}

/* ---- Input area (floating card) ---- */
.vcb-input-area {
    background: white;
    padding: 12px;
    flex-shrink: 0;
}

.vcb-input-card {
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 2px 4px 8px 0 rgba(0, 0, 0, 0.1), -2px 4px 8px 0 rgba(0, 0, 0, 0.1);
    padding: 12px;
}

.vcb-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #1f2937;
    resize: none;
    overflow-y: auto;
    max-height: 200px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.vcb-input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.vcb-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.vcb-input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin-top: 8px;
}

.vcb-input-actions-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vcb-plus-btn {
    padding: 6px;
    margin: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcb-plus-btn:hover {
    color: #6b7280;
    background: #f1f5f9;
}

.vcb-plus-btn svg { width: 24px; height: 24px; }

.vcb-send-btn {
    padding: 6px;
    margin: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: #9ca3af;
    cursor: not-allowed;
    font-size: 1.1rem;
    transition: all 0.2s;
    opacity: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcb-send-btn.enabled {
    color: #0a1e3d;
    cursor: pointer;
    opacity: 1;
}

.vcb-send-btn.enabled:hover {
    background: #f1f5f9;
}

.vcb-send-btn svg { width: 24px; height: 24px; }

.vcb-input-actions-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.vcb-mic-btn {
    padding: 6px;
    margin: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vcb-mic-btn svg { width: 22px; height: 22px; }
.vcb-mic-btn:hover { background: #f1f5f9; color: #6b7280; }
.vcb-mic-btn.recording {
    color: #dc2626;
    background: #fee2e2;
    animation: vcb-mic-pulse 1.4s ease-in-out infinite;
}
.vcb-mic-btn.recording:hover { background: #fecaca; }
@keyframes vcb-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

/* Drag-drop visual feedback */
.vcb-input-card.drag-over {
    border: 2px dashed #0a1e3d !important;
    background: #e6f9fc !important;
}

/* ---- Mobile / Tablet Full-Screen (≤768px) ---- */
@media (max-width: 768px) {
    #vcb-window {
        inset: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        bottom: 0;
        right: 0;
        max-width: 100%;
        box-shadow: none;
    }

    #vcb-container {
        bottom: 1rem;
        right: 1rem;
    }

    .vcb-messages {
        flex: 1 !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
    }

    .vcb-input {
        font-size: 16px !important;
        min-height: 44px !important;
        max-height: 160px !important;
    }

    .vcb-input-card {
        border-radius: 0 !important;
        box-shadow: none !important;
        border-top: 1px solid #e5e7eb !important;
    }

    .vcb-input-area {
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    }
}

/* ════════════════════════════════════════════════════════════════════
   Cookie notice bar — slim dark fixed bar at the bottom of the page.
   Shown once, dismissed via localStorage[bsgCookieAck]=1. BSG has no
   analytics/ad cookies, so there's nothing to opt OUT of — single
   "Got it" button. Sits above the chatbot launcher (z-index 10000 vs
   9999) so the user sees the notice before the assistant invitation.
   ════════════════════════════════════════════════════════════════════ */

.bsg-cookie-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(10, 30, 61, 0.97);  /* BSG navy, slight translucency */
    backdrop-filter: saturate(180%) blur(6px);
    -webkit-backdrop-filter: saturate(180%) blur(6px);
    border-top: 1px solid rgba(15, 204, 233, 0.18);
    color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.25);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.26s ease, opacity 0.26s ease;
}
.bsg-cookie-bar.visible {
    transform: translateY(0);
    opacity: 1;
}

.bsg-cookie-bar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.bsg-cookie-bar-text {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.45;
    color: rgba(241, 245, 249, 0.92);
}
.bsg-cookie-bar-text strong {
    color: #ffffff;
    font-weight: 700;
    margin-right: 0.35rem;
}
.bsg-cookie-bar-link {
    color: var(--primary-cyan, #0fcce9);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.4rem;
    white-space: nowrap;
}
.bsg-cookie-bar-link:hover { text-decoration: underline; }

.bsg-cookie-bar-btn {
    flex-shrink: 0;
    background: var(--primary-cyan, #0fcce9);
    color: #0a1e3d;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(15, 204, 233, 0.25);
    font-family: inherit;
}
.bsg-cookie-bar-btn:hover {
    background: #2ed8f0;
    box-shadow: 0 4px 14px rgba(15, 204, 233, 0.35);
}
.bsg-cookie-bar-btn:active { transform: scale(0.97); }

/* Two-button mode — actions container + secondary "Essential Only" button */
.bsg-cookie-bar-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.bsg-cookie-bar-btn-secondary {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(241, 245, 249, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, border-color 0.15s;
    font-family: inherit;
}
.bsg-cookie-bar-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}
.bsg-cookie-bar-btn-secondary:active { transform: scale(0.97); }

/* Mobile — stack vertically, full-width buttons */
@media (max-width: 640px) {
    .bsg-cookie-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        padding: 0.85rem 1rem 1rem;
    }
    .bsg-cookie-bar-text { font-size: 0.82rem; }
    .bsg-cookie-bar-btn { width: 100%; }
    .bsg-cookie-bar-btn-secondary { width: 100%; }
    .bsg-cookie-bar-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        width: 100%;
    }
}

/* Hide the reCAPTCHA v3 badge sitewide. Google's terms allow this as
   long as the required branding text is displayed in the user flow —
   that text lives in the base template footer + on auth pages
   (see templates/base.html + templates/auth_base.html).
   Matches the pattern used across SBVault, CTG, iCare, skillbreed.com.
   2026-07-18. */
.grecaptcha-badge {
    visibility: hidden !important;
}
