/*----------------------------------------------
 * Avanty Global Trade — overrides for the Avanty/Leverage theme
 * Loaded after default.css and theme-orange.css
 * 1. Tokens (dark default + light theme)
 * 2. Base & fixes
 * 3. Header, brand, language, theme toggle
 * 4. Hero
 * 5. Sections & components
 * 6. Guides, FAQ, article pages
 * 7. Form, footer
 * 8. Light theme specifics
 * 9. Responsive
 *--------------------------------------------*/

/* ---------- 1. Tokens ---------- */
:root {
    --h1-font: 'Sora', 'Poppins', sans-serif;
    --h1-size: 4.2rem;
    --h1-weight: 800;
    --h2-font: 'Sora', 'Poppins', sans-serif;
    --h2-size: 2.6rem;
    --h2-weight: 700;

    --primary-color: #f26b1d;
    --secondary-color: #ffb020;

    --bg-0: #071122;
    --bg-1: #0b1a33;
    --bg-2: #0e2141;
    --bg-3: #12284d;
    --line: rgba(143, 163, 194, .18);
    --txt: #b5c3d9;
    --txt-strong: #f2f5fa;
    --txt-soft: #8fa3c2;
    --accent-txt: #ffb020;
    --art-bg: radial-gradient(120% 120% at 30% 20%, #12284d, #071122);

    --header-bg-color: #0b1a33;
    --nav-item-color: #e7edf6;
    --top-nav-item-color: #e7edf6;
    --hero-bg-color: #0b1a33;

    --section-1-bg-color: #0b1a33;
    --section-2-bg-color: #0e2141;
    --section-3-bg-color: #071122;
    --section-4-bg-color: #0b1a33;
    --section-5-bg-color: #0e2141;
    --section-6-bg-color: #071122;
    --section-7-bg-color: #0b1a33;
    --footer-bg-color: #071122;

    --secondary-bg-color: #071122;
    --secondary-bg-color-2: #0b1a33;
    --secondary-bg-color-3: #0e2141;
    --dark-grey-color: #0e2141;
}

html.theme-light {
    --bg-0: #eef3f9;
    --bg-1: #ffffff;
    --bg-2: #f5f8fc;
    --bg-3: #e8eff8;
    --line: rgba(11, 26, 51, .12);
    --txt: #44546d;
    --txt-strong: #0b1a33;
    --txt-soft: #64748d;
    --accent-txt: #c4560f;
    --art-bg: radial-gradient(120% 120% at 30% 20%, #ffffff, #e3ebf6);

    --header-bg-color: #ffffff;
    --nav-item-color: #0b1a33;
    --top-nav-item-color: #0b1a33;
    --hero-bg-color: #f5f8fc;

    --section-1-bg-color: #ffffff;
    --section-2-bg-color: #f5f8fc;
    --section-3-bg-color: #eef3f9;
    --section-4-bg-color: #ffffff;
    --section-5-bg-color: #f5f8fc;
    --section-6-bg-color: #eef3f9;
    --section-7-bg-color: #ffffff;
    --footer-bg-color: #0b1a33;

    --primary-t-color: #0b1a33;
    --primary-p-color: #44546d;
    --primary-bg-color: #f5f8fc;
    --card-bg-color: #ffffff;
}

/* no flash of the wrong theme: shown once the inline script has switched sections */
html.theme-light:not(.theme-ready) body { visibility: hidden; }

/* ---------- 2. Base & fixes ---------- */
body.trade-site { background-color: var(--bg-1); }
.trade-site h1, .trade-site h2, .trade-site h3, .trade-site h4, .trade-site h5 { font-family: 'Sora', 'Poppins', sans-serif; letter-spacing: -.01em; }
.trade-site p { color: var(--txt); }

/* theme gradient bar above h2.featured: anchor it to the heading itself */
.trade-site h2.featured { position: relative; }

/* headings promoted from h4 to h3 for a correct outline keep the h4 look */
.trade-site h3.h4 { font-size: 1.3rem; margin: 1.5rem 0; line-height: 1.2; }
.trade-site .card:not(.no-hover):hover h3.h4 { color: #fff; }
.trade-site .items .item h3.h4 { margin: 1rem 0 .5rem; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; padding: .6rem 1rem; background: var(--primary-color); color: #fff; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- 3. Header ---------- */
.brand-trade { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-trade img { display: block; border-radius: 8px; }
.brand-trade span { display: flex; flex-direction: column; line-height: 1.05; }
.brand-trade b { font-family: 'Sora', sans-serif; font-weight: 800; letter-spacing: .14em; font-size: 1.15rem; color: var(--nav-item-color); }
.brand-trade i { font-style: normal; font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-txt); }
.navbar .brand-trade .version-number { position: static; margin: 0; }
footer .brand-trade b { font-size: 1.4rem; color: #f2f5fa; }
footer .brand .logo.brand-trade img, footer .brand-trade img { height: 40px; width: 40px; }

.lang-switch { display: flex; align-items: center; }
.lang-switch .nav-link { padding: .25rem .35rem !important; font-weight: 600; font-size: .85rem; opacity: .6; }
.lang-switch .nav-link.active { opacity: 1; color: var(--primary-color) !important; }
.lang-switch .lang-sep { color: var(--txt-soft); font-size: .8rem; }
.lang-switch .lang-gap { display: inline-block; width: .5rem; }
.lang-switch .theme-toggle { opacity: 1; }
.theme-toggle i { font-size: 1.05rem; }
.navbar .icons { flex-direction: row; align-items: center; }
.navbar .icons .nav-item { display: flex; align-items: center; }
@media (min-width: 992px) and (max-width: 1299px) {
    .navbar .items .nav-link { padding-left: .55rem !important; padding-right: .55rem !important; font-size: .9rem; }
}

#menu .menu-extras { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin-top: 1.5rem; }
#menu .lang-switch.mobile { display: flex; gap: .4rem; }
#menu .menu-extras .nav-link { display: inline-block !important; width: auto !important; min-width: 0 !important; border: 0 !important; background: none !important; padding: .4rem .6rem !important; margin: 0 !important; font-size: 1.1rem; }

.lang-hint {
    position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1040;
    display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem .6rem 1.1rem;
    background: var(--bg-3); border: 1px solid var(--line); border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: .88rem; color: var(--txt-strong);
}
.lang-hint a { color: var(--primary-color); font-weight: 600; }
.lang-hint button { border: 0; background: none; color: var(--txt-soft); font-size: 1.3rem; line-height: 1; padding: 0 .3rem; cursor: pointer; }

/* ---------- 4. Hero ---------- */
.hero .slide-content .title { max-width: 700px; }
.full-slider.featured .inner .left:before,
.full-slider.featured .inner .left:after { display: none !important; }
.hero-kicker {
    display: inline-block; width: fit-content; align-self: flex-start; margin-bottom: 1rem; padding: .35rem .8rem;
    border: 1px solid rgba(242, 107, 29, .45); border-radius: 100px;
    font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
    color: var(--accent-txt);
}
.hero .description { max-width: 540px; font-size: 1.1rem; }
.hero .hero-image { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .3)); }

/* ---------- 5. Sections & components ---------- */
.eyebrow {
    display: block; margin-bottom: .9rem;
    font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
    color: var(--primary-color);
}
/* room for the theme's gradient bar (22px above h2.featured) */
.eyebrow + h2.featured { margin-top: 2.2rem; }

.art-frame { position: relative; border-radius: 18px; overflow: hidden; background: var(--art-bg); border: 1px solid var(--line); aspect-ratio: 1 / 1; }
.art-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.map-legend {
    position: absolute; left: 1rem; bottom: 1rem; margin: 0; padding: .8rem 1rem;
    list-style: none; background: rgba(7, 17, 34, .85); border: 1px solid var(--line); border-radius: 12px;
    font-size: .8rem; color: #dce4f0;
}
.map-legend li { display: flex; align-items: center; gap: .55rem; padding: .15rem 0; }
.map-legend i { width: 18px; height: 4px; border-radius: 2px; display: inline-block; flex: 0 0 18px; }

.offers .card { background: var(--bg-2); border: 1px solid var(--line); }
.offers .card p { color: var(--txt); }

/* distribution */
.channel-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.channel-list li {
    padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1);
    font-family: 'Sora', sans-serif; font-weight: 700; color: var(--txt-strong); font-size: .95rem; text-align: left;
}
.channel-list small { display: block; font-family: 'Poppins', sans-serif; font-weight: 400; color: var(--txt-soft); font-size: .78rem; margin-top: .15rem; }
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 3rem; }
.pillar { padding: 1.8rem; border-radius: 16px; background: var(--bg-1); border: 1px solid var(--line); }
.pillar i { font-size: 1.8rem; color: var(--primary-color); }
.pillar h3 { font-size: 1.15rem; color: var(--txt-strong); margin: 1rem 0 .5rem; }
.pillar p { font-size: .92rem; margin: 0; }

/* sectors */
.sector-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sector { background: var(--bg-2); padding: 2rem 1.6rem; transition: background .25s ease; }
.sector:hover { background: var(--bg-3); }
.sector i { font-size: 1.9rem; color: var(--primary-color); display: block; margin-bottom: 1rem; }
.sector h3 { font-size: 1.05rem; color: var(--txt-strong); margin: 0 0 .45rem; }
.sector p { font-size: .9rem; margin: 0; }

/* process */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; position: relative; }
.steps:before { content: ''; position: absolute; top: 26px; left: 5%; right: 5%; height: 2px; background: repeating-linear-gradient(90deg, var(--primary-color) 0 6px, transparent 6px 14px); opacity: .6; }
.steps li { position: relative; text-align: center; }
.steps .num {
    position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center;
    width: 54px; height: 54px; margin-bottom: 1rem; border-radius: 50%;
    background: var(--bg-0); border: 2px solid var(--primary-color);
    font-family: 'Sora', sans-serif; font-weight: 700; color: var(--txt-strong);
}
.steps h3 { font-size: 1.05rem; color: var(--txt-strong); margin: 0 0 .5rem; }
.steps p { font-size: .9rem; }

/* world map */
.world-map { position: relative; width: 100%; aspect-ratio: 1080 / 520; margin: 1rem 0 2.5rem; }
.world-map > img, .world-map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-map .lane { fill: none; stroke: var(--primary-color); stroke-width: 1.6; stroke-linecap: round; opacity: .85; stroke-dasharray: 900; stroke-dashoffset: 900; }
.world-map .lane.alt { stroke: var(--secondary-color); }
.world-map svg.play .lane { animation: lane-draw 2.4s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes lane-draw { to { stroke-dashoffset: 0; } }
.world-map .hub { fill: #f7f9fc; stroke: var(--primary-color); stroke-width: 1.5; }
.world-map .hub-label { fill: var(--txt-strong); font: 600 10.5px 'Poppins', sans-serif; paint-order: stroke; stroke: var(--bg-1); stroke-width: 3px; }
.world-map .hq { fill: var(--primary-color); stroke: #fff; stroke-width: 2; }
.world-map .hq-label { font-size: 13px; font-weight: 700; }
.world-map .hq-pulse { fill: var(--primary-color); opacity: .25; transform-origin: 683.1px 145.8px; animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .5; } 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .world-map .lane { stroke-dashoffset: 0; animation: none !important; }
    .world-map .hq-pulse { animation: none; }
}
.region-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.region-grid > div { padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.region-grid h3 { font-size: .95rem; color: var(--accent-txt); margin: 0 0 .4rem; }
.region-grid p { font-size: .85rem; margin: 0; }

/* incoterms */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table.inco { width: 100%; border-collapse: collapse; min-width: 720px; }
table.inco th { background: var(--bg-0); color: var(--accent-txt); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; text-align: left; padding: 1rem 1.2rem; }
table.inco td { padding: .85rem 1.2rem; border-top: 1px solid var(--line); color: var(--txt); font-size: .92rem; vertical-align: top; }
table.inco td b { font-family: 'Sora', sans-serif; color: var(--txt-strong); font-size: 1rem; margin-right: .4rem; }
table.inco td span { color: var(--txt-soft); font-size: .82rem; }
table.inco tr.sea td:first-child b { color: var(--accent-txt); }
table.inco tbody tr:hover td { background: rgba(127, 127, 127, .05); }
.fineprint { margin-top: 1rem; font-size: .78rem; color: var(--txt-soft); text-align: center; }

.docs-band .doc-list { letter-spacing: .08em; color: var(--accent-txt); font-weight: 600; font-size: .85rem; }
.docs-band .col-12 { color: var(--txt); max-width: 820px; margin: 0 auto; }

/* ---------- 6. Guides, FAQ, article ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.guide-card {
    display: flex; flex-direction: column; padding: 1.8rem; border-radius: 16px; text-decoration: none !important;
    background: var(--bg-2); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease;
}
.guide-card:hover { transform: translateY(-3px); border-color: var(--primary-color); }
.guide-card h3 { font-size: 1.2rem; color: var(--txt-strong); margin: .6rem 0; line-height: 1.3; }
.guide-card p { font-size: .92rem; margin: 0 0 1rem; }
.guide-meta { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-color); font-weight: 700; }
.guide-more { margin-top: auto; color: var(--accent-txt); font-weight: 600; font-size: .9rem; }

.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-1); margin-bottom: .8rem; }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.1rem 3rem 1.1rem 1.3rem; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:after { content: '+'; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--primary-color); }
.faq-item[open] summary:after { content: '–'; }
.faq-item summary h3 { margin: 0; font-size: 1.02rem; color: var(--txt-strong); line-height: 1.4; }
.faq-item p { padding: 0 1.3rem 1.2rem; margin: 0; }

.article-hero { padding-top: 9rem; padding-bottom: 3rem; }
.article-hero h1 { font-size: 2.8rem; line-height: 1.15; max-width: 900px; color: var(--txt-strong); }
.breadcrumbs { font-size: .85rem; margin-bottom: 1.2rem; color: var(--txt-soft); }
.breadcrumbs a { color: var(--accent-txt); }
.article-meta { color: var(--txt-soft); font-size: .9rem; }
.article-grid { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; align-items: start; }
.article-toc { position: sticky; top: 110px; padding: 1.2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); }
.article-toc .eyebrow { margin-bottom: .6rem; }
.article-toc ol { list-style: none; padding-left: 0; margin: 0; font-size: .88rem; }
.article-toc li { margin: .4rem 0; }
.article-toc a { color: var(--txt); }
.article-toc a:hover { color: var(--primary-color); }
.article-body { max-width: 760px; }
.article-body .lead { font-size: 1.15rem; line-height: 1.7; color: var(--txt-strong); }
.article-body h2 { font-size: 1.6rem; margin: 2.6rem 0 1rem; color: var(--txt-strong); scroll-margin-top: 110px; }
.article-body p, .article-body li { font-size: 1rem; line-height: 1.75; color: var(--txt); }
.article-body ul, .article-body ol { padding-left: 1.3rem; margin-bottom: 1.2rem; }
.article-body li { margin: .45rem 0; }
.article-body b { color: var(--txt-strong); }
.article-body a { color: var(--accent-txt); }
.article-cta { margin: 3rem 0 2rem; padding: 2rem; border-radius: 16px; background: var(--bg-1); border: 1px solid var(--primary-color); }
.article-cta h2 { margin-top: 0; }
.sources { font-size: .9rem; }
.sources-title { font-size: 1.2rem !important; }
.guide-grid.single { grid-template-columns: 1fr; max-width: 760px; margin-left: auto; }

/* ---------- 7. Form & footer ---------- */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.multi-step-form .success.message .failed { display: none; }
.multi-step-form .success.message .failed .icon { color: var(--invalid-color); }
.multi-step-form .done-text, .multi-step-form .fail-text { margin: .5rem 0 1.5rem; }
.multi-step-form .consent { font-size: .78rem; color: var(--txt-soft); margin: .25rem 0 1rem; text-align: left; }
.multi-step-form .consent a { color: var(--accent-txt); }
.multi-step-form .two-col { margin: 0; }
.multi-step-form .two-col .input-group > i { right: 18px; }
.multi-step-form select.form-control option { color: #111; }
.form .message { background-color: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.form .message p { color: var(--txt); }
.content-images .gallery .step-image { pointer-events: none; display: block; aspect-ratio: 1 / 1; }
.content-images .art-bg { background: var(--art-bg); border-radius: 18px; object-fit: contain; height: 100%; }

footer .navbar-nav, footer .navbar-nav * { word-break: normal !important; overflow-wrap: break-word; white-space: normal; }
footer .nav-link b { font-weight: 600; }
.trade-site footer h2.title { font-size: 1.3rem; margin-top: 0; }
footer .copyright a { color: var(--txt-soft); }
footer .copyright a:hover { color: var(--primary-color); }
footer .legal { margin: 0; }

/* ---------- 8. Light theme specifics ---------- */
html.theme-light .navbar { box-shadow: 0 1px 0 var(--line); }
html.theme-light .hero .hero-image { filter: drop-shadow(0 25px 45px rgba(11, 26, 51, .18)); }
html.theme-light .hero .description { color: var(--txt); }
html.theme-light .dark-button, html.theme-light .dark-button:visited { color: var(--txt-strong); border-color: var(--txt-strong); }
html.theme-light .dark-button:hover { color: #fff; }
html.theme-light .map-legend { background: rgba(255, 255, 255, .92); color: var(--txt-strong); }
html.theme-light .world-map > img { filter: saturate(.6) brightness(.95); }
html.theme-light .form .form-control { background-color: #fff; border-color: rgba(11, 26, 51, .18); color: var(--txt-strong); }
/* footer stays dark in both themes for contrast */
html.theme-light footer { --txt: #b5c3d9; --txt-strong: #f2f5fa; --txt-soft: #8fa3c2; --line: rgba(143, 163, 194, .18); background-color: #0b1a33; }
html.theme-light footer, html.theme-light footer p, html.theme-light footer .nav-link { color: #b5c3d9; }
html.theme-light footer h2.title, html.theme-light footer .nav-link b { color: #f2f5fa; }
html.theme-light footer .badge.tag { color: #b5c3d9; border-color: rgba(143, 163, 194, .3); }
html.theme-light #copyright { background-color: #071122; }

/* ---------- 9. Responsive ---------- */
@media (max-width: 1199px) {
    .region-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
    :root { --h1-size: 3.3rem; --h2-size: 2.2rem; }
    .sector-grid { grid-template-columns: repeat(2, 1fr); }
    .pillar-grid { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; gap: .5rem; }
    .steps:before { top: 0; bottom: 0; left: 26px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, var(--primary-color) 0 6px, transparent 6px 14px); }
    .steps li { display: grid; grid-template-columns: 54px 1fr; column-gap: 1.2rem; text-align: left; align-items: start; }
    .steps .num { grid-row: span 2; }
    .steps h3 { margin: .9rem 0 .2rem; }
    .article-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .article-toc { position: static; }
    .distribution .art-frame { margin-top: 2rem; }
}
@media (max-width: 767px) {
    :root { --h1-size: 2.4rem; --h2-size: 1.9rem; }
    .hero .description { font-size: 1rem; }
    .hero .hero-image, .hero .hero-image.aos-animate { opacity: .2 !important; }
    .hero-kicker { align-self: center; margin-left: auto; margin-right: auto; }
    .navbar .icons .lang-switch, .navbar .icons .theme-toggle { display: none; }
    .region-grid, .guide-grid, .channel-list { grid-template-columns: 1fr; }
    .art-frame { margin-top: 2rem; }
    .map-legend { position: static; border-radius: 0 0 12px 12px; }
    .art-frame:has(.map-legend) { aspect-ratio: auto; }
    .world-map .hub-label { font-size: 15px; }
    .world-map .hub-label:not(.hq-label) { display: none; }
    .article-hero { padding-top: 7rem; }
    .article-hero h1 { font-size: 1.9rem; }
    .lang-hint { left: 1rem; right: 1rem; transform: none; border-radius: 14px; font-size: .82rem; flex-wrap: wrap; }
}
@media (max-width: 479px) {
    .sector-grid { grid-template-columns: 1fr; }
}
.multi-step-form .fail-code { display: block; margin-top: .4rem; font-size: .75rem; opacity: .7; font-family: monospace; }
