/* =========================================================
   style.css
   Version: 1.3.1
   Date: 2026-06-30

   Änderungen in Version 1.3.1
   - Poster-Grid reagiert sauber auf mittlere und kleine Bildschirmbreiten
   - Zwei Spalten bis 1.180 px, eine Spalte bis 768 px
   - keine abgeschnittenen Poster durch feste Mindestbreiten
   ========================================================= */

:root {
    --primary-color: #005A9C;
    --secondary-color: #f4f4f4;
    --font-color: #444444;
    --light-gray: #ddd;
}

/* =========================================================
   GLOBAL
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Titillium Web', Helvetica, Arial, sans-serif;
    margin: 0;
    color: var(--font-color);
    background-color: rgba(0,0,116,0.05);
    overflow-y: scroll;
}

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

/* =========================================================
   FONTS – TITILLIUM WEB
   ========================================================= */

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-LightItalic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-ExtraLightItalic.ttf') format('truetype');
    font-weight: 200;
    font-style: italic;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-SemiBoldItalic.ttf') format('truetype');
    font-weight: 600;
    font-style: italic;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */

header {
    background-color: #f8f8f8;
    color: #ccc;
    padding: 1rem 2rem;
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo {
    height: clamp(26px, 4vw, 40px);
    width: auto;
}


.navbar-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-toggle {
    display: none;
    appearance: none;
    border: none;
    background: #511c54;
    color: #fff;
    border-radius: 4px;
    padding: 10px 12px;
    cursor: pointer;
    font: inherit;
    font-weight: bold;
    line-height: 1;
}

.menu-toggle:hover {
    background-color: #444444;
}

.menu-toggle .menu-icon {
    display: block;
    font-size: 1.2rem;
    line-height: 1;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

nav a {
    color: #FFF;
    background-color: #a04f91;
    text-decoration: none;
    text-transform: uppercase;
    margin-right: 0;
    padding: 10px 14px 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: 1.15rem;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
	/* border-bottom: 4px solid #ad2235; */
}

nav a:hover,
nav a.active {
    background-color: #ad2235;
	/* border-bottom: 4px solid #511c54; */
}

/* =========================================================
   SEARCH BAR
   ========================================================= */

.search-bar-container {
    background-color: #f0f0f0;
    padding: 1rem 2rem;
    position: sticky;
    top: 72px;
    z-index: 899;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: center;
}

#searchInput {
    padding: 10px 14px;
    min-height: 46px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    width: 100%;
    max-width: 800px;
    font-size: 1.1rem;
    font-family: 'DIN', Helvetica, Arial, sans-serif;
    color: var(--font-color);
    background: #fff;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,90,156,0.12);
}

/* =========================================================
   MAIN
   ========================================================= */

main {
    padding: 2rem;
}

h1.kategorie { text-align: center; font-size: 2.4rem; background: #FFF; padding: 0.3rem; color: #CCC;}

/* =========================================================
   POSTER GRID
   ========================================================= */

#poster-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    width: 100%;
    min-width: 0;
    justify-content: center;
    justify-items: center;
}

.poster-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,116,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    min-width: 0;
    max-width: 400px;
    overflow: hidden;
}

.poster-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,116,0.2);
}

.poster-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 8px 12px;
    font-size: 0.9em;
    color: #666;
    border-bottom: 1px solid var(--secondary-color);
}

.poster-number {
    font-weight: bold;
    color: #666666;
}

.poster-category,
.poster-category1,
.poster-category2,
.poster-category3,
.poster-category4,
.poster-category5,
.poster-category6, 
.poster-category7,    
.poster-category8,
.poster-category9,
.poster-category10  { 
	padding: 2px 10px;
	border-radius: 3px;
    font-weight: bold;
    flex-shrink: 1;
	line-height: 1.2em;
	text-align: right;
}

.poster-category1 {
    color: #FFFFFF;
    background: #a04f91;
}

.poster-category2 {
    color: #FFFFFF;
    background: #511c54;
}

.poster-category3 {
    color: #FFFFFF;
    background: #ad2235;
}

.poster-category4 {
    color: #FFFFFF;
    background: #ca28ef;
}

.poster-category5 { 
    color: #FFFFFF;
    background: #c96f19; 
}

.poster-category6 { 
    color: #FFFFFF;
    background: #dc3620; 
}

.poster-category7 { 
    color: #FFFFFF;
    background: #b1c94d; 
}

.poster-category8 { 
    color: #FFFFFF;
    background: #9793a4; 
}

.poster-category9 { 
    color: #000000;
    background: #999999; 
}

.poster-category10 { 
    color: #000000;
    background: #f2b8c4; 
}


.poster-thumb {
    width: 100%;
    height: auto;
    cursor: pointer;
    display: block;
    background: #fff;
}

.poster-caption {
    padding: 12px;
    flex-grow: 1;
}

.poster-title {
    font-size: 1.1em;
    line-height: 1.25;
    margin: 0 0 5px 0;
}

.poster-authors {
    font-size: 0.9em;
    color: #555;
    margin: 0;
    line-height: 1.35;
}

.abstract-btn {
    display: none;
    width: calc(100% - 24px);
    margin: 0 12px 12px 12px;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
    font-family: 'DIN', Helvetica, Arial, sans-serif;
}

.abstract-btn:hover {
    background-color: #004170;
}

.hidden {
    display: none !important;
}

/* =========================================================
   LIGHTBOX / VOLLBILD
   ========================================================= */

.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

#lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 1rem; */
}

#lightbox-content img,
#lightbox-content video,
#lightbox-content iframe {
    max-width: 100%;
    max-height: 100%;
    border: none;
    object-fit: contain;
}

#lightbox-content img {
    transition: transform 0.1s ease-out;
    transform-origin: 0 0;
    cursor: grab;
}

#lightbox-content img.dragging {
    cursor: grabbing;
}

#lightbox-content iframe {
    width: 100%;
    height: 100%;
}

.close-btn {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));

    width: 40px;
    height: 40px;
    padding: 0;
    box-sizing: border-box;

    display: block;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #dddddd;
    border-radius: 10px;

    font-size: 0; /* blendet das &times;-Zeichen aus */
    cursor: pointer;
    z-index: 10050;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.close-btn::before,
.close-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 3px;
    background: #222222;
    transform-origin: center;
}

.close-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.close-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #999999;
    transform: scale(1.05);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: background-color 0.3s;
    z-index: 1000;
    text-shadow: 2px 2px 4px #000;
    line-height: 1;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

#backToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #a04f91;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s, background-color 0.3s;
}

#backToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#backToTopBtn:hover {
    background-color: #a04f91;
}

/* =========================================================
   GALLERY / CATEGORY PAGE
   ========================================================= */

.gallery-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 50px 30px;
    max-width: 1800px;
    margin: 2rem auto;
    align-items: start;
}

/* Letztes Element bei ungerader Anzahl */
.gallery-container > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc(50% - 15px); /* entspricht etwa einer Grid-Spalte */
}


.gallery-item {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover img,
.gallery-item:focus img {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.session-titel {
    text-align: center;
    font-weight: bold;
    color: #666;
    text-transform: uppercase;
    margin-top: 1rem;
    font-size: 2rem;
}

/* =========================================================
   OPTIONAL / SPÄTERE MODAL-STRUKTUREN
   ========================================================= */

.modal-hidden {
    display: none;
}

.modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
}

.modal-close-btn {
    cursor: pointer;
}

.form-success-hidden {
    display: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
    #poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    main {
        padding: 1.5rem;
    }

    #poster-grid {
        gap: 1.5rem;
    }

    .gallery-container {
        gap: 28px;
        margin: 1.5rem auto;
    }

    nav a {
        font-size: 1rem;
        padding: 8px 12px;
    }

    #searchInput {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.9rem 1rem;
        min-height: 72px;
        align-items: center;
    }

    .header-logo {
        height: 30px;
    }

    .nav-wrapper {
        position: relative;
        margin-left: auto;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    nav {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        min-width: 240px;
        max-width: min(85vw, 320px);
        background: #f8f8f8;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        border-radius: 8px;
        padding: 0.6rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        z-index: 950;
    }

    nav.is-open {
        display: flex;
    }

    nav a {
        width: 100%;
        font-size: 0.95rem;
        padding: 10px 12px;
        text-align: left;
    }

    .search-bar-container {
        top: 72px;
        padding: 0.8rem 1rem;
    }

    #searchInput {
        width: 100%;
        max-width: none;
        min-height: 44px;
        font-size: 1rem;
    }

    main {
        padding: 1rem;
    }

    #poster-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .poster-item {
        max-width: 100%;
    }

    .poster-meta-top {
        font-size: 0.85em;
        padding: 8px 10px;
    }

    .poster-caption {
        padding: 10px;
    }

    .gallery-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 1rem auto;
    }

    .gallery-item img {
        border-radius: 10px;
    }

    .nav-btn {
        font-size: 24px;
        padding: 15px;
    }

    .prev-btn {
        left: 5px;
    }

    .next-btn {
        right: 5px;
    }

    .close-btn {
        top: 15px;
        right: 20px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.75rem;
    }

    .header-logo {
        height: 26px;
    }

    .menu-toggle {
        padding: 9px 11px;
    }

    nav {
        min-width: 220px;
        top: calc(100% + 8px);
    }

    nav a {
        font-size: 0.9rem;
        padding: 9px 11px;
    }

    .search-bar-container {
        top: 68px;
        padding: 0.7rem 0.75rem;
    }

    #searchInput {
        font-size: 0.95rem;
        padding: 10px 12px;
    }

    .poster-title {
        font-size: 1em;
    }

    .poster-authors {
        font-size: 0.8em;
    }

    .gallery-container {
        gap: 14px;
    }

    #backToTopBtn {
        padding: 12px;
        font-size: 16px;
        right: 15px;
        bottom: 15px;
    }
}
/* POSTER-TIMER */
.poster-timer {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 10px;
    z-index: 9999;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.poster-timer.active {
    display: flex;
}

.timer-play-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
}

.timer-display {
    min-width: 46px;
    text-align: center;
    font-weight: bold;
    color: #fff;
}

.poster-timer.expired {
    background: red;
}

.poster-timer.expired .timer-display {
    color: #fff;
}

.poster-timer.expired {
    background: red;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* =========================================================
   iPad / Mobile Fix
   Nur Touch-Geräte, keine großen Kiosk-Bildschirme
   ========================================================= */

@media (hover: none) and (pointer: coarse) and (min-width: 769px) and (max-width: 1024px) {

    main {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    #poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .poster-item {
        max-width: 100%;
        width: 100%;
    }

    .poster-meta-top {
        gap: 0.4rem;
    }

    .poster-category,
    .poster-category1,
    .poster-category2,
    .poster-category3,
    .poster-category4,
    .poster-category5,
    .poster-category6,
    .poster-category7,
    .poster-category8,
    .poster-category9,
    .poster-category10 {
        font-size: 0.8em;
        padding: 2px 6px;
    }

    .lightbox {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }

    #lightbox-content {
        padding: 56px 10px 20px 10px;
    }

    #lightbox-content img,
    #lightbox-content video,
    #lightbox-content iframe {
        max-width: 96vw;
        max-height: calc(100vh - 80px);
        object-fit: contain;
    }

    .close-btn {
        z-index: 10050;
    }

    .nav-btn {
        z-index: 10040;
    }
}