/* =========================================================
   MATRIX SYSTEMS — Professional design layer
   Unified look applied on top of the base template across
   every page: header, buttons, cards, subheader, footer.
   ========================================================= */

:root {
    --matrix-ink: #12172a;
    --matrix-ink-2: #232f47;
    --matrix-muted: #64708a;
    --matrix-line: #e6eaf1;
    --matrix-soft: #f6f8fb;
    --matrix-panel: #ffffff;
    --matrix-red: #b91f2f;
    --matrix-red-dark: #7f1521;
    --matrix-red-light: #d94452;
    --matrix-gold: #c99a48;
    --matrix-blue: #16233f;
    --matrix-blue-2: #223a5f;

    --matrix-radius-sm: 6px;
    --matrix-radius-md: 10px;
    --matrix-radius-lg: 16px;

    --matrix-shadow-sm: 0 6px 18px rgba(18, 23, 42, .06);
    --matrix-shadow-md: 0 16px 38px rgba(18, 23, 42, .09);
    --matrix-shadow-lg: 0 26px 60px rgba(18, 23, 42, .14);
    --matrix-shadow-red: 0 14px 30px rgba(185, 31, 47, .22);

    --matrix-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Base ---------- */

html {
    scroll-behavior: smooth;
}

body.light-scheme {
    background: #fff;
    color: var(--matrix-ink);
}

::selection {
    background: var(--matrix-red);
    color: #fff;
}

a {
    transition: color .2s ease;
}

:focus-visible {
    outline: 2px solid var(--matrix-gold);
    outline-offset: 3px;
}

h1, h2, h3, h4, h5 {
    letter-spacing: 0;
    color: var(--matrix-ink);
}

section {
    padding: 84px 0;
}

/* Slim gold-to-red rule under the very top of the page for a premium finish */
body.light-scheme::before {
    content: "";
    position: fixed;
    inset-inline: 0;
    top: 0;
    height: 3px;
    z-index: 100050;
    background: linear-gradient(90deg, var(--matrix-blue) 0%, var(--matrix-red) 45%, var(--matrix-gold) 100%);
    pointer-events: none;
}

/* ---------- Header ---------- */

header.transparent,
header {
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--matrix-line);
    box-shadow: var(--matrix-shadow-sm);
    backdrop-filter: blur(14px);
}

#topbar {
    background: linear-gradient(90deg, var(--matrix-blue) 0%, var(--matrix-ink-2) 100%);
    border-bottom: 0;
}

#topbar .topbar-widget,
#topbar a {
    color: rgba(255, 255, 255, .86) !important;
    font-weight: 600;
    font-size: 13px;
}

#topbar a:hover {
    color: #fff !important;
}

.topbar-icon {
    filter: brightness(0) saturate(100%) invert(100%) !important;
    opacity: .85;
}

#logo img {
    max-height: 56px;
}

#mainmenu > li > a,
.menu_side_area a.menu-item {
    color: var(--matrix-ink) !important;
}

#mainmenu > li > a {
    position: relative;
    font-weight: 700;
    letter-spacing: 0;
    padding-bottom: 4px;
}

#mainmenu > li > a::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--matrix-red);
    transition: width .25s var(--matrix-ease);
}

#mainmenu > li > a.active,
#mainmenu > li > a:hover {
    color: var(--matrix-red) !important;
}

#mainmenu > li > a.active::after,
#mainmenu > li:hover > a::after {
    width: 100%;
}

#mainmenu ul {
    border: 1px solid var(--matrix-line) !important;
    border-radius: var(--matrix-radius-md) !important;
    box-shadow: var(--matrix-shadow-lg) !important;
    overflow: hidden;
}

#mainmenu li li a {
    font-weight: 600;
    transition: background .2s ease, color .2s ease, padding-right .2s ease;
}

#mainmenu li li a:hover {
    color: var(--matrix-red) !important;
    background: var(--matrix-soft);
    padding-right: 26px;
}

/* ---------- Buttons ---------- */

.btn-main,
.btn-main:visited,
.btn-main.fx-slide {
    position: relative;
    background: linear-gradient(135deg, var(--matrix-red) 0%, var(--matrix-red-dark) 100%);
    border-color: var(--matrix-red);
    border-radius: var(--matrix-radius-sm);
    box-shadow: var(--matrix-shadow-red);
    font-weight: 700;
    letter-spacing: 0;
    transition: transform .22s var(--matrix-ease), box-shadow .22s var(--matrix-ease), background .22s ease;
}

.btn-main:hover {
    background: linear-gradient(135deg, var(--matrix-red-light) 0%, var(--matrix-red) 100%);
    border-color: var(--matrix-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(185, 31, 47, .28);
}

.btn-main:active {
    transform: translateY(0);
}

/* ---------- Subheader (inner page banner) ---------- */

#subheader {
    min-height: 340px;
    display: flex;
    align-items: center;
    background-color: var(--matrix-blue);
    position: relative;
    overflow: hidden;
}

#subheader::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(18, 23, 34, .88), rgba(34, 58, 95, .70)),
        radial-gradient(circle at 18% 22%, rgba(201, 154, 72, .20), transparent 32%);
    z-index: 0;
}

#subheader::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--matrix-red), var(--matrix-gold));
    z-index: 1;
}

#subheader .center-y,
#subheader .container {
    position: relative;
    z-index: 1;
}

#subheader h1 {
    color: #fff;
    font-size: clamp(38px, 5vw, 64px);
    font-weight: 800;
    margin-bottom: 14px;
}

#subheader .lead,
#subheader p {
    color: rgba(255, 255, 255, .84);
    max-width: 760px;
    margin-inline: auto;
}

/* ---------- Section kicker / subtitle ---------- */

.subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--matrix-red);
    font-weight: 800;
    letter-spacing: .2px;
}

/* ---------- Cards ---------- */

.corporate-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: var(--matrix-panel);
    border: 1px solid var(--matrix-line);
    border-radius: var(--matrix-radius-md);
    overflow: hidden;
    color: var(--matrix-ink);
    box-shadow: var(--matrix-shadow-sm);
    transition: transform .28s var(--matrix-ease), box-shadow .28s var(--matrix-ease), border-color .28s var(--matrix-ease);
}

.corporate-card:hover {
    transform: translateY(-6px);
    border-color: rgba(185, 31, 47, .28);
    box-shadow: var(--matrix-shadow-lg);
}

.corporate-card-media {
    position: relative;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--matrix-soft);
    padding: 30px;
}

.corporate-card-media::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--matrix-red), var(--matrix-gold));
    opacity: 0;
    transform: scaleX(.4);
    transition: opacity .28s ease, transform .28s ease;
}

.corporate-card:hover .corporate-card-media::after {
    opacity: 1;
    transform: scaleX(1);
}

.corporate-card-media img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.corporate-card-body {
    padding: 26px;
    flex: 1;
}

.corporate-card h4 {
    color: var(--matrix-ink);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.45;
}

.corporate-card p {
    color: var(--matrix-muted);
    line-height: 1.9;
    margin-bottom: 18px;
}

.corporate-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--matrix-red);
    font-weight: 800;
    transition: gap .2s ease;
}

.corporate-card:hover .corporate-link {
    gap: 10px;
}

.corporate-section-head {
    max-width: 780px;
    margin: 0 auto 46px;
    text-align: center;
}

.corporate-section-head h2 {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    margin: 8px 0 12px;
}

.corporate-section-head p {
    color: var(--matrix-muted);
    font-size: 18px;
    line-height: 1.9;
}

.corporate-detail {
    background: #fff;
    border: 1px solid var(--matrix-line);
    border-radius: var(--matrix-radius-md);
    box-shadow: var(--matrix-shadow-sm);
    padding: 36px;
}

.corporate-detail-image {
    width: 100%;
    max-height: 390px;
    object-fit: contain;
    background: var(--matrix-soft);
    border-radius: var(--matrix-radius-sm);
    padding: 34px;
    margin-bottom: 28px;
}

.corporate-sidebar {
    background: linear-gradient(160deg, var(--matrix-blue) 0%, var(--matrix-blue-2) 100%);
    color: #fff;
    border-radius: var(--matrix-radius-md);
    padding: 28px;
    box-shadow: var(--matrix-shadow-md);
}

.corporate-sidebar h4 {
    color: #fff;
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 8px;
}

.corporate-sidebar h4::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--matrix-gold);
    border-radius: 3px;
}

.corporate-sidebar a {
    display: block;
    padding: 13px 0;
    color: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    transition: color .2s ease, padding-right .2s ease;
}

.corporate-sidebar a:hover {
    color: #fff;
    padding-right: 8px;
}

/* ---------- Logo grids (partners / clients / certificates) ---------- */

.matrix-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 18px;
}

.matrix-logo-tile {
    min-height: 126px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--matrix-line);
    border-radius: var(--matrix-radius-sm);
    box-shadow: var(--matrix-shadow-sm);
    transition: transform .25s var(--matrix-ease), box-shadow .25s var(--matrix-ease), border-color .25s var(--matrix-ease);
}

.matrix-logo-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(185, 31, 47, .26);
    box-shadow: var(--matrix-shadow-md);
}

.matrix-logo-tile img {
    max-width: 100%;
    max-height: 82px;
    object-fit: contain;
}

/* ---------- Footer ---------- */

footer.text-light {
    background: linear-gradient(150deg, #0c1120 0%, var(--matrix-blue) 55%, var(--matrix-blue-2) 100%) !important;
    border-top: 3px solid var(--matrix-red) !important;
}

footer.text-light .widget h5 {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-weight: 800;
}

footer.text-light .widget h5::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 34px;
    height: 3px;
    background: var(--matrix-gold);
    border-radius: 3px;
}

footer .social-icons a {
    transition: transform .22s ease, background .22s ease;
}

footer .social-icons a:hover {
    background: var(--matrix-red) !important;
    transform: translateY(-3px);
}

.subfooter {
    background: rgba(0, 0, 0, .18);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ---------- Hero (legacy slider variant, kept for other homepages) ---------- */

.matrix-hero-upgrade {
    min-height: 720px;
    background: #eef1f6;
}

.matrix-hero-upgrade .swiper-inner {
    position: relative;
}

.matrix-hero-upgrade .sw-caption {
    text-align: right;
}

.matrix-hero-upgrade .sw-text-wrapper {
    max-width: 760px;
    background: rgba(18, 23, 34, .58);
    border-right: 5px solid var(--matrix-red);
    padding: 34px;
    backdrop-filter: blur(8px);
}

.matrix-hero-upgrade h1 {
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.18;
}

/* ---------- Trust / stats strip ---------- */

.matrix-trust-strip {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.matrix-trust-card {
    background: #fff;
    border: 1px solid var(--matrix-line);
    box-shadow: var(--matrix-shadow-md);
    border-radius: var(--matrix-radius-sm);
    padding: 24px;
}

.matrix-trust-card strong {
    display: block;
    background: linear-gradient(135deg, var(--matrix-red), var(--matrix-red-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 30px;
    font-weight: 900;
    margin-bottom: 5px;
}

.matrix-trust-card span {
    color: var(--matrix-muted);
    font-weight: 700;
}

/* ---------- Misc polish ---------- */

.bg-dark-2 {
    background: linear-gradient(150deg, #0c1120 0%, var(--matrix-blue) 100%) !important;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--matrix-soft);
}

::-webkit-scrollbar-thumb {
    background: var(--matrix-blue-2);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-red);
}

@media (max-width: 768px) {
    section {
        padding: 56px 0;
    }

    #subheader {
        min-height: 300px;
    }

    .corporate-detail {
        padding: 22px;
    }

    body.light-scheme::before {
        height: 2px;
    }
}
