
/* =========================================================
   TSG SALACH – JOOMLA 6 TEMPLATE
   ========================================================= */

/* 01. Variablen */
:root {
    --blue: #086bb2;
    --navy: #092d4d;
    --ink: #132d43;
    --muted: #59748a;
    --bg: #f3f7fb;
    --line: #dce8f1;
}

/* 02. Allgemeine Einstellungen */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

a {
    color: var(--blue);
}

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

.container {
    width: min(1220px, calc(100% - 48px));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    z-index: 200;
    background: #fff;
    padding: 12px;
}

.skip-link:focus {
    top: 8px;
}

*:focus-visible {
    outline: 3px solid #ffbe4c;
    outline-offset: 3px;
}

/* =========================================================
   03. HEADER & LOGO
   ========================================================= */

.site-header {
    position: relative;
    z-index: 100;
    background: #fff;
    box-shadow: 0 4px 20px #102b4310;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 30px;
    min-height: 92px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    text-decoration: none;
}

.brand img {
    width: 55px;
    height: 62px;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong {
    font-size: 1.23rem;
    color: var(--blue);
    letter-spacing: .025em;
}

.brand-copy small {
    margin-top: 6px;
    color: var(--muted);
    font-size: .76rem;
}

/* =========================================================
   04. NAVIGATION
   ========================================================= */

.primary-navigation {
    margin-left: auto;
    min-width: 0;
}

.primary-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.primary-navigation .nav-level-0 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
}

.primary-navigation li {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.primary-navigation li > a,
.primary-navigation .nav-label {
    display: block;
    padding: 13px 9px;
    font-size: .86rem;
    font-weight: 650;
    text-decoration: none;
    color: var(--ink);
    white-space: nowrap;
}

.primary-navigation li > a:hover,
.primary-navigation .is-current > a {
    color: var(--blue);
}

.submenu-toggle {
    border: 0;
    background: transparent;
    color: var(--blue);
    padding: 8px 5px;
    cursor: pointer;
    font-size: 1.15rem;
}

/* Untermenüs */
.primary-navigation .nav-level:not(.nav-level-0) {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    max-height: min(75vh, 600px);
    overflow: auto;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 20px 40px #092d4d24;
    z-index: 110;
}

.primary-navigation li:hover > .nav-level,
.primary-navigation li:focus-within > .nav-level,
.primary-navigation li.submenu-open > .nav-level {
    display: block;
}

.primary-navigation .nav-level:not(.nav-level-0) li {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.primary-navigation .nav-level:not(.nav-level-0) a,
.primary-navigation .nav-level:not(.nav-level-0) .nav-label {
    padding: 9px 10px;
    white-space: normal;
    font-size: .84rem;
    font-weight: 550;
    flex: 1;
}

.primary-navigation .nav-level-2,
.primary-navigation .nav-level-3 {
    top: 0 !important;
    left: 100% !important;
}

.primary-navigation .nav-level-0 > li:has(> a[href*="Itemid="]):last-child > .nav-level {
    left: auto;
    right: 0;
}

.nav-toggle {
    display: none;
}

/* =========================================================
   05. HERO / STARTSEITENBANNER
   ========================================================= */

.hero {
    color: #fff;
    background: linear-gradient(115deg, #064775, #006caf 75%, #078bc4);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 55px;
    align-items: center;
    min-height: 430px;
    padding-block: 62px;
}

.eyebrow {
    display: block;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    color: #b9e6ff;
}

.eyebrow.dark {
    color: var(--blue);
}

.hero h1 {
    font-size: clamp(2.8rem, 5vw, 4.7rem);
    line-height: 1.05;
    letter-spacing: -.04em;
    margin: 22px 0;
}

.hero p {
    font-size: 1.12rem;
    color: #e1f1ff;
    max-width: 540px;
}

.button {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    border-radius: 9px;
    padding: 13px 21px;
    font-weight: 750;
    text-decoration: none;
}

.button-white {
    background: #fff;
    color: #0067a9;
}

.button:hover {
    transform: translateY(-2px);
}

.hero-visual {
    min-height: 310px;
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(0deg, #062a50bd, #063a6a12),
        url('../images/bg-tsg.jpg') center / cover;
    box-shadow: 0 20px 50px #001e3b3b;
    display: flex;
    align-items: end;
}

.hero-visual-overlay {
    padding: 35px;
}

.hero-visual-overlay span {
    font-size: .72rem;
    letter-spacing: .18em;
}

.hero-visual-overlay strong {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.9rem);
    line-height: 1.15;
    margin-top: 12px;
}

/* =========================================================
   06. SEITENINHALT & ÜBERSCHRIFTEN
   ========================================================= */

.page-shell {
    padding: 55px 0 85px;
}

.section-heading h2 {
    font-size: clamp(1.65rem, 3vw, 2.3rem);
    letter-spacing: -.025em;
    margin: 7px 0 8px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

/* =========================================================
   07. STARTSEITE – ABTEILUNGEN & KACHELN
   ========================================================= */

.highlights {
    margin-bottom: 55px;
}

.highlight-fallback {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.highlight-fallback > a {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    box-shadow: 0 8px 24px #083f6610;
    transition: transform .2s, box-shadow .2s;
}

.highlight-fallback > a:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px #083f661c;
}

.highlight-icon {
    font-size: 1.65rem;
}

.highlight-fallback strong {
    font-size: 1.12rem;
    color: var(--ink);
}

.highlight-fallback > a > span:last-child {
    font-size: .9rem;
}

/* =========================================================
   08. AKTUELLES & NEUIGKEITEN
   ========================================================= */

.home-news {
    background: #fff;
    padding: 34px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 25px #083f660b;
}

.news-setup {
    color: var(--muted);
    font-size: .94rem;
    margin: 25px 0 0;
}

/* =========================================================
   09. INHALTSSEITEN & SIDEBAR
   ========================================================= */

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 25px;
}

.content-grid:has(.sidebar) {
    grid-template-columns: minmax(0, 1fr) 270px;
}

.main-content {
    min-width: 0;
    background: #fff;
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 8px 25px #083f660b;
}

.sidebar > div {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
}

.breadcrumbs-wrap {
    margin-bottom: 18px;
    color: var(--muted);
}

/* =========================================================
   10. FOOTER
   ========================================================= */

.site-footer {
    background: var(--navy);
    color: #d5e5f1;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px;
    padding-block: 43px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.footer-brand strong {
    color: #fff;
}

.site-footer a {
    color: #d3efff;
}

.footer-bottom {
    border-top: 1px solid #ffffff24;
    padding-block: 18px;
    display: flex;
    justify-content: space-between;
    font-size: .84rem;
}

/* =========================================================
   11. JOOMLA-MODULE – STARTSEITE
   ========================================================= */

.hero-managed > .mod-custom {
    width: min(1220px, calc(100% - 48px));
    margin-inline: auto;
}

.hero-managed .hero-layout {
    width: 100%;
}

.highlight-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.highlight-modules > .mod-custom {
    min-width: 0;
}

.highlight-modules .tsg-feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    box-shadow: 0 8px 24px #083f6610;
    transition: transform .2s, box-shadow .2s;
}

.highlight-modules .tsg-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px #083f661c;
}

.highlight-modules .tsg-feature-card strong {
    font-size: 1.12rem;
    color: var(--ink);
}

.highlight-modules .tsg-feature-card .tsg-feature-text {
    font-size: .9rem;
    color: var(--blue);
}

.home-news .mod-articlesnews,
.home-news .mod-articleslatest {
    margin-top: 20px;
}

/* =========================================================
   12. KONTAKTINFOS – POSITION
   ========================================================= */

/*
   Kontaktbox um 105px nach unten verschieben.
   Gilt nur für Desktop / Tablet ab 769px.
*/
@media (min-width: 769px) {
    .tsg-contact-card {
        transform: translateY(105px);
    }
}

/* =========================================================
   13. RESPONSIVE – DESKTOP-NAVIGATION
   ========================================================= */

@media (min-width: 1061px) {
    .primary-navigation .nav-level-0 > li:nth-child(2) > .nav-level {
        width: min(650px, calc(100vw - 80px));
        display: none;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px 12px;
    }

    .primary-navigation .nav-level-0 > li:nth-child(2):hover > .nav-level,
    .primary-navigation .nav-level-0 > li:nth-child(2):focus-within > .nav-level,
    .primary-navigation .nav-level-0 > li:nth-child(2).submenu-open > .nav-level {
        display: grid;
    }

    .primary-navigation .nav-level-0 > li:nth-child(2) > .nav-level > li {
        display: block;
    }

    .primary-navigation .nav-level-0 > li:nth-child(2) > .nav-level > li > .nav-level {
        left: 0 !important;
        top: 100% !important;
    }
}

/* =========================================================
   14. RESPONSIVE – TABLET & MOBILE NAVIGATION
   ========================================================= */

@media (max-width: 1060px) {
    .header-inner {
        min-height: 80px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        margin-left: auto;
        width: 45px;
        height: 43px;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: #fff;
        padding: 11px;
    }

    .nav-toggle span {
        height: 2px;
        background: var(--blue);
        width: 100%;
    }

    .primary-navigation {
        display: none;
        order: 3;
        width: 100%;
        margin: 0;
        padding: 0 0 16px;
    }

    .primary-navigation.nav-open {
        display: block;
    }

    .primary-navigation .nav-level-0 {
        display: block;
        max-height: 75vh;
        overflow: auto;
    }

    .primary-navigation li {
        display: flex;
        justify-content: space-between;
    }

    .primary-navigation li > a,
    .primary-navigation .nav-label {
        flex: 1;
        white-space: normal;
    }

    .primary-navigation .nav-level:not(.nav-level-0),
    .primary-navigation .nav-level-2,
    .primary-navigation .nav-level-3 {
        position: static !important;
        width: 100%;
        max-height: none;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--line);
        border-radius: 0;
        margin-left: 14px;
        padding: 0 0 0 10px;
        display: none !important;
    }

    .primary-navigation li.submenu-open > .nav-level {
        display: block !important;
    }

    .primary-navigation li:hover > .nav-level,
    .primary-navigation li:focus-within > .nav-level {
        display: none;
    }

    .primary-navigation li.submenu-open:hover > .nav-level,
    .primary-navigation li.submenu-open:focus-within > .nav-level {
        display: block;
    }

    .hero-layout {
        gap: 28px;
    }

    .hero-visual {
        min-height: 270px;
    }
}

/* =========================================================
   15. RESPONSIVE – SMARTPHONE
   ========================================================= */

@media (max-width: 700px) {
    .container {
        width: calc(100% - 30px);
    }

    .brand img {
        width: 47px;
        height: auto;
    }

    .brand-copy strong {
        font-size: 1.07rem;
    }

    .brand-copy small {
        font-size: .67rem;
    }

    .hero-layout {
        grid-template-columns: 1fr;
        padding-block: 38px;
    }

    .hero-visual {
        min-height: 220px;
    }

    .page-shell {
        padding: 34px 0 55px;
    }

    .highlight-fallback,
    .highlight-modules {
        grid-template-columns: 1fr;
    }

    .home-news,
    .main-content {
        padding: 23px;
    }

    .content-grid:has(.sidebar) {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .hero-managed > .mod-custom {
        width: calc(100% - 30px);
    }

}

/* =========================================================
   TSG SALACH – FUSSBALL-ÜBERSICHT
   ========================================================= */

.tsg-football {
    width: 100%;
    margin: 0 auto;
}

.tsg-football-intro {
    margin-bottom: 28px;
}

.tsg-football-intro h2 {
    color: #092d4d;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    margin: 0 0 12px;
}

.tsg-football-intro p {
    color: #59748a;
    font-size: 16px;
    margin: 0;
}

/* Kachel-Layout */
.tsg-football-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 25px 0;
}

/* Einzelne Kacheln */
.tsg-football-grid a.tsg-football-card {
    display: flex !important;
    flex-direction: column;
    min-width: 0;
    min-height: 165px;
    padding: 22px;
    background: #fff;
    border: 1px solid #dce8f1;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(8, 63, 102, .08);
    color: #132d43;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.tsg-football-grid a.tsg-football-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(8, 63, 102, .16);
    border-color: #086bb2;
}

.tsg-football-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    background: #eaf5fd;
    border-radius: 12px;
    font-size: 23px;
}

.tsg-football-card-title {
    display: block;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.4;
    color: #132d43;
}

.tsg-football-card-arrow {
    align-self: flex-end;
    margin-top: auto;
    color: #086bb2;
    font-size: 22px;
}

/* Berichte & Neuigkeiten */
.tsg-football a.tsg-football-news {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: linear-gradient(110deg, #064775, #086bb2);
    border-radius: 16px;
    color: #fff !important;
    text-decoration: none !important;
}

.tsg-football-news strong {
    display: block;
    font-size: 19px;
    color: #fff;
}

.tsg-football-news small {
    display: block;
    margin-top: 5px;
    color: #e1f1ff;
}

.tsg-football-news-arrow {
    color: #fff;
    font-size: 26px;
}

/* Tablet */
@media (max-width: 1050px) {
    .tsg-football-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Smartphone */
@media (max-width: 550px) {
    .tsg-football-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tsg-football-grid a.tsg-football-card {
        min-height: 125px;
        padding: 18px;
    }

    .tsg-football a.tsg-football-news {
        padding: 20px;
    }
}