
/* =========================
   BRIDGE - ENKEL DESIGN
   Färger: svart, rött och vitt
   ========================= */

:root {
  --black: #080808;
  --red: #85232e;
  --red-hover: #a42e3a;
  --white: #ffffff;
  --light: #f6f4f4;
  --text: #242124;
  --muted: #686368;
  --border: #e2dadd;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--red-hover);
}

#app {
  min-height: 100vh;
}

/* SIDANS STRUKTUR */

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--white);
}

.home-main,
.page-main {
  flex: 1;
  background: var(--white);
  color: var(--text);
}

.page-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 46px) 60px;
}

/* SVART SIDHUVUD */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 15px clamp(16px, 4vw, 46px);
  background: var(--black);
  border-bottom: 3px solid var(--red);
}

/* LOGOTYP */

.site-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 100px;
}

.site-logo {
  display: block;
  width: auto;
  max-width: 180px;
  height: 48px;
  object-fit: contain;
  object-position: left center;
}

.site-brand-fallback {
  color: var(--white);
  font-weight: bold;
  letter-spacing: 3px;
}

/* MENY */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px 17px;
}

.site-nav a {
  padding: 5px 0;
  border-bottom: 2px solid transparent;
  color: #eeeeee;
  font-size: 0.86rem;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  border-bottom-color: var(--red-hover);
  color: #ffffff;
}

/* LOG IN OCH REGISTER */

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-button {
  padding: 9px 14px;
  border: 1px solid #777;
  border-radius: 4px;
  background: transparent;
  color: var(--white);
  font-size: 0.85rem;
}

.auth-button:hover {
  border-color: var(--red-hover);
  background: #211416;
  color: var(--white);
}

.register-button {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

.register-button:hover {
  border-color: var(--red-hover);
  background: var(--red-hover);
  color: var(--white);
}

/* INLOGGNINGSRUTA */

.auth-panel {
  padding: 28px 16px;
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.auth-panel[hidden] {
  display: none;
}

.auth-panel-inner {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 26px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  border-radius: 5px;
  background: var(--white);
}

.auth-panel-inner h2 {
  margin-top: 0;
  color: var(--text);
}

.auth-description,
.auth-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.auth-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.7rem;
}

.auth-panel form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.auth-panel label {
  font-size: 0.9rem;
}

.auth-panel input {
  width: 100%;
  padding: 11px;
  border: 1px solid #d4ccce;
  border-radius: 4px;
  background: var(--white);
  color: var(--text);
}

.auth-panel input:focus {
  outline: 2px solid var(--red);
  outline-offset: 1px;
}

.auth-submit {
  margin-top: 10px;
  padding: 11px;
  border: 0;
  border-radius: 4px;
  background: var(--red);
  color: var(--white);
  font-weight: bold;
}

.auth-submit:hover {
  background: var(--red-hover);
}

.auth-message {
  color: var(--red);
  font-size: 0.9rem;
}

.auth-note {
  margin-bottom: 0;
  font-size: 0.78rem;
}

/* STARTSIDANS STORA RUBRIK */

.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 340px;
  overflow: hidden;
  padding: clamp(30px, 7vw, 76px);
  background: linear-gradient(115deg, #171315, #080808);
  border-bottom: 4px solid var(--red);
  color: var(--white);
}

.home-hero::after {
  position: absolute;
  right: -75px;
  bottom: -150px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(165, 58, 70, 0.45);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.home-hero .eyebrow {
  color: #e7a2a9;
}

.home-hero h1 {
  margin: 0 0 15px;
  color: var(--white);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.15;
}

.home-hero-content > p:not(.eyebrow) {
  max-width: 600px;
  color: #e0dadd;
  font-size: 1.02rem;
}

/* KNAPPAR PÅ STARTSIDAN */

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 17px;
  border: 1px solid var(--red);
  border-radius: 4px;
  background: var(--red);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: bold;
}

.hero-link:hover {
  background: var(--red-hover);
  color: var(--white);
}

/* KATEGORIER */

.home-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px clamp(16px, 4vw, 46px);
  background: var(--white);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 22px;
}

.section-heading h2,
.home-section h2,
.home-feature h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.3;
}

.section-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 24px 0;
}

.home-category-grid {
  margin-top: 0;
}

/* RÖDA OCH SVARTA KATEGORIBOXAR */

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 145px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid #4a3336;
  border-left: 4px solid var(--red);
  border-radius: 5px;
  background: linear-gradient(135deg, #2a171a, #111011 78%);
  color: var(--white);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s, border-color 0.2s,
              background 0.2s, box-shadow 0.2s;
}

.category-card::after {
  position: absolute;
  right: -35px;
  bottom: -65px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(191, 91, 102, 0.3);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: #a34a55;
  background: linear-gradient(135deg, #3a1c21, #171113 78%);
  color: var(--white);
  box-shadow: 0 7px 16px rgba(55, 15, 22, 0.14);
}

.category-number {
  color: #d98a94;
  font-size: 0.76rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.category-card-title {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: bold;
}

.category-card-arrow {
  position: absolute;
  z-index: 1;
  right: 19px;
  bottom: 15px;
  color: #e7a2a9;
  font-size: 1.25rem;
}

/* LÄTT VARIATION MELLAN BOXARNA */

.category-card-2,
.category-card-5,
.category-card-8 {
  background: linear-gradient(135deg, #30181c, #151113 78%);
}

.category-card-3,
.category-card-6,
.category-card-9 {
  background: linear-gradient(135deg, #211719, #100f10 78%);
}

/* STARTSIDANS NEDRE PANEL */

.home-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 clamp(16px, 4vw, 46px) 42px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid #4a3336;
  border-left: 4px solid var(--red);
  border-radius: 5px;
  background: #f8f5f5;
}

.home-feature h2 {
  color: var(--text);
}

.home-feature p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
}

.home-feature .eyebrow {
  color: var(--red);
}

/* SIDRUBRIKER */

.page-intro {
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.page-intro h1 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.2;
}

.page-intro p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

/* INNEHÅLLSPANELER */

.content-panel {
  margin: 24px 0;
  padding: clamp(14px, 3vw, 26px);
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #faf8f8;
}

.content-panel h2 {
  margin-top: 0;
  color: var(--text);
}

.content-panel p {
  color: #4e484b;
}

.content-panel a {
  color: var(--red);
}

/* TABELLER */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  text-align: left;
}

thead {
  background: #251719;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid #e9e3e4;
  vertical-align: top;
}

th {
  color: var(--white);
  font-size: 0.84rem;
  font-weight: bold;
  white-space: nowrap;
}

td {
  color: #373135;
  font-size: 0.93rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8eeee;
}

/* SVART SIDFOT */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  margin-top: auto;
  padding: 20px;
  border-top: 3px solid var(--red);
  background: var(--black);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 4px;
}

/* MOBIL OCH MINDRE SKÄRMAR */

@media (max-width: 1100px) {
  .site-header {
    justify-content: flex-start;
  }

  .site-nav {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .auth-actions {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-hero {
    min-height: 300px;
  }

  .home-feature {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-header {
    gap: 13px;
    padding: 15px;
  }

  .site-logo {
    height: 40px;
    max-width: 145px;
  }

  .auth-button {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .site-nav {
    gap: 7px 13px;
  }

  .site-nav a {
    font-size: 0.82rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 115px;
  }

  .home-hero {
    min-height: 280px;
    padding: 30px 22px;
  }

  .home-section {
    padding: 32px 16px;
  }

  .home-feature {
    margin: 0 16px 30px;
  }

  .page-main {
    padding: 28px 14px 42px;
  }

  th,
  td {
    padding: 10px;
  }

  .auth-panel-inner {
    padding: 24px 18px;
  }
}
