@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");


* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f5f5;
    color: #222;
}


/* Top bar */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.topbar-inner {
    max-width: 1200px;
    margin: auto;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 66px;
}

.topnav a {
    margin-right: 1rem;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
}

.search {
    margin-left: auto;
    padding: 0.5rem 0.7rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 220px;
}

/* Hero */
.hero {
    background: url("hero.png") center/cover;
    color: #fff;
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero-input {
    margin-top: 1rem;
    padding: 0.8rem;
    width: 100%;
    max-width: 500px;
    border-radius: 6px;
    border: none;
}

/* Layout */
.layout {
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
}

/* Sidebar */
.sidebar .card {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #e6e6e6;
}

.primary {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 0.6rem;
    width: 100%;
    border-radius: 4px;
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list li {
    padding: 0.4rem 0;
    color: #555;
}

/* Content */
.content {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e6e6e6;
}

.forum-header {
    padding: 1.2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tabs {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #eee;
}

.tabs button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
}

.tabs .active {
    color: #000;
    font-weight: 600;
}

/* Threads */
#posts .thread {
    padding: 1.2rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.thread-title {
    font-size: 1rem;
    margin: 0 0 0.3rem 0;
}

.thread-meta {
    font-size: 0.8rem;
    color: #777;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.thread-meta span::after {
    content: "·";
    margin-left: 0.5rem;
}

.thread-meta span:last-child::after {
    content: "";
}
/* ===== Trådlista (Houzz-lik) ===== */

.thread-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.thread-row:last-child {
    border-bottom: none;
}

.thread-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.thread-title {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 0.35rem;
}

.thread-title:hover {
    text-decoration: underline;
    cursor: pointer;
}

.thread-meta {
    font-size: 0.8rem;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.thread-meta span::after {
    content: "·";
    margin-left: 0.6rem;
}

.thread-meta span:last-child::after {
    content: "";
}

.thread-right {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
}
/* ===== Inlägg & svar (Houzz-lik kort) ===== */

.post-card {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    background: #fff;
    margin: 1rem 0;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.post-body {
    flex: 1;
}

.post-meta {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.4rem;
}

.post-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #222;
}

/* ===== Svar ===== */

.reply-card {
    margin-left: 3rem;
    border-color: #eee;
    background: #fafafa;
}

.reply-card .post-avatar {
    width: 40px;
    height: 40px;
}

.reply-card .post-content {
    font-size: 0.9rem;
}

/* Trådtitel */
.thread-view h2 {
    margin: 1.5rem 0 1rem 0;
    padding-left: 0.25rem;
    font-size: 1.6rem;
    font-weight: 600;
}
#thread-view h2 {
    padding-left: 0.5rem;
}
.post-card {
    padding: 1.4rem 1.6rem;
}
/* Rubrik för svar */
#thread-view h3 {
    margin: 2rem 0 1rem 3rem;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
}
.reply-card {
    margin-left: 3rem;
    background: #fafafa;
    border-color: #eee;
}

.reply-card .post-content {
    font-size: 0.9rem;
    color: #333;
}
/* Tillbaka-länk */
/* Tillbaka-knapp (modern secondary button) */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;

    padding: 0.45rem 0.75rem;

    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;

    cursor: pointer;
    margin-bottom: 1.2rem;
    margin-left: 5px;
    margin-top: 5px;
}

.back-btn:hover {
    background: #efefef;
    border-color: #ccc;
}
/* Kategorilänkar */
.list li {
    padding: 0.4rem 0.2rem;
    color: #555;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.list li:hover {
    background: #f0f0f0;
    color: #222;
}
.tabs button {
    cursor: pointer;
}

.tabs button:hover {
    color: #000;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;

  position: relative;
  left: 50%;
  transform: translateX(-50%);

  margin: 32px 0px 0;
  margin-bottom: 20px;
}




.pagination button {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

.pagination button.active {
  background: #111;
  color: #fff;
  border-color: #111;
}


/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.modal-card {
  position: relative;
  max-width: 420px;
  margin: 10vh auto;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

.modal-card h2 {
  margin-top: 0;
}

.modal-intro {
  color: #555;
  margin-bottom: 16px;
}

.modal-card form label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

.modal-card input {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

button.full {
  width: 100%;
}

.success {
  text-align: center;
}

.success h3 {
  margin-top: 0;
}
.hidden {
  display: none;
}


.error {
  margin-top: 12px;
  color: #b00020;
  font-size: 14px;
}

textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-top: 4px;
}


.demo-disclaimer {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);

  font-size: 11px;
  color:#f5f5f5;

  pointer-events: none;
  z-index: 999;
}



@media (max-width: 900px) {

  /* Topbar */
  .topbar-inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .topnav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
  }

  .search {
    width: 100%;
  }

  /* Hero */
  .hero {
    padding: 24px 16px;
    text-align: center;
  }

  .hero-input {
    width: 100%;
  }

  /* Layout */
  .layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 12px;
  }

  /* Content först */
  .content {
    order: 1;
  }

  /* Sidebar under */
  .sidebar {
    order: 2;
  }

  /* Forum header */
  .forum-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Tabs */
  .tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }

  .tabs button {
    white-space: nowrap;
  }

  /* Trådrader */
  .thread-row {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .thread-right {
    grid-column: 1 / -1;
    font-size: 12px;
    color: #666;
    margin-top: 4px;
  }

  .thread-meta {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: 6px;
  }
}
@media (max-width: 480px) {

  .logo {
    height: 28px;
  }

  .topnav a {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero p {
    font-size: 14px;
  }

  .thread-title {
    font-size: 15px;
  }

  .thread-avatar {
    width: 36px;
    height: 36px;
  }
}

