:root{
  --bg:#F0F0F0;
  --ink:#2C5C34;
  --muted:#6b7280;
  --card:#F0F0F0;
  --border:#e5e7eb;
  --accent:#F0F0F0;
  --accent2:#10b981;
  --shadow:0 12px 28px rgba(0,0,0,.06);
}

/* DN-inspirerade typsnitt */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* Grund - UPPDATERAD FÖR SVENSKA */
*{box-sizing:border-box}
html{font-size:16px}
body{
  margin:0;
  color:var(--ink);
  background:radial-gradient(1200px 800px at 80% -20%,#F0F0F0 0%,var(--bg) 40%) fixed;
  font-family:'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height:1.6;
  direction:ltr;
  text-align:left;
}

.container{max-width:1040px;margin:0 auto;padding:1.25rem}

/* Rubriker med elegant typsnitt */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight:600;
  line-height:1.3;
  margin-bottom:0.5em;
}

/* Banner - UPPDATERAD FÖR LTR */
.banner {
  position: relative;
  width: 100%;
  height: 220px;
  background: url('images/icons/mosque.png') center center / cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1040px;
  background: rgba(250,250,250,.6);
  border-radius: 16px;
  padding: 1rem 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.7);
  z-index: 1;
}

.khan-logo {
  max-height: 130px;
  border-radius: 12px;
  height: auto;
  margin-left: 1rem; /* Ändrat från margin-right till margin-left för LTR */
}

/* Menyn i bannern - UPPDATERAD FÖR LTR */
.banner-nav {
  display:flex;
  gap:0.6rem;
  flex-wrap:nowrap;
  white-space:nowrap;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
}

.banner-nav a {
  text-decoration:none;
  color:#333;
  font-weight:bold;
  padding:.35rem .7rem;
  border-radius:6px;
  border:1px solid var(--border);
  background:var(--card);
  box-shadow:var(--shadow);
  display:inline-block;
  white-space:nowrap;
  font-family: 'Inter', sans-serif;
}

.banner-nav a:hover {
  background: rgba(250,250,250,1);
}

/* Circle-loggan - UPPDATERAD POSITION FÖR LTR */
.circle-logo {
  position: absolute;
  top: var(--logo-top, 8px);
  left: var(--logo-left, 8px); /* Ändrat från right till left */
  width: var(--logo-size, 180px);
  height: auto;
  z-index: 2;
  pointer-events: none;
  display: block;
}

/* Hero - UPPDATERAD FÖR LTR */
.hero{
  display:grid;
  grid-template-columns:180px 1fr;
  gap:1rem;
  align-items:center;
  padding:1.25rem;
  text-align:left;
}

.hero img{
  width:100%;
  height:auto;
  border-radius:1rem;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  object-fit:cover
}

.hero h1{
  margin:.25rem 0 0;
  font-size:1.5rem;
  font-family: 'Playfair Display', serif;
  font-weight:600;
}

.hero p{
  margin:.25rem 0 0;
  color:var(--muted);
  font-family: 'Inter', sans-serif;
}

/* Cards & Grid - UPPDATERAD FÖR LTR */
.grid{
  display:grid;
  gap:1rem;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  text-align:left;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:1rem;
  padding:1rem;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  gap:.6rem;
  min-height:220px;
  text-align:left;
}



.article-cover{
  width:100%;
  aspect-ratio:16/9;
  display:block;
  object-fit:cover;
  border-radius:.8rem;
  border:1px solid var(--border);
  box-shadow:var(--shadow);
  margin:0 0 .6rem 0
}

.card img{
  max-width:100%;
  height:auto;
  display:block;
  object-fit:cover
}

.card h3{
  margin:0;
  font-size:1rem;
  font-family: 'Playfair Display', serif;
  font-weight:600;
}

.card p{
  margin:0;
  color:#2c5c34; /* Ändrat från var(--muted) till #2c5c34 */
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

/* Relaterade kort - UPPDATERAD FÖR LTR */
.related-section{
  margin-top:2.25rem;
  text-align:left;
}

.related-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:1rem;
  align-items:start;
  text-align:left;
}

.related-card{
  background:rgba(250,250,250,.6);
  padding:.75rem;
  border-radius:8px;
  box-shadow:0 2px 4px rgba(0,0,0,0.12);
  transition:transform .2s;
  display:flex;
  flex-direction:column;
  gap:.5rem;
  align-items:stretch;
  text-align:left;
}

.related-card:hover{
  transform:translateY(-4px)
}

.related-card img{
  width:100%;
  height:140px;
  object-fit:cover;
  border-radius:6px
}

.related-card h4{
  font-family: 'Playfair Display', serif;
  font-weight:600;
}

/* Thematic / featured - UPPDATERAD FÖR LTR */
.featured-thematic{
  display:flex;
  flex-direction:row; /* Ändrat från row-reverse till row */
  align-items:stretch;
  background:#F0F0F0;
  border-radius:.5rem;
  padding:1rem;
  margin-bottom:1rem;
  box-shadow:var(--shadow);
  gap:1rem;
  text-align:left;
}

.featured-thematic img{
  width:60%;
  object-fit:cover;
  border-radius:.8rem
}

.featured-thematic .info{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:left;
}

.featured-thematic .date{
  color:var(--muted);
  font-size:.9rem;
  margin:.25rem 0;
  font-family: 'Inter', sans-serif;
}

.featured-thematic h2{
  font-family: 'Playfair Display', serif;
  font-weight:600;
}

/* Thematic hero - UPPDATERAD FÖR LTR */
.thematic-hero{
  display:grid;
  grid-template-columns:1fr 1.2fr;
  gap:1rem;
  background:#F0F0F0;
  border:1px solid var(--border);
  border-radius:1rem;
  padding:1rem;
  box-shadow:var(--shadow);
  text-align:left;
}

.thematic-hero .img-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:1rem;
  border:1px solid var(--border)
}

.thematic-hero h2{
  margin:.25rem 0 .35rem;
  font-size:1.6rem;
  font-family: 'Playfair Display', serif;
  font-weight:600;
}

/* Article page layout - UPPDATERAD FÖR LTR */
.article-container{
  background:rgba(250,250,250,0.6);
  border-radius:12px;
  padding:.9rem;
  margin-top:0.1rem;
  text-align:left;
}

.article-layout{
  display:block;
  text-align:left;
}

.article-image{
  float:right; /* Ändrat från left till right för LTR */
  margin:0 0 1rem 1rem; /* Ändrat från 0 1rem 1rem 0 till 0 0 1rem 1rem */
  max-width:40%;
}

.article-image img{
  width:100%;
  height:auto;
  border-radius:10px;
  object-fit:cover
}

.article-text{
  font-size:.6rem;
  line-height:1.7;
  color:var(--ink);
  font-family: 'Inter', sans-serif;
  text-align:left;
}

.article-text p{
  margin-bottom:1.2em;
}



/* ===== SAMMANFATTNING I ARTIKELSIDOR ===== */
.article-container .article-excerpt {
  font-size: 1.3rem;
  color: #2c5c34;
  line-height: 1.6;
  font-weight: 500;
  margin: .3rem 0 1rem 0;
  padding: .1rem 0;
  border-bottom: 2px solid #e5e7eb;
  font-family: 'Inter', sans-serif;
}

/* Alternativt om excerpt visas i en div utan klass */
.article-container div[style*="font-size:1.3rem"] {
  font-size: 1.3rem !important;
  color: #2c5c34 !important;
  line-height: 1.6 !important;
  font-weight: 500 !important;
  margin: 1rem 0 1.5rem 0 !important;
  padding: 1rem 0 !important;
  border-bottom: 2px solid #e5e7eb !important;
  font-family: 'Inter', sans-serif !important;
}



/* Footer - UPPDATERAD FÖR LTR */
footer{
  margin-top:2rem;
  padding:2rem 1rem;
  text-align:left;
  color:var(--muted);
  font-family: 'Inter', sans-serif;
}

/* Responsiv - UPPDATERAD FÖR LTR */
@media(max-width:820px){
  .featured-thematic{
    flex-direction:column;
    text-align:left;
  }
  .featured-thematic img{
    width:100%
  }
  .thematic-hero{
    grid-template-columns:1fr;
    text-align:left;
  }
}

@media(max-width:640px){
  .hero{
    grid-template-columns:1fr;
    text-align:left;
  }
  .card{
    min-height:auto;
    text-align:left;
  }
  .article-image{
    float:none;
    max-width:100%;
    margin:0 0 1rem 0
  }
  .related-grid{
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    text-align:left;
  }
  .related-card img{
    height:120px
  }
  html{
    font-size:16px
  }
}

/* Article hero - UPPDATERAD FÖR LTR */
.article-hero {
  width: 100%;
  min-height: 300px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  flex-direction: column;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.article-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  border-radius: 12px;
  z-index: 0;
}

.article-hero h1,
.article-hero p {
  position: relative;
  z-index: 1;
  font-family: 'Playfair Display', serif;
  font-weight:600;
}

/* Globala länkar */
a {
  color: var(--ink);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}

a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.faq-item a {
  text-decoration: none;
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 600;
  font-family: 'Playfair Display', serif;
}

.faq-item a:hover {
  color: var(--accent2);
}

/* Sökformulär styling */
.search-container {
    margin: 1rem 0;
    text-align: left;
}

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #2c5c34;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.search-btn {
    padding: 0.8rem 1.5rem;
    background: #2c5c34;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    font-family: 'Inter', sans-serif;
}

.search-btn:hover {
    background: #1e3e24;
}

/* Featured thematic med weekly-label - UPPDATERAD FÖR LTR */
.featured-thematic {
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  margin: 1.5rem 0 1rem 0;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 100%;
  text-align: left;
}

.weekly-label {
  position: absolute;
  top: -10px;
  left: 2rem; /* Ändrat från right till left */
  background: #2c5c34;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1rem;
  z-index: 2;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-family: 'Inter', sans-serif;
}

.thematic-content {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  text-align: left;
}

.image-container {
  flex: 0 0 300px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 350px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}

.info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.info h2 {
  margin: 0 0 0.8rem 0;
  font-size: 1.4rem;
  font-family: 'Playfair Display', serif;
  font-weight:600;
}

.info h2 a {
  text-decoration: none;
  color: #2c5c34;
}

.info h2 a:hover {
  text-decoration: underline;
}

.date {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 1rem 0;
  font-family: 'Inter', sans-serif;
}

/* Responsiv design */
@media (max-width: 768px) {
  .featured-thematic {
    padding: 1.5rem 1rem 1rem 1rem;
    margin: 1rem 0 1rem 0;
    text-align: left;
  }
  
  .thematic-content {
    flex-direction: column;
    gap: 1rem;
    text-align: left;
  }
  
  .image-container {
    flex: 0 0 auto;
    width: 100%;
    min-height: 250px;
  }
  
  .image-container img {
    min-height: 250px;
    max-height: 300px;
  }
  
  .weekly-label {
    top: -12px;
    left: 1rem; /* Ändrat från right till left */
    padding: 0.6rem 1rem;
    font-size: 1rem;
  }
}

/* Ytterligare minskning av avstånd för container */
.container {
    margin-top: 0.5rem;
    text-align: left;
}

/* ÖVERSTYR navigationbarens avstånd */
.banner {
    margin-bottom: 0.5rem !important;
}

.container {
    margin-top: 0.5rem !important;
}

/* Badge för datum i kort */
.badge {
    background-color: #f0f0f0;
    color: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-color:#f0f0f0;
    display: inline-block;
    margin: 5px 0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

/* Typsnittsinställningar */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

.article-text {
    font-size: 1rem;
    line-height: 1.7;
    font-family: 'Inter', sans-serif;
}

.article-text p {
    margin-bottom: 1em;
}

.card h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

/* Textjustering */
body {
    direction: ltr;
    text-align: left;
}

.container {
    text-align: left;
}

/* Sammanfattning */
.card p:not(.badge) {
  margin:0;
  color:#2c5c34;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  font-size: .85rem;
}

.article-excerpt {
  font-size: 1.4rem;
  color: #2c5c34;
  line-height: 1.5;
  font-weight: 500;
  margin: 0.25rem 0 0.5rem 0;  /* Minimalt utrymme */
  padding: 0;
  font-family: 'Inter', sans-serif;
}

.category-tag {
  display: inline-block;
  background: #2c5c34;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  font-family: 'Inter', sans-serif;
}

/* Alternativ färgschema för olika kategorier */
.category-tag.reflektioner { background: #3b82f6; }
.category-tag.djup { background: #8b5cf6; }
.category-tag.tematisk { background: #10b981; }
.category-tag.qa { background: #f59e0b; }
