:root {
    --ankar-blue: #004b8d;
    --ankar-yellow: #ffc72c;
    --ankar-black: #111111;
    --ankar-light: #f7f8fa;
}

/* Reset-ish */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ankar-black);
    background-color: #ffffff;
}

/* Global links – refined, no underlines */
a {
    color: var(--ankar-blue);
    text-decoration: none;
}

/* Override Bootstrap link-style buttons (MENU, search, etc.) */
.btn-link {
    text-decoration: none !important;
    color: var(--ankar-black);
}

.btn-link:hover,
.btn-link:focus {
    text-decoration: none !important;
    color: var(--ankar-blue);
}


a:hover,
a:focus {
    color: #00376a;
    text-decoration: none;
}

/* Header / Navbar */
.ankar-header {
    border-bottom: 1px solid #e5e5e5;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ankar-logo {
    height: 48px;
    width: auto;
}

.brand-text {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.btn-ankar-primary {
    background: var(--ankar-blue);
    border-color: var(--ankar-blue);
    color: #ffffff;
    font-weight: 600;
    border-radius: 999px;
    padding-inline: 1.5rem;
}

.btn-ankar-primary:hover {
    background: #00376a;
    border-color: #00376a;
    color: #ffffff;
}

.btn-ankar-dark {
    background: var(--ankar-black);
    border-color: var(--ankar-black);
    color: #ffffff;
}

.text-ankar-dark {
    color: var(--ankar-black);
}

/* Hamburger icon */
.menu-icon-lines {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.menu-icon-lines span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ankar-black);
}

/* Mega menu overlay */
.mega-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.46);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    z-index: 999;
}

.mega-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mega-menu-inner {
    background: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 1.5rem 1.5rem 1rem;
    overflow-y: auto;
    position: relative;
}

.mega-menu-header {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.mega-search-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 600px;
}

.mega-section {
    border-bottom: 1px solid #e8e8e8;
}

.mega-section-toggle {
    width: 100%;
    text-align: left;
    padding: 0.9rem 0;
    font-weight: 600;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mega-section-toggle i {
    font-size: 0.8rem;
}

.mega-section-content {
    display: none;
    padding-bottom: 1rem;
}

.mega-section-content.open {
    display: block;
}

.mega-subtitle {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    color: #666;
    margin-bottom: 0.4rem;
}

.mega-links {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.mega-links li a {
    display: block;
    padding: 0.2rem 0;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--ankar-black);
}

.mega-links li a:hover {
    color: var(--ankar-blue);
}

.mega-menu-footer {
    border-top: 1px solid #e5e5e5;
    padding-top: 0.8rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.mega-menu-footer a {
    margin-right: 1.2rem;
    text-decoration: none;
    color: #555;
}

.mega-menu-footer a:hover {
    color: var(--ankar-blue);
}

/* Hero slider */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    min-height: 60vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    position: absolute;
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.25));
    color: #ffffff;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 540px;
    padding: 2rem;
}

.hero-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ankar-yellow);
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.hero-text {
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
}

.hero-actions .btn {
    margin-right: 0.5rem;
}

.hero-actions .btn-outline-light {
    border-radius: 999px;
}

/* Feature cards on home */
.feature-section {
    background: var(--ankar-light);
}

.feature-card {
    border-radius: 0.75rem;
    border: 1px solid #e0e0e0;
    padding: 1.2rem;
    background: #fff;
    height: 100%;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.feature-card p {
    font-size: 0.9rem;
}

/* Footer */
.ankar-footer {
    background: #111;
    color: #f5f5f5;
    margin-top: 3rem;
    padding-bottom: 4.5rem;
    /* space for bottom nav on mobile */
}

.ankar-footer h6 {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.footer-links li {
    margin-bottom: 0.25rem;
}

.footer-links a {
    color: #f5f5f5;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--ankar-yellow);
}

.footer-logo {
    height: 40px;
    width: auto;
}

/* Footer bottom inline links (Privacy, Terms) */
.ankar-footer .small a {
    text-decoration: none;
    color: #f5f5f5;
}

.ankar-footer .small a:hover {
    text-decoration: none;
    color: var(--ankar-yellow);
}

/* Mobile bottom nav */
.mobile-bottom-nav {
    position: fixed;
    inset-inline: 0.5rem;
    bottom: 0.75rem;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.12);
    border-radius: 1.5rem;
    display: flex;
    justify-content: space-around;
    padding: 0.4rem 0.25rem;
    z-index: 1050;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    font-size: 0.7rem;
    color: #555;
    text-decoration: none;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    display: block;
}

.bottom-nav-item span {
    display: block;
    margin-top: 0.1rem;
}

/* Active state (you can toggle with JS/body class later) */
.bottom-nav-item.active {
    color: var(--ankar-blue);
}

/* Search page */
.search-page .search-results a {
    color: var(--ankar-blue);
}

.search-page .search-results a:hover {
    text-decoration: underline;
}

/* Responsive tweaks */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-content {
        padding: 1.5rem 1.25rem;
    }
}

/* ===== Database-managed website content ===== */
.cms-page-main {
    background: #fff;
}

.cms-page-hero {
    min-height: 330px;
    background-color: #072640;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.cms-page-hero-overlay {
    min-height: 330px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(7, 38, 64, .96), rgba(0, 75, 141, .82), rgba(0, 0, 0, .28));
}

.cms-page-hero h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.25rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: -.035em;
}

.cms-hero-subtitle {
    max-width: 760px;
    margin: 1.1rem 0 0;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, .86);
}

.cms-eyebrow {
    margin: 0 0 .75rem;
    color: var(--ankar-yellow);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.cms-section {
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.cms-section + .cms-section {
    border-top: 1px solid rgba(7, 38, 64, .07);
}

.cms-section-shell {
    max-width: 1060px;
    margin: 0 auto;
}

.cms-section h2 {
    max-width: 850px;
    margin: 0 0 1rem;
    color: #072640;
    font-size: clamp(1.55rem, 3vw, 2.55rem);
    line-height: 1.15;
    font-weight: 820;
    letter-spacing: -.025em;
}

.cms-rich-text {
    color: #435263;
    font-size: 1rem;
    line-height: 1.78;
}

.cms-rich-text > *:last-child {
    margin-bottom: 0;
}

.cms-rich-text ul,
.cms-rich-text ol {
    padding-left: 1.25rem;
}

.cms-rich-text li + li {
    margin-top: .42rem;
}

.cms-rich-text table {
    width: 100%;
    margin: 1.25rem 0;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #dbe4ec;
    border-radius: 14px;
}

.cms-rich-text th,
.cms-rich-text td {
    padding: .85rem 1rem;
    border-right: 1px solid #e5ebf0;
    border-bottom: 1px solid #e5ebf0;
    vertical-align: top;
}

.cms-rich-text th {
    background: #072640;
    color: #fff;
}

.cms-rich-text tr:last-child td {
    border-bottom: 0;
}

.cms-rich-text th:last-child,
.cms-rich-text td:last-child {
    border-right: 0;
}

.cms-section-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(7, 38, 64, .13);
}

.cms-section-image-wide {
    max-height: 520px;
    margin: .5rem 0 1.75rem;
    aspect-ratio: 16 / 7;
}

.cms-theme-soft {
    background: #f4f8fb;
}

.cms-theme-blue {
    background: linear-gradient(135deg, #072640, #004b8d);
    color: #fff;
}

.cms-theme-blue h2,
.cms-theme-blue .cms-rich-text {
    color: #fff;
}

.cms-theme-blue .cms-rich-text {
    color: rgba(255, 255, 255, .82);
}

.cms-theme-gold {
    background: linear-gradient(135deg, #fff9e8, #fff3c9);
}

.cms-section-cards .cms-rich-text > .cms-card-grid,
.cms-section-stats .cms-rich-text > .cms-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.cms-card,
.cms-stat {
    height: 100%;
    padding: 1.35rem;
    background: #fff;
    border: 1px solid #dfe8ef;
    border-radius: 18px;
    box-shadow: 0 9px 24px rgba(7, 38, 64, .055);
}

.cms-card h3,
.cms-stat strong {
    display: block;
    color: #072640;
    font-size: 1.05rem;
    font-weight: 800;
}

.cms-stat strong {
    color: #004b8d;
    font-size: clamp(1.85rem, 4vw, 3rem);
}

.cms-section-cta .cms-section-shell {
    padding: clamp(1.8rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, #072640, #004b8d);
    border-radius: 26px;
    color: #fff;
    box-shadow: 0 22px 55px rgba(7, 38, 64, .18);
}

.cms-section-cta h2,
.cms-section-cta .cms-rich-text {
    color: #fff;
}

.cms-section-cta .cms-rich-text {
    color: rgba(255, 255, 255, .82);
}

.ankar-visitor-counter {
    padding: 1.25rem 0 3rem;
    background: #fff;
}

.visitor-counter-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.65rem 1.8rem;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(255, 199, 44, .2), transparent 30%),
        linear-gradient(135deg, #06243d, #004b8d);
    border-radius: 24px;
    box-shadow: 0 18px 46px rgba(7, 38, 64, .18);
}

.visitor-counter-intro {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.visitor-counter-icon {
    display: grid;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #072640;
    background: #ffc72c;
    border-radius: 18px;
    font-size: 1.35rem;
}

.visitor-counter-intro p {
    margin: 0 0 .25rem;
    color: #ffc72c;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.visitor-counter-intro h2 {
    max-width: 420px;
    margin: 0;
    color: #fff;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.visitor-counter-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(105px, 1fr));
    gap: .75rem;
}

.visitor-counter-stats > div {
    min-width: 112px;
    padding: .8rem 1rem;
    text-align: center;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 16px;
}

.visitor-counter-stats strong,
.visitor-counter-stats span {
    display: block;
}

.visitor-counter-stats strong {
    color: #fff;
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    line-height: 1;
}

.visitor-counter-stats span {
    margin-top: .4rem;
    color: rgba(255, 255, 255, .72);
    font-size: .75rem;
}

@media (max-width: 767.98px) {
    .cms-page-hero,
    .cms-page-hero-overlay {
        min-height: 280px;
    }

    .cms-section-cards .cms-rich-text > .cms-card-grid,
    .cms-section-stats .cms-rich-text > .cms-stat-grid {
        grid-template-columns: 1fr;
    }

    .cms-rich-text table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .visitor-counter-shell {
        align-items: stretch;
        flex-direction: column;
        padding: 1.25rem;
    }

    .visitor-counter-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .visitor-counter-stats > div {
        min-width: 0;
        padding: .7rem .4rem;
    }
}

/* Hide overlay scroll bar on small screens if needed */
.mega-menu-inner::-webkit-scrollbar {
    width: 6px;
}

.mega-menu-inner::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}


/* ===== Section sidebar (What We Do / Who We Are) ===== */
.page-with-sidebar {
    background-color: #ffffff;
}

.who-sidebar {
    padding-right: 1rem;
    border-right: 1px solid #eee;
}

/* Headings: WHAT WE DO, MORE SERVICES, ABOUT ANKAR, etc. */
.who-sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #777;
    margin-bottom: 0.35rem;
}

/* List */
.who-sidebar-nav {
    list-style: none;
    padding-left: 0;
    margin: 0 0 0.9rem 0;
}

.who-sidebar-nav li+li {
    margin-top: 2px;
}

/* Links */
.who-sidebar-nav a {
    display: block;
    font-size: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: 0.3rem;
    border-left: 3px solid transparent;
    color: #222;
    text-decoration: none;
}

/* Hover state */
.who-sidebar-nav a:hover {
    background-color: #f8f9fa;
    border-left-color: var(--ankar-blue);
    color: var(--ankar-blue);
}

/* Active item – match screenshot: pill + colored left border */
.who-sidebar-nav a.active {
    font-weight: 600;
    background-color: #f5f5f5;
    border-left-color: var(--ankar-blue);
    /* use brand blue for the bar */
    color: #000;
}

/* Sticky behaviour */
@media (min-width: 768px) {
    .sticky-sidebar {
        position: sticky;
        top: 90px;
        /* under sticky header */
    }
}

/* Mobile: no right border, just a simple block on top */
@media (max-width: 767.98px) {
    .who-sidebar {
        border-right: none;
        border-bottom: 1px solid #eee;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        padding-right: 0;
    }
}
