/* COMPLEMENTARY-i theme polish — brand colors live in Settings (style_color1-4, see colors.blade.php).
   This file only adds structure/typography/responsive polish that isn't per-admin content. */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* Brand palette extracted directly from the COMPLEMENTARY-i logo.
   --brand-primary/--brand-dark mirror Settings.style_color1/2 (colors.blade.php) so both
   sources agree; --brand-secondary/--brand-accent are used here only, deliberately sparingly:
   secondary (red) for genuine calls-to-action/highlights, accent (blue/purple) for icons and
   decorative moments — not spread across every element. */
:root {
    --brand-primary: #265B24;
    --brand-secondary: #E9201D;
    --brand-accent: #3F4786;
    --brand-dark: #1F2937;
    --brand-light: #F5F7F5;
}

body, h1, h2, h3, h4, h5, h6, .navbar a, .btn-theme {
    font-family: 'Nunito', 'Roboto', sans-serif;
}

body {
    color: var(--brand-dark);
}

/* ---------- Wordmark logo fallback (used until a real logo file is uploaded) ---------- */
.logo-wordmark {
    display: inline-flex;
    align-items: baseline;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 26px;
    line-height: 1;
    color: var(--brand-dark);
    letter-spacing: -.02em;
    white-space: nowrap;
}
.logo-wordmark .accent { color: var(--brand-primary); }
.logo-wordmark .tagline {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--brand-secondary);
    margin-top: 2px;
}

/* ---------- Topbar ---------- */
#topbar {
    background: var(--brand-dark);
    color: #fff;
}
#topbar .contact-info a,
#topbar .contact-info i {
    color: #fff;
}
#topbar .contact-info i {
    color: var(--brand-secondary) !important;
}
/* Search toggle, language switcher, etc. default to the theme's dark text color (meant for
   a light header), which is nearly invisible against this dark navy topbar; the base theme's
   hover state also turns them brand-primary green, which reads oddly here — keep everything
   in this row plain white instead. */
#topbar .controls a,
#topbar .controls .btn,
#topbar .controls .header-dropdown .btn {
    color: #fff;
}
#topbar .controls a:hover,
#topbar .controls .btn:hover,
#topbar .header-search-btn:hover,
#topbar .appearance-toggle a:hover {
    color: #fff;
    opacity: .8;
}

/* ---------- Header ---------- */
#header {
    background: #fff;
    transition: box-shadow .3s ease, padding .3s ease;
}
#header.header-scrolled {
    box-shadow: 0 4px 20px rgba(9, 30, 62, .08) !important;
}
.navbar > ul > li {
    padding: 8px 0 23px 28px;
}
.navbar a {
    font-weight: 700;
    font-size: 15px;
}
.navbar .active, .navbar .active:focus,
.navbar a:hover, .navbar li:hover > a {
    color: var(--brand-primary) !important;
}

/* ---------- Dropdown menus (Resources, etc.) ---------- */
.navbar .dropdown ul {
    border-radius: 10px;
    box-shadow: 0 14px 34px rgba(9, 30, 62, .14);
    overflow: hidden;
    padding: 10px 0;
    min-width: 230px;
}
.navbar .dropdown ul a {
    font-weight: 600;
    padding: 10px 22px;
}
.navbar .dropdown ul li:hover > a {
    background: var(--brand-light);
}

/* ---------- Thematic Areas dropdown: a regular dropdown (not a mega panel), but with
   icon badges per item so it still reads as more considered than a plain text list.
   Desktop only — the .navbar-mobile block further down restores the plain stacked-row
   mobile look (the badge/positioning rules here would otherwise leak into it, since the
   off-canvas nav is the same #navbar element with an extra class, not a separate one). */
.navbar .has-mega > ul {
    min-width: 300px;
}
.navbar .has-mega > ul > li > a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}
.navbar .has-mega > ul > li > a i.drop-arrow {
    display: none;
}
.navbar .has-mega > ul > li > a i:first-child {
    flex: none;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand-accent) 12%, white);
    color: var(--brand-accent);
    font-size: 14px;
    transition: background .2s ease, color .2s ease;
}
.navbar .has-mega > ul > li:hover > a i:first-child {
    background: var(--brand-primary);
    color: #fff;
}

/* Mobile off-canvas: plain stacked row, not the floating desktop dropdown card, and a
   simple inline icon rather than the colored badge (matches the site's other mobile
   submenu items). */
.navbar-mobile .has-mega > ul,
.navbar-mobile .has-mega > ul.dropdown-active {
    position: static;
    width: 100%;
    min-width: unset;
    box-shadow: none;
    border-radius: 0;
    left: 0;
    transform: none;
}
.navbar-mobile .has-mega > ul > li > a i:first-child {
    width: auto;
    height: auto;
    background: transparent;
    color: inherit;
    font-size: inherit;
    border-radius: 0;
}

/* ---------- Hero slider polish ---------- */
#hero .carousel-content {
    text-align: center; /* base theme only centers this below 992px; keep it centered always */
}
#hero .carousel-item::before {
    background: linear-gradient(180deg, rgba(7,91,21,.25) 0%, rgba(9,30,62,.75) 100%);
}
#hero .slider-title,
#hero h2 {
    font-weight: 800;
    text-shadow: none;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
#hero .slider-details {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    opacity: .95;
}
/* Genuine call-to-action: the one button whose whole job is to make someone click,
   so it gets the secondary (red) accent per the brand guide rather than the primary green
   used everywhere else. */
#hero .slider-link {
    background: var(--brand-secondary);
    border-radius: 50px;
    padding: 12px 34px;
    font-weight: 700;
    box-shadow: none !important;
    filter: brightness(1);
    transition: filter .2s ease;
    /* Shrink-to-fit + auto margins centers the button without affecting the
       left-aligned title/paragraph above it (those center via their own max-width+margin). */
    display: table;
    margin-left: auto;
    margin-right: auto;
}
#hero .slider-link:hover {
    background: var(--brand-secondary);
    filter: brightness(0.88);
}

/* ---------- Generic listing filter bar (e.g. Projects: Ongoing / Completed) ---------- */
.topic-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}
.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.filter-label {
    font-weight: 700;
    color: var(--brand-dark);
    margin-right: 4px;
}
.filter-pill {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    border: 1px solid var(--brand-light);
    background: #fff;
    color: var(--brand-dark);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s ease;
}
.filter-pill:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}
.filter-pill.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}

/* ---------- Homepage Blog & News toggle (no page load, Swiper-driven) ---------- */
.blog-news-home, .projects-home, .publications-home {
    padding: 70px 0;
}
.projects-home {
    background: var(--brand-light);
}
.blog-news-header h2,
.publications-home-header h2 {
    font-weight: 800;
    color: var(--brand-dark);
    position: relative;
    padding-bottom: 10px;
}
.blog-news-header h2::after,
.publications-home-header h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    background: var(--brand-primary);
    border-radius: 4px;
}
.blog-news-tabs {
    display: inline-flex;
    background: var(--brand-light);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
}
.blog-news-tab {
    border: none;
    background: transparent;
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 700;
    color: var(--brand-dark);
    cursor: pointer;
    transition: all .2s ease;
}
.blog-news-tab.active {
    background: var(--brand-primary);
    color: #fff;
}
.blog-news-swiper,
.publications-home-swiper {
    padding: 6px 6px 50px;
}
.blog-news-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(9, 30, 62, .08);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}
.blog-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(9, 30, 62, .14);
}
.blog-news-card-media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--brand-light);
}
.blog-news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-news-card-media-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-accent);
    font-size: 32px;
    background: color-mix(in srgb, var(--brand-accent) 10%, white);
}
.blog-news-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--brand-secondary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
}
.blog-news-new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f5b800;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 4px 11px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.blog-news-viewall {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 28px;
    border-radius: 50px;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 700;
    text-decoration: none;
    transition: all .2s ease;
}
.blog-news-viewall:hover {
    background: var(--brand-primary);
    color: #fff;
}
.blog-news-card-body {
    padding: 20px 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-news-date {
    font-size: 13px;
    color: var(--brand-accent);
    font-weight: 700;
    margin-bottom: 6px;
}
.blog-news-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.blog-news-title a {
    color: var(--brand-dark);
}
.blog-news-excerpt {
    color: #5b6472;
    font-size: 14.5px;
    margin-bottom: 14px;
    flex: 1;
}
.blog-news-readmore {
    font-weight: 700;
    color: var(--brand-primary);
    text-decoration: none;
}
.blog-news-readmore:hover {
    color: var(--brand-secondary);
}
.blog-news-swiper .swiper-pagination-bullet-active,
.publications-home-swiper .swiper-pagination-bullet-active {
    background: var(--brand-primary);
}
.blog-news-swiper .swiper-button-prev,
.blog-news-swiper .swiper-button-next,
.publications-home-swiper .swiper-button-prev,
.publications-home-swiper .swiper-button-next {
    width: 42px;
    height: 42px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(9, 30, 62, .15);
    color: var(--brand-dark);
}
.blog-news-swiper .swiper-button-prev::after,
.blog-news-swiper .swiper-button-next::after,
.publications-home-swiper .swiper-button-prev::after,
.publications-home-swiper .swiper-button-next::after {
    font-size: 15px;
}
@media (max-width: 767px) {
    .blog-news-swiper .swiper-button-prev,
    .blog-news-swiper .swiper-button-next,
    .publications-home-swiper .swiper-button-prev,
    .publications-home-swiper .swiper-button-next {
        display: none; /* the peeking next slide is the mobile affordance instead */
    }
}

/* ---------- Homepage Services section ---------- */
.services-home {
    padding: 70px 0 80px;
    background: var(--brand-light);
}
.services-home-header {
    max-width: 620px;
    margin: 0 auto 40px;
}
.services-home-eyebrow {
    display: inline-block;
    background: color-mix(in srgb, var(--brand-primary) 12%, white);
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.services-home-header h2 {
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 8px;
}
.services-home-header p {
    color: #5b6472;
    margin-bottom: 0;
}
.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 34px 28px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(9, 30, 62, .07);
    border-top: 3px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(9, 30, 62, .14);
    border-top-color: var(--brand-primary);
}
.service-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    transition: background .2s ease;
}
.service-card:hover .service-card-icon {
    background: var(--brand-secondary);
}
.service-card h3 {
    font-size: 19px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 10px;
}
.service-card p {
    color: #5b6472;
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}
.service-card-more {
    font-weight: 700;
    color: var(--brand-primary);
    font-size: 14px;
}
.service-card:hover .service-card-more {
    color: var(--brand-secondary);
}

/* ---------- Thematic Area detail page: "Services we deliver" ---------- */
.thematic-area-services {
    margin: 40px 0;
    padding: 40px 0 10px;
    border-top: 1px solid var(--brand-light);
}
.thematic-area-services-header h3 {
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 30px;
    font-size: 22px;
}
.thematic-service-card {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    background: #fff;
    border: 1px solid var(--brand-light);
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.thematic-service-card:hover {
    box-shadow: 0 10px 26px rgba(9, 30, 62, .1);
    transform: translateY(-3px);
    border-color: var(--brand-primary);
}
.thematic-service-card img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex: none;
}
.thematic-service-card h4 {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 6px;
}
.thematic-service-card p {
    font-size: 13.5px;
    color: #5b6472;
    margin-bottom: 0;
    line-height: 1.5;
}
body.dark .thematic-area-services {
    border-top-color: rgba(255, 255, 255, .1);
}
body.dark .thematic-area-services-header h3 {
    color: #fff;
}
body.dark .thematic-service-card {
    background: #16212e;
    border-color: rgba(255, 255, 255, .08);
}
body.dark .thematic-service-card h4 {
    color: #fff;
}
body.dark .thematic-service-card p {
    color: rgba(255, 255, 255, .65);
}

/* ---------- About page: Mission / Vision highlight cards ---------- */
.about-mission-vision {
    padding: 50px 0 10px;
}
.mission-vision-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    height: 100%;
    background: color-mix(in srgb, var(--brand-primary) 6%, white);
    border: 1px solid color-mix(in srgb, var(--brand-primary) 16%, white);
    border-radius: 16px;
    padding: 30px 28px;
}
.mission-vision-card--vision {
    background: color-mix(in srgb, var(--brand-accent) 6%, white);
    border-color: color-mix(in srgb, var(--brand-accent) 18%, white);
}
.mission-vision-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.mission-vision-card--vision .mission-vision-icon {
    background: var(--brand-accent);
}
.mission-vision-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 6px;
}
.mission-vision-card p {
    color: #5b6472;
    font-size: 14.5px;
    line-height: 1.6;
    margin-bottom: 0;
}
body.dark .mission-vision-card {
    background: #16212e;
    border-color: #26384a;
}
body.dark .mission-vision-card h3 {
    color: #fff;
}
body.dark .mission-vision-card p {
    color: rgba(255, 255, 255, .65);
}

/* ---------- About page: Core Values grid ---------- */
.about-values {
    padding: 55px 0 65px;
}
.about-values-header {
    max-width: 620px;
    margin: 0 auto 40px;
}
.about-values-eyebrow {
    display: inline-block;
    background: color-mix(in srgb, var(--brand-secondary) 12%, white);
    color: var(--brand-secondary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.about-values-header h2 {
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 8px;
}
.about-values-header p {
    color: #5b6472;
    margin-bottom: 0;
}
.value-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 30px 22px;
    box-shadow: 0 4px 18px rgba(9, 30, 62, .07);
    border-top: 3px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.value-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(9, 30, 62, .14);
    border-top-color: var(--brand-secondary);
}
.value-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--brand-secondary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
    flex-shrink: 0;
}
.value-card p {
    color: var(--brand-dark);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0;
}
body.dark .about-values-header h2 {
    color: #fff;
}
body.dark .about-values-header p {
    color: rgba(255, 255, 255, .65);
}
body.dark .value-card {
    background: #16212e;
    box-shadow: none;
}
body.dark .value-card p {
    color: #fff;
}

/* ---------- About page: Team grid ---------- */
.about-team {
    padding: 55px 0 70px;
    background: var(--brand-light);
}
.about-team-header {
    max-width: 620px;
    margin: 0 auto 40px;
}
.about-team-eyebrow {
    display: inline-block;
    background: color-mix(in srgb, var(--brand-primary) 12%, white);
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 14px;
}
.about-team-header h2 {
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: 8px;
}
.about-team-header p {
    color: #5b6472;
    margin-bottom: 0;
}
.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 34px 22px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(9, 30, 62, .07);
    border-top: 3px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.team-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(9, 30, 62, .14);
    border-top-color: var(--brand-primary);
}
.team-card-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 18px;
    overflow: hidden;
    flex-shrink: 0;
}
.team-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 4px;
}
.team-card-role {
    display: inline-block;
    color: var(--brand-primary);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 12px;
}
.team-card p {
    color: #5b6472;
    font-size: 13.5px;
    line-height: 1.6;
    margin-bottom: 0;
}
.team-card-linkedin {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
body.dark .about-team {
    background: #111a24;
}
body.dark .about-team-header h2 {
    color: #fff;
}
body.dark .about-team-header p {
    color: rgba(255, 255, 255, .65);
}
body.dark .team-card {
    background: #16212e;
    box-shadow: none;
}
body.dark .team-card h3 {
    color: #fff;
}
body.dark .team-card p {
    color: rgba(255, 255, 255, .65);
}
body.dark .team-card-linkedin {
    background: #1d2b3a;
}

/* ---------- Partners carousel: force every logo to the same visual size regardless of its
   native dimensions (Swiper's slidesPerView:"auto" otherwise sizes each slide to its image). ---------- */
.partners-slider .swiper-slide {
    width: 180px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.partners .thumbnail {
    width: 160px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 0 auto;
}
.partners .thumbnail img {
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(40%);
    opacity: .85;
    transition: all .2s ease;
}
.partners .thumbnail:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ---------- Thematic Area detail page: Previous/Next nav ---------- */
.thematic-area-nav {
    padding: 18px 0;
    gap: 16px;
}
.thematic-area-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--brand-dark);
    max-width: 45%;
}
.thematic-area-nav-link i {
    font-size: 18px;
    color: var(--brand-primary);
    flex: none;
}
.thematic-area-nav-link small {
    display: block;
    color: #5b6472;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.thematic-area-nav-link strong {
    display: block;
    font-size: 14.5px;
    line-height: 1.3;
}
.thematic-area-nav-link:hover strong {
    color: var(--brand-primary);
}
body.dark .thematic-area-nav-link {
    color: #fff;
}
body.dark .thematic-area-nav-link small {
    color: rgba(255, 255, 255, .6);
}

/* ---------- Homepage Research Division Teams section ---------- */
.research-division {
    padding: 70px 0 60px;
    background: var(--brand-dark);
}
.research-division-header {
    max-width: 620px;
    margin: 0 auto 40px;
}
.research-division-header h2 {
    color: #fff;
    font-weight: 800;
    margin-top: 10px;
}
.research-division-card {
    height: 100%;
    text-align: center;
    padding: 34px 24px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    transition: background .2s ease, transform .2s ease;
}
.research-division-card:hover {
    background: rgba(255, 255, 255, .1);
    transform: translateY(-6px);
}
.research-division-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.research-division-card h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}
.research-division-card p {
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ---------- Responsive: mobile off-canvas polish ---------- */
@media (max-width: 991px) {
    .navbar > ul > li {
        padding: 0;
    }
    .navbar-mobile ul {
        top: 76px;
    }
    #topbar .contact-info {
        font-size: 13px;
    }
}

/* ---------- Night mode: everything above assumes a light header/white cards, so it needs
   its own pass here rather than just inheriting — several elements would otherwise render
   invisible (dark text on dark background) when the site's own Light/Dark toggle is used. ---------- */
body.dark #header {
    background: var(--brand-dark);
}
body.dark .logo-wordmark {
    color: #fff;
}
body.dark .logo-wordmark .accent {
    color: #7fbf7a; /* lighter green — #265B24 primary is too dark to read on a dark header */
}
body.dark .logo-wordmark .tagline {
    color: var(--brand-secondary);
}
body.dark .navbar a {
    color: #fff;
}
body.dark .navbar .active, body.dark .navbar .active:focus,
body.dark .navbar a:hover, body.dark .navbar li:hover > a {
    color: #7fbf7a !important;
}
body.dark .navbar .has-mega > ul > li > a i:first-child {
    background: color-mix(in srgb, var(--brand-accent) 35%, black);
    color: #fff;
}
body.dark .navbar .has-mega > ul > li:hover > a i:first-child {
    background: var(--brand-primary);
}
body.dark .filter-label {
    color: #fff;
}
body.dark .filter-pill {
    background: transparent;
    border-color: rgba(255, 255, 255, .25);
    color: #fff;
}
body.dark .filter-pill:hover {
    border-color: var(--brand-secondary);
    color: var(--brand-secondary);
}
body.dark .filter-pill.active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}
body.dark .blog-news-header h2,
body.dark .publications-home-header h2,
body.dark .blog-news-title a {
    color: #fff;
}
body.dark .blog-news-tabs {
    background: rgba(255, 255, 255, .08);
}
body.dark .blog-news-tab {
    color: #fff;
}
body.dark .blog-news-card {
    background: #16212e;
    box-shadow: none;
}
body.dark .blog-news-excerpt {
    color: rgba(255, 255, 255, .7);
}
body.dark .blog-news-swiper .swiper-button-prev,
body.dark .blog-news-swiper .swiper-button-next,
body.dark .publications-home-swiper .swiper-button-prev,
body.dark .publications-home-swiper .swiper-button-next {
    background: #16212e;
    color: #fff;
}
body.dark .blog-news-viewall {
    color: #7fbf7a;
    border-color: #7fbf7a;
}
body.dark .blog-news-viewall:hover {
    background: #7fbf7a;
    color: var(--brand-dark);
}
body.dark .services-home, body.dark .projects-home {
    background: #111a24;
}
body.dark .services-home-header h2 {
    color: #fff;
}
body.dark .services-home-header p {
    color: rgba(255, 255, 255, .65);
}
body.dark .service-card {
    background: #16212e;
    box-shadow: none;
}
body.dark .service-card h3 {
    color: #fff;
}
body.dark .service-card p {
    color: rgba(255, 255, 255, .65);
}

/* ===== AI Assistant widget (replaces the old WhatsApp float button's corner spot) ===== */
#ai-assistant {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 999;
    transition: bottom .3s ease;
}
#ai-assistant.above-cookie-banner {
    bottom: 260px;
}
#ai-assistant.above-cookie-banner .ai-assistant-panel {
    bottom: 334px;
    max-height: min(70vh, calc(100vh - 350px));
}
.ai-assistant-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--brand-primary);
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}
.ai-assistant-toggle:hover {
    background: var(--brand-dark);
    transform: scale(1.06);
}
.ai-assistant-bubble {
    position: absolute;
    right: 70px;
    bottom: 8px;
    background: #fff;
    color: var(--brand-dark);
    padding: 10px 16px;
    border-radius: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s;
}
.ai-assistant-bubble.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
.ai-assistant-bubble.d-none {
    opacity: 0 !important;
    visibility: hidden !important;
}
.ai-assistant-bubble-text i {
    color: var(--brand-primary);
    margin-left: 4px;
}
.ai-assistant-bubble-close {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e3e3e3;
    color: #888;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    transition: background .15s ease, color .15s ease;
}
.ai-assistant-bubble-close:hover {
    background: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: #fff;
}
.ai-assistant-panel {
    position: fixed;
    right: 15px;
    bottom: 89px;
    width: 340px;
    max-width: calc(100vw - 30px);
    max-height: min(70vh, calc(100vh - 105px));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.ai-assistant-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.ai-assistant-header {
    background: var(--brand-primary);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}
.ai-assistant-header strong {
    display: block;
    font-size: 15px;
}
.ai-assistant-header small {
    display: block;
    color: rgba(255, 255, 255, .8);
    font-size: 12px;
    margin-top: 2px;
}
.ai-assistant-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    opacity: .85;
    line-height: 1;
}
.ai-assistant-close:hover {
    opacity: 1;
}
.ai-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--brand-light);
    min-height: 0;
}
.ai-assistant-msg {
    max-width: 88%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
}
.ai-assistant-msg-bot {
    align-self: flex-start;
    background: #fff;
    color: var(--brand-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}
.ai-assistant-msg-user {
    align-self: flex-end;
    background: var(--brand-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ai-assistant-typing {
    font-style: italic;
    opacity: .7;
}
.ai-assistant-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ai-assistant-quick {
    border: 1px solid var(--brand-primary);
    background: #fff;
    color: var(--brand-primary);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.ai-assistant-quick:hover {
    background: var(--brand-primary);
    color: #fff;
}
.ai-assistant-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: flex-start;
    max-width: 92%;
}
.ai-assistant-result {
    display: block;
    background: #fff;
    border: 1px solid #e3e8e3;
    border-radius: 10px;
    padding: 8px 11px;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.ai-assistant-result strong {
    display: block;
    font-size: 13px;
    color: var(--brand-primary);
    margin-bottom: 2px;
}
.ai-assistant-result span {
    display: block;
    font-size: 12px;
    color: #5a635a;
}
.ai-assistant-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #ebefeb;
    background: #fff;
    flex-shrink: 0;
}
.ai-assistant-input-row input {
    flex: 1;
    border: 1px solid #dde3dd;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13.5px;
    outline: none;
}
.ai-assistant-input-row input:focus {
    border-color: var(--brand-primary);
}
.ai-assistant-input-row button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.ai-assistant-input-row button:hover {
    background: var(--brand-dark);
}

@media (max-width: 480px) {
    #ai-assistant {
        right: 10px;
        bottom: 15px;
    }
    #ai-assistant.above-cookie-banner {
        bottom: 320px;
    }
    .ai-assistant-panel {
        right: 10px;
        width: calc(100vw - 20px);
        bottom: 89px;
        max-height: min(70vh, calc(100vh - 105px));
    }
    #ai-assistant.above-cookie-banner .ai-assistant-panel {
        bottom: 394px;
        max-height: min(70vh, calc(100vh - 410px));
    }
    .ai-assistant-bubble {
        max-width: 150px;
        white-space: normal;
    }
}

body.dark .ai-assistant-panel {
    background: #16212e;
}
body.dark .ai-assistant-messages {
    background: #111a24;
}
body.dark .ai-assistant-msg-bot {
    background: #1d2b3a;
    color: #fff;
}
body.dark .ai-assistant-result {
    background: #1d2b3a;
    border-color: #26384a;
}
body.dark .ai-assistant-result span {
    color: rgba(255, 255, 255, .6);
}
body.dark .ai-assistant-input-row {
    background: #16212e;
    border-top-color: #26384a;
}
body.dark .ai-assistant-input-row input {
    background: #1d2b3a;
    border-color: #26384a;
    color: #fff;
}
body.dark .ai-assistant-bubble {
    background: #1d2b3a;
    color: #fff;
}
body.dark .ai-assistant-bubble-close {
    background: #16212e;
    border-color: #26384a;
    color: rgba(255, 255, 255, .7);
}
