/* ===================================================================
   /styles/site.css  —  Shared styles (header, footer, layout, cards,
   buttons, sliders, tables, placeholders, utilities)
   =================================================================== */

:root {
    --bg: #0b0f17;
    --bg2: #0f1729;
    --card: #121826;
    --text: #e7eef8;
    --muted: #97a3b6;
    --border: #243044;
    --accent: #35c6ff;
    --accent2: #a7ff83;
    --gold: #f39c12;
    --goldHover: #e67e22;
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

img {
    max-width: 100%;
    height: auto;
    display: block
}

/* ---------- Layout ---------- */
.wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 18px
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 18px
}

/* ---------- Header / Navbar ---------- */
header.site {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(9, 14, 24, .85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.brand {
    display: inline-block;
    font-weight: 800;
    letter-spacing: .2px;
    color: #d9e6f9;
    font-size: larger;
}

.brand:hover {
    color: var(--accent)
}

/* ---------- Footer ---------- */
footer.global {
    text-align: center;
    padding: 20px;
    background: #111;
    color: #fff;
}

/* ---------- Buttons ---------- */
.button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 5px;
    font-weight: 700;
    transition: background .15s ease-in-out;
    background-color: #0051c3;
    /* Dodger blue */
    color: #fff;
}

.button:hover {
    background-color: #187bcd;
}

.button.small {
    padding: 8px 16px;
}

/* ---------- CTAs ---------- */
/* CTA card container */
.card.cta-card {
    background: linear-gradient(180deg, rgba(167, 255, 131, .08), rgba(53, 198, 255, .08));
    border-color: #2b3e58;
}

/* Button row */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
}

/* Secondary CTA (neutral) */
.cta.alt {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    background: transparent;
    color: #cfe0ff;
    border: 1px solid var(--border);
}

.cta.alt:hover {
    background: rgba(255, 255, 255, .04);
}

.cta.button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 5px;
    font-weight: 700;
    transition: background .15s ease-in-out;
}

.cta.button {
    background: var(--gold);
    color: #000;
}

.cta.button:hover {
    background: var(--goldHover)
}

.cta.button.small {
    padding: 8px 16px;
}

/* ---------- Hero (can be used on home or articles) ---------- */
.hero {
    text-align: center;
    padding: 36px 18px
}

.hero h1 {
    line-height: 1.08;
    margin: 0 0 10px;
    letter-spacing: -.01em;
}

.hero .lead {
    color: #cfe0ff;
    max-width: 860px;
    margin: 18px auto;
}

.pills {
    margin-bottom: 18px
}

.pill {
    display: inline-block;
    font-size: 12px;
    padding: 6px 10px;
    margin: 0 6px 10px;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0));
}

/*---------- Split Container -----------*/
.split {
    display: flex;
    gap: 18px;
}

.split>* {
    width: 50%;
}

.split+* {
    margin-top: 18px;
}

@media(max-width:1080px) {
    .split {
        flex-direction: column;
    }

    .split>* {
        width: auto;
    }
}

/* ---------- Cards & grid ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
    margin-top: 18px
}

.card {
    grid-column: span 12;
    background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, 0));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .25);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    margin-bottom: 18px;
    gap: 18px;
}

.card:hover {
    transform: translateY(-2px);
    border-color: #2a3a55;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .35)
}

@media(min-width:720px) {
    .card.half {
        grid-column: span 6
    }

    .card.third {
        grid-column: span 4
    }
}

h2,
h3 {
    margin: 8px 0 6px;
    line-height: 1.15;
    letter-spacing: -.01em
}

h3 {
    color: var(--accent)
}

p {
    margin: 8px 0;
    color: #d7e3f5
}

.small {
    font-size: 14px;
    color: #aab7cd
}

.cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px
}

@media(min-width:820px) {
    .cols {
        grid-template-columns: 1.15fr .85fr
    }
}

/* ---------- Video ---------- */
.video-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/9;
    margin: 0 auto;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px
}

.video-summary {
    margin-top: 8px;
    color: #cfe0ff;
    text-align: center
}

/* ---------- Slider (structure only; behavior via your slider.js) ---------- */
/*
.slider{
  display:flex; justify-content:center; width:100%;
  margin:20px auto; overflow:hidden; border-radius:8px;
  box-sizing:border-box; position:relative;
}
.slides{
  display:flex; width:100%;
  transition:transform 0.5s ease-in-out;
  margin-left:10%; margin-right:10%;
  box-sizing:border-box; touch-action:pan-y;
}
.slider-item{
  max-width:100%; flex-shrink:0; display:flex; align-items:center;
  background:#0e1422; text-align:center; border:2px solid transparent;
  border-radius:6px; overflow:hidden;
}
.slider-item img{width:100%; object-fit:scale-down; border-radius:6px}
.slider-buttons{text-align:center;margin-top:10px}
.slider-buttons button{
  border:none; background:#39445a; padding:8px; margin:0 5px; border-radius:50%; cursor:pointer
}
.slider-buttons button.active{ background:var(--gold) }
.slider-arrow{
  position:absolute; top:50%; transform:translateY(-50%); z-index:10;
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.5); color:#fff; font-weight:800; cursor:pointer; user-select:none;
}
.slider-arrow.left{ left:14px } .slider-arrow.right{ right:14px }
.slider-arrow.disabled{ display:none }
*/
/* === your original styles (unchanged) === */
.slider {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 8px;
    box-sizing: border-box;
    position: relative;
}

.slides {
    display: flex;
    width: 100%;
    /* transition moved to .js-enhanced block below */
    margin-left: 10%;
    margin-right: 10%;
    box-sizing: border-box;
    touch-action: pan-y;
}

.slider-item {
    max-width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    background: #0e1422;
    text-align: center;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
}

.slider-item img {
    width: 100%;
    object-fit: scale-down;
    border-radius: 6px
}

.slider-buttons {
    text-align: center;
    margin-top: 10px
}

.slider-buttons button {
    border: none;
    background: #39445a;
    padding: 8px;
    margin: 0 5px;
    border-radius: 50%;
    cursor: pointer
}

.slider-buttons button.active {
    background: var(--gold)
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
}

.slider-arrow.left {
    left: 14px
}

.slider-arrow.right {
    right: 14px
}

.slider-arrow.disabled {
    display: none
}

/* === no-JS fallback: scrollbar + scroll-snap ON .slides === */
/* When JS is NOT enhancing (no .js-enhanced class), we enable horizontal scroll & snap */
.slider:not(.js-enhanced) .slides {
    overflow-x: auto;
    /* fallback scrolling here (on .slides) */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 16px;
    /* optional spacing between slides */
    padding-inline: 0;
    /* keep your margins controlling framing */
}

/* snap each slide cleanly */
.slider:not(.js-enhanced) .slider-item {
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* hide arrows & dots in fallback (you only need the scrollbar) */
.slider:not(.js-enhanced) .slider-arrow,
.slider:not(.js-enhanced) .slider-buttons {
    display: none !important;
}

/* === JS-enhanced mode: restore your transform-driven carousel === */
.slider.js-enhanced {
    overflow: hidden;
}

.slider.js-enhanced .slides {
    overflow: visible;
    /* JS controls movement, not scrollbars */
    scroll-snap-type: none;
    /* avoid tug-of-war with JS */
    transition: transform 0.5s ease-in-out;
    /* your original transition */
}

/* Optional: subtle scrollbar styling (WebKit only) */
*::-webkit-scrollbar {
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

*:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
}


/* ---------- Tables (shared) ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top
}

.table th {
    background: #0f1729;
    color: #dbe9ff;
    text-align: left;
    font-weight: 800
}

.table tr:last-child td {
    border-bottom: none
}

table td,
table th {
    padding: 0.25rem 1rem;
}

.table-scroll {
    overflow-x: auto;
}

@media(max-width:480px) {

    table th,
    table td {
        padding: 4px 6px;
    }
}

/* ---------- Image placeholders (optional utility) ---------- */
figure {
    margin: 0
}

.ph {
    --w: 960;
    --h: 540;
    position: relative;
    width: 100%;
    aspect-ratio: var(--w) / var(--h);
    background: repeating-linear-gradient(45deg, #0f1b33 0 12px, #0d1426 12px 24px);
    border: 1px dashed #2a3a55;
    display: grid;
    place-items: center;
    color: #b9c7d9;
    border-radius: 12px;
    overflow: hidden;
}

.ph::before {
    content: attr(data-label);
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    padding: 8px 10px;
    background: #0f2344;
    border: 1px solid #2a3a55;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

/* ---------- Utilities ---------- */
.k {
    color: var(--accent2);
    font-weight: 700
}

.tip {
    color: #c0d3ff
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- articles list ---------- */
#learn {
    margin: 5rem 0;
}

/* === SHARE BUTTONS (Dark Theme Default) === */
.share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.share a,
.share button {
  border: 1px solid #2e2e2e;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #1a1a1a;
  color: #e6e6e6;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.share a:hover,
.share button:hover {
  background: #2a2a2a;
  border-color: #3a3a3a;
}

.share a:active,
.share button:active {
  background: #333;
}

.share-native {
  font-weight: 600;
  background: #242424;
}

.share a:focus-visible,
.share button:focus-visible {
  outline: 2px solid #3b82f6; /* bright blue focus ring */
  outline-offset: 2px;
}

/* === OPTIONAL LIGHT VERSION (commented out for now) ===
.share a,
.share button {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #fff;
  color: #111;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.share a:hover,
.share button:hover {
  background: #f7f7f7;
}
.share a:active,
.share button:active {
  background: #efefef;
}
.share-native {
  font-weight: 600;
  background: #fafafa;
}
.share a:focus-visible,
.share button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
=== END LIGHT VERSION === */

/* layout for icon + label */
.share .icon {
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.share .icon svg {
  width: 1em;
  height: 1em;
  display: block;
}

/* spacing between icon and text */
.share .label {
  margin-left: .5rem;
}

/* easy modes to switch */
.share.icon-only .label { display: none; }
.share.label-only .icon { display: none; }

.share .share-btn[data-network="facebook"]  { color: #8ab4ff; }
.share .share-btn[data-network="x"]         { color: #e6e6e6; }
.share .share-btn[data-network="linkedin"]  { color: #7cc0ff; }
.share .share-btn[data-network="whatsapp"]  { color: #8be09f; }
.share .share-btn[data-network="telegram"]  { color: #9ad1ff; }
.share .share-btn[data-network="email"]     { color: #e6e6e6; }
