/* =========================================================================
   CH3 Interactions — brand theme
   Palette: CH3 red, charcoal, white  (matches sample layout)
   ========================================================================= */
:root {
    --ch3-red: #e30613;
    --ch3-red-dark: #b80410;
    --ch3-dark: #161617;
    --ch3-charcoal: #1f1f22;
    --ch3-gray: #6b7280;
    --ch3-light: #f5f6f8;
    --ch3-border: #e6e8ec;
    --ch3-radius: .55rem;
    --ch3-shadow: 0 .5rem 1.5rem rgba(15, 16, 17, .08);
    --ch3-shadow-lg: 0 1rem 2.5rem rgba(15, 16, 17, .14);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: #2b2f36;
    background: #fff;
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4 {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.25;
}

a { text-decoration: none; }

.text-ch3 { color: var(--ch3-red) !important; }
.bg-ch3 { background-color: var(--ch3-red) !important; }
.bg-dark-ch3 { background-color: var(--ch3-dark) !important; }
.bg-light-ch3 { background-color: var(--ch3-light) !important; }

/* ---- Buttons ---------------------------------------------------------- */
.btn-ch3 {
    background: var(--ch3-red);
    border-color: var(--ch3-red);
    color: #fff;
    font-weight: 600;
    padding: .65rem 1.5rem;
    border-radius: var(--ch3-radius);
    transition: all .2s ease;
}
.btn-ch3:hover, .btn-ch3:focus {
    background: var(--ch3-red-dark);
    border-color: var(--ch3-red-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 .5rem 1rem rgba(227, 6, 19, .3);
}
.btn-outline-ch3 {
    border: 2px solid var(--ch3-red);
    color: var(--ch3-red);
    font-weight: 600;
    padding: .6rem 1.45rem;
    border-radius: var(--ch3-radius);
}
.btn-outline-ch3:hover { background: var(--ch3-red); color: #fff; }
.btn-outline-light { font-weight: 600; }

/* ---- Brand logo ------------------------------------------------------- */
.ch3-logo {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.55rem;
    letter-spacing: -.02em;
    color: #fff;
    background: var(--ch3-red);
    padding: .15rem .55rem;
    border-radius: .35rem;
    line-height: 1;
    display: inline-block;
}
.ch3-logo .sup { font-size: .9em; }
.brand-logo { max-height: 44px; width: auto; display: block; }
.admin-brand .brand-logo, .offcanvas-header .brand-logo { max-height: 36px; }
.logo-preview {
    width: 88px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    background: #f4f5f7; border: 1px solid var(--ch3-border); border-radius: .5rem;
    flex: 0 0 auto;
}
.logo-preview img { max-width: 80px; max-height: 52px; }
.profile-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    background: rgba(227,6,19,.1); color: var(--ch3-red);
    display: flex; align-items: center; justify-content: center; font-size: 3rem;
}

/* ---- Navbar ----------------------------------------------------------- */
.navbar-ch3 {
    background: #fff;
    box-shadow: 0 .25rem 1rem rgba(0,0,0,.06);
    padding-top: .75rem;
    padding-bottom: .75rem;
}
.navbar-ch3 .nav-link {
    font-weight: 600;
    color: var(--ch3-dark) !important;
    margin: 0 .35rem;
    position: relative;
}
.navbar-ch3 .nav-link:hover,
.navbar-ch3 .nav-link.active { color: var(--ch3-red) !important; }
.navbar-ch3 .nav-link.active::after {
    content: '';
    position: absolute;
    left: .75rem; right: .75rem; bottom: -.35rem;
    height: 3px;
    background: var(--ch3-red);
    border-radius: 2px;
}
.topbar {
    background: var(--ch3-dark);
    color: #d7d8dc;
    font-size: .85rem;
}

/* Mobile slide-in menu (offcanvas drawer from the right) */
@media (max-width: 991.98px) {
    .navbar .offcanvas {
        position: fixed;
        top: 0; bottom: 0; right: 0; left: auto;
        width: min(300px, 85vw);
        max-width: 85vw;
        background: #fff;
        visibility: hidden;
        transform: translateX(100%);
        transition: transform .3s ease-in-out, visibility .3s;
        will-change: transform;
    }
    .navbar .offcanvas.showing,
    .navbar .offcanvas.show {
        visibility: visible;
        transform: none !important;
    }
    .navbar .offcanvas.hiding { transform: translateX(100%) !important; }
    .navbar .offcanvas-body { overflow-y: auto; }
    .navbar .offcanvas .navbar-nav .nav-link { padding: .65rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--ch3-border); }
    .navbar .offcanvas .dropdown-menu { border: 0; padding-left: 1rem; box-shadow: none; }
}
.topbar a { color: #d7d8dc; }
.topbar a:hover { color: #fff; }

/* ---- Hero (contained box, matches the sample layout) ------------------ */
.hero-box {
    position: relative;
    background:
        linear-gradient(120deg, rgba(227,6,19,.97) 0%, rgba(184,4,16,.95) 60%, rgba(150,3,12,.96) 100%),
        url('/images/hero-pattern.svg');
    background-size: cover;
    background-position: center;
    color: var(--ch3-hero-text, #fff);
    border-radius: var(--ch3-radius);
    padding: clamp(2.5rem, 6vw, 5rem);
    overflow: hidden;
    min-height: 440px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-box::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.12), transparent 45%);
    pointer-events: none;
}
.hero-box > * { position: relative; z-index: 2; }
.hero-box .badge { align-self: flex-start; width: auto; }
.hero-box h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.06; }
.hero-box .lead { color: rgba(255,255,255,.92); max-width: 40rem; }

/* Hero slide with a background image — overlay keeps text readable */
.hero-box.has-image {
    background-size: cover;
    background-position: center;
}
.hero-box.has-image::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--ch3-hero-overlay, linear-gradient(110deg, rgba(150,3,12,.92) 0%, rgba(22,22,23,.55) 100%));
    pointer-events: none;
}

/* Hero carousel controls */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next { width: 4%; opacity: .85; }
.hero-carousel .carousel-indicators { margin-bottom: 1rem; }
.hero-carousel .carousel-indicators [data-bs-target] {
    width: 30px; height: 5px; border-radius: 3px;
    background-color: rgba(255,255,255,.55);
}
.hero-carousel .carousel-indicators .active { background-color: #fff; }

/* ---- Section helpers -------------------------------------------------- */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-title { position: relative; margin-bottom: 2.5rem; }
.section-title .eyebrow {
    color: var(--ch3-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .82rem;
}

/* ---- Service / feature cards ----------------------------------------- */
.feature-card {
    background: var(--ch3-red);
    color: #fff;
    border-radius: var(--ch3-radius);
    padding: 2rem 1.5rem;
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
    border: none;
}
.feature-card:nth-child(even) { background: var(--ch3-dark); }
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--ch3-shadow-lg); }
.feature-card .icon {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    display: inline-flex;
}
.feature-card h3 { font-size: 1.25rem; }
.feature-card p { color: rgba(255,255,255,.85); font-size: .95rem; margin-bottom: 1rem; }
.feature-card a { color: #fff; font-weight: 600; }

/* ---- Generic card ----------------------------------------------------- */
.card-ch3 {
    border: 1px solid var(--ch3-border);
    border-radius: var(--ch3-radius);
    overflow: hidden;
    height: 100%;
    transition: transform .25s ease, box-shadow .25s ease;
    background: #fff;
}
.card-ch3:hover { transform: translateY(-6px); box-shadow: var(--ch3-shadow); }
.card-ch3 .card-img-top { height: 210px; object-fit: cover; }
.card-ch3 .badge-division {
    background: rgba(227,6,19,.1);
    color: var(--ch3-red);
    font-weight: 600;
}

/* ---- Stats ------------------------------------------------------------ */
.stat-box {
    text-align: center;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.stat-box .num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: var(--ch3-red); line-height: 1; }
.stat-box .lbl { color: var(--ch3-gray); font-weight: 600; margin-top: .35rem; }

/* 2×2 stats grid that fills the height of the column beside it */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 1rem;
    min-height: 320px;
}

/* ---- CTA band --------------------------------------------------------- */
.cta-band {
    background: linear-gradient(120deg, var(--ch3-dark), var(--ch3-charcoal));
    color: #fff;
    border-radius: var(--ch3-radius);
}

/* ---- Footer ----------------------------------------------------------- */
.footer {
    background: var(--ch3-dark);
    color: #b9bbc2;
    padding-top: 3.5rem;
}
.footer h5 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.footer a { color: #b9bbc2; }
.footer a:hover { color: var(--ch3-red); }
.footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 2.5rem; padding: 1.25rem 0;
    font-size: .88rem;
}

/* ---- Floating WhatsApp ------------------------------------------------ */
.wa-float {
    position: fixed;
    right: 1.25rem; bottom: 1.25rem;
    width: 56px; height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.25);
    z-index: 1040;
    transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }

/* ---- Page header ------------------------------------------------------ */
.page-header {
    background: linear-gradient(120deg, var(--ch3-dark), var(--ch3-charcoal));
    color: #fff;
    padding: 4rem 0 3rem;
}
.page-header .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.5); }
.page-header .breadcrumb a { color: rgba(255,255,255,.8); }
.page-header .breadcrumb .active { color: #fff; }

/* ---- Forms ------------------------------------------------------------ */
.form-control:focus, .form-select:focus {
    border-color: var(--ch3-red);
    box-shadow: 0 0 0 .2rem rgba(227,6,19,.15);
}

/* ---- Admin ------------------------------------------------------------ */
.admin-body { background: #f4f5f7; }

.admin-sidebar {
    background: var(--ch3-sidebar-bg, var(--ch3-dark));
    color: var(--ch3-sidebar-text, #c7c9d1);
}
/* Only the desktop sidebar is sticky/full-height — NOT the mobile offcanvas */
.admin-sidebar:not(.offcanvas) {
    width: 296px;
    height: 100vh;
    position: sticky;
    top: 0;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: 1.25rem 1.25rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.admin-brand:hover { color: #fff; }

.admin-nav-wrap { min-height: 0; }
.admin-nav-scroll { overflow-y: auto; min-height: 0; padding: .25rem .75rem 1rem; }
.admin-nav-scroll::-webkit-scrollbar { width: 6px; }
.admin-nav-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }

/* Search */
.admin-search { position: relative; padding: 1rem .9rem .25rem; }
.admin-search i { position: absolute; left: 1.65rem; top: 50%; transform: translateY(-30%); color: #8b8d97; font-size: .9rem; }
.admin-search .form-control {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
    padding-left: 2.2rem;
    border-radius: .55rem;
}
.admin-search .form-control::placeholder { color: #8b8d97; }
.admin-search .form-control:focus { background: rgba(255,255,255,.1); box-shadow: none; border-color: rgba(255,255,255,.2); }

/* Section labels */
.admin-nav-section {
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6e7079;
    font-weight: 700;
    padding: 1rem .65rem .4rem;
}

/* Nav items */
.admin-nav { gap: .1rem; }
.admin-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #c7c9d1;
    border-radius: .55rem;
    padding: .6rem .65rem;
    font-weight: 500;
    position: relative;
}
.admin-nav .nav-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; flex: 0 0 auto; }
.admin-nav .nav-link span:first-of-type { flex: 1 1 auto; white-space: nowrap; }
.admin-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav .nav-link.active { background: rgba(227,6,19,.16); color: #fff; }
.admin-nav .nav-link.active::before {
    content: '';
    position: absolute; left: -.75rem; top: 50%; transform: translateY(-50%);
    width: 4px; height: 22px; border-radius: 0 3px 3px 0;
    background: var(--ch3-red);
}
.admin-nav .nav-link.active i { color: var(--ch3-red); }
.admin-badge {
    background: var(--ch3-red); color: #fff;
    font-size: .72rem; font-weight: 700;
    min-width: 22px; text-align: center;
    padding: .1rem .45rem; border-radius: 1rem;
}
.admin-dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,.2); }

/* Footer */
.admin-nav-foot { padding: .5rem .75rem 1rem; border-top: 1px solid rgba(255,255,255,.07); }
.admin-copyright { color: #6e7079; font-size: .78rem; padding: .75rem .65rem 0; }

/* Dashboard quick-link cards */
.dash-card {
    display: flex; align-items: center; gap: 1rem;
    background: #fff; border: 1px solid var(--ch3-border);
    border-radius: var(--ch3-radius); padding: 1.1rem 1.25rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    height: 100%;
}
.dash-card:hover { transform: translateY(-4px); box-shadow: var(--ch3-shadow); border-color: var(--ch3-red); }
.dash-card .dash-ico {
    flex: 0 0 auto; width: 48px; height: 48px; border-radius: .8rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem; background: rgba(227,6,19,.1); color: var(--ch3-red);
    transition: transform .2s ease;
}
.dash-card:hover .dash-ico { transform: scale(1.08); }
/* Modern multi-colour dashboard icons */
.dash-ico.c-red     { background: rgba(227,6,19,.12);   color: #e30613; }
.dash-ico.c-blue    { background: rgba(37,99,235,.12);  color: #2563eb; }
.dash-ico.c-green   { background: rgba(22,163,74,.12);  color: #16a34a; }
.dash-ico.c-purple  { background: rgba(147,51,234,.12); color: #9333ea; }
.dash-ico.c-orange  { background: rgba(234,88,12,.12);  color: #ea580c; }
.dash-ico.c-teal    { background: rgba(13,148,136,.12); color: #0d9488; }
.dash-ico.c-pink    { background: rgba(219,39,119,.12); color: #db2777; }
.dash-ico.c-indigo  { background: rgba(79,70,229,.12);  color: #4f46e5; }
.dash-ico.c-amber   { background: rgba(217,119,6,.14);  color: #d97706; }
.dash-ico.c-cyan    { background: rgba(8,145,178,.12);  color: #0891b2; }
.dash-ico.c-violet  { background: rgba(124,58,237,.12); color: #7c3aed; }
.dash-ico.c-emerald { background: rgba(5,150,105,.12);  color: #059669; }
.dash-ico.c-rose    { background: rgba(225,29,72,.12);  color: #e11d48; }
.dash-card .dash-meta { display: flex; flex-direction: column; line-height: 1.2; }
.dash-card .dash-meta strong { color: var(--ch3-dark); }
.dash-card .dash-meta small { color: var(--ch3-gray); }
.dash-card .dash-count { margin-left: auto; font-weight: 800; color: var(--ch3-dark); font-size: 1.25rem; }

.admin-stat { border-left: 4px solid var(--ch3-red); }

.advert-tag {
    display: inline-block;
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .7;
    margin-bottom: .5rem;
}

/* ---- Wide banner advert (main column, grows to fill column) ------------ */
.home-banner { width: 100%; min-height: 300px; position: relative; }
/* Absolute fill avoids Chrome's flex percentage-height collapse on the image */
.home-banner-img { position: absolute; inset: 0; display: block; }
.home-banner-img img,
.home-banner-img video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--ch3-radius);
    box-shadow: var(--ch3-shadow);
}
.home-banner-fallback {
    flex: 1 1 auto;
    width: 100%;
    background:
        linear-gradient(125deg, rgba(227,6,19,.97), rgba(184,4,16,.97)),
        url('/images/hero-pattern.svg');
    background-size: cover;
    border-radius: var(--ch3-radius);
    box-shadow: var(--ch3-shadow);
    color: #fff;
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.home-banner-fallback h3 { font-size: 1.75rem; line-height: 1.2; }
.home-banner-fallback p { font-size: .98rem; }

/* ---- Adverts panel (room for TWO square artworks) --------------------- */
.advert-sidebar { position: sticky; top: 6rem; }
.adverts-panel {
    background: var(--ch3-red);
    border-radius: var(--ch3-radius);
    padding: 1rem;
    box-shadow: var(--ch3-shadow);
}
.adverts-panel-title {
    color: #fff;
    text-align: center;
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: .75rem;
}
/* Rotating pages: only the active one shows */
.adverts-page { display: none; }
.adverts-page.is-active { display: block; animation: advFade .5s ease; }
@keyframes advFade { from { opacity: 0; } to { opacity: 1; } }
.adverts-panel-tile {
    position: relative;
    display: block;
    background: #fff;
    border-radius: .5rem;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    transition: transform .2s ease;
}
.adverts-panel-tile:hover { transform: translateY(-3px); }
.adverts-panel-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.adverts-panel-tile-empty {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: .4rem;
    text-align: center; padding: 1.5rem;
    color: var(--ch3-dark);
}
.adverts-panel-tile-empty strong { font-size: 1.1rem; }
.adverts-panel-tile-empty span { font-size: .85rem; color: var(--ch3-gray); }
.adverts-panel-tile-empty .apt-btn {
    margin-top: .4rem;
    background: var(--ch3-red); color: #fff;
    font-weight: 600; font-size: .8rem;
    padding: .3rem .9rem; border-radius: 1rem;
}

/* ---- News cards ------------------------------------------------------- */
.news-card .card-img-top { height: 180px; }
.news-card .news-cat {
    position: absolute;
    top: .75rem; left: .75rem;
    background: var(--ch3-red);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 1rem;
}

/* ---- Service suggestion (sidebar on service pages) -------------------- */
.service-suggest-eyebrow {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ch3-gray);
    margin-bottom: .6rem;
}
.service-suggest-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--ch3-border);
    border-radius: var(--ch3-radius);
    padding: 1rem 1.25rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-suggest-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ch3-shadow);
    border-color: var(--ch3-red);
}
.service-suggest-icon {
    flex: 0 0 auto;
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ch3-red);
    color: #fff;
    border-radius: .5rem;
    font-size: 1.4rem;
}
.service-suggest-body { display: flex; flex-direction: column; line-height: 1.25; flex: 1 1 auto; }
.service-suggest-body strong { color: var(--ch3-dark); font-size: 1.02rem; }
.service-suggest-body small { color: var(--ch3-gray); font-size: .82rem; }
.service-suggest-arrow { color: var(--ch3-red); font-size: 1.1rem; transition: transform .2s ease; }
.service-suggest-card:hover .service-suggest-arrow { transform: translateX(4px); }

/* ---- Auth (split-screen login) ---------------------------------------- */
.auth-body { margin: 0; background: #fff; }
.auth-split { display: flex; min-height: 100vh; }
.auth-brand {
    flex: 1 1 50%;
    position: relative;
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(150deg, rgba(227,6,19,.96) 0%, rgba(184,4,16,.95) 55%, rgba(22,22,23,.97) 100%),
        url('/images/hero-pattern.svg');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.auth-brand::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.12), transparent 45%);
    pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 2; }
.auth-brand-content { max-width: 30rem; }
.auth-brand-content h1 { font-size: clamp(2rem, 4vw, 3rem); color: #fff; margin-bottom: 1rem; }
.auth-brand-content p { color: rgba(255,255,255,.85); font-size: 1.05rem; }
.auth-brand-footer { font-size: .85rem; color: rgba(255,255,255,.7); }

.auth-form-wrap {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}
.auth-form { width: 100%; max-width: 400px; }
.auth-form h2 { font-size: 1.9rem; }
.auth-back { color: var(--ch3-gray); font-weight: 600; font-size: .9rem; }
.auth-back:hover { color: var(--ch3-red); }
.auth-form .input-group-text { background: #fff; color: var(--ch3-gray); border-right: 0; }
.auth-form .input-group .form-control { border-left: 0; }

@media (max-width: 767.98px) {
    .auth-brand { display: none; }
    .auth-form-wrap { flex-basis: 100%; }
}

/* ---- Team cards ------------------------------------------------------- */
.team-card {
    background: #fff;
    border: 1px solid var(--ch3-border);
    border-radius: var(--ch3-radius);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--ch3-shadow); }
.team-photo { position: relative; overflow: hidden; }
.team-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.team-socials {
    position: absolute;
    left: 0; right: 0; bottom: -3.5rem;
    display: flex; justify-content: center; gap: .5rem;
    padding: .75rem;
    background: linear-gradient(transparent, rgba(22,22,23,.85));
    transition: bottom .25s ease;
}
.team-card:hover .team-socials { bottom: 0; }
.team-socials a {
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ch3-dark);
    border-radius: 50%;
    transition: background .2s ease, color .2s ease;
}
.team-socials a:hover { background: var(--ch3-red); color: #fff; }

/* ---- Live chat widget ------------------------------------------------- */
.chat-launcher {
    position: fixed; right: 1.25rem; bottom: 1.25rem;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--ch3-red); color: #fff; border: 0;
    font-size: 1.5rem; box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.25);
    z-index: 1045; transition: transform .2s ease;
}
.chat-launcher:hover { transform: scale(1.08); }
.chat-launcher.has-unread::after {
    content: ''; position: absolute; top: 4px; right: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #2ecc71; border: 2px solid #fff;
}
.chat-panel {
    position: fixed; right: 1.25rem; bottom: 1.25rem;
    width: 360px; max-width: calc(100vw - 2rem); height: 520px; max-height: calc(100vh - 3rem);
    background: #fff; border-radius: .9rem; overflow: hidden;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.3); z-index: 1046;
    display: flex; flex-direction: column;
    animation: chatIn .25s ease;
}
@keyframes chatIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.chat-header {
    background: linear-gradient(135deg, var(--ch3-red), var(--ch3-red-dark));
    color: #fff; padding: 1rem 1.1rem;
    display: flex; align-items: center; justify-content: space-between;
}
.chat-header small { opacity: .85; font-size: .78rem; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.chat-x { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; opacity: .85; }
.chat-x:hover { opacity: 1; }
.chat-intro { padding: 1.25rem; }
.chat-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: #f5f6f8; }
.chat-messages { flex: 1 1 auto; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.chat-msg { max-width: 80%; display: flex; flex-direction: column; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.them { align-self: flex-start; align-items: flex-start; }
.chat-msg-who { font-size: .68rem; color: var(--ch3-gray); margin: 0 .4rem .1rem; font-weight: 600; }
.chat-bubble {
    padding: .55rem .8rem; border-radius: 1rem; font-size: .92rem; line-height: 1.35;
    white-space: pre-wrap; word-break: break-word;
}
.chat-msg.them .chat-bubble { background: #fff; color: #23252b; border: 1px solid var(--ch3-border); border-bottom-left-radius: .3rem; }
.chat-msg.me .chat-bubble { background: var(--ch3-red); color: #fff; border-bottom-right-radius: .3rem; }
.chat-msg-time { font-size: .66rem; color: var(--ch3-gray); margin: .15rem .4rem 0; }
.chat-typing { padding: .25rem 1.2rem .75rem; display: flex; gap: 4px; align-items: center; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9a9ca5; animation: chatDot 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chatDot { 0%,60%,100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ---- Team Meetings ---------------------------------------------------- */
.meet-user {
    display: flex; align-items: center; gap: .7rem; width: 100%; text-align: left;
    background: none; border: 0; border-bottom: 1px solid var(--ch3-border);
    padding: .7rem .9rem; cursor: pointer;
}
.meet-user:hover { background: var(--ch3-light); }
.meet-user.active { background: rgba(227,6,19,.06); box-shadow: inset 3px 0 0 var(--ch3-red); }
.meet-avatar {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #eef0f3; color: #6b7280; font-size: 1.1rem;
}
.meet-user-meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; flex: 1 1 auto; }
.meet-user-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meet-unread {
    flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: var(--ch3-red); color: #fff; font-size: .72rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.meet-incoming {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080;
    display: flex; align-items: center; gap: .8rem;
    background: var(--ch3-dark); color: #fff; padding: .85rem 1.1rem;
    border-radius: .8rem; box-shadow: var(--ch3-shadow-lg);
    animation: meetRing 1s infinite alternate;
}
@keyframes meetRing { from { transform: translateY(0); } to { transform: translateY(-3px); } }
.chat-input { display: flex; gap: .5rem; padding: .65rem; border-top: 1px solid var(--ch3-border); background: #fff; }
.chat-input input[type=text] { flex: 1 1 auto; min-width: 0; border: 1px solid var(--ch3-border); border-radius: 1.5rem; padding: .55rem 1rem; outline: none; }
.chat-tool { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #eef0f3; color: #555; font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.chat-tool:hover { background: #e3e6ea; }
.chat-emoji-pop { position: absolute; bottom: 62px; left: 8px; z-index: 30; box-shadow: var(--ch3-shadow-lg); border-radius: .6rem; overflow: hidden; }
.chat-emoji-pop emoji-picker { --background: #fff; height: 320px; }
/* chat attachments */
.chat-att-img img { max-width: 200px; max-height: 200px; border-radius: .6rem; display: block; }
.chat-att-file { display: inline-flex; gap: .45rem; align-items: center; background: #fff; border: 1px solid var(--ch3-border); border-radius: .6rem; padding: .45rem .75rem; color: var(--ch3-dark); text-decoration: none; max-width: 230px; }
.chat-msg.me .chat-att-file { background: rgba(255,255,255,.95); }
.chat-att-file:hover { border-color: var(--ch3-red); color: var(--ch3-red); }
.chat-input input:focus { border-color: var(--ch3-red); }
.chat-input button { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--ch3-red); color: #fff; }

/* ---- Admin live chat (two-pane inbox) --------------------------------- */
/* flex-direction:row overrides Bootstrap's .card column, so the list sits LEFT and the chat RIGHT */
.chat-admin { display: flex; flex-direction: row; height: calc(100vh - 140px); overflow: hidden; }
.chat-admin-list { width: 300px; flex: 0 0 300px; border-right: 1px solid var(--ch3-border); display: flex; flex-direction: column; }
@media (max-width: 767.98px) {
    .chat-admin { flex-direction: column; height: auto; }
    .chat-admin-list { width: auto; flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--ch3-border); max-height: 38vh; }
    .chat-admin-thread { min-height: 60vh; }
}
.chat-admin-list-head { padding: 1rem; border-bottom: 1px solid var(--ch3-border); display: flex; justify-content: space-between; align-items: center; }
.chat-admin-convs { overflow-y: auto; flex: 1 1 auto; }
.chat-conv { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--ch3-border); padding: .75rem 1rem; cursor: pointer; }
.chat-conv:hover { background: #f7f8fa; }
.chat-conv.active { background: rgba(227,6,19,.07); box-shadow: inset 3px 0 0 var(--ch3-red); }
.chat-conv-last { font-size: .82rem; color: var(--ch3-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-ago { font-size: .7rem; color: #adb1ba; margin-top: .15rem; }
.chat-admin-thread { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.chat-admin-empty { margin: auto; text-align: center; }
.chat-convo { display: flex; flex-direction: column; height: 100%; min-height: 0; position: relative; }
.chat-admin-thread-head { padding: .75rem 1.1rem; border-bottom: 1px solid var(--ch3-border); display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex: 0 0 auto; }
.chat-admin-thread .chat-messages { background: #f5f6f8; min-height: 0; }
/* long names: truncate with ellipsis */
.chat-peer { min-width: 0; }
.chat-peer strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head-actions { flex: 0 0 auto; display: flex; align-items: center; gap: .6rem; }
.chat-conv-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.chat-conv-top strong { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv-top .badge { flex: 0 0 auto; }

/* ---- Advert detail page ----------------------------------------------- */
.advert-content p { margin-bottom: 1rem; color: #43454d; }
.advert-hero-empty {
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
    background: var(--ch3-light); color: #c3c6cf; font-size: 3rem;
}
.advert-more-tile { display: block; text-decoration: none; }
.advert-more-tile img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    border-radius: .6rem; box-shadow: var(--ch3-shadow); transition: transform .2s ease;
}
.advert-more-tile:hover img { transform: translateY(-4px); }
.advert-more-empty {
    aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
    background: var(--ch3-red); color: #fff; border-radius: .6rem; padding: 1rem; text-align: center;
}
.advert-more-name { display: block; margin-top: .5rem; font-weight: 600; color: var(--ch3-dark); font-size: .9rem; }

/* ---- Social share buttons --------------------------------------------- */
.share-buttons { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.share-label { font-weight: 600; color: var(--ch3-gray); font-size: .9rem; }
.share-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ch3-border); background: #fff; color: var(--ch3-dark);
    text-decoration: none; font-size: 1.05rem; cursor: pointer; transition: all .2s ease;
}
.share-btn:hover { color: #fff; transform: translateY(-2px); }
.share-btn.fb:hover { background: #1877f2; border-color: #1877f2; }
.share-btn.x:hover  { background: #000; border-color: #000; }
.share-btn.li:hover { background: #0a66c2; border-color: #0a66c2; }
.share-btn.copy:hover { background: var(--ch3-red); border-color: var(--ch3-red); }

/* ---- Misc ------------------------------------------------------------- */
.object-cover { object-fit: cover; }
[data-aos] { will-change: transform, opacity; }
