/* Blogg – styrende CSS for hele bloggen
   Brukes av: index.php (forside) og alle artikkel-sider (.html).
   Endringer her gjelder forsiden og alle artikler. */

.blogg-page {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f5f5f5;
}

.blogg-page *,
.blogg-page *::before,
.blogg-page *::after {
  box-sizing: border-box;
}

/* Header */
.blogg-page header {
  background: #1a1a2e;
  color: #eee;
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.blogg-page .header-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.blogg-page header .logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.blogg-page header .logo:hover {
  color: #a0c4ff;
}

.blogg-page header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.blogg-page header nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
}

.blogg-page header nav a:hover {
  color: #fff;
}

/* Main */
.blogg-page main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  background: #fff;
  min-height: 60vh;
  box-shadow: 0 0 20px rgba(0,0,0,0.06);
}

.blogg-page .breadcrumbs {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.blogg-page .breadcrumbs a {
  color: #2563eb;
  text-decoration: none;
}

.blogg-page .breadcrumbs a:hover {
  text-decoration: underline;
}

.blogg-page .breadcrumbs span {
  margin: 0 0.25rem;
}

/* Article */
.blogg-page article {
  margin: 0;
}

.blogg-page article h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: #1a1a2e;
}

.blogg-page article h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: #1a1a2e;
  padding-bottom: 0.25rem;
}

.blogg-page article h3 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
  color: #333;
}

.blogg-page article p {
  margin: 0 0 1rem;
}

.blogg-page article a {
  color: #2563eb;
  text-decoration: none;
}

.blogg-page article a:hover {
  text-decoration: underline;
}

.blogg-page article ul,
.blogg-page article ol {
  margin: 0 0 1rem 1.5rem;
  padding: 0;
}

.blogg-page article li {
  margin-bottom: 0.35rem;
}

.blogg-page article .section-title {
  margin-top: 2rem;
}

/* Bilder i artikler – varierende størrelser */
.blogg-page article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1rem 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.blogg-page article .img-small {
  width: 220px;
}

.blogg-page article .img-medium {
  width: 400px;
}

.blogg-page article .img-large {
  width: 100%;
  max-width: 560px;
}

/* CTA / info-boks */
.blogg-page article article,
.blogg-page article .cta-spillsidene {
  background: #f0f4ff;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid #2563eb;
}

/* Footer */
.blogg-page footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.9rem;
  color: #666;
  background: #eee;
  border-top: 1px solid #ddd;
}

.blogg-page footer a {
  color: #2563eb;
  text-decoration: none;
}

.blogg-page footer a:hover {
  text-decoration: underline;
}

.blogg-page footer p {
  margin: 0.25rem 0;
}

/* ============================================
   Blogg-forside (index) – samme fil styrende
   for alle blogg-sider og artikler
   ============================================ */

.blogg-index .index-hero {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.blogg-index .index-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: #1a1a2e;
  margin: 0 0 0.5rem;
}

.blogg-index .index-hero p {
  color: #6b7280;
  margin: 0;
  font-size: 1.05rem;
}

.blogg-index .posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.blogg-index .post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #e5e7eb;
}

.blogg-index .post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.blogg-index .post-card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.blogg-index .post-card-img-wrap {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.blogg-index .post-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blogg-index .post-card-img-wrap .placeholder-icon {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

.blogg-index .post-card-img-wrap .placeholder-icon svg {
  width: 100%;
  height: 100%;
  fill: #a0c4ff;
}

.blogg-index .post-card-body {
  padding: 1.25rem;
}

.blogg-index .post-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blogg-index .post-card:hover .post-card-title {
  color: #2563eb;
}

.blogg-index main {
  max-width: 1200px;
}
