/* ==========================================================================
   Code Xenix Custom Premium Header Styles
   ========================================================================== */

/* Header Base & Sticky */
body {
    padding-top: var(--header-height, 80px);
}

.header__custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 20px 0;
    border-bottom: 1px solid transparent;
}

.header__custom.is-sticky {
    padding: 10px 0;
    background: rgba(var(--bg-menu-rgb), 0.85);
    /* Code Xenix dark background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(var(--text-primary-rgb), 0.05);
    box-shadow: 0 4px 30px rgba(var(--shadow-color-rgb), 0.3);
}

.header__custom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__custom a {
    border: none !important;
    /* Override global style.css a tag border */
}

/* Logo */
.header__logo-custom a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    border: none;
    letter-spacing: -0.5px;
}

.header__logo-custom img {
    height: 40px;
    width: auto;
}

.header__custom.is-sticky .header__logo-custom img {
    height: 36px;
}

/* Navigation Base */
.header__nav-custom {
    display: none;
}

@media (min-width: 992px) {
    .header__nav-custom {
        display: flex;
        align-items: center;
        gap: 32px;
    }
}

.nav__list-custom {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.nav__item-custom {
    position: relative;
    padding: 20px 0;
}

.nav__link-custom {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    padding: 10px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.nav__link-custom:hover,
.nav__item-custom:hover>.nav__link-custom {
    color: var(--text-primary);
}

.nav__link-custom:hover,
.nav__item-custom:hover>.nav__link-custom {
    color: var(--text-primary);
}

.chevron-down {
    width: 12px;
    height: 12px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.nav__item-custom:hover .chevron-down {
    transform: rotate(180deg);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: 800px;
    background: rgba(var(--bg-menu-rgb), 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(var(--text-primary-rgb), 0.08);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 40px;
    cursor: default;
}

.nav__item-custom.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mega-menu__left {
    flex: 0 0 280px;
    padding-right: 30px;
    border-right: 1px solid rgba(var(--text-primary-rgb), 0.1);
    display: flex;
    flex-direction: column;
}

.mega-menu__heading {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.mega-menu__desc {
    font-size: 14px;
    color: #9aa0a6;
    line-height: 1.6;
    margin-bottom: 24px;
}

.mega-menu__view-all {
    margin-top: auto;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: none;
    transition: color 0.3s ease;
}

.mega-menu__view-all:hover {
    color: #b8e045;
}

.mega-menu__right {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.service-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    transition: background 0.3s ease;
}

.service-card:hover {
    background: rgba(var(--text-primary-rgb), 0.05);
}

/* Services Mega Menu Layout */
.mega-menu--services {
    width: 980px;
    left: 50%;
    transform: translateX(-30%) translateY(15px);
}

.nav__item-custom.has-mega:hover .mega-menu--services {
    transform: translateX(-30%) translateY(0);
}

.mega-menu--services .mega-menu__right {
    display: flex;
    gap: 30px;
}

.services-column {
    display: flex;
    flex-direction: column;
}

.services-column--top {
    flex: 2;
}

.services-column--enterprise {
    flex: 1;
}

.services-column h4.group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-left: 10px;
}

.services-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.services-grid-1 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(148, 207, 20, 0.1);
    color: var(--brand-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.service-card__info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.service-card__info p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Mini Card for Tech & Industries */
.mega-menu--tech {
    width: 900px;
    /* left: auto; */
    /* right: -150px; */
    /* transform: translateY(15px); */
}

.mega-menu--tech .mega-menu__right {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* .nav__item-custom.has-mega:hover .mega-menu--tech {
    transform: translateY(0);
} */

.mega-menu--industry {
    width: 900px;
    /* left: auto;
    right: -50px;
    transform: translateY(15px); */
}

.mega-menu--industry .mega-menu__right {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* .nav__item-custom.has-mega:hover .mega-menu--industry {
    transform: translateY(0);
} */

.mini-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    transition: background 0.3s ease;
}

.mini-card:hover {
    background: rgba(var(--text-primary-rgb), 0.05);
}

.mini-card__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(148, 207, 20, 0.1);
    color: var(--brand-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.mini-card__info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Simple Dropdown (Company) */
.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(15px);
    width: 220px;
    background: rgba(var(--bg-menu-rgb), 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(var(--text-primary-rgb), 0.08);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    margin: 0;
}

.nav__item-custom.has-dropdown:hover .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu-custom li {
    margin-bottom: 4px;
}

.dropdown-menu-custom li:last-child {
    margin-bottom: 0;
}

.dropdown-menu-custom a {
    display: block;
    padding: 10px 16px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: none !important;
    transition: all 0.2s ease;
}

.dropdown-menu-custom a:hover {
    background: rgba(var(--text-primary-rgb), 0.05);
    color: var(--text-primary);
    padding-left: 20px;
    /* Slight slide effect */
}

/* Theme Toggle Positioning */
@media (min-width: 992px) {
    #theme-toggle-desktop {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1050;
    }
}

/* CTA & Burger */
.header__cta-custom {
    display: none;
}

@media (min-width: 992px) {
    .header__cta-custom {
        display: flex;
        width: 140px;
        justify-content: flex-end;
        align-items: center;
        margin-right: 70px;
    }
}

.header__cta-custom .btn-active {
    height: 46px;
    padding: 0 28px;
    font-size: 16px;
}

.btn-cta-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: #94cf14;
    color: #141a1e;
    font-size: 15px;
    font-weight: 700;
    border-radius: 30px;
    text-decoration: none;
    border: none;
    box-shadow: 0 4px 12px rgba(148, 207, 20, 0.2);
    transition: all 0.3s ease;
}

.btn-cta-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(148, 207, 20, 0.4);
    background: #a5e024;
    color: #141a1e;
}

/* Mobile Burger Menu */
.mobile-burger {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

@media (min-width: 992px) {
    .mobile-burger {
        display: none;
    }
}

.mobile-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.mobile-burger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-burger.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-burger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu Panel */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(13, 17, 20, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    padding: 100px 20px 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.4s ease;
}

.mobile-menu-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(var(--text-primary-rgb), 0.05);
}

.mobile-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border: none;
}

.mobile-nav-link.has-submenu {
    cursor: pointer;
}

/* Mobile Accordion */
.mobile-submenu {
    display: none;
    padding-bottom: 16px;
    list-style: none;
    margin: 0;
}

.mobile-nav-group-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 16px 8px;
}

.mobile-submenu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-muted);
    font-size: 16px;
    text-decoration: none;
    border: none !important;
}

.mobile-submenu a:hover {
    color: var(--text-primary);
}

.mobile-cta-wrapper {
    margin-top: 40px;
    text-align: center;
}

.mobile-cta-wrapper .btn-active {
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
}

/* ===========================================================
   Content Wrapper - Side-by-Side Image & Text Layout
   =========================================================== */

.content-wrapper {
    display: block;
}

/* OVERVIEW SECTION - Image on Right */
.content-wrapper--overview.has-image {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
}

.content-wrapper--overview>* {
    flex: 1;
    min-width: 0;
}

/* Reorder so image appears on right - text first, image second */
.content-wrapper--overview> :is(p, ul, ol, h1, h2, h3, h4, h5, h6, blockquote, div:not(figure)) {
    order: 1;
}

.content-wrapper--overview>figure,
.content-wrapper--overview>img {
    order: 2;
}

/* BENEFITS SECTION - Image on Left */
.content-wrapper--benefits.has-image {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
}

.content-wrapper--benefits>* {
    flex: 1;
    min-width: 0;
}

/* Reorder so image appears on left - image first, text second */
.content-wrapper--benefits>figure,
.content-wrapper--benefits>img {
    order: 1;
}

.content-wrapper--benefits> :is(p, ul, ol, h1, h2, h3, h4, h5, h6, blockquote, div:not(figure)) {
    order: 2;
}

/* PROCESS SECTION - Image on Right */
.content-wrapper--process.has-image {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2rem;
}

.content-wrapper--process>* {
    flex: 1;
    min-width: 0;
}

/* Reorder so image appears on right - text first, image second */
.content-wrapper--process> :is(p, ul, ol, h1, h2, h3, h4, h5, h6, blockquote, div:not(figure)) {
    order: 1;
}

.content-wrapper--process>figure,
.content-wrapper--process>img {
    order: 2;
}

/* Images in content wrapper */
.content-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
    margin: 0;
}

/* Paragraphs and text elements */
.content-wrapper p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-wrapper p:last-child {
    margin-bottom: 0;
}

/* Lists in content wrapper */
.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: 1rem;
    padding-left: 20px;
}

.content-wrapper li {
    margin-bottom: 0.5rem;
}

/* Headings in content wrapper */
.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    margin-bottom: 1rem;
    margin-top: 0;
}

/* Blockquotes */
.content-wrapper blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 4px solid var(--brand-primary);
}

/* Strong and emphasis tags */
.content-wrapper strong,
.content-wrapper b {
    font-weight: 700;
}

.content-wrapper em,
.content-wrapper i {
    font-style: italic;
}

/* Figures with captions */
.content-wrapper figure {
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
}

/* Text / Image container helpers created by JS */
.content-wrapper .text-container {
    display: block;
}

.content-wrapper .image-container {
    display: flex;
    align-items: flex-start;
    /* top align image with text */
    justify-content: center;
}

.content-wrapper .image-container img {
    display: block;
    max-width: 100%;
    height: auto;
}

.content-wrapper figcaption {
    font-size: 0.875rem;
    color: var(--brand-primary);
    margin-top: 0.5rem;
    text-align: center;
}

/* Tables */
.content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content-wrapper table th,
.content-wrapper table td {
    padding: 0.75rem;
    border: 1px solid var(--border-heavy);
    text-align: left;
}

.content-wrapper table th {
    background-color: #1a1f24;
    font-weight: 700;
}

/* Horizontal rule */
.content-wrapper hr {
    border: none;
    border-top: 1px solid var(--border-heavy);
    margin: 2rem 0;
}

/* Code blocks */
.content-wrapper code {
    background-color: #1a1f24;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.content-wrapper pre {
    background-color: #1a1f24;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
}

.content-wrapper pre code {
    background-color: transparent;
    padding: 0;
}

/* Responsive adjustments - Side-by-side on larger screens */
@media (min-width: 992px) {

    .content-wrapper--overview.has-image,
    .content-wrapper--benefits.has-image,
    .content-wrapper--process.has-image {
        flex-wrap: nowrap;
        gap: 2rem;
    }

    .content-wrapper--overview.has-image>*,
    .content-wrapper--benefits.has-image>*,
    .content-wrapper--process.has-image>* {
        flex: 1 1 50%;
    }

    .content-wrapper--overview.has-image img,
    .content-wrapper--overview.has-image figure,
    .content-wrapper--benefits.has-image img,
    .content-wrapper--benefits.has-image figure,
    .content-wrapper--process.has-image img,
    .content-wrapper--process.has-image figure {
        max-width: 100%;
    }
}

/* Tablet responsiveness */
@media (min-width: 768px) and (max-width: 991px) {

    .content-wrapper--overview.has-image,
    .content-wrapper--benefits.has-image,
    .content-wrapper--process.has-image {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .content-wrapper--overview.has-image>*,
    .content-wrapper--benefits.has-image>*,
    .content-wrapper--process.has-image>* {
        flex: 1 1 45%;
    }
}

/* Mobile responsiveness - Stack vertically */
@media (max-width: 767px) {

    .content-wrapper--overview.has-image,
    .content-wrapper--benefits.has-image,
    .content-wrapper--process.has-image {
        flex-direction: column;
        gap: 1.5rem;
    }

    .content-wrapper--overview.has-image>*,
    .content-wrapper--benefits.has-image>*,
    .content-wrapper--process.has-image>* {
        flex: 1 1 100%;
        width: 100%;
        order: initial !important;
    }

    .content-wrapper.has-image img {
        width: 100%;
    }
}

/* Alignment utilities */
.content-wrapper .align-left {
    float: left;
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.content-wrapper .align-right {
    float: right;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-wrapper .align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Fix for inline elements that should wrap */
.content-wrapper {
    word-wrap: break-word;
    overflow-wrap: break-word;
}