/* ═══════════════════════════════════════
   AXAMI CMS — THEME SYSTEM
   Byt tema genom att ändra data-theme på <html>
   ═══════════════════════════════════════ */

/* DARK THEME (default) */
[data-theme="dark"] {
  --bg-primary:    #0d1b2a;
  --bg-secondary:  #152236;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --nav-bg:        rgba(13,27,42,0.96);
  --nav-border:    rgba(255,255,255,0.06);
  --text-primary:  #ffffff;
  --text-secondary:rgba(255,255,255,0.65);
  --text-muted:    rgba(255,255,255,0.4);
  --text-body:     #e8edf5;
  --accent:        #f97316;
  --accent-hover:  #fb923c;
  --blue:          #1a6eb5;
  --blue-light:    #2e87d4;
  --border:        rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --shadow:        0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg:     0 12px 48px rgba(0,0,0,0.5);
  --hero-overlay:  linear-gradient(135deg,rgba(13,27,42,0.97) 0%,rgba(13,27,42,0.7) 50%,rgba(26,110,181,0.3) 100%);
  --hero-img-opacity: 0.18;
  --section-alt:   #111f30;
  --footer-bg:     #0a1520;
  --logo-filter:   brightness(0) invert(1);
  --logo-bar-bg:   #111f30;
  --logo-filter-bar: grayscale(1) brightness(2) opacity(0.4);
  --stat-border:   rgba(255,255,255,0.08);
  --card-border:   rgba(255,255,255,0.08);
  --step-bg:       #152236;
  --step-border:   #1a6eb5;
  --cta-bg:        linear-gradient(135deg,#1a6eb5 0%,#0d1b2a 100%);
}

/* LIGHT THEME */
[data-theme="light"] {
  --bg-primary:    #ffffff;
  --bg-secondary:  #f4f7fb;
  --bg-card:       #ffffff;
  --bg-card-hover: #f0f5fc;
  --nav-bg:        rgba(255,255,255,0.97);
  --nav-border:    rgba(0,0,0,0.08);
  --text-primary:  #0d1b2a;
  --text-secondary:#3a5070;
  --text-muted:    #8a9bb0;
  --text-body:     #1a2535;
  --accent:        #ea6c10;
  --accent-hover:  #f97316;
  --blue:          #1a6eb5;
  --blue-light:    #2580cc;
  --border:        rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.16);
  --shadow:        0 2px 16px rgba(13,27,42,0.08);
  --shadow-lg:     0 8px 40px rgba(13,27,42,0.12);
  --hero-overlay:  linear-gradient(135deg,rgba(13,27,42,0.88) 0%,rgba(13,27,42,0.6) 50%,rgba(26,110,181,0.25) 100%);
  --hero-img-opacity: 0.25;
  --section-alt:   #f0f5fb;
  --footer-bg:     #0d1b2a;
  --logo-filter:   none;
  --logo-bar-bg:   #f4f7fb;
  --logo-filter-bar: grayscale(1) opacity(0.45);
  --stat-border:   rgba(255,255,255,0.1);
  --card-border:   #dde4ef;
  --step-bg:       #ffffff;
  --step-border:   #1a6eb5;
  --cta-bg:        linear-gradient(135deg,#1a6eb5 0%,#0d2a4a 100%);
}

/* ═══ BASE RESET & TYPOGRAPHY ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-primary);
  color: var(--text-body);
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Syne', sans-serif; line-height: 1.15; color: var(--text-primary); }
a { color: var(--blue-light); text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ═══ LAYOUT ═══ */
.container { max-width: 1160px; margin: 0 auto; padding: 0 5%; }
section { padding: 88px 0; }
.section-inner { max-width: 1160px; margin: 0 auto; padding: 0 5%; }

/* ═══ NAV ═══ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 70px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center;
  padding: 0 5%;
  justify-content: space-between;
  transition: background 0.3s, border-color 0.3s;
}
.nav-logo img { height: 34px; filter: var(--logo-filter); transition: filter 0.3s; }
.nav-menu { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-menu a {
  color: var(--text-secondary); font-size: 15px; font-weight: 400;
  transition: color 0.2s; letter-spacing: 0.01em;
}
.nav-menu a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent) !important; color: #fff !important;
  padding: 9px 20px; border-radius: 8px; font-weight: 500 !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; transform: translateY(-1px); }
.nav-hamburger { display: none; cursor: pointer; background: none; border: none; color: var(--text-primary); font-size: 24px; }
.page-body { padding-top: 70px; }

/* ═══ BUTTONS ═══ */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 10px; font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.2s; border: none; font-family: 'DM Sans',sans-serif; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(249,115,22,0.3); color: #fff; }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); }
.btn-outline:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-light); transform: translateY(-2px); color: #fff; }

/* ═══ SECTION LABELS ═══ */
.section-tag {
  display: inline-block;
  background: rgba(26,110,181,0.12); color: var(--blue-light);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 6px;
  margin-bottom: 14px;
}
.section-title { font-size: clamp(26px,3.5vw,42px); font-weight: 700; margin-bottom: 14px; }
.section-lead { font-size: 17px; line-height: 1.75; color: var(--text-secondary); font-weight: 300; }

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-primary); position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%;
  opacity: var(--hero-img-opacity);
  transition: opacity 0.3s;
}
.hero-overlay { position: absolute; inset: 0; background: var(--hero-overlay); }
.hero-content {
  position: relative; z-index: 2; flex: 1;
  display: flex; align-items: center;
  padding: 80px 5% 60px;
  max-width: 1200px; margin: 0 auto; width: 100%; gap: 60px;
}
.hero-text { flex: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(249,115,22,0.15); border: 1px solid rgba(249,115,22,0.3);
  color: #fb923c; font-size: 13px; font-weight: 500; letter-spacing: 0.05em;
  padding: 6px 14px; border-radius: 100px; margin-bottom: 24px;
}
.hero-badge::before { content: "●"; font-size: 8px; }
.hero-title { font-size: clamp(36px,5vw,60px); font-weight: 800; color: #fff; margin-bottom: 20px; line-height: 1.1; }
.hero-title .accent { color: var(--accent); }
.hero-sub { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,0.65); max-width: 500px; margin-bottom: 36px; font-weight: 300; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { flex: 1; max-width: 540px; position: relative; }
.hero-visual img { width: 100%; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,0.5); }
.hero-badge-img {
  position: absolute; bottom: -18px; left: -18px;
  background: var(--blue); color: #fff;
  padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
}
.hero-badge-img .num { font-family: 'Syne',sans-serif; font-size: 26px; font-weight: 700; line-height: 1; }
.hero-badge-img .lbl { font-size: 12px; opacity: 0.8; margin-top: 2px; }
.hero-stats {
  position: relative; z-index: 2;
  display: flex;
  border-top: 1px solid var(--stat-border);
  max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 5%;
}
.hero-stat { flex: 1; padding: 24px 0 24px 28px; border-right: 1px solid var(--stat-border); }
.hero-stat:last-child { border-right: none; }
.hero-stat .num { font-family: 'Syne',sans-serif; font-size: 22px; font-weight: 700; color: #fff; }
.hero-stat .lbl { font-size: 13px; color: rgba(255,255,255,0.5); margin-top: 3px; }

/* ═══ LOGOS BAR ═══ */
.logos-bar { background: var(--logo-bar-bg); padding: 44px 5%; border-bottom: 1px solid var(--border); transition: background 0.3s; }
.logos-label { text-align: center; font-size: 11px; letter-spacing: 0.1em; font-weight: 600; color: var(--text-muted); text-transform: uppercase; margin-bottom: 24px; }
.logos-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 36px 52px; }
.logos-row img { height: 26px; width: auto; filter: var(--logo-filter-bar); transition: filter 0.2s; object-fit: contain; }
.logos-row img:hover { filter: none; }

/* ═══ SPLIT SECTION ═══ */
.split-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; margin-top: 56px; }
.split-wrap.reverse { direction: rtl; }
.split-wrap.reverse > * { direction: ltr; }
.split-img-wrap { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.split-img-wrap img { width: 100%; display: block; }
.split-tag { position: absolute; top: 18px; right: 18px; background: var(--bg-primary); color: var(--text-primary); font-family: 'Syne',sans-serif; font-size: 12px; font-weight: 600; padding: 7px 12px; border-radius: 8px; display: flex; align-items: center; gap: 5px; }
.split-tag::before { content: "✓"; color: #4ade80; }
.features-list { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feat-icon { width: 42px; height: 42px; border-radius: 10px; background: rgba(26,110,181,0.1); color: var(--blue-light); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.feat-body h4 { font-family: 'Syne',sans-serif; font-size: 15px; font-weight: 600; margin-bottom: 3px; color: var(--text-primary); }
.feat-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ═══ FUNCTION CARDS ═══ */
.functions-bg { background: var(--bg-secondary); }
.cards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 52px; }
.func-card {
  background: var(--bg-card); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 26px;
  transition: all 0.25s; text-decoration: none; display: block;
}
.func-card:hover { background: var(--bg-card-hover); border-color: var(--blue); transform: translateY(-3px); box-shadow: var(--shadow); }
.func-card-icon { width: 46px; height: 46px; background: rgba(26,110,181,0.12); border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px; }
.func-card h3 { font-family: 'Syne',sans-serif; font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.func-card p { font-size: 14px; line-height: 1.65; color: var(--text-secondary); }
.func-card .more { display: inline-flex; align-items: center; gap: 5px; color: var(--blue-light); font-size: 13px; font-weight: 500; margin-top: 14px; }

/* ═══ STEPS ═══ */
.steps-bg { background: var(--bg-primary); }
.steps-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 0; margin-top: 56px; position: relative; }
.steps-grid::before { content:''; position: absolute; top: 27px; left: 10%; right: 10%; height: 2px; background: linear-gradient(90deg, var(--blue) 0%, var(--accent) 100%); opacity: 0.2; }
.step { text-align: center; padding: 0 10px; position: relative; z-index: 1; }
.step-circle { width: 54px; height: 54px; background: var(--step-bg); border: 2px solid var(--step-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Syne',sans-serif; font-size: 18px; font-weight: 700; color: var(--blue); margin: 0 auto 18px; box-shadow: 0 4px 14px rgba(26,110,181,0.15); }
.step h4 { font-family: 'Syne',sans-serif; font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ═══ SHOWCASE ═══ */
.showcase-wrap { background: var(--bg-secondary); border-radius: 24px; overflow: hidden; display: grid; grid-template-columns: 1fr 1.2fr; }
.showcase-text { padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.showcase-visual { background: rgba(26,110,181,0.1); display: flex; align-items: flex-end; justify-content: center; padding-top: 40px; overflow: hidden; }
.showcase-visual img { width: 88%; border-radius: 12px 12px 0 0; box-shadow: 0 -12px 50px rgba(0,0,0,0.25); }

/* ═══ CTA ═══ */
.cta-section { background: var(--cta-bg); text-align: center; padding: 88px 5%; }
.cta-section h2 { font-size: clamp(28px,4vw,48px); font-weight: 800; color: #fff; margin-bottom: 14px; }
.cta-section p { font-size: 17px; color: rgba(255,255,255,0.7); margin-bottom: 36px; font-weight: 300; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-contacts { display: flex; justify-content: center; gap: 36px; flex-wrap: wrap; margin-top: 40px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,0.15); }
.cta-contact-item { color: rgba(255,255,255,0.8); font-size: 15px; display: flex; align-items: center; gap: 8px; }

/* ═══ FOOTER ═══ */
.site-footer { background: var(--footer-bg); color: rgba(255,255,255,0.5); padding: 52px 5% 28px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 30px; filter: brightness(0) invert(1) opacity(0.7); margin-bottom: 12px; }
.footer-tagline { font-size: 13px; line-height: 1.7; max-width: 240px; }
.footer-col h5 { font-family: 'Syne',sans-serif; color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 14px; letter-spacing: 0.03em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.5); font-size: 14px; transition: color 0.2s; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom { max-width: 1160px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; font-size: 12px; }
.footer-bottom a { color: rgba(255,255,255,0.35); }

/* ═══ SCROLL REVEAL ═══ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ═══ HERO ANIMATIONS ═══ */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
@keyframes fadeRight { from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:none; } }
.anim-1 { animation: fadeUp 0.6s 0.05s ease both; }
.anim-2 { animation: fadeUp 0.6s 0.15s ease both; }
.anim-3 { animation: fadeUp 0.6s 0.25s ease both; }
.anim-4 { animation: fadeUp 0.6s 0.35s ease both; }
.anim-img { animation: fadeRight 0.8s 0.2s ease both; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 960px) {
  .hero-content { flex-direction: column; padding: 60px 5% 40px; }
  .hero-visual { max-width: 100%; }
  .split-wrap { grid-template-columns: 1fr; gap: 36px; }
  .split-wrap.reverse { direction: ltr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .steps-grid::before { display: none; }
  .showcase-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-menu { display: none; }
  .nav-hamburger { display: block; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .hero-stat { border-right: none; border-bottom: 1px solid var(--stat-border); padding: 18px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-contacts { flex-direction: column; align-items: center; gap: 16px; }
}

/* ═══ THEME TOGGLE BUTTON ═══ */
.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border-strong);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: all 0.2s; color: var(--text-primary);
}
.theme-toggle:hover { background: var(--bg-card-hover); transform: scale(1.1); }

/* ═══ EDIT OVERLAY (admin only) ═══ */
.editable-block {
  position: relative;
}
.editable-block:hover .edit-btn { opacity: 1; }
.edit-btn {
  position: absolute; top: 8px; right: 8px; z-index: 50;
  background: #1a6eb5; color: #fff;
  border: none; border-radius: 6px; padding: 5px 10px;
  font-size: 12px; cursor: pointer; opacity: 0;
  transition: opacity 0.15s;
  font-family: 'DM Sans',sans-serif;
}

/* ═══ LANGUAGE SWITCHER ═══ */
.lang-switcher { position:relative; }
.lang-current {
  display:flex; align-items:center; gap:5px;
  background:var(--bg-card); border:1px solid var(--border-strong);
  border-radius:8px; padding:6px 10px; cursor:pointer;
  color:var(--text-primary); font-family:'DM Sans',sans-serif;
  font-size:14px; font-weight:500; transition:all 0.2s;
}
.lang-current:hover { background:var(--bg-card-hover); }
.lang-code { font-size:12px; font-weight:600; letter-spacing:0.04em; }
.lang-arrow { font-size:10px; opacity:0.6; transition:transform .2s; }
.lang-current[aria-expanded="true"] .lang-arrow { transform:rotate(180deg); }
.lang-dropdown {
  display:none; position:absolute; top:calc(100% + 6px); right:0;
  background:var(--bg-secondary); border:1px solid var(--border-strong);
  border-radius:10px; padding:6px; list-style:none; z-index:500;
  min-width:150px; box-shadow:var(--shadow-lg);
}
.lang-dropdown.open { display:block; }
.lang-option {
  display:flex; align-items:center; gap:10px;
  padding:8px 12px; border-radius:7px; text-decoration:none;
  color:var(--text-secondary); font-size:14px; transition:all 0.15s;
}
.lang-option:hover { background:var(--bg-card-hover); color:var(--text-primary); }
.lang-option.current { color:var(--text-primary); font-weight:500; background:var(--bg-card); }
.flag { font-size:18px; }

/* Translation missing banner */
.translation-banner {
  background:rgba(234,179,8,0.12); border-bottom:1px solid rgba(234,179,8,0.25);
  color:#fde68a; font-size:13px; padding:8px 5%; text-align:center;
  margin-top:70px;
}

/* Admin link */
.admin-link {
  width:32px;height:32px;border-radius:50%;background:var(--bg-card);
  border:1px solid var(--border-strong); display:flex; align-items:center;
  justify-content:center; color:var(--accent) !important; font-size:16px;
}

/* Mobile nav */
@media (max-width:960px) {
  .nav-right-mobile { display:flex; align-items:center; gap:8px; }
  .nav-menu.mobile-open {
    display:flex !important; flex-direction:column;
    position:absolute; top:70px; left:0; right:0;
    background:var(--nav-bg); padding:16px 5%;
    border-bottom:1px solid var(--border); z-index:199;
    gap:4px;
  }
  .lang-dropdown { right:auto; left:0; }
}
