/* =========================================================
   ABENTEUER-TRAMPOLIN – JOOMLA 6 / CASSIOPEIA
   Bereinigte user.css
   ========================================================= */

/* ---------------------------------------------------------
   GRUNDLAYOUT UND TYPOGRAFIE
   --------------------------------------------------------- */
body {
    background: url("../images/hg-abenteuer-tr.jpg") repeat;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 18px;
    color: #333333;
}

.site-grid {
    width: 980px;
    max-width: calc(100% - 20px);
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
}

a {
    color: #9b1c24;
}

a:hover,
a:focus {
    color: #651117;
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 12px 0;
    font-weight: bold;
}

h1 {
    font-size: 26px;
    line-height: 28px;
}

h2 {
    font-size: 18px;
    line-height: 24px;
}

h3 {
    font-size: 16px;
    line-height: 18px;
}

h4 {
    font-size: 14px;
    line-height: 16px;
}

h5 {
    font-size: 13px;
    line-height: 15px;
}

h6 {
    font-size: 12px;
    line-height: 14px;
}

.page-header h2 {
    font-size: 26px;
    line-height: 28px;
    margin: 12px 0 24px;
}

/* ---------------------------------------------------------
   HEADER / ALTE BUCHGRAFIK
   --------------------------------------------------------- */
.container-header {
    width: 950px;
    max-width: calc(100% - 20px);
    min-height: 270px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    background: url("../images/abenteuer_trampolin_header.png") top center no-repeat;
    background-color: transparent;
    box-shadow: none;
}

.container-header .navbar-brand {
    display: none;
}

.container-header .container-nav {
    position: absolute;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    max-width: none;
    height: 270px;
    margin: 0;
    padding: 0;
    display: block;
}

.container-header .container-search {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
    padding: 0;
}

.container-header .container-search .random-image {
    margin: 0;
}

.container-header .container-search .random-image img {
    display: block;
    width: 446px;
    height: 209px;
    object-fit: cover;
}

.container-header .mod-menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

.container-header .mod-menu > li > a {
    color: #ffffff;
    padding: 3px 7px;
}

/* ---------------------------------------------------------
   OBEN: SUCHE / IMPRESSUM
   --------------------------------------------------------- */
.menuoben {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin-top: -30px;
    margin-bottom: 0;
    padding: 0 !important;
    min-height: 30px;
}

.menuoben .card-body {
    padding: 0 !important;
}

.menuoben .mod-menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    margin: 0;
    padding: 0;
}

.menuoben .mod-menu > li {
    display: block;
}

.menuoben .mod-menu > li > a {
    padding: 5px;
}

/* ---------------------------------------------------------
   LINKE SEITENLEISTE
   --------------------------------------------------------- */
.container-sidebar-left .card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    margin-bottom: 18px;
}

.container-sidebar-left .card-body {
    padding: 0;
}

.container-sidebar-left .card-header {
    background-color: #c8001e;
    color: #ffffff;
    padding: 5px 10px 5px 25px;
    margin: 8px 10px 10px -25px;
    border: 0;
    border-radius: 0;
    font-size: 16px;
    line-height: 18px;
    font-weight: bold;
}

.container-sidebar-left .mod-menu a {
    color: #9b1c24 !important;
}

.container-sidebar-left .mod-menu a:hover,
.container-sidebar-left .mod-menu a:focus {
    color: #651117 !important;
}

/* Rechte Infobox */
.container-sidebar-right .card-header {
    background-color: #c8001e;
    color: #ffffff;
    border: 0;
    font-size: 16px;
    line-height: 18px;
    font-weight: bold;
    padding: 5px 10px;
}

.container-sidebar-right .card-header * {
    color: #ffffff;
}

/* Mobiles Aufklappmenü auf Desktop grundsätzlich ausblenden */
.mobile-section-nav {
    display: none !important;
}

/* Phoca-RSS-Symbol generell ausblenden */
#phocagallery .pg-top-icons {
    display: none !important;
}

/* ---------------------------------------------------------
   INHALTSTABELLEN
   --------------------------------------------------------- */
.chronik-tabelle {
    width: 100%;
    border-collapse: collapse;
}

.chronik-tabelle td {
    padding: 5px 8px;
    vertical-align: top;
}

.chronik-tabelle tr:not(:last-child) td {
    border-bottom: 1px solid #b5b5b5;
}

.chronik-tabelle td:first-child {
    width: 115px;
    white-space: nowrap;
    padding-left: 0;
    padding-right: 12px;
}

.presseberichte-tabelle {
    width: 100%;
    border-collapse: collapse;
}

.presseberichte-tabelle td {
    padding: 10px 12px;
    vertical-align: middle;
}

.presseberichte-tabelle tr:not(:last-child) td {
    border-bottom: 1px solid #b5b5b5;
}

.presseberichte-tabelle td:first-child {
    width: 210px;
    padding-left: 0;
}

.presseberichte-tabelle td:first-child img {
    max-width: 100%;
    height: auto;
}

/* =========================================================
   DESKTOP
   ========================================================= */
@media (min-width: 769px) {

    /* Suche / Impressum höher und in Rot */
    .menuoben {
        transform: translateY(-12px);
    }

    .menuoben .mod-menu > li > a {
        color: #c8001e !important;
    }

    .menuoben .mod-menu > li > a:hover,
    .menuoben .mod-menu > li > a:focus {
        color: #8f0015 !important;
    }

    /* CSC-Vereinslogo näher an das letzte Menü rücken */
    #mod-menu92 {
        margin-top: -30px !important;
    }

    /* -----------------------------------------------------
       PHOCA – Kategorienübersicht: 3 größere Spalten
       ----------------------------------------------------- */
    #phocagallery .pg-categories-items-box {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        gap: 14px !important;
        width: 100% !important;
        height: auto !important;
    }

    #phocagallery .pg-category-box {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        float: none !important;
        flex: 0 0 calc(33.333% - 10px) !important;
        width: calc(33.333% - 10px) !important;
        max-width: calc(33.333% - 10px) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #phocagallery .pg-category-box-image {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    #phocagallery .pg-category-box-image img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    #phocagallery .pg-category-box-title {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ordnersymbol und Bildanzahl in der Kategorienübersicht ausblenden */
    #phocagallery .pg-category-box-title svg.ph-si-category,
    #phocagallery .pg-category-box-count {
        display: none !important;
    }

    /* -----------------------------------------------------
       PHOCA – Bilder innerhalb einer geöffneten Galerie
       Titel, Dateinummern und Zusatzsymbole ausblenden
       ----------------------------------------------------- */
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:not(:has(.ph-si-back-medium))
    .pg-item-box-title,
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:not(:has(.ph-si-back-medium))
    .pg-item-box-info,
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:not(:has(.ph-si-back-medium))
    .pg-item-box-icons-box {
        display: none !important;
    }

    /* Falls Phoca einzelne Bild-/Aktionssymbole außerhalb der Iconbox ausgibt */
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:not(:has(.ph-si-back-medium))
    svg.ph-si-image,
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:not(:has(.ph-si-back-medium))
    svg.ph-si-download,
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:not(:has(.ph-si-back-medium))
    svg.ph-si-search {
        display: none !important;
    }

    /* -----------------------------------------------------
       PHOCA – Zurück-Kachel innerhalb einer Galerie
       ----------------------------------------------------- */
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium) {
        width: 130px !important;
        max-width: 130px !important;
        height: 110px !important;
        min-height: 0 !important;
        margin: 0.5em !important;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium)
    .pg-item-box-image {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 130px !important;
        max-width: 130px !important;
        height: 100px !important;
        aspect-ratio: auto !important;
    }

    #pg-msnr-container.pg-category-items-box
    .ph-si-back-medium {
        width: 58px !important;
        height: 58px !important;
        max-width: 58px !important;
        max-height: 58px !important;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium)
    .ph-si-back-medium {
        opacity: 0 !important;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium)
    .pg-item-box-image::after {
        content: "←";
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Arial, sans-serif;
        font-size: 46px;
        line-height: 1;
        font-weight: normal;
        color: #9aaaba;
        pointer-events: none;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium)
    .pg-item-box-info {
        display: none !important;
    }
}

/* =========================================================
   HANDY / TABLET
   ========================================================= */
@media (max-width: 768px) {

    /* -----------------------------------------------------
       Header proportional verkleinern
       ----------------------------------------------------- */
    .container-header {
        width: calc(100% - 20px);
        max-width: none;
        min-height: 0;
        height: auto;
        aspect-ratio: 950 / 261;
        background-size: 100% 100%;
        background-position: center top;
        background-repeat: no-repeat;
    }

    .container-header .container-nav {
        width: 100%;
        height: 100%;
    }

    .container-header .container-nav .container-search {
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        width: 48.53% !important;
        height: calc(85.83% + 1em) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container-header .container-nav .container-search .random-image,
    .container-header .container-nav .container-search .random-image img {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container-header .container-nav .container-search .random-image img {
        display: block !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .site-grid {
        width: calc(100% - 20px);
        max-width: none;
        box-sizing: border-box;
        padding: 20px;
    }

    /* Desktop-Seitenleiste ausblenden; Inhalt volle Breite */
    .site-grid > .container-sidebar-left {
        display: none !important;
    }

    .site-grid > .container-component {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* -----------------------------------------------------
       Mobiles Sektionsmenü
       ----------------------------------------------------- */
    .mobile-section-nav {
        display: block !important;
        width: 100%;
        margin: 0 0 4px 0 !important;
    }

    .site-grid > .mobile-section-nav {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        justify-self: stretch !important;
        box-sizing: border-box !important;
    }

    .mobile-section-nav__item {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 7px 0;
    }

    .mobile-section-nav__toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        margin: 0;
        padding: 10px 14px;
        border: 0;
        border-radius: 0;
        background: #c8001e;
        color: #ffffff;
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        font-size: 18px;
        line-height: 24px;
        font-weight: bold;
        text-align: left;
        cursor: pointer;
    }

    .mobile-section-nav__toggle::after {
        content: "▼";
        margin-left: 12px;
        font-size: 13px;
        color: #ffffff;
    }

    .mobile-section-nav__toggle[aria-expanded="true"]::after {
        content: "▲";
    }

    .mobile-section-nav__panel {
        box-sizing: border-box;
        width: 100%;
        padding: 8px 14px 10px 14px;
        background: #ffffff;
    }

    .mobile-section-nav__panel[hidden] {
        display: none !important;
    }

    /* Suche / Impressum kompakt */
    .main-top.menuoben {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        height: auto !important;
    }

    .main-top.menuoben .card-body,
    .main-top.menuoben .mod-menu {
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

    .main-top.menuoben .mod-menu > li > a {
        padding: 2px 5px !important;
        line-height: 20px !important;
    }

    /* -----------------------------------------------------
       Phoca allgemein mobil
       ----------------------------------------------------- */
    #phocagallery {
        margin-top: -35px !important;
    }

    #phocagallery:has(.pg-category-box) {
        margin-top: 0 !important;
    }

    #phocagallery-categories-detail:empty {
        display: none !important;
    }

    #phocagallery .ph-cb {
        height: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* -----------------------------------------------------
       Phoca: Bilder / Untergalerien innerhalb einer Kategorie
       ----------------------------------------------------- */
    #pg-msnr-container.pg-category-items-box {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    #pg-msnr-container.pg-category-items-box > .pg-item-box {
        flex: 0 0 calc(50% - 6px) !important;
        width: calc(50% - 6px) !important;
        max-width: calc(50% - 6px) !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:not(:has(.ph-si-back-medium))
    img.pg-image {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    #pg-msnr-container
    .pg-item-box-title.category
    svg.ph-si-category {
        display: none !important;
    }

    /* Kompakte Zurück-Zeile */
    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium) {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 36px !important;
        min-height: 36px !important;
        margin: 0 0 6px 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium)
    .pg-item-box-image {
        position: relative !important;
        width: 48px !important;
        max-width: 48px !important;
        height: 38px !important;
        margin: 0 !important;
        aspect-ratio: auto !important;
    }

    #pg-msnr-container.pg-category-items-box
    .ph-si-back-medium {
        width: 38px !important;
        height: 38px !important;
        max-width: 38px !important;
        max-height: 38px !important;
        color: #777777 !important;
        fill: #777777 !important;
        opacity: 0 !important;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium)
    .pg-item-box-image::after {
        content: "←";
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: Arial, sans-serif;
        font-size: 32px !important;
        line-height: 1;
        font-weight: normal;
        color: #9aaaba;
        pointer-events: none;
    }

    #pg-msnr-container.pg-category-items-box
    > .pg-item-box:has(.ph-si-back-medium)
    .pg-item-box-info {
        display: none !important;
    }

    /* -----------------------------------------------------
       Phoca: oberste Kategorienübersicht mobil
       ----------------------------------------------------- */
    #phocagallery #pg-msnr-container {
        height: auto !important;
    }

    #phocagallery .pg-category-box {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        float: none !important;
        display: inline-block !important;
        vertical-align: top !important;
        width: calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
        margin: 5px !important;
        box-sizing: border-box !important;
    }

    #phocagallery .pg-category-box-image {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    #phocagallery .pg-category-box-image img {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    #phocagallery .pg-category-box-title {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #phocagallery .pg-category-box-title svg.ph-si-category,
    #phocagallery .pg-category-box-count {
        display: none !important;
    }
}
