/* =============================================
   GMS LEUTKIRCH – JOOMLA 5 TEMPLATE
   Gemeinschaftsschule Leutkirch im Allgäu
   Farbpalette: Grün #2E7D32, Akzent #F9A825
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Logo-Farben: Blau + Rot + Dunkelgrau */
    --gms-blue:         #2980B9;
    --gms-blue-mid:     #3498DB;
    --gms-blue-light:   #EBF3FB;
    --gms-blue-dark:    #1A5276;
    --gms-red:          #C0392B;
    --gms-red-dark:     #922B21;
    --gms-dark:         #2C3E50;
    /* Aliase damit bestehende Regeln weiter funktionieren */
    --gms-green:        #2980B9;
    --gms-green-mid:    #3498DB;
    --gms-green-light:  #EBF3FB;
    --gms-green-dark:   #1A5276;
    --gms-accent:       #C0392B;
    --gms-accent-dark:  #922B21;
    --gms-black:        #1A1A1A;
    --gms-text:         #333333;
    --gms-text-light:   #666666;
    --gms-gray:         #F5F5F5;
    --gms-gray-border:  #DEDEDE;
    --gms-white:        #FFFFFF;
    --gms-radius:       4px;
    --gms-radius-lg:    8px;
    --gms-container:    1200px;
    --gms-shadow:       0 2px 8px rgba(0,0,0,0.08);
    --gms-shadow-md:    0 4px 16px rgba(0,0,0,0.12);
}

html { scroll-behavior: smooth; }

body.gms-body {
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--gms-text);
    background: var(--gms-gray);
}

a { color: var(--gms-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gms-green-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* =============================================
   CONTAINER
   ============================================= */
.gms-container {
    max-width: var(--gms-container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =============================================
   TOP BAR
   ============================================= */
.gms-topbar {
    background: var(--gms-blue-dark);
    font-size: 12px;
}
.gms-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}
.gms-topbar-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}
.gms-topbar-link:hover { color: var(--gms-accent); text-decoration: none; }
.gms-topbar-sep { color: rgba(255,255,255,0.3); margin: 0 8px; }

/* =============================================
   HEADER
   ============================================= */
.gms-header {
    background: var(--gms-white);
    border-bottom: 4px solid var(--gms-blue);
    box-shadow: var(--gms-shadow);
}
.gms-header-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 2rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Logo */
.gms-logo a { text-decoration: none; display: block; }
.gms-logo-img {
    max-height: 110px;
    width: auto;
    display: block;
}
.gms-logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gms-logo-gms {
    font-family: 'Nunito', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: var(--gms-blue);
    line-height: 1;
    letter-spacing: -1px;
}
.gms-logo-name {
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gms-black);
    line-height: 1;
}
.gms-logo-sub {
    font-size: 12px;
    color: var(--gms-text-light);
    letter-spacing: 0.5px;
}

/* Header Slider */
.gms-header-slider {
    position: relative;
    border-radius: var(--gms-radius-lg);
    overflow: hidden;
    height: 340px;
    background: var(--gms-green-light);
    box-shadow: var(--gms-shadow);
}
.gms-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}
.gms-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}
.gms-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    display: block;
}
/* Klassenfotos (header1–4): Ausschnitt nach unten, damit die Menschen
   statt der Baumkronen im Slider zu sehen sind. header5/6 (Schultüten)
   bleiben mittig. */
.gms-slide img[src*="header1"],
.gms-slide img[src*="header2"],
.gms-slide img[src*="header3"],
.gms-slide img[src*="header4"] {
    object-position: 50% 62%;
}
.gms-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.gms-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.gms-dot.active {
    background: var(--gms-white);
    transform: scale(1.3);
}

/* =============================================
   NAVIGATION – exakt auf Joomla mod_menu HTML
   Klassen: .mod-menu .nav-item .mod-menu__sub
            .mod-menu__separator .separator
   ============================================= */
.gms-nav {
    background: var(--gms-blue);
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.gms-nav-inner {
    display: flex;
    align-items: stretch;
    position: relative;
}

/* Reset – Joomla Bootstrap-Klassen neutralisieren */
.gms-nav-wrap .mod-menu,
.gms-nav-wrap .mod-menu__sub,
.gms-nav-wrap .list-unstyled {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ---- Top-Level Liste ---- */
.gms-nav-wrap .mod-menu {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: stretch;
}

/* ---- Top-Level Items ---- */
.gms-nav-wrap .mod-menu > .nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
}

/* Top-Level: echter Link */
.gms-nav-wrap .mod-menu > .nav-item > a {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: rgba(255,255,255,0.93) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none !important;
    white-space: nowrap;
    height: 48px;
    border-bottom: 3px solid transparent;
    transition: background 0.18s, border-color 0.18s;
}
.gms-nav-wrap .mod-menu > .nav-item > a:hover,
.gms-nav-wrap .mod-menu > .nav-item.active:not(.default) > a,
.gms-nav-wrap .mod-menu > .nav-item.current > a {
    background: rgba(0,0,0,0.2);
    color: #fff !important;
    border-bottom-color: var(--gms-red);
    text-decoration: none !important;
}

/* Top-Level: Separator (kein Link, z.B. "Service", "Unsere Schule") */
.gms-nav-wrap .mod-menu > .nav-item > span.mod-menu__separator,
.gms-nav-wrap .mod-menu > .nav-item > .separator {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    color: rgba(255,255,255,0.93);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    height: 48px;
    border-bottom: 3px solid transparent;
    cursor: default;
    transition: background 0.18s;
}
/* Separator verhält sich wie ein Link beim Hover (Dropdown öffnet) */
.gms-nav-wrap .mod-menu > .nav-item.divider:hover > span.mod-menu__separator,
.gms-nav-wrap .mod-menu > .nav-item.divider:focus-within > span.mod-menu__separator {
    background: rgba(0,0,0,0.2);
    color: #fff;
    border-bottom-color: var(--gms-red);
}

/* ---- Dropdown (1. Ebene) ---- */
.gms-nav-wrap .mod-menu > .nav-item > .mod-menu__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--gms-white);
    min-width: 240px;
    border-top: 3px solid var(--gms-red);
    border-radius: 0 0 var(--gms-radius) var(--gms-radius);
    box-shadow: var(--gms-shadow-md);
    z-index: 700;
    flex-direction: column;
}
.gms-nav-wrap .mod-menu > .nav-item:hover > .mod-menu__sub,
.gms-nav-wrap .mod-menu > .nav-item:focus-within > .mod-menu__sub {
    display: flex !important;
}

/* Dropdown Items */
.gms-nav-wrap .mod-menu__sub > .nav-item {
    position: relative;
    display: block;
}
/* Dropdown: echter Link */
.gms-nav-wrap .mod-menu__sub > .nav-item > a {
    display: block;
    padding: 9px 16px;
    color: var(--gms-text) !important;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none !important;
    border-bottom: 0.5px solid var(--gms-gray-border);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.gms-nav-wrap .mod-menu__sub > .nav-item > a:hover,
.gms-nav-wrap .mod-menu__sub > .nav-item.active:not(.default) > a,
.gms-nav-wrap .mod-menu__sub > .nav-item.current > a {
    background: var(--gms-blue-light);
    color: var(--gms-blue-dark) !important;
    text-decoration: none !important;
}
/* Dropdown: Separator als Gruppenüberschrift */
.gms-nav-wrap .mod-menu__sub > .nav-item > span.mod-menu__separator,
.gms-nav-wrap .mod-menu__sub > .nav-item > .separator {
    display: block;
    padding: 8px 16px 4px;
    color: var(--gms-blue-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 0.5px solid var(--gms-gray-border);
    background: var(--gms-blue-light);
    cursor: default;
}

/* ---- 3. Ebene (flyout rechts) ---- */
.gms-nav-wrap .mod-menu__sub > .nav-item > .mod-menu__sub {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: var(--gms-white);
    min-width: 220px;
    border-top: 3px solid var(--gms-blue);
    border-radius: 0 0 var(--gms-radius) var(--gms-radius);
    box-shadow: var(--gms-shadow-md);
    z-index: 800;
    flex-direction: column;
}
.gms-nav-wrap .mod-menu__sub > .nav-item:hover > .mod-menu__sub,
.gms-nav-wrap .mod-menu__sub > .nav-item:focus-within > .mod-menu__sub {
    display: flex !important;
}

/* ---- Mobile Toggle ---- */
.gms-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px 0;
    margin-left: auto;
}
.gms-nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--gms-white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.gms-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gms-nav-toggle.open span:nth-child(2) { opacity: 0; }
.gms-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* =============================================
   BREADCRUMB
   ============================================= */
.gms-breadcrumb {
    background: var(--gms-white);
    border-bottom: 0.5px solid var(--gms-gray-border);
    padding: 0.5rem 0;
    font-size: 13px;
    color: var(--gms-text-light);
}
.gms-breadcrumb a { color: var(--gms-text-light); }
.gms-breadcrumb a:hover { color: var(--gms-green); text-decoration: none; }
.gms-breadcrumb .breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 0; }
.gms-breadcrumb .breadcrumb-item + .breadcrumb-item::before { content: " › "; padding: 0 6px; color: var(--gms-gray-border); }

/* =============================================
   MAIN LAYOUT
   ============================================= */
.gms-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
    align-items: start;
}
.gms-wrapper:has(.gms-sidebar-left):not(:has(.gms-sidebar-right)) {
    grid-template-columns: 240px 1fr;
}
.gms-wrapper:has(.gms-sidebar-right):not(:has(.gms-sidebar-left)) {
    grid-template-columns: 1fr 280px;
}
.gms-wrapper:has(.gms-sidebar-left):has(.gms-sidebar-right) {
    grid-template-columns: 220px 1fr 260px;
}

/* Main content */
.gms-main {
    background: var(--gms-white);
    border-radius: var(--gms-radius-lg);
    padding: 2rem;
    box-shadow: var(--gms-shadow);
    min-width: 0;
}
.gms-main-top { margin-bottom: 1.5rem; }

/* Sidebar */
.gms-sidebar { min-width: 0; }

.gms-sidebar .moduletable {
    background: var(--gms-white);
    border-radius: var(--gms-radius-lg);
    box-shadow: var(--gms-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.gms-sidebar .moduletable h3,
.gms-sidebar .moduletable .module-title {
    background: var(--gms-blue);
    color: var(--gms-white);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 10px 16px;
    margin: 0;
    border-bottom: 3px solid var(--gms-red);
}
.gms-sidebar .moduletable > *:not(h3):not(.module-title) {
    padding: 1rem;
}

/* =============================================
   ARTICLE / CONTENT STYLES
   ============================================= */
.gms-main h1 { font-size: 26px; font-weight: 700; color: var(--gms-blue-dark); margin-bottom: 0.5rem; }
.gms-main h2 { font-size: 21px; font-weight: 600; color: var(--gms-blue); margin: 1.5rem 0 0.5rem; }
.gms-main h3 { font-size: 17px; font-weight: 600; color: var(--gms-black); margin: 1.25rem 0 0.5rem; }
.gms-main h4 { font-size: 15px; font-weight: 600; margin: 1rem 0 0.4rem; }

.gms-main p { margin-bottom: 1rem; }
.gms-main ul, .gms-main ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.gms-main li { margin-bottom: 0.25rem; }
.gms-main table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 14px; }
.gms-main th { background: var(--gms-blue); color: var(--gms-white); padding: 10px 12px; text-align: left; font-weight: 600; }
.gms-main td { padding: 9px 12px; border-bottom: 0.5px solid var(--gms-gray-border); }
.gms-main tr:nth-child(even) td { background: var(--gms-blue-light); }

/* Article info bar */
.gms-main .article-info,
.gms-main .article-header-info {
    font-size: 12px;
    color: var(--gms-text-light);
    padding: 8px 0 12px;
    border-bottom: 0.5px solid var(--gms-gray-border);
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}
.gms-main .article-info .label {
    background: var(--gms-blue-light);
    color: var(--gms-blue-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

/* Read More */
.gms-main .readmore a {
    display: inline-block;
    background: var(--gms-blue);
    color: var(--gms-white);
    padding: 8px 18px;
    border-radius: var(--gms-radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: background 0.2s;
}
.gms-main .readmore a:hover { background: var(--gms-green-dark); text-decoration: none; }

/* Blog / Article List
   Deckt die Joomla-Layouts ab:
   - Kategorie-Blog:          com-content-category-blog__items / __item
   - Hervorgehobene Beiträge: com-content-featured__items / __item
   Spalten-Klasse: Joomla 5 gibt je nach Version "masonry-N" ODER "columns-N" aus. */
.gms-main .com-content-category-blog__items,
.gms-main .com-content-featured__items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.gms-main .com-content-category-blog__items.columns-2,
.gms-main .com-content-category-blog__items.masonry-2,
.gms-main .com-content-featured__items.columns-2,
.gms-main .com-content-featured__items.masonry-2 { grid-template-columns: repeat(2, 1fr); }
.gms-main .com-content-category-blog__items.columns-3,
.gms-main .com-content-category-blog__items.masonry-3,
.gms-main .com-content-featured__items.columns-3,
.gms-main .com-content-featured__items.masonry-3 { grid-template-columns: repeat(3, 1fr); }
.gms-main .com-content-category-blog__items.columns-4,
.gms-main .com-content-category-blog__items.masonry-4,
.gms-main .com-content-featured__items.columns-4,
.gms-main .com-content-featured__items.masonry-4 { grid-template-columns: repeat(4, 1fr); }
.gms-main .com-content-category-blog__items.columns-5,
.gms-main .com-content-category-blog__items.masonry-5,
.gms-main .com-content-featured__items.columns-5,
.gms-main .com-content-featured__items.masonry-5 { grid-template-columns: repeat(5, 1fr); }
.gms-main .com-content-category-blog__items.columns-6,
.gms-main .com-content-category-blog__items.masonry-6,
.gms-main .com-content-featured__items.columns-6,
.gms-main .com-content-featured__items.masonry-6 { grid-template-columns: repeat(6, 1fr); }

.gms-main .com-content-category-blog__item,
.gms-main .com-content-featured__item {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 0.5px solid var(--gms-gray-border);
    border-radius: var(--gms-radius-lg);
    overflow: hidden;
    background: var(--gms-white);
    box-shadow: var(--gms-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.gms-main .com-content-category-blog__item:hover,
.gms-main .com-content-featured__item:hover {
    box-shadow: var(--gms-shadow-md);
    transform: translateY(-2px);
}
.gms-main .com-content-category-blog__item .item-image,
.gms-main .com-content-featured__item .item-image { border-bottom: 3px solid var(--gms-red); }
.gms-main .com-content-category-blog__item .item-image img,
.gms-main .com-content-featured__item .item-image img { width: 100%; height: 160px; object-fit: cover; }
/* Beitragsbilder mit abgerundeten Ecken (Bild liegt i.d.R. in item-content > p > img,
   ohne eigene .item-image-Klasse) */
.gms-main .com-content-category-blog__item img,
.gms-main .com-content-featured__item img {
    border-radius: var(--gms-radius-lg);
}
.gms-main .com-content-category-blog__item .item-title,
.gms-main .com-content-category-blog__item .page-header,
.gms-main .com-content-featured__item .item-title,
.gms-main .com-content-featured__item .page-header {
    font-size: 15px;
    font-weight: 600;
    padding: 0.75rem 1rem 0.25rem;
}
.gms-main .com-content-category-blog__item .item-title a,
.gms-main .com-content-featured__item .item-title a { color: var(--gms-blue-dark); text-decoration: none; }
.gms-main .com-content-category-blog__item .item-title a:hover,
.gms-main .com-content-featured__item .item-title a:hover { color: var(--gms-blue); }
.gms-main .com-content-category-blog__item .article-info,
.gms-main .com-content-featured__item .article-info { padding: 0 1rem; margin: 0; border: none; }
.gms-main .com-content-category-blog__item .item-content,
.gms-main .com-content-featured__item .item-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 0.75rem 1rem 1rem;
}
.gms-main .com-content-category-blog__item p,
.gms-main .com-content-featured__item p { font-size: 14px; }
.gms-main .com-content-category-blog__item .readmore,
.gms-main .com-content-featured__item .readmore {
    margin-top: auto;
    padding: 0.5rem 0 0;
}
/* Chevron im „Weiterlesen"-Button als Textzeichen (die Icon-Schrift wird nicht geladen) */
.gms-main .readmore a [class*="icon-"] { font-family: Arial, "DejaVu Sans", sans-serif !important; }
.gms-main .readmore a [class*="icon-"]::before { content: "\00A0\203A"; font-weight: 700; } /* › */

/* --- Beitragskarten: Vorschaubild oben + ansprechendere Optik ---------------
   Ein im Editor eingefügtes Beitragsbild rutscht automatisch nach oben und wird
   zum randlosen Vorschaubild der Karte (über Titel und Text). Zusätzlich:
   weicherer Schatten, sanftes Anheben und ein leichter Bild-Zoom beim Überfahren.
   Hinweis: nutzt den modernen CSS-Selektor :has() (alle aktuellen Browser). */
.gms-main .com-content-category-blog__item,
.gms-main .com-content-featured__item {
    border: 1px solid var(--gms-gray-border);
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(26, 82, 118, 0.07);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.gms-main .com-content-category-blog__item:hover,
.gms-main .com-content-featured__item:hover {
    box-shadow: 0 12px 28px rgba(26, 82, 118, 0.16);
    transform: translateY(-4px);
}
.gms-main .com-content-category-blog__item .item-content,
.gms-main .com-content-featured__item .item-content {
    padding: 0.9rem 1.1rem 1.1rem;
}
/* erstes Beitragsbild -> randloses Vorschaubild ganz oben.
   Greift unabhängig davon, ob das Bild im Editor in <p>, <h3>, <figure> o. Ä. liegt. */
.gms-main .com-content-category-blog__item .item-content > *:has(> img),
.gms-main .com-content-featured__item .item-content > *:has(> img) {
    order: -1;
    margin: -0.9rem -1.1rem 0.9rem;
    overflow: hidden;
    line-height: 0;
    border-bottom: 3px solid var(--gms-red);
}
.gms-main .com-content-category-blog__item .item-content > *:has(> img) > img,
.gms-main .com-content-featured__item .item-content > *:has(> img) > img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 0;
    display: block;
    margin: 0;
    transition: transform 0.35s ease;
}
.gms-main .com-content-category-blog__item:hover .item-content > *:has(> img) > img,
.gms-main .com-content-featured__item:hover .item-content > *:has(> img) > img {
    transform: scale(1.06);
}
/* Kartentitel (Joomla gibt hier i.d.R. eine schlichte Überschrift aus) */
.gms-main .com-content-category-blog__item .item-content > h2,
.gms-main .com-content-category-blog__item .item-content > h3,
.gms-main .com-content-featured__item .item-content > h2,
.gms-main .com-content-featured__item .item-content > h3 {
    color: var(--gms-blue-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.4rem;
}
.gms-main .com-content-category-blog__item .item-content > h2 a,
.gms-main .com-content-category-blog__item .item-content > h3 a,
.gms-main .com-content-featured__item .item-content > h2 a,
.gms-main .com-content-featured__item .item-content > h3 a { color: inherit; text-decoration: none; }
.gms-main .com-content-category-blog__item .item-content > h2 a:hover,
.gms-main .com-content-category-blog__item .item-content > h3 a:hover,
.gms-main .com-content-featured__item .item-content > h2 a:hover,
.gms-main .com-content-featured__item .item-content > h3 a:hover { color: var(--gms-blue); }
.gms-main .com-content-category-blog__item .item-content p,
.gms-main .com-content-featured__item .item-content p { color: #4b5563; line-height: 1.6; }

/* Pagination */
.gms-main .pagination,
.gms-main nav[aria-label="Seitennavigation"] ol {
    display: flex;
    gap: 4px;
    list-style: none;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 0;
}
.gms-main .pagination li a,
.gms-main .pagination li span {
    display: inline-block;
    padding: 6px 12px;
    border: 0.5px solid var(--gms-gray-border);
    border-radius: var(--gms-radius);
    font-size: 13px;
    color: var(--gms-text);
    text-decoration: none;
}
.gms-main .pagination li.active span,
.gms-main .pagination li a:hover {
    background: var(--gms-blue);
    border-color: var(--gms-blue);
    color: var(--gms-white);
}
/* Pfeile (Erste / Zurück / Weiter / Letzte) zuverlässig anzeigen –
   unabhängig von der Icon-Schrift, als echte Textzeichen.
   Deckt die üblichen Joomla-Icon-Klassen ab. */
.gms-main .pagination [class*="icon-"] {
    font-family: Arial, "DejaVu Sans", sans-serif !important;
    line-height: 1;
}
.gms-main .pagination [class*="icon-"]::before {
    font-family: inherit !important;
    font-weight: 700;
}
.gms-main .pagination [class*="angle-double-left"]::before,
.gms-main .pagination [class*="icon-first"]::before,
.gms-main .pagination [class*="icon-backward"]::before { content: "\00AB" !important; } /* « */
.gms-main .pagination [class*="angle-left"]::before,
.gms-main .pagination [class*="icon-previous"]::before,
.gms-main .pagination [class*="chevron-left"]::before,
.gms-main .pagination [class*="arrow-left"]::before { content: "\2039" !important; } /* ‹ */
.gms-main .pagination [class*="angle-right"]::before,
.gms-main .pagination [class*="icon-next"]::before,
.gms-main .pagination [class*="chevron-right"]::before,
.gms-main .pagination [class*="arrow-right"]::before { content: "\203A" !important; } /* › */
.gms-main .pagination [class*="angle-double-right"]::before,
.gms-main .pagination [class*="icon-last"]::before,
.gms-main .pagination [class*="icon-forward"]::before { content: "\00BB" !important; } /* » */

/* Forms */
.gms-main label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 4px; }
.gms-main input[type="text"],
.gms-main input[type="email"],
.gms-main input[type="tel"],
.gms-main textarea,
.gms-main select {
    width: 100%;
    border: 1px solid var(--gms-gray-border);
    border-radius: var(--gms-radius);
    padding: 9px 12px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 1rem;
    background: var(--gms-white);
    color: var(--gms-text);
    transition: border-color 0.2s;
}
.gms-main input:focus,
.gms-main textarea:focus {
    outline: none;
    border-color: var(--gms-blue);
    box-shadow: 0 0 0 3px rgba(41,128,185,0.15);
}
.gms-main button[type="submit"],
.gms-main input[type="submit"] {
    background: var(--gms-blue);
    color: var(--gms-white);
    border: none;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--gms-radius);
    cursor: pointer;
    transition: background 0.2s;
}
.gms-main button[type="submit"]:hover { background: var(--gms-green-dark); }

/* Alerts */
.alert { padding: 1rem 1.25rem; border-radius: var(--gms-radius); margin-bottom: 1rem; font-size: 14px; }
.alert-success { background: #e8f5e9; color: #1b5e20; border-left: 4px solid var(--gms-green); }
.alert-warning { background: #fff8e1; color: #e65100; border-left: 4px solid var(--gms-accent); }
.alert-error, .alert-danger { background: #ffebee; color: #b71c1c; border-left: 4px solid #ef5350; }
.alert-info { background: #e3f2fd; color: #0d47a1; border-left: 4px solid #1976D2; }

/* =============================================
   CONTENT TOP / BOTTOM
   ============================================= */
.gms-content-top, .gms-content-bottom {
    background: var(--gms-white);
    border-top: 0.5px solid var(--gms-gray-border);
    padding: 1.5rem 0;
}

/* =============================================
   FOOTER
   ============================================= */
.gms-footer { background: var(--gms-blue-dark); margin-top: 0; }
.gms-footer-top { padding: 3rem 0 2rem; border-bottom: 0.5px solid rgba(255,255,255,0.1); }
.gms-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
}
.gms-footer-logo {
    font-family: 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--gms-white);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.gms-footer-col p,
.gms-footer-col a {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    line-height: 2;
    display: block;
    text-decoration: none;
}
.gms-footer-col a:hover { color: var(--gms-accent); text-decoration: none; }
.gms-footer-title {
    color: #F4A62A;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.gms-footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 1rem 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}
.gms-footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.gms-footer-bottom a:hover { color: var(--gms-accent); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
    .gms-header-inner {
        grid-template-columns: 180px 1fr;
        gap: 1rem;
    }
    .gms-header-slider { height: 260px; }
    .gms-logo-img { max-height: 90px; }

    .gms-wrapper,
    .gms-wrapper:has(.gms-sidebar-left):not(:has(.gms-sidebar-right)),
    .gms-wrapper:has(.gms-sidebar-right):not(:has(.gms-sidebar-left)),
    .gms-wrapper:has(.gms-sidebar-left):has(.gms-sidebar-right) {
        grid-template-columns: 1fr;
    }
    .gms-sidebar-left { order: 2; }
    .gms-main { order: 1; }
    .gms-sidebar-right { order: 3; }

    .gms-main .com-content-category-blog__items.columns-3,
    .gms-main .com-content-category-blog__items.columns-4,
    .gms-main .com-content-category-blog__items.columns-5,
    .gms-main .com-content-category-blog__items.columns-6,
    .gms-main .com-content-category-blog__items.masonry-3,
    .gms-main .com-content-category-blog__items.masonry-4,
    .gms-main .com-content-category-blog__items.masonry-5,
    .gms-main .com-content-category-blog__items.masonry-6,
    .gms-main .com-content-featured__items.columns-3,
    .gms-main .com-content-featured__items.columns-4,
    .gms-main .com-content-featured__items.columns-5,
    .gms-main .com-content-featured__items.columns-6,
    .gms-main .com-content-featured__items.masonry-3,
    .gms-main .com-content-featured__items.masonry-4,
    .gms-main .com-content-featured__items.masonry-5,
    .gms-main .com-content-featured__items.masonry-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .gms-topbar-left .gms-topbar-sep:last-of-type,
    .gms-topbar-left .gms-topbar-link:last-child { display: none; }
    .gms-header-inner { grid-template-columns: 1fr; gap: 0.75rem; }
    /* Definierte Höhe für die GESAMTE Kette inkl. Bild. Auf manchen Handys
       löst sich die vererbte height:100% nicht auf, dann nimmt das Bild seine
       natürliche Höhe an → Box wird hochkant und schneidet das Querformat
       seitlich ab. Eine feste vw-Höhe direkt auf jedem Element verhindert das,
       sodass die volle Bildbreite (alle Kinder) sichtbar bleibt. */
    .gms-header-slider,
    .gms-header-slider .gms-slider-track,
    .gms-header-slider .gms-slide,
    .gms-header-slider .gms-slide img {
        height: 65vw;
        max-height: 300px;
    }
    .gms-logo-img { max-height: 70px; }
    .gms-logo-gms { font-size: 32px; }

    .gms-nav-toggle { display: flex; }
    .gms-nav-wrap {
        display: none;
        width: 100%;
        background: var(--gms-blue-dark);
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        z-index: 600;
        border-top: 2px solid var(--gms-red);
        box-shadow: var(--gms-shadow-md);
        max-height: 80vh;
        overflow-y: auto;
    }
    .gms-nav-wrap.open { display: block; }
    .gms-nav-inner { flex-wrap: wrap; position: relative; }

    /* Mobile: Top-Level Liste vertikal */
    .gms-nav-wrap .mod-menu {
        flex-direction: column !important;
        padding: 0.5rem 0 !important;
    }
    .gms-nav-wrap .mod-menu > .nav-item { display: block; }

    /* Mobile: Top-Level Links & Separatoren */
    .gms-nav-wrap .mod-menu > .nav-item > a,
    .gms-nav-wrap .mod-menu > .nav-item > span.mod-menu__separator {
        height: auto !important;
        line-height: 1.4 !important;
        padding: 10px 1.5rem !important;
        border-bottom: 0.5px solid rgba(255,255,255,0.08) !important;
        border-left: none !important;
        width: 100%;
    }

    /* Mobile: Dropdowns statisch (ausklappbar) */
    .gms-nav-wrap .mod-menu > .nav-item > .mod-menu__sub,
    .gms-nav-wrap .mod-menu__sub > .nav-item > .mod-menu__sub {
        position: static !important;
        box-shadow: none !important;
        border-top: none !important;
        border-radius: 0 !important;
        background: rgba(0,0,0,0.25) !important;
        display: none;
        flex-direction: column;
        min-width: 0 !important;
    }
    .gms-nav-wrap .mod-menu > .nav-item.mob-open > .mod-menu__sub,
    .gms-nav-wrap .mod-menu__sub > .nav-item.mob-open > .mod-menu__sub {
        display: flex !important;
    }
    .gms-nav-wrap .mod-menu__sub > .nav-item > a {
        color: rgba(255,255,255,0.82) !important;
        background: transparent !important;
        padding-left: 2.5rem !important;
        border-bottom-color: rgba(255,255,255,0.06) !important;
    }
    .gms-nav-wrap .mod-menu__sub > .nav-item > a:hover {
        color: #fff !important;
        background: rgba(255,255,255,0.07) !important;
    }
    .gms-nav-wrap .mod-menu__sub > .nav-item > span.mod-menu__separator {
        color: rgba(255,255,255,0.5) !important;
        background: transparent !important;
        padding-left: 2.5rem !important;
        font-size: 11px;
    }
    /* 3rd level mobile */
    .gms-nav-wrap .mod-menu__sub .mod-menu__sub > .nav-item > a {
        padding-left: 3.5rem !important;
    }

    .gms-main { padding: 1.25rem; }
    .gms-footer-grid { grid-template-columns: 1fr 1fr; }

    .gms-main .com-content-category-blog__items,
    .gms-main .com-content-featured__items {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 420px) {
    .gms-footer-grid { grid-template-columns: 1fr; }
    .gms-topbar-inner { justify-content: center; }
    .gms-topbar-right { display: none; }
}

/* Print */
.gms-print .gms-topbar,
.gms-print .gms-header,
.gms-print .gms-nav,
.gms-print .gms-breadcrumb,
.gms-print .gms-sidebar,
.gms-print .gms-footer { display: none; }
.gms-print .gms-wrapper { display: block; padding: 0; }
.gms-print .gms-main { box-shadow: none; padding: 0; }

/* =========================================================
   jDownloads – Downloadseite als Karten-Raster
   HTML dazu: jDownloads-Backend → Layouts → Files-Layout
   (jede Datei wird in <div class="gms-jd-card"> ausgegeben)
   ========================================================= */

/* Das Raster greift auf zwei Wegen:
   1) deterministisch über einen Wrapper .gms-jd-grid um die Dateiliste
   2) automatisch, sobald >=2 Karten direkte Geschwister sind
   (das "~ .gms-jd-card" stellt sicher, dass NICHT einzelne
    Datei-Wrapper zu Mini-Rastern werden) */
.gms-main .gms-jd-grid,
.gms-main *:has(> .gms-jd-card ~ .gms-jd-card) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin: 1.25rem 0 2rem;
    padding: 0;
    list-style: none;
}

.gms-main .gms-jd-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--gms-white);
    border: 0.5px solid var(--gms-gray-border);
    border-top: 3px solid var(--gms-red);
    border-radius: var(--gms-radius-lg);
    padding: 1rem;
    box-shadow: var(--gms-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.gms-main .gms-jd-card:hover {
    box-shadow: var(--gms-shadow-md);
    transform: translateY(-2px);
}

/* Dateityp-Icon (jDownloads liefert über {file_pic} das Extension-Bild) */
.gms-main .gms-jd-card__icon {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--gms-radius);
    background: var(--gms-blue-light);
    overflow: hidden;
}
.gms-main .gms-jd-card__icon img {
    max-width: 32px;
    max-height: 32px;
    width: auto;
    height: auto;
}

.gms-main .gms-jd-card__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--gms-blue-dark);
}
.gms-main .gms-jd-card__title a { color: inherit; text-decoration: none; }
.gms-main .gms-jd-card__title a:hover { color: var(--gms-blue); }

.gms-main .gms-jd-card__meta {
    font-size: 12px;
    color: var(--gms-text-light);
}

/* Download-Button: jDownloads-Ausgabe an den GMS-Stil angleichen */
.gms-main .gms-jd-card__btn { margin-top: auto; }
.gms-main .gms-jd-card__btn a,
.gms-main .gms-jd-card__btn button,
.gms-main .gms-jd-card__btn input[type="button"],
.gms-main .gms-jd-card__btn input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: var(--gms-blue);
    color: #fff !important;
    border: none;
    border-radius: var(--gms-radius);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.gms-main .gms-jd-card__btn a:hover,
.gms-main .gms-jd-card__btn button:hover,
.gms-main .gms-jd-card__btn input[type="button"]:hover,
.gms-main .gms-jd-card__btn input[type="submit"]:hover {
    background: var(--gms-blue-dark);
}

/* =========================================================
   jDownloads – Kategorie-Übersicht als Kacheln
   HTML dazu: jDownloads-Backend → Layouts → Categories-Layout
   (jede Kategorie wird als <a class="gms-jd-cat-card"> ausgegeben)
   ========================================================= */

/* Raster für die Kategorie-Kacheln (zwei Wege wie bei den Datei-Karten) */
.gms-main .gms-jd-cat-grid,
.gms-main *:has(> .gms-jd-cat-card ~ .gms-jd-cat-card) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 2rem;
    padding: 0;
    list-style: none;
}

.gms-main .gms-jd-cat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--gms-white);
    border: 0.5px solid var(--gms-gray-border);
    border-left: 3px solid var(--gms-blue);
    border-radius: var(--gms-radius-lg);
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    box-shadow: var(--gms-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.gms-main .gms-jd-cat-card:hover {
    box-shadow: var(--gms-shadow-md);
    transform: translateY(-2px);
}

/* Ordner-Icon (per CSS, ohne Abhängigkeit von einer Icon-Schrift) */
.gms-main .gms-jd-cat-card__icon {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: var(--gms-radius);
    background: var(--gms-blue-light) center/26px no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232980B9'%3E%3Cpath d='M10 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z'/%3E%3C/svg%3E");
}

.gms-main .gms-jd-cat-card__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.gms-main .gms-jd-cat-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gms-blue-dark);
    line-height: 1.3;
}
.gms-main .gms-jd-cat-card__meta {
    font-size: 12px;
    color: var(--gms-text-light);
}

/* Bestehende einfache Variante bleibt nutzbar */
.gms-main .gms-jd-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gms-blue-light);
    border: 0.5px solid var(--gms-gray-border);
    border-radius: var(--gms-radius-lg);
    padding: 0.85rem 1rem;
    color: var(--gms-blue-dark);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.gms-main .gms-jd-cat:hover { background: #dcebfa; }

/* ---------------------------------------------------------
   jDownloads Standard-Layout → GMS-Kacheln (ohne Layout-Eingriff)
   Geprüft an der echten Ausgabe: Kategorien stehen als
   .jd_cat_main-Blöcke direkt in .jd-item-page; Titel/Zähler
   sind per float angeordnet. Wir lösen die Floats auf und
   legen die Blöcke als Karten in ein Raster.
   --------------------------------------------------------- */

/* Raster nur auf der Übersicht (wenn >=2 Kategorie-Blöcke vorhanden);
   alle Nicht-Kategorie-Elemente (Navi, Kopf, Footer) volle Breite */
.gms-main .jd-item-page:has(> [class*="jd_cat_main"] ~ [class*="jd_cat_main"]) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    align-items: start;
}
.gms-main .jd-item-page:has(> [class*="jd_cat_main"] ~ [class*="jd_cat_main"]) > *:not([class*="jd_cat_main"]) {
    grid-column: 1 / -1;
}

/* Kategorie = Karte */
.gms-main [class*="jd_cat_main"] {
    margin: 0 !important;
    background: var(--gms-white);
    border: 0.5px solid var(--gms-gray-border);
    border-left: 3px solid var(--gms-blue);
    border-radius: var(--gms-radius-lg);
    padding: 1rem 1.1rem;
    box-shadow: var(--gms-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}
.gms-main [class*="jd_cat_main"]:hover {
    box-shadow: var(--gms-shadow-md);
    transform: translateY(-2px);
}

/* Float-Layout der Standardausgabe auflösen: Titel oben, Zähler darunter */
.gms-main [class*="jd_categories_title"] {
    float: none !important;
    font-size: 16px;
    font-weight: 600;
}
.gms-main [class*="jd_categories_title"] img {
    height: 30px;
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}
.gms-main [class*="jd_categories_title"] a {
    color: var(--gms-blue-dark);
    text-decoration: none;
    vertical-align: middle;
}
.gms-main [class*="jd_categories_title"] a:hover { color: var(--gms-blue); }

.gms-main [class*="jd_categories_inner_wrapper"] {
    float: none !important;
    margin-top: 8px;
}
.gms-main [class*="jd_cats_sum_subcats"],
.gms-main [class*="jd_cats_sum_files"] {
    float: none !important;
    display: inline-block;
    font-size: 12px;
    color: var(--gms-text-light);
    margin-right: 12px;
}
.gms-main [class*="jd_cat_description"] {
    font-size: 13px;
    color: var(--gms-text);
    margin-top: 6px;
}
.gms-main .jd_clear_left { display: none !important; }

/* Verlauf-Buttons (Übersicht / Suchen / Zurück) flach machen –
   echte Klasse ist .jdbutton */
.gms-main .jdbutton:not(.jstatus),
.gms-main span.jdbutton:not(.jstatus) {
    background: var(--gms-blue) !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--gms-radius) !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    display: inline-block;
    cursor: pointer;
    transition: background 0.2s;
}
.gms-main .jdbutton:hover { background: var(--gms-blue-dark) !important; }

/* „Powered by jDownloads" ausblenden.
   Achtung: im href steht "jDownloads.com" (großes D) – daher der
   case-insensitive Selektor [... i]. Es wird gezielt nur der
   Powered-by-Footer ausgeblendet, nicht die Zurück-Navigation. */
.gms-main a[href*="jdownloads.com" i],
.gms-main .jd_footer:has(> a[href*="jdownloads.com" i]),
.gms-main .jd_copyright {
    display: none !important;
}

/* ---------------------------------------------------------
   jDownloads Bootstrap-5-Layout: Datei-Einträge als GMS-Karten
   Geprüft an der echten Ausgabe der Kategorieseite:
   .my-2 > div(ohne Klasse) > .jd_left / .jd_download_url / .jd_rating
   (jd_left float:left, Download-Button/Rating float:right – wir lösen
    die Floats auf und legen die Dateien als Karten ins Raster)
   --------------------------------------------------------- */
.gms-main .my-2:has(> div > .jd_left) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    align-items: start;
}
.gms-main .my-2:has(> div > .jd_left) > .jd_files_title39 {
    grid-column: 1 / -1;
    font-weight: 600;
    color: var(--gms-blue-dark);
    margin-bottom: 0.25rem;
}

/* Datei = Karte (klassenloser Container mit .jd_left als Kind) */
.gms-main .my-2 > div:has(> .jd_left) {
    background: var(--gms-white);
    border: 0.5px solid var(--gms-gray-border);
    border-left: 3px solid var(--gms-red);
    border-radius: var(--gms-radius-lg);
    padding: 1rem;
    box-shadow: var(--gms-shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.gms-main .my-2 > div:has(> .jd_left):hover {
    box-shadow: var(--gms-shadow-md);
    transform: translateY(-2px);
}

/* Floats auflösen, Inhalt sauber stapeln */
.gms-main .jd_left {
    float: none !important;
    width: auto !important;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.gms-main .jd_left img { width: 32px; height: 32px; object-fit: contain; }
.gms-main .jd_left b { font-size: 14px; font-weight: 600; }
.gms-main .jd_left b a { color: var(--gms-blue-dark); text-decoration: none; }
.gms-main .jd_left b a:hover { color: var(--gms-blue); }

.gms-main .jd_download_url {
    float: none !important;
    width: 100% !important;
    margin-top: auto;
}
.gms-main .jd_download_url .jdbutton { width: 100%; }

.gms-main .jd_rating { float: none !important; width: auto !important; }
.gms-main .jd_clear { display: none !important; }

/* Status-Badge „Neu" als kleines grünes Pill (nicht als blauer Button) */
.gms-main .jdbutton.jstatus {
    background: #2e7d32 !important;
    background-image: none !important;
    color: #fff !important;
    padding: 2px 8px !important;
    font-size: 11px !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* ---------------------------------------------------------
   Kontakt-Komponente (com_contact): Label + Wert in einer Zeile
   Standardmäßig stehen dt (Telefon:/Fax:) und dd (Nummer)
   untereinander. Hier paarweise nebeneinander; jede Zeile
   beginnt mit ihrem Label, die Adresse bleibt eigenständig.
   --------------------------------------------------------- */
.gms-main .com-contact__address dt,
.gms-main .com-contact__address dd {
    display: inline;
    margin: 0;
}
.gms-main .com-contact__address dd { margin-left: 0.35em; }
.gms-main .com-contact__address dt:not(:first-child)::before {
    content: "\A";
    white-space: pre;
}


/* ====================================================================
   Login-Seite (com_users) – GMS-Style
   Eng auf .com-users-login begrenzt, betrifft keine anderen Formulare.
   ==================================================================== */

/* Karte */
.com-users-login.login{
  max-width: 430px;
  margin: 34px auto 56px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-top: 4px solid var(--gms-blue, #2980B9);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(26,82,118,.10);
  overflow: hidden;
}

/* Optionale Seitenüberschrift ("Anmelden") mittig */
main#content .page-header{ text-align: center; }
main#content .page-header h1,
main#content .page-header h2{
  color: var(--gms-blue-dark, #1A5276);
  font-size: 22px;
  margin-bottom: 14px;
}

/* Formular-Innenabstand, Bootstrap-"well" neutralisieren */
#com-users-login__form,
.com-users-login__form{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 22px 24px 26px !important;
  margin: 0 !important;
}
.com-users-login .well{ background: transparent; border: 0; box-shadow: none; padding: 0; }
.com-users-login fieldset{ border: 0; padding: 0; margin: 0; }

/* Felder gestapelt statt horizontal */
.com-users-login .control-group{ display: block; margin-bottom: 15px; }
.com-users-login .control-label{
  display: block; float: none; width: auto;
  text-align: left; margin: 0 0 5px; padding: 0;
}
.com-users-login .control-label label{
  font-weight: 600; font-size: 13.5px; color: #33414d; margin: 0;
}
.com-users-login .control-label .star{ color: var(--gms-red, #C0392B); margin-left: 2px; }
.com-users-login .controls{ margin-left: 0 !important; width: 100%; }

/* Eingabefelder */
.com-users-login input.form-control{
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cfd6dd;
  border-radius: 9px;
  font-size: 15px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.com-users-login input.form-control:focus{
  outline: 0;
  border-color: var(--gms-blue, #2980B9);
  box-shadow: 0 0 0 3px rgba(41,128,185,.18);
}

/* Passwortfeld mit Anzeigen/Ausblenden-Knopf
   (Joomla-Element joomla-field-passwordview ODER .input-group):
   Eingabefeld dehnt sich, Knopf bleibt kompakt daneben. */
.com-users-login joomla-field-passwordview,
.com-users-login .input-group{
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}
.com-users-login joomla-field-passwordview > input,
.com-users-login joomla-field-passwordview input.form-control,
.com-users-login .input-group > input,
.com-users-login .input-group input.form-control{
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.com-users-login .input-password-toggle,
.com-users-login joomla-field-passwordview button,
.com-users-login .input-group .btn,
.com-users-login .input-group-text{
  flex: 0 0 auto;
  width: auto;                 /* NICHT volle Breite */
  padding: 0 12px;
  border: 1px solid #cfd6dd;
  background: #f3f6f8;
  color: #5a6b78;
  border-radius: 9px;
  white-space: nowrap;
  font-size: 13px;
}

/* Checkbox "Angemeldet bleiben" */
.com-users-login .form-check,
.com-users-login .controls label[for="remember"]{
  display: flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 14px; color: #555; margin: 2px 0;
}
.com-users-login .form-check-input{ margin: 0; }

/* Buttons allgemein */
.com-users-login .btn{ border-radius: 9px; font-weight: 700; padding: 11px 16px; }

/* Anmelden (primär) – volle Breite, GMS-Blau */
.com-users-login button[type="submit"],
.com-users-login .btn-primary{
  width: 100%;
  font-size: 15px;
  margin-top: 8px;
  background: var(--gms-blue, #2980B9);
  border-color: var(--gms-blue, #2980B9);
  color: #fff;
}
.com-users-login button[type="submit"]:hover,
.com-users-login .btn-primary:hover{
  background: var(--gms-blue-dark, #1A5276);
  border-color: var(--gms-blue-dark, #1A5276);
}

/* Web-Authentifizierung: eigener, kompakter Button (NICHT der Passwort-Toggle) */
.com-users-login .webauthn-button,
.com-users-login button[id*="webauthn"],
.com-users-login button[class*="webauthn"]{
  width: 100%;
  margin-top: 10px;
  background: #eef2f5;
  border: 1px solid #d7dee4;
  color: var(--gms-blue-dark, #1A5276);
  font-weight: 600;
}

/* Symbole in den Login-Buttons begrenzen, damit nichts riesig wird */
.com-users-login button svg,
.com-users-login .btn svg,
.com-users-login button[id*="webauthn"] svg,
.com-users-login [class*="webauthn"] svg{
  max-height: 1.4em;
  width: auto;
}

/* "Passwort vergessen?" / "Benutzername vergessen?" */
.com-users-login ul{
  list-style: none; padding: 14px 0 0; margin: 16px 0 0;
  display: flex; flex-direction: column; gap: 6px;
  text-align: center; border-top: 1px solid #eef1f4;
}
.com-users-login ul a{
  color: var(--gms-blue, #2980B9); text-decoration: none; font-size: 13.5px;
}
.com-users-login ul a:hover{ text-decoration: underline; }

/* Mobil */
@media (max-width: 480px){
  .com-users-login.login{ margin: 18px 10px 36px; }
  #com-users-login__form, .com-users-login__form{ padding: 18px 16px 20px !important; }
}

/* Slider auf der Schulanmeldungs-Seite ausblenden */
body:has(.nav-item.current a[href*="schulanmeldung"]) .gms-header-slider { display: none; }