/*
 * style.default.css
 * Template: as002050 (An-Nasihah Zentrum Stuttgart)
 * Extrahiert aus mockup_modern_2_responsive.html
 * Wird in index.php geladen via:
 *   $doc->addStyleSheet('templates/' . $this->template . '/css/style.default.css');
 */

:root{
  --primary: #34508a;        /* modern indigo-blue, replaces teal */
  --primary-dark: #1e2f52;
  --primary-light: #5c7db8;
  --primary-tint: #eaf0fb;
  --accent: #c8a84b;         /* warm gold, kept as accent */
  --accent-dark: #a88a35;
  --accent-tint: #fbf3e1;
  --text-main: #1a1a1a;
  --text-muted: #55617a;     /* darkened from #64748b for better contrast on white */
  --border: #e3e8f0;
  --bg-page: #f6f7fb;

  /* fluid layout tokens */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 24px);
  --radius: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', sans-serif; background: var(--bg-page); color: var(--text-main); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { -webkit-tap-highlight-color: rgba(52,80,138,0.15); }

/* focus visibility across the board (keyboard nav) */
a:focus-visible, button:focus-visible, .nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ============ NAVBAR ============ */
.navbar { background: var(--primary-dark); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.navbar .inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.navbar-logo { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.navbar-logo .mark { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-family: 'Amiri', serif; font-size: 18px; color: var(--accent); flex-shrink: 0; }
.navbar-logo .text { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.navbar.nav-open .navlinks { max-height: 2000px; }
/* hamburger toggle — hidden on desktop */
.nav-toggle { display: none; background: none; border: none; width: 40px; height: 40px; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ''; display: block; width: 20px; height: 2px; background: #fff; position: relative; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.navlinks { display: flex; align-items: center; }
.navlinks a { color: rgba(255,255,255,0.85); font-size: 13px; font-weight: 500; padding: 18px 16px; display: block; text-decoration: none; transition: color 0.15s, background 0.15s; border-bottom: 2px solid transparent; }
.navlinks a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.navlinks a.active { color: #fff; border-bottom: 2px solid var(--accent); }

.navbar-extra { display: flex; align-items: center; gap: 14px; }
.navbar-extra a.utility { color: rgba(255,255,255,0.7); font-size: 11px; text-decoration: none; }
.navbar-extra a.utility:hover { color: #fff; }
.navbar-social { display: flex; gap: 6px; }
.navbar-social a { width: 28px; height: 28px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; text-decoration: none; transition: background 0.15s; }
.navbar-social a:hover { background: var(--accent); }

/* ============ HEADER ============ */
.header { background: #fff; border-bottom: 1px solid var(--border); overflow: hidden; }
.header .inner { max-width: var(--container); margin: 0 auto; padding: clamp(32px, 6vw, 48px) var(--gutter); display: flex; align-items: center; gap: clamp(24px, 4vw, 48px); }

/* Joomla wraps Custom HTML modules in an extra <div class="mod-custom">
   between .inner and .header-text/.header-image. Flexbox only treats
   DIRECT children as flex items, so that wrapper breaks the side-by-side
   layout. display:contents makes the wrapper act as if it isn't there,
   so .header-text/.header-image become effective flex items again.
   Same fix applied to .cards, since the Cards module has the identical
   problem with its grid. */
.header .inner > .mod-custom,
.cards > .mod-custom,
.khalifah > .mod-custom,
.navbar-social > .mod-custom,
.navbar-extra > .mod-custom { display: contents; }

/* Safety net: some Joomla editors auto-wrap loose links in a <p> on save.
   .navbar-social and .navbar-extra are flex and expect <a> as direct
   children, so collapse an accidental <p> wrapper the same way. */
.navbar-social > .mod-custom > p,
.navbar-extra > .mod-custom > p { display: contents; }

/* Safety net: if the Cards module's content still has its own redundant
   <div class="cards"> wrapper inside it (nested .cards-in-.cards), collapse
   that too so the .card elements land directly in the outer grid instead
   of being squeezed into a single column. Best fix is removing the
   redundant inner <div class="cards"> from the module content directly —
   this rule just prevents the squeeze if that hasn't been done yet. */
.cards .cards { display: contents; }
.header-text { flex: 1; min-width: 0; }
.header-badge { display: inline-block; background: var(--accent-tint); color: var(--accent-dark); font-size: 11px; font-weight: 600; padding: 5px 13px; border-radius: 20px; margin-bottom: 18px; letter-spacing: 0.4px; }
.header-text h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; color: var(--primary-dark); line-height: 1.2; letter-spacing: -0.6px; margin-bottom: 14px; }
.header-text p.sub { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.header-text p.lead { font-size: 15px; color: #4a5568; line-height: 1.7; max-width: 460px; margin-bottom: 24px; }
.header-btn { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%); color: #fff; font-size: 13px; font-weight: 600; padding: 13px 26px; border-radius: 999px; text-decoration: none; box-shadow: 0 6px 16px rgba(52,80,138,0.28); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.header-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(52,80,138,0.35); }
.header-btn:active { transform: translateY(0); }

/* IMAGE PLACEHOLDER — swap this block's contents for a real <img> */
.header-image { flex: 0 0 400px; height: 280px; border-radius: 16px; overflow: hidden; position: relative; background: linear-gradient(135deg, var(--primary-tint) 0%, #f1f4fb 100%); border: 2px dashed #c7d3ea; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; }
.header-image .icon { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--primary); box-shadow: 0 4px 14px rgba(52,80,138,0.12); }
.header-image span.label { font-size: 12px; font-weight: 600; color: var(--primary); }
.header-image span.hint { font-size: 11px; color: var(--text-muted); max-width: 220px; line-height: 1.5; }
/* To use a real photo, replace the placeholder markup with:
   <img src="your-image.jpg" alt="..." style="width:100%;height:100%;object-fit:cover;"> */

/* Once a real <img> is inside .header-image, drop the dashed
   placeholder border and gradient background so the photo isn't
   framed like an unfinished placeholder */
.header-image:has(img) {
  border: none;
  background: none;
}

/* ============ CONTENT GRID ============ */
.content { max-width: var(--container); margin: 0 auto; padding: clamp(24px, 5vw, 40px) var(--gutter); display: grid; grid-template-columns: 1fr 320px; gap: 28px; }

/* SECTION LABEL */
.section-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; transition: box-shadow 0.2s, transform 0.2s; }
.card:hover { box-shadow: 0 6px 24px rgba(52,80,138,0.1); transform: translateY(-2px); }
.card h3 { font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text-main); }
.card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.card a { font-size: 12px; color: var(--primary); font-weight: 600; text-decoration: none; display: inline-block; transition: transform 0.15s ease, color 0.15s ease; }
.card a:hover { color: var(--primary-dark); transform: translateX(3px); }

/* ============ CARD ICONS (Islamisches Wissen / Schule / Gemeinschaft) ============
   Replaces the emoji ::before rules from the original block:
     .card-icon.blue::before  { content: "📚"; }
     .card-icon.gold::before  { content: "🏫"; }
     .card-icon.slate::before { content: "👥"; }
   with flat line-style SVGs, matching the .contact-icon treatment.
   No HTML changes needed — same class names, module content untouched. */

.card-icon.blue::before,
.card-icon.gold::before,
.card-icon.slate::before {
  content: none;
}

.card-icon {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

/* Islamisches Wissen — open book */
.card-icon.blue {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334508a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}

/* An-Nasihah Schule — lined book, matches .contact-icon.icon-school */
.card-icon.gold {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a88a35' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3Cpath d='M9 7h7M9 11h7'/%3E%3C/svg%3E");
}

/* Gemeinschaft — community/people */
.card-icon.slate {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555e6b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
/* ARTICLE */
.article { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: clamp(20px, 4vw, 28px); margin-bottom: 20px; }
.article-tag { display: inline-block; background: var(--primary-tint); color: var(--primary); font-size: 11px; padding: 3px 10px; border-radius: 20px; margin-bottom: 12px; }
.article h2 { font-size: clamp(17px, 3vw, 20px); font-weight: 600; color: var(--primary); margin-bottom: 12px; line-height: 1.3; }
.article-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.article p { font-size: 14px; color: #333; line-height: 1.8; margin-bottom: 16px; }
.article-arabic { font-family: 'Amiri', serif; font-size: clamp(18px, 3.2vw, 22px); line-height: 2; color: var(--text-main); text-align: center; background: #f9f5ee; border-right: 4px solid var(--accent); padding: 16px 20px; border-radius: 0 8px 8px 0; margin: 20px 0; direction: rtl; }
.readmore { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #d9b968 0%, var(--accent) 100%); color: #fff; font-size: 12px; font-weight: 600; padding: 9px 20px; border-radius: 999px; text-decoration: none; box-shadow: 0 5px 14px rgba(200,168,75,0.32); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.readmore:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(200,168,75,0.4); }
.readmore:active { transform: translateY(0); }

/* ============================================================
   FEATURED ARTICLE (com_content) — Joomla-Klassen auf das
   .article-Konzept aus dem Mockup mappen */
.page-featured .items-leading .item {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: clamp(20px, 4vw, 28px);
  margin-bottom: 20px;
}
.page-featured .item_title {
  font-size: clamp(17px, 3vw, 20px);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
  line-height: 1.3;
}
.page-featured .item p {
  font-size: 14px;
  color: #333;
  line-height: 1.8;
  margin-bottom: 16px;
}

/* Joomla's Bootstrap btn-info fights your gold .readmore pill —
   neutralize btn/btn-info so only .readmore styling applies */
.page-featured .readmore.btn.btn-info {
  background: linear-gradient(135deg, #d9b968 0%, var(--accent) 100%) !important;
  border: none !important;
  color: #fff !important;
}

/* SIDEBAR */
.sidebar-widget { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; margin-bottom: 20px; }
.sidebar-widget h3 { font-size: 14px; font-weight: 600; color: var(--primary); border-bottom: 2px solid var(--primary-tint); padding-bottom: 10px; margin-bottom: 16px; }
.sidebar-item { display: flex; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #f0f0f0; }
.sidebar-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-item-icon { width: 36px; height: 36px; background: var(--primary-tint); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; }
.sidebar-item-text h4 { font-size: 13px; font-weight: 500; color: var(--text-main); margin-bottom: 2px; }
.sidebar-item-text span { font-size: 11px; color: var(--text-muted); }

/* sidebar-item as a clickable <a> (e.g. the "Folgen Sie uns" social links):
   kill the browser's default blue/underline link styling so it keeps
   looking like the rest of the widget instead of a plain hyperlink */
a.sidebar-item { text-decoration: none; color: inherit; cursor: pointer; }
a.sidebar-item:hover,
a.sidebar-item:visited,
a.sidebar-item:active { text-decoration: none; color: inherit; }

/* ABOUT WIDGET */
.about-widget { background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; color: #fff; }
.about-widget .mark { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-family: 'Amiri', serif; font-size: 18px; margin-bottom: 14px; }
.about-widget h3 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.about-widget p { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.9); }

/* KHALIFAH */
.khalifah { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 32px; }
.khalifah-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; text-align: center; transition: box-shadow 0.2s, transform 0.2s; }
.khalifah-card:hover { box-shadow: 0 6px 24px rgba(52,80,138,0.1); transform: translateY(-2px); }
.khalifah-header { background: var(--primary); padding: 12px; color: #fff; font-size: 15px; font-weight: 600; }
.khalifah-body { padding: 16px; }
.khalifah-body p { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.khalifah-avatar { width: 70px; height: 70px; background: var(--primary-tint); border-radius: 50%; margin: 8px auto; display: flex; align-items: center; justify-content: center; font-family: 'Amiri', serif; font-size: 24px; color: var(--primary); }
.khalifah-body h4 { font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 4px; }
.khalifah-body .blessing { font-size: 11px; color: var(--accent-dark); margin-bottom: 12px; }
.khalifah-btn { display: inline-block; background: linear-gradient(135deg, #d9b968 0%, var(--accent) 100%); color: #fff; font-size: 11px; font-weight: 600; padding: 7px 16px; border-radius: 999px; text-decoration: none; box-shadow: 0 4px 10px rgba(200,168,75,0.3); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.khalifah-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 14px rgba(200,168,75,0.38); }

/* ============ FOOTER ============ */
.footer { background: var(--primary-dark); padding: clamp(28px, 5vw, 40px) 0 0; margin-top: 0; }
.footer .inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) 32px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h3 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.footer p, .footer a, .footer li { color: rgba(255,255,255,0.72); font-size: 13px; line-height: 1.8; text-decoration: none; list-style: none; }
.footer a:hover { color: #fff; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a { width: 34px; height: 34px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: background 0.15s; }
.footer-social a:hover { background: rgba(255,255,255,0.2); color: #fff; }
.footer-bottom { background: #14213c; padding: 14px var(--gutter); }
.footer-bottom .inner { max-width: var(--container); margin: 0 auto; padding: 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { color: rgba(255,255,255,0.55); font-size: 12px; }
.footer-bottom a { color: rgba(255,255,255,0.55); font-size: 12px; text-decoration: none; margin-left: 16px; }
.footer-bottom a:hover { color: #fff; }

/* ==================================================================
   RESPONSIVE BREAKPOINTS — mobile-first overrides applied top-down
   Desktop  : > 1024px   (base styles above)
   Tablet   : 641px – 1024px
   Mobile   : <= 640px
   ================================================================== */

/* ---------- TABLET (<=1024px): sidebar drops below, khalifah 2-up, cards 2-up ---------- */
@media (max-width: 1024px) {
  .content { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .khalifah { grid-template-columns: repeat(2, 1fr); }
  .header-image { flex-basis: 320px; height: 240px; }
}

/* ---------- TABLET/MOBILE NAV (<=840px): hamburger menu takes over ---------- */
@media (max-width: 840px) {
  .nav-toggle { display: flex; }
  .navbar .inner { padding-top: 4px; padding-bottom: 4px; }
  .navlinks {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    order: 3;
  }
  .navbar.nav-open .navlinks { max-height: 480px; }
  .navlinks a { padding: 14px 6px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .navlinks a.active { border-bottom: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.05); }

  .navbar-extra {
    order: 2;
    margin-left: auto;
  }
  .navbar-extra a.utility { display: none; } /* keep utility links inside the drawer on small screens */
  .navbar.nav-open .navbar-extra a.utility {
    display: block; order: 4; width: 100%; padding: 10px 6px; color: rgba(255,255,255,0.7);
  }
}

/* ---------- MOBILE (<=640px) ---------- */
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .khalifah { grid-template-columns: 1fr; }

  .header .inner { flex-direction: column; align-items: stretch; text-align: left; }
  .header-image { width: 100%; flex: none; height: 200px; order: -1; }
  .header-text p.lead { max-width: none; }
  .header-btn { width: 100%; justify-content: center; }

  .article-arabic { font-size: 18px; padding: 14px; }

  .footer .inner { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .footer-bottom .inner { flex-direction: column; align-items: flex-start; }
  .footer-bottom a { margin-left: 0; margin-right: 16px; }

  .sidebar-item-text h4 { font-size: 12.5px; }
}

/* ---------- Very small phones ---------- */
@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .navbar-logo .text { font-size: 13px; }
  .khalifah-header { font-size: 14px; }
}

/* ============================================================
   NAVLINKS — Reset + Dropdown-Support für das echte Joomla-Menü
   (mod_as_menu gibt eine verschachtelte <ul><li><ul>-Struktur
   aus statt flacher <a>-Links wie im ursprünglichen Mockup.
   Diese Regeln sind bewusst GENERISCH gehalten — sie greifen
   auf jede <ul>/<li>-Ebene innerhalb von .navlinks, unabhängig
   von den genauen Klassennamen, die mod_as_menu vergibt.) */

/* Grund-Reset: keine Browser-Bullets, kein Standard-Margin/Padding
   auf allen Listenebenen innerhalb der Navigation */
.navlinks ul,
.navlinks ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.navlinks li { position: relative; }

/* Top-Level: horizontale Leiste wie im Mockup.
   .navlinks selbst ODER ein direktes <ul> darin — deckt beide
   möglichen Ausgabeformen von mod_as_menu ab. */
.navlinks,
.navlinks > ul {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Alle Top-Level-Links wie bisher im Mockup gestylt.
   ">" beschränkt das bewusst auf die oberste Ebene, damit
   Untermenü-Links NICHT die gleiche große horizontale Optik
   bekommen. */
.navlinks > a,
.navlinks > ul > li > a,
.navlinks > li > a {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  padding: 18px 16px;
  display: block;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.navlinks > a:hover,
.navlinks > ul > li > a:hover,
.navlinks > li > a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.navlinks > a.active,
.navlinks > ul > li.active > a,
.navlinks > li.active > a,
.navlinks > ul > li.current > a,
.navlinks > li.current > a { color: #fff; border-bottom: 2px solid var(--accent); }

/* Kleiner Pfeil-Indikator für Menüpunkte mit Untermenü */
.navlinks li:has(ul) > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

/* DROPDOWN — Untermenü (2. Ebene und tiefer), per Default versteckt */
.navlinks li ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--primary-dark);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
/* Dropdown anzeigen bei Hover ODER Tastatur-Fokus (Zugänglichkeit) */
.navlinks li:hover > ul,
.navlinks li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Links innerhalb des Dropdowns: eigenes, kompakteres Styling */
.navlinks li ul a {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  border-radius: 5px;
  white-space: nowrap;
  border-bottom: none;
}
.navlinks li ul a:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* Untermenü der 3. Ebene (falls vorhanden): seitlich statt darunter */
.navlinks li ul li ul {
  top: 0;
  left: 100%;
}

/* MOBILE (<=840px): Dropdowns werden zu einklappbaren Bereichen,
   passend zum bereits vorhandenen Hamburger-Menü-Verhalten */
@media (max-width: 840px) {
  .navlinks > ul,
  .navlinks { flex-direction: column; align-items: stretch; }
  .navlinks li ul {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.04);
    display: none;
    padding: 0 0 0 16px;
  }
  .navlinks li.nav-open > ul,
  .navlinks li:focus-within > ul { display: block; }
  .navlinks li.nav-open > a::after,
  .navlinks li:focus-within > a::after {
  transform: translateY(-3px) rotate(225deg);
}
}

/* ============================================================
   CARD-ICONS — automatisch über die vorhandene Modul-Klasse
   (blue/gold/slate) gesetzt, kein zusätzliches Feld nötig.
   modChrome_mockupcard() in modules.php gibt bereits
   <div class="card-icon [blue|gold|slate]"></div> aus —
   das Icon selbst kommt jetzt rein aus CSS via ::before.
   WICHTIG: Dies setzt voraus, dass der <div> im echten Joomla-
   Output LEER ist. Falls du diese CSS-Datei zusammen mit dem
   ursprünglichen Mockup-HTML testest (wo die Emojis noch als
   Text im <div> stehen, z.B. <div class="card-icon blue">📚</div>),
   werden die Icons DOPPELT angezeigt. Für den Mockup-Test also
   entweder den Text aus den card-icon-divs entfernen oder diesen
   Block vorübergehend auskommentieren. */
/* Fallback, falls moduleclass_sfx leer bleibt */
.card-icon:not(.blue):not(.gold):not(.slate)::before { content: "•"; }

/* ============================================================
   NAVBAR-SOCIAL — Reset für den Fall, dass das echte Social-
   Icons-Modul eine <ul><li>-Struktur statt flacher <a>-Tags
   ausgibt (gleiches Muster wie der .navlinks-Fix oben). */
.navbar-social,
.navbar-social ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar-social li { display: flex; }
.navbar-social a,
.navbar-social li a {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  transition: background 0.15s;
}
.navbar-social a:hover,
.navbar-social li a:hover { background: var(--accent); }

/* Verhindert, dass navbar-extra bei genug Platz in eine neue
   Zeile umbricht (nur ab Desktop-Breite relevant — Mobile
   übernimmt weiterhin der Hamburger ab 840px, siehe oben). */
@media (min-width: 841px) {
  .navbar .inner { flex-wrap: nowrap; }
  .navlinks { flex-shrink: 1; overflow-x: auto; }
  .navbar-logo, .navbar-extra { flex-shrink: 0; }
}

/* ============================================================
   NAVLINKS FIX — 6 Top-Level-Punkte + Logo + Utility + Social
   sind zusammen breiter als 1200px (--container). Padding
   verkleinert, damit alles ohne Umbruch/Scrollbalken passt.
   Überschreibt die vorherige overflow-x:auto-Regel bewusst. */
@media (min-width: 841px) {
  .navlinks > a,
  .navlinks > ul > li > a,
  .navlinks > li > a {
    padding-left: 10px;
    padding-right: 10px;
  }
  .navlinks { overflow: visible; }
  .navbar-extra { gap: 10px; }
  .navbar-extra a.utility { font-size: 10px; }
}

/* =========================================================
   KHALIFAH CARDS
   ========================================================= */

.khalifah {
    width: 100% !important;
    max-width: 100% !important;

    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important; /* was 24px — restored to match the original 16px used everywhere else (.cards, base .khalifah) */

    box-sizing: border-box !important;
}

.khalifah-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    box-sizing: border-box !important;
}

/* Header */
.khalifah-header {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Body */
.khalifah-body {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Prevent text from forcing strange sizing */
.khalifah-card p,
.khalifah-card h4 {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Mobile */
@media (max-width: 900px) {
    .khalifah {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .khalifah {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   Pagination
   ========================================================= */
.pagenavigation {
    margin-top: 24px;
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    width: 100%;
    box-sizing: border-box;
}

.pagenavigation .pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;   /* ← add this line */
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagenavigation .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 11px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #d9b968 0%, var(--accent) 100%) !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(200,168,75,0.3);
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pagenavigation .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(200,168,75,0.38);
    color: #fff !important;
}

.pagenavigation .btn.next {
    margin-left: auto;
}

@media (max-width: 480px) {
  .pagenavigation .pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 100%;
    /* overflow: hidden entfernt */
  }
  .pagenavigation .btn.next {
    margin-left: auto;
  }
  .pagenavigation .btn.prev {
    margin-right: auto;
  }
}

/* =========================================================
   Bread Crumb
   ========================================================= */
.breadcrumb {
    list-style: none !important;
    margin: 0 0 8px !important; /* smaller bottom margin */
    padding: 10px 20px !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    width: fit-content;
    background: #fff;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.breadcrumb li {
    display: flex !important;
    align-items: center;
    white-space: nowrap;
}

.breadcrumb a.pathway {
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.15s ease;
}

.breadcrumb a.pathway:hover {
    color: var(--accent-dark) !important;
    text-decoration: none !important;
}

.breadcrumb .divider {
    margin: 0 8px;
    color: #c7d3ea;
    font-size: 10px;
}

.breadcrumb #lastitem {
    color: var(--primary) !important;
    font-weight: 600;
}

/* =========================================================
   Full Text
   ========================================================= */
.item_fulltext {
    font-family: 'Inter', sans-serif;
}

.item_fulltext p,
.item_fulltext strong,
.item_fulltext span,
.item_fulltext em {
    font-size: inherit !important;
    font-family: inherit !important;
    color: inherit !important;
}

.item_fulltext > p:has(strong:first-child):first-of-type,
.item_fulltext p strong span[style*="18px"] {
    display: block;
}


.item_fulltext ul {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.item_fulltext ul li {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
    padding-left: 20px;
    margin-bottom: 10px;
    position: relative;
    text-align: left;
}

.item_fulltext ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.item_fulltext .activities-extra {
    background: var(--primary-tint);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin: 24px 0 20px;
}

.item_fulltext .activities-extra p {
    margin-bottom: 12px;
}

.item_fulltext .activities-extra strong {
    color: var(--primary-dark);
}

.item_fulltext .activities-extra ul {
    margin-bottom: 0;
}


.schedule-day {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.schedule-day-label {
    display: inline-block;
    background: var(--primary-tint);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.schedule-slot {
    margin-bottom: 14px;
}
.schedule-slot:last-child { margin-bottom: 0; }

.schedule-slot-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-dark);
    margin-bottom: 6px;
}

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

.schedule-slot li {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: 14px;
    position: relative;
}

.schedule-slot li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.schedule-slot .badge-new {
    display: inline-block;
    background: #fdeeee;
    color: #c0392b;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    margin-right: 6px;
    vertical-align: middle;
}

Hier das komplette, robuste CSS-Paket für dieses Grid-Konzept — inklusive Schutz gegen den Joomla-<p>-Wrapping-Fehler (das gleiche Muster, das du schon bei .header/.cards mit display: contents gelöst hast):
css

/* ============ EIGENSCHAFTEN-GRID (attr-card) ============ */

.item_fulltext .attributes-header {
    text-align: center;
    margin-bottom: 28px;
}

.item_fulltext .attributes-header .page-title {
    display: block;
    font-family: 'Amiri', serif;
    font-size: clamp(22px, 4vw, 28px);
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.item_fulltext .attributes-header .page-title.latin {
    font-family: 'Inter', sans-serif;
    font-size: clamp(18px, 3vw, 22px);
}

.item_fulltext .attributes-header .subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.item_fulltext .attributes-header audio {
    display: block;
    margin: 16px auto 0;
    max-width: 400px;
}

.attributes-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 24px;
    box-sizing: border-box !important;
}

/* Schutz: falls Joomla/TinyMCE beim Speichern einen <p>-Wrapper
   zwischen .attributes-grid und den <a class="attr-card"> einfügt
   (gleiches Problem wie bei .header/.cards mit mod-custom),
   macht display:contents den Wrapper "unsichtbar" fürs Grid-Layout. */
.attributes-grid > p {
    display: contents !important;
}

.attributes-grid .attr-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    transition: box-shadow 0.2s, transform 0.2s;
}

.attributes-grid .attr-card:hover {
    box-shadow: 0 6px 18px rgba(52,80,138,0.12);
    transform: translateY(-2px);
}

.attributes-grid .attr-thumb {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 !important;
    overflow: hidden !important;
    background: var(--primary-tint);
    flex-shrink: 0;
}

.attributes-grid .attr-thumb img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.attributes-grid .attr-number {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--primary) !important;
    color: #fff !important;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.attributes-grid .attr-label {
 padding: 6px 6px 8px;
    min-height: 36px;
    font-size: 9px;
    padding: 8px 8px 10px;
    border-top: 1px solid var(--border);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--text-main) !important;
    text-align: center;
    line-height: 1.3;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .attributes-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 640px) {
    .attributes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 420px) {
    .attributes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ============ CONTACT ICONS (Ansprechpartner) ============
   SVGs live here as background-image data URIs instead of inline
   <svg> tags in article content, because Joomla's text filter
   strips svg/path/rect/circle on save for non-Super-User groups. */

.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.contact-icon.blue { background-color: var(--primary-tint); }
.contact-icon.gold { background-color: var(--accent-tint); }

.contact-icon.icon-phone {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334508a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.contact-icon.icon-school {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a88a35' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3Cpath d='M9 7h7M9 11h7'/%3E%3C/svg%3E");
}

.contact-icon.icon-kaaba {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334508a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-1 .1-1.3.5l-.4.5c-.4.5-.2 1.2.3 1.5L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.5 1 .7 1.5.3l.5-.4c.4-.3.6-.8.5-1.3z'/%3E%3C/svg%3E");
}

.contact-icon.icon-rings {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a88a35' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}

.contact-icon.icon-person {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334508a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='5'/%3E%3Cpath d='M20 21a8 8 0 1 0-16 0'/%3E%3C/svg%3E");
}

.contact-icon.icon-mail {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: #fff;
  background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334508a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E");
}
@media (max-width: 840px) {
  .navlinks,
  .navlinks > ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
  }

  .navlinks > ul > li,
  .navlinks > ul > li > a {
    width: 100% !important;
    display: block !important;
  }
}

.navbar-logo .mark {
  font-family: 'Aref Ruqaa', 'Amiri', serif;
  font-weight: 700;
}

/* ============ CATEGORY LIST (com_content category view) ============ */

.content-category {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: clamp(20px, 4vw, 28px);
}

/* FILTER BAR */
.com-content__filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.com-content__filter .inputbox {
    flex: 1;
    min-width: 160px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-main);
    background: #fff;
    transition: border-color 0.15s ease;
}
.com-content__filter .inputbox:focus {
    outline: none;
    border-color: var(--primary-light);
}

.com-content__filter .btn {
    height: 40px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.com-content__filter .btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(52,80,138,0.25);
}
.com-content__filter .btn-primary:hover { transform: translateY(-2px); }
.com-content__filter .btn-secondary {
    background: var(--primary-tint);
    color: var(--primary);
}
.com-content__filter .btn-secondary:hover { background: #dde6f7; }

/* LIMIT / PAGE-SIZE SELECT */
.com-content-category__pagination.btn-group {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.com-content-category__pagination .form-select {
    height: 38px;
    padding: 0 32px 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-muted);
    background: #fff;
    cursor: pointer;
}

/* TABLE → CARD-LIST LOOK */
.com-content-category__table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}
.com-content-category__table thead th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    padding: 0 0 12px;
    border-bottom: 2px solid var(--primary-tint);
}
.com-content-category__table thead th a {
    color: inherit;
    text-decoration: none;
}
.com-content-category__table tbody tr {
    background: transparent !important;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}
.com-content-category__table tbody tr:hover {
    background: var(--primary-tint) !important;
}
.com-content-category__table tbody tr:last-child { border-bottom: none; }

.com-content-category__table .list-title {
    padding: 14px 8px 14px 0;
    font-weight: 400;
}
.com-content-category__table .list-title a {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}
.com-content-category__table .list-title a:hover { color: var(--primary); }

.com-content-category__table .list-hits {
    padding: 14px 0;
    text-align: right;
    width: 90px;
}
.com-content-category__table .badge.bg-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-tint) !important;
    color: var(--accent-dark) !important;
    font-size: 11px;
    font-weight: 700;
}

/* PAGINATION (category list uses <ul>, distinct from .pagenavigation) */
.com-content-category__navigation {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.pagination__wrapper .pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.pagination__wrapper .page-item { display: flex; }
.pagination__wrapper .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.pagination__wrapper .page-item:not(.disabled) .page-link:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}
.pagination__wrapper .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-color: transparent;
    color: #fff;
}
.pagination__wrapper .page-item.disabled .page-link {
    opacity: 0.4;
    cursor: default;
}

@media (max-width: 640px) {
    .com-content__filter { flex-direction: column; align-items: stretch; }
    .com-content-category__pagination.btn-group { justify-content: flex-start; }
}

/* ============ PDF-DOWNLOAD-LISTE (Mawlid & ähnliche Artikel) ============
   Trifft <p><a download>...</a></p>-Blöcke innerhalb von .item_fulltext.
   Die Inline-Styles (font-family/font-size) auf <span> werden über die
   bestehende .item_fulltext span { font-size: inherit !important } Regel
   bereits neutralisiert — hier kommt nur das Link-/Zeilen-Styling dazu. */
.item_fulltext p:has(a[download]) {
    margin-bottom: 10px;
}

.item_fulltext p:has(a[download]) a[download] {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.item_fulltext p:has(a[download]) a[download]:hover {
    box-shadow: 0 6px 20px rgba(52,80,138,0.1);
    transform: translateY(-2px);
    border-color: var(--primary-light);
    color: var(--primary);
}

.item_fulltext p:has(a[download]) a[download]::before {
    content: '';
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background-color: var(--primary-tint);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334508a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cpath d='M12 18v-6M9 15l3 3 3-3'/%3E%3C/svg%3E");
}

/* ============ KHALIFAH-BIOGRAFIE (z.B. Abû Bakr, ^Umar, etc.) ============ */

/* PORTRAIT-BILD — erstes zentriertes <p><img></p> im Artikel */
.item_fulltext > p:first-child:has(> img) {
    margin-bottom: 20px;
}
.item_fulltext > p:first-child:has(> img) img {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-tint);
    box-shadow: 0 8px 24px rgba(52,80,138,0.15);
}

/* NAMENS-BLOCK — <p style="text-align:center"><strong>Name</strong></p>
   direkt gefolgt vom Segensspruch-<p>. Trifft beide über die
   fett-gedruckte Struktur, die Joomla speichert. */
.item_fulltext p[style*="text-align: center"]:has(strong) {
    margin-bottom: 4px;
}
.item_fulltext p[style*="text-align: center"]:has(strong) strong {
    font-family: 'Amiri', serif;
    font-size: clamp(20px, 3.5vw, 26px);
    color: var(--primary-dark);
    font-weight: 700;
}

/* Der Segensspruch direkt danach (kein <strong>, aber zentriert,
   direkt nach dem Namens-Absatz) — etwas Abstand + gedämpfte Farbe */
.item_fulltext p[style*="text-align: center"]:has(strong) + p[style*="text-align: center"] {
    color: var(--accent-dark);
    font-size: 13px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

/* ARABISCHE ZITATE — zentrierte <p> mit großer arabischer Schrift
   (font-size 14pt Inline-Style), inkl. Klammern ﴾...﴿ */
.item_fulltext p[style*="text-align: center"]:has(span[style*="14pt"]) {
    font-family: 'Amiri', serif;
    font-size: clamp(18px, 3.2vw, 22px);
    line-height: 2;
    color: var(--text-main);
    background: #f9f5ee;
    border-right: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    direction: rtl;
}
.item_fulltext p[style*="text-align: center"]:has(span[style*="14pt"]) span {
    font-size: inherit !important;
    font-family: inherit !important;
}

/* "Die Bedeutung lautet" — Übersetzungs-Absätze, die direkt auf ein
   arabisches Zitat folgen: leicht abgesetzt, kursiv-gedämpft */
.item_fulltext p[style*="text-align: center"]:has(span[style*="14pt"]) + p:has(strong) {
    background: var(--primary-tint);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: -4px 0 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.item_fulltext p[style*="text-align: center"]:has(span[style*="14pt"]) + p:has(strong) strong {
    color: var(--primary-dark);
}

/* FUSSNOTEN — letzte Absätze mit href="#_ftnref..." */
.item_fulltext p:has(> a[href^="#_ftnref"]) {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}
.item_fulltext p:has(> a[href^="#_ftnref"]) a[href^="#_ftnref"] {
    position: absolute;
    left: 0;
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 600;
}

/* Leere abschließende <h2 class="caption"> ausblenden statt sichtbarer Leerzeile */
.item_fulltext h2.caption:empty {
    display: none;
}

/* Fußnoten-Referenz-Anker im Fließtext (hochgestellte [1], [2], [3]) */
.item_fulltext p span a[href^="#_ftn"]:not([href^="#_ftnref"]) {
    font-size: 10px;
    vertical-align: super;
    color: var(--accent-dark);
    text-decoration: none;
    font-weight: 700;
}

/* ============ GOLDENE-REIHE GALERIE (Tabellen mit DE/AR/TR-Bildern) ============
   Jede <table> hat Zeile 1 = Titel ("Die goldene Reihe 105"),
   Zeile 2 = drei <td> mit je einem verlinkten Bild (DE/AR/TR).
   Kein HTML-Umbau nötig — reines Tabellen-Reset + Grid-Optik via CSS. */

.item_fulltext table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Titel-Zeile (erste <tr>, erste <td> enthält den Text) */
.item_fulltext table tr:first-child {
    background: var(--primary-tint);
}
.item_fulltext table tr:first-child td {
    padding: 12px 18px !important;
    border: none !important;
}
.item_fulltext table tr:first-child td p {
    font-size: 13px !important;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 !important;
    letter-spacing: 0.2px;
}
/* leere &nbsp;-<td>-Zellen in der Titel-Zeile ausblenden */
.item_fulltext table tr:first-child td:not(:has(p)) {
    display: none;
}

/* Bild-Zeile (zweite <tr>): Grid statt starrer Tabellen-Zellen */
.item_fulltext table tr:last-child {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
}
.item_fulltext table tr:last-child td {
    padding: 0 !important;
    border: none !important;
    display: block;
}

.item_fulltext table tr:last-child td a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.item_fulltext table tr:last-child td a:hover {
    box-shadow: 0 8px 24px rgba(52,80,138,0.14);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}
.item_fulltext table tr:last-child td a img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

/* leere &nbsp;-<td>-Zellen in der Bild-Zeile ausblenden, falls vorhanden */
.item_fulltext table tr:last-child td:not(:has(a)) {
    display: none;
}

/* Sprachbeschriftung unter jedem Bild, abgeleitet aus dem title-Attribut
   des Links (z.B. "Die Goldene Reihe 105 (Deutsch)") */
.item_fulltext table tr:last-child td a::after {
    content: attr(title);
    display: block;
    padding: 8px 10px;
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-page);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .item_fulltext table tr:last-child {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px;
    }
    .item_fulltext table tr:last-child td a::after {
        font-size: 8px;
        padding: 5px 4px;
    }
}
@media (max-width: 420px) {
    .item_fulltext table tr:last-child {
        grid-template-columns: 1fr;
    }
}

/* ============ GLAUBENSBEKENNTNIS-ARTIKEL (Übertritt in den Islam) ============ */

/* Arabischer Text — nutzt die bereits vorhandene Klasse .arabisch,
   gleiche Optik wie .article-arabic im Mockup */
.item_fulltext p.arabisch {
    font-family: 'Amiri', serif;
    font-size: clamp(20px, 3.5vw, 26px);
    line-height: 2;
    color: var(--text-main);
    background: #f9f5ee;
    border-right: 4px solid var(--accent);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
    direction: rtl;
}
.item_fulltext p.arabisch strong {
    font-weight: 700;
    color: inherit;
}

/* Umschrift (Transliteration) — italic, zentriert, direkt nach .arabisch,
   zwei aufeinanderfolgende zentrierte <p><em> ohne eigene Klasse */
.item_fulltext p.arabisch + p[style*="text-align: center"],
.item_fulltext p.arabisch + p[style*="text-align: center"] + p[style*="text-align: center"] {
    font-family: 'Amiri', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 4px;
}
.item_fulltext p.arabisch + p[style*="text-align: center"] {
    margin-top: -8px;
}
.item_fulltext p.arabisch + p[style*="text-align: center"] + p[style*="text-align: center"] {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

/* "Zu Deutsch: ..." Übersetzungs-Absatz — hervorgehobene Box wie bei
   den "Die Bedeutung lautet"-Blöcken in den Khalifah-Biografien */
.item_fulltext p:has(> strong):not(.arabisch) {
    background: var(--primary-tint);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
}
.item_fulltext p:has(> strong):not(.arabisch) strong {
    color: var(--primary-dark);
}

/* Unterstrichene Betonungen im Fließtext (z.B. "keine Voraussetzungen")
   dezenter als Standard-underline, passend zur Akzentfarbe */
.item_fulltext p span[style*="underline"] {
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}