/* ============================================================
   REWORKED GLOBAL STYLE.CSS
   Professionell optimiert, konfliktfrei, responsive
   ============================================================ */

/* ------------------------------------------------------------
   GLOBAL BASE
   ------------------------------------------------------------ */
body {
    background-color: #0f0f0f;
    color: #f1f1f1;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------
   FIXED HEADER & LAYOUT
   ------------------------------------------------------------ */
#siteHeader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    display: block !important; /* verhindert Bootstrap-Flex */
    background-color: #0f0f0f;
}

/* Dynamischer Abstand unter dem Header */
main.container, main {
    padding-top: var(--header-height, 260px);
    transition: padding-top 0.25s ease;
}

/* ------------------------------------------------------------
   HEADER IMAGE
   ------------------------------------------------------------ */
.header-image {
    width: 100%;
    margin: 0;
    padding: 0;
}

.header-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    object-position: center;
}

/* ------------------------------------------------------------
   NAVBAR
   ------------------------------------------------------------ */
.navbar-custom {
    background-color: #0f0f0f !important;
    width: 100%;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    border-top: 1px solid #111;
}

.navbar-custom .navbar-brand {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

#siteHeader nav.navbar .nav-link {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 0.9rem;
    line-height: 1.2;
    transition: color 0.35s ease, background-color 0.35s ease, transform 0.35s ease;
}

nav.navbar .nav-link:hover,
nav.navbar .nav-link:focus,
nav.navbar .nav-link.active {
    color: #052d68;
    background-color: rgba(13,110,253,0.15);
    border-radius: 6px;
    outline: none;
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   IMAGE BOXES
   ------------------------------------------------------------ */
.image-box {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.image-box:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.image-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: filter 0.5s ease, transform 0.5s ease;
}

.image-box:hover img {
    filter: brightness(0.7);
    transform: scale(1.02);
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    padding: 0 15px;
    text-align: center;
}

.image-box:hover .overlay {
    opacity: 1;
}

/* ------------------------------------------------------------
   TEXT BOXES UNTER BILDERN
   ------------------------------------------------------------ */
.box {
    padding: 1.2rem 1.8rem;
    background-color: #fff;
    color: #444;
    border-radius: 0 0 12px 12px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
    transition: background-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.box:hover {
    background-color: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.box-text {
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
    max-height: 8.5em;
    overflow-y: auto;
    padding-right: 6px;
}

.box-text::-webkit-scrollbar {
    width: 7px;
}

.box-text::-webkit-scrollbar-thumb {
    background-color: #999;
    border-radius: 4px;
}

/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */
button.btn {
    padding: 0.65rem 1.4rem;
    font-size: 1.15rem;
    border-radius: 8px;
    transition: background-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

button.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

button.btn-primary:hover,
button.btn-primary:focus {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    box-shadow: 0 6px 16px rgba(13,110,253,0.5);
    transform: translateY(-2px);
}

/* ------------------------------------------------------------
   PDF BOX
   ------------------------------------------------------------ */
#pdf_box {
    position: relative;
    background-color: #1a1a1a;
    border: 1px solid #444;
    overflow: hidden;
}

#pdf_container {
    width: 100%;
    height: 75vh;
}

#pdf_container iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

#pdf_container iframe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ------------------------------------------------------------
   ACCESSIBILITY FOCUS
   ------------------------------------------------------------ */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
    transition: outline-offset 0.15s ease-in-out;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 576px) {
    body {
        font-size: 14px;
        line-height: 1.4;
    }

    header .navbar-brand {
        font-size: 1.3rem;
    }

    nav.navbar .nav-link {
        font-size: 1rem;
        padding: 0.7rem 1rem;
    }

    .overlay {
        opacity: 1;
        position: static;
        transform: none;
        text-shadow: none;
        margin-top: 0.5rem;
        display: block;
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    header .navbar-brand {
        font-size: 1.6rem;
    }
    nav.navbar .nav-link {
        font-size: 1.1rem;
    }
}

@media (min-width: 992px) {
    header .navbar-brand {
        font-size: 1.8rem;
    }
    nav.navbar .nav-link {
        font-size: 1.15rem;
    }
}
