/*
 * 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; }

/* 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-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 20px; }
.card-icon.blue { background: var(--primary-tint); }
.card-icon.gold { background: var(--accent-tint); }
.card-icon.slate { background: #eef1f6; }
.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); }

/* 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:has(ul) > a::after { transform: translateY(-3px) rotate(135deg); }
}

/* ============================================================
   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. */
.card-icon.blue::before  { content: "📚"; }
.card-icon.gold::before  { content: "🏫"; }
.card-icon.slate::before { content: "👥"; }
/* 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;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.pagenavigation .pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    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 {
        flex-direction: column; /* stack Zurück/Weiter on very small screens */
    }
}

/* =========================================================
   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;
}
