/*
Theme Name: FSR Jura Theme
Theme URI: https://fsr-jura-halle.de
Description: Maßgeschneidertes WordPress-Theme für den Fachschaftsrat Jura der Martin-Luther-Universität Halle-Wittenberg. Ermöglicht die einfache Pflege von Inhalten über die WordPress-Oberfläche.
Version: 1.0.0
Author: FSR Jura Halle
Author URI: https://fsr-jura-halle.de
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fsr-jura
Tags: custom-menu, custom-logo, flexible-header, responsive-layout
*/

/* ===== GLOBAL VARIABLES & RESET ===== */

:root {
    --main-bg: #ffffff;
    --main-text: #222222;
    --accent: #660f23;
    --accent-light: #8e2c3a;
    --header-bg: #552327;
    --footer-bg: #552327;
    --button-bg: #552327;
    --button-text: #ffffff;
    --header-height: calc(64px + 1rem + 1rem);
}

body {
    margin: 0;
    font-family: 'Inter', 'Montserrat', Arial, sans-serif;
    background: var(--main-bg);
    color: var(--main-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    padding-top: 2rem;
}

body.dark {
    --main-bg: #1a1a1a;
    --main-text: #f0f0f0;
    --accent: #a8324a;
    --header-bg: #2e2e2e;
    --footer-bg: #2e2e2e;
    --button-bg: #444;
    --button-text: #ffffff;
}

h2 {
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 2rem;
    letter-spacing: 0.01em;
    color: var(--main-text);
}

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

.header {
    background: var(--header-bg);
    color: var(--button-text);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1050;
    overflow: visible;
    height: auto;
}
.wp-block-site-logo { display: flex; align-items: center; z-index: 1100; }
.wp-block-site-logo img { height: 64px; width: 64px; object-fit: contain; display: block; }
.header .wp-block-navigation { display: flex; align-items: center; z-index: 1100; }
.header .wp-block-navigation__container { list-style: none; display: flex; gap: 2rem; margin: 0; padding: 0; }
.header .wp-block-navigation-item__content { color: var(--button-text); text-decoration: none; font-weight: 500; transition: color 0.3s ease; font-family: 'Montserrat', 'Inter', Arial, sans-serif; display: flex; align-items: center; }
.header .wp-block-navigation-item__content:hover { color: #e0e0e0; text-decoration: none; }
.header .wp-block-navigation__submenu-icon { background: none; border: none; color: var(--button-text); cursor: pointer; padding: 0; margin-left: 0.3rem; display: inline-flex; align-items: center; }
.header .wp-block-navigation__submenu-icon svg { fill: var(--button-text); }
.header .wp-block-navigation-item.has-child { position: relative; display: flex; align-items: center; }
.header .wp-block-navigation .wp-block-navigation__submenu-container { position: absolute; top: 100%; left: 0; min-width: 200px; background: var(--header-bg); border: none; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); padding: 1.5rem; margin-top: 0.5rem; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.3s ease, visibility 0.3s ease; z-index: 998; height: auto; width: auto; overflow: visible; }
.header .wp-block-navigation-item.has-child:hover > .wp-block-navigation__submenu-container,
.header .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container { opacity: 1; visibility: visible; pointer-events: auto; }
.header .wp-block-navigation .wp-block-navigation__submenu-container::before { content: ''; position: absolute; top: -0.5rem; left: 0; right: 0; height: 0.5rem; }
.header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: white; display: block; padding: 0.5rem 0.75rem; margin: 0 -0.75rem; border-radius: 4px; font-size: 0.95rem; font-weight: 400; transition: background 0.2s ease, color 0.2s ease; }
.header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { color: #ffffff; background: rgba(255,255,255,0.15); }
.header .wp-block-navigation__submenu-container .wp-block-navigation-item { margin-bottom: 0.5rem; display: block; }
.header .wp-block-navigation__responsive-container-open { display: none; }

/* ===== CONTENT SECTIONS ===== */

.about, .contact, .gallery, .examenspfand, .useful-links {
    padding: 4rem 2rem;
    background: var(--main-bg);
    color: var(--main-text);
    box-sizing: border-box;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
}

.about p, .contact p, .examenspfand p {
    max-width: 600px;
    margin: 1.2em auto 0 auto;
    line-height: 1.7;
}

/* ===== FOOTER ===== */

.footer {
    text-align: center;
    line-height: 1.5;
    padding: 1.1rem 0.5rem;
    background: var(--footer-bg);
    color: var(--button-text);
    font-size: 0.9rem;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 700px) {
    .footer {
        padding: 1.2rem 0.5rem;
        font-size: 0.92rem;
    }
}

.useful-links {
    padding: 4rem 2rem;
    background: var(--main-bg);
    color: var(--main-text);
}

/* ===== CALENDAR ===== */

.calendar-iframe {
    width: 100%;
    display: block;
    border: none;
}

.calendar-wrapper {
    width: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: #fff;
}

.calendar-iframe-wrapper {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(102,15,35,0.08);
    margin-bottom: 2.2rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    .calendar-wrapper iframe {
        height: 400px;
    }
}

/* ===== LAYOUT ===== */

html, body {
    height: 100%;
    overflow-x: hidden;
}

/* Ersatz fuer das beim FSE-Umzug entfallene Fuell-Element zwischen Inhalt und
   Fussleiste (Gap G-08.1-4a): WordPress legt die gesamte Vorlagenausgabe in
   einen eigenen Rahmen, der die Fensterhoehe bisher nicht als Mindestmass kannte.
   Der Rahmen bekommt sie hier, die Fussleisten-Vorlage klebt an dessen unterem
   Rand. Bewusst OHNE Wechsel des Layoutmodus: eine Flex- oder Grid-Spalte am
   Rahmen beschaedigt Hero, About und Useful-Links der Startseite messbar. */
.wp-site-blocks {
    min-height: 100vh;
}

.wp-site-blocks > footer.wp-block-template-part {
    position: sticky;
    top: 100vh;
}

/* ===== LINKS & UTILITIES ===== */

.modern-link,
.about a.modern-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: color 0.2s, background 0.2s;
    border-radius: 4px;
    padding: 1px 3px;
    background: transparent;
}

.modern-link:hover,
.about a.modern-link:hover,
.modern-link:focus,
.about a.modern-link:focus {
    color: #fff;
    background: var(--accent);
    text-decoration: none;
    outline: none;
}

.about-blockschrift {
    text-align: justify;
    color: var(--main-text);
}

/* ===== DOWNLOADS ===== */

.downloads-list {
    margin: 2.5rem auto 1.5rem auto;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 0 1rem;
}

@media (min-width: 700px) {
    .downloads-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem;
        justify-content: flex-start;
    }
    /* Die Kachel-Obergrenze des heutigen Entwurfs steht jetzt bei der Grid-Regel in assets/css/pages.css (Gap G-08.1-3b). */
}

.download-item {
    background: #f7f7f7;
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(102,15,35,0.06);
    border-left: 4px solid var(--accent);
    margin-bottom: 0;
}

.download-name {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.3rem;
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
}

.download-link {
    color: var(--main-bg);
    background: var(--accent);
    border-radius: 6px;
    padding: 0.45em 1.1em;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin-top: 0.2rem;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 6px rgba(102,15,35,0.08);
}

.download-link:hover,
.download-link:focus {
    background: var(--accent-light);
    color: #fff;
    box-shadow: 0 2px 12px rgba(102,15,35,0.13);
    text-decoration: underline;
    outline: none;
}

.mlu-tooltip:hover,
.mlu-tooltip:focus {
    background: var(--accent);
    color: #fff;
}

.mlu-tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 260px;
    background: #222;
    color: #fff;
    text-align: center;
    border-radius: 7px;
    padding: 0.5em 1em;
    position: absolute;
    z-index: 10;
    left: 50%;
    transform: translateX(-50%);
    bottom: 130%;
    font-size: 0.98em;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(0,0,0,0.13);
    transition: opacity 0.2s;
    pointer-events: none;
}

.mlu-tooltip:hover .mlu-tooltip-text,
.mlu-tooltip:focus .mlu-tooltip-text {
    visibility: visible;
    opacity: 1;
}

.last-updated-hint {
    text-align: right;
    color: #ffffff;
    font-size: 0.93rem;
    margin: 0.5rem 0 0.5rem 0;
    padding-right: 1.2em;
    opacity: 1;
    letter-spacing: 0.01em;
    user-select: text;
}

.last-updated-hint .wp-block-post-date::before {
    content: "Letzte Aktualisierung: ";
}

.last-updated-hint:empty {
    display: none;
}

/* ===== DOWNLOAD LIST SECTION ===== */

.download-list-section {
    max-width: 800px;
    margin: 3rem auto 2rem auto;
    background: #faf7f8;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(102,15,35,0.07);
    padding: 2.5rem 2rem 2rem 2rem;
    line-height: 1.7;
    font-size: 1.09rem;
    letter-spacing: 0.01em;
    word-break: break-word;
}

@media (max-width: 900px) {
    .download-list-section {
        max-width: 80vw;
    }
}

.download-list-section h1 {
    margin-bottom: 1.7rem;
    margin-top: 0;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: left;
}

.download-list-section p,
.download-list-section a,
.download-list-section li,
.download-list-section .download-list-title {
    line-height: 1.7;
    font-size: 1.09rem;
}

.download-list-section p {
    margin-bottom: 1.1em;
    margin-top: 0.2em;
    max-width: 700px;
}

.download-list-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.download-list-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: flex;
    align-items: baseline;
    gap: 0.7em;
    margin-bottom: 0.4rem;
}

.download-list-title p {
    margin: 0;
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
}

.download-list-stand {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.download-list-link {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.7rem 1.1rem;
    font-size: 1.03rem;
    margin-top: 0.2rem;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.13s;
    letter-spacing: 0.01em;
    margin-bottom: 0.1rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
    word-break: break-all;
}

.download-list-link:hover,
.download-list-link:focus {
    background: var(--accent-light);
    color: #fff;
    box-shadow: 0 4px 16px rgba(102,15,35,0.13);
    text-decoration: underline;
    outline: none;
    transform: translateY(-2px) scale(1.02);
}

.download-list-hinweis {
    font-size: 1.04rem;
    line-height: 1.7;
    max-width: 700px;
    margin-top: 1.7rem;
    padding: 0.7em 1em;
    border-radius: 8px;
    background: #f7f7f7;
    box-shadow: 0 1px 4px rgba(102,15,35,0.04);
}

@media (max-width: 700px) {
    .download-list-section {
        padding: 1.2rem 0.7rem 1.2rem 0.7rem;
        font-size: 1rem;
    }
    .download-list-section h1 {
        font-size: 1.3rem;
    }
    .download-list-hinweis {
        font-size: 0.98rem;
        padding: 0.6em 0.7em;
    }
}

/* --- Phase 4: Block-Mapping Listen-Optik --- */

.download-list-list .download-list-item {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(102,15,35,0.05);
    padding: 1.2rem 1.3rem 1.1rem 1.3rem;
    margin-bottom: 0.2rem;
    transition: box-shadow 0.18s, transform 0.13s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.download-list-list .download-list-item:hover,
.download-list-list .download-list-item:focus-within {
    box-shadow: 0 4px 16px rgba(102,15,35,0.11);
    transform: translateY(-2px) scale(1.01);
}

.download-list-title .download-list-stand {
    font-size: 1rem;
    font-weight: 500;
}

.download-list-list .download-list-item .wp-block-file {
    margin: 0;
    font-size: inherit;
}

.download-list-item .wp-block-file a {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.7rem 1.1rem;
    font-size: 1.03rem;
    margin-top: 0.2rem;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.13s;
    letter-spacing: 0.01em;
    margin-bottom: 0.1rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
    word-break: break-all;
}

.download-list-item .wp-block-file a:hover,
.download-list-item .wp-block-file a:focus {
    background: var(--accent-light);
    color: #fff;
    box-shadow: 0 4px 16px rgba(102,15,35,0.13);
    text-decoration: underline;
    outline: none;
    transform: translateY(-2px) scale(1.02);
}


/* ===== MOBILE NAVIGATION ===== */

@media (max-width: 1150px) {
    .header .wp-block-navigation__responsive-container-open { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: none; border: none; cursor: pointer; z-index: 1100; padding: 0; position: relative; }
    .header .wp-block-navigation__responsive-container-open svg { display: none; }
    /* ---- Hamburger ↔ X morph ---- */
    .header .wp-block-navigation__responsive-container-open::before,
    .header .wp-block-navigation__responsive-container-open::after { content: ''; position: absolute; width: 20px; height: 2px; background: var(--button-text); left: 50%; transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
    .header .wp-block-navigation__responsive-container-open::before { transform: translate(-50%, calc(-50% - 5px)); }
    .header .wp-block-navigation__responsive-container-open::after { transform: translate(-50%, calc(-50% + 5px)); }
    .header .wp-block-navigation > .wp-block-navigation__container { display: none; }
    .header .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
    @keyframes fsr-menu-in { from { opacity: 0; } to { opacity: 1; } }
    .header .wp-block-navigation__responsive-container.is-menu-open { display: flex; flex-direction: column; align-items: stretch; background: var(--header-bg) !important; color: var(--button-text) !important; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1110; overflow-y: auto; box-sizing: border-box; animation: fsr-menu-in 0.28s cubic-bezier(0.4, 0, 0.2, 1); }
    /* Overlay content: left-aligned, top-anchored */
    .header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { display: flex !important; flex-direction: column !important; justify-content: flex-start !important; align-items: flex-start !important; flex: 1; padding: 4rem 2rem 2rem; width: 100%; box-sizing: border-box; }
    /* Close button styled as X at same position as hamburger */
    .header .wp-block-navigation__responsive-container-close { position: absolute; top: 34px; right: 2rem; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; z-index: 1120; padding: 0; }
    .header .wp-block-navigation__responsive-container-close svg { display: none; }
    .header .wp-block-navigation__responsive-container-close::before,
    .header .wp-block-navigation__responsive-container-close::after { content: ''; position: absolute; width: 20px; height: 2px; background: var(--button-text); left: 50%; }
    .header .wp-block-navigation__responsive-container-close::before { transform: translate(-50%, -50%) rotate(45deg); }
    .header .wp-block-navigation__responsive-container-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
    /* Nav list: full-width column, no dividers */
    .header .wp-block-navigation__responsive-container .wp-block-navigation__container { display: flex !important; flex-direction: column !important; gap: 0; padding: 0; list-style: none; margin: 0; width: 100%; align-items: flex-start !important; justify-content: flex-start !important; }
    /* Top-level items: large Apple-style, no divider */
    .header .wp-block-navigation__responsive-container .wp-block-navigation-item { display: flex !important; align-items: center; width: 100%; border-bottom: none; }
    .header .wp-block-navigation__responsive-container > .wp-block-navigation__responsive-close > .wp-block-navigation__responsive-dialog > .wp-block-navigation__responsive-container-content > .wp-block-navigation__container > .wp-block-navigation-item { margin-bottom: 0.25rem; }
    .header .wp-block-navigation__responsive-container .wp-block-navigation-item__content { font-size: 1.8rem; font-weight: 600; display: flex !important; align-items: center; justify-content: flex-start !important; color: var(--button-text) !important; text-decoration: none; width: 100%; padding: 0.2rem 0; }
    /* Submenus: always expanded, smaller, indented */
    .header .wp-block-navigation__responsive-container .wp-block-navigation__submenu-container { display: none; position: static; opacity: 1; visibility: visible; pointer-events: auto; background: transparent; padding: 0 0 0.5rem 1rem; box-shadow: none; border-radius: 0; width: 100%; }
    .header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { display: none !important; }
    .header .wp-block-navigation__responsive-container .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 1.1rem !important; font-weight: 400; padding: 0.35rem 0; color: rgba(255,255,255,0.75) !important; }
    .wp-block-site-logo img { height: 44px; width: 44px; }

    /* ---- Slide-nav: WP override ---- */
    .header .wp-block-navigation__responsive-container .wp-block-navigation__submenu-icon { display: none !important; }

    /* ---- Slide-nav: wrapper + track ---- */
    .fsr-slide-nav { width: 100%; overflow: hidden; }
    .fsr-slide-nav__track { display: flex; width: 200%; transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1); }
    .fsr-slide-nav__panel { flex: 0 0 50%; }

    /* ---- Slide-nav: shared list reset ---- */
    .fsr-slide-nav__list { list-style: none; margin: 0; padding: 0; width: 100%; }

    /* ---- Slide-nav: main panel links ---- */
    .fsr-slide-nav__link { font-size: 1.8rem; font-weight: 600; color: var(--button-text) !important; text-decoration: none; display: block; padding: 0.6rem 0; }
    .fsr-slide-nav__link:hover { color: rgba(255,255,255,0.75) !important; }

    /* ---- Slide-nav: submenu trigger buttons (parent items) ---- */
    .fsr-slide-nav__trigger { background: none; border: none; cursor: pointer; color: var(--button-text); font-size: 1.8rem; font-weight: 600; padding: 0.6rem 0; width: 100%; display: flex; align-items: center; justify-content: flex-start; font-family: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
    .fsr-slide-nav__trigger:hover { color: rgba(255,255,255,0.75); }
    .fsr-slide-nav__chevron { color: var(--button-text); font-weight: 400; margin-left: 0.5rem; }

    /* ---- Slide-nav: float heading (header row, shown when submenu is open) ---- */
    .fsr-slide-nav__float-heading { display: none; position: absolute; top: 34px; left: 4.5rem; right: 4.5rem; text-align: center; font-size: 1.1rem; font-weight: 700; color: var(--button-text); line-height: 28px; z-index: 1120; margin: 0; padding: 0; text-transform: uppercase; letter-spacing: 0.04em; }
    .fsr-slide-nav__float-heading.is-visible { display: block; }

    /* ---- Slide-nav: sub panel items ---- */
    .fsr-slide-nav__list--sub { margin-top: 0; }
    .fsr-slide-nav__link--sub { font-size: 1.5rem; font-weight: 500; padding: 0.6rem 0; }

    /* ---- Slide-nav: allow long labels to wrap instead of being clipped by
       .fsr-slide-nav{overflow:hidden} (quick-260915-wqj). Purely additive —
       does not modify any existing declaration on these three selectors.
       word-break:break-word is required in addition to overflow-wrap:break-word
       because .fsr-slide-nav__panel is a flex item with min-width:auto; only
       word-break lowers its min-content width so the panel can shrink to its
       flex-basis and the label actually wraps instead of being measured as
       one unbreakable line and then clipped. ---- */
    .fsr-slide-nav__link,
    .fsr-slide-nav__trigger,
    .fsr-slide-nav__link--sub {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* ---- Slide-nav: back button (mirrors close button position, top-left) ---- */
    .fsr-slide-nav__back { display: none; position: absolute; top: 34px; left: 2rem; background: none; border: none; cursor: pointer; color: var(--button-text); font-size: 1.8rem; line-height: 1; padding: 0; z-index: 1120; align-items: center; font-family: inherit; -webkit-tap-highlight-color: transparent; }
    .fsr-slide-nav__back.is-visible { display: flex; }
    .fsr-slide-nav__trigger:focus-visible,
    .fsr-slide-nav__back:focus-visible,
    .fsr-slide-nav__link:focus-visible,
    .fsr-slide-nav__link--sub:focus-visible { outline: 2px solid var(--button-text); outline-offset: 2px; }

    .hero-text h1 { font-size: 2rem; }
}

/* ===== HERO SECTION (Homepage) ===== */

.hero {
    background: url('assets/images/index/hintergrund.webp') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero-image-copyright {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0rem 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background-color: rgba(0, 0, 0, 0.5);
    border-top-left-radius: 10px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.hero:hover .hero-image-copyright {
    opacity: 1;
}

@media (max-width: 900px) {
    .hero-image-copyright {
        opacity: 1;
        pointer-events: auto;
    }
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.hero-text {
    position: relative;
    z-index: 1;
    padding: 2rem;
    border-radius: 10px;
    color: var(--button-text);
}

.hero-text h1 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    background: var(--main-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 24px rgba(0,0,0,0.25);
    margin-bottom: 1rem;
    transition: background 0.8s cubic-bezier(.4,2,.6,1);
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.13;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.hero-text p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Homepage section headings */
.about h2,
.useful-links h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.1rem;
    letter-spacing: 0.01em;
    color: var(--accent);
    text-align: left;
}

.about p,
.useful-links p {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 0.9rem;
    color: var(--main-text);
}

/* Responsive hero */
@media (max-width: 900px) {
    .hero-text h1 {
        font-size: 1.5rem;
        margin-bottom: 0.7rem;
    }
    .about h2,
    .useful-links h2 {
        font-size: 1.18rem;
        margin-bottom: 0.8rem;
    }
    .about p,
    .useful-links p {
        font-size: 0.97rem;
    }
}

@media (max-width: 700px) {
    .hero {
        padding: 1.2rem 0.5rem;
        height: 38vh;
        min-height: 220px;
    }
    .hero-text {
        padding: 1.1rem 0.5rem;
    }
    .hero-text h1 {
        font-size: 1.45rem;
        line-height: 1.18;
        padding: 0;
        margin-bottom: 0.7rem;
        text-align: center;
        word-break: break-word;
        max-width: 100%;
    }
    .hero-text p {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 1.08rem;
    }
}

@media (max-width: 400px) {
    .hero-text h1 {
        font-size: 1.05rem;
        line-height: 1.15;
        padding: 0;
    }
}

/* ===== USEFUL LINKS GALLERY (Homepage) ===== */

.useful-links-gallery-wrapper {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: 0;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.useful-gallery {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 90vw;
    max-width: 90vw;
    border-radius: 12px;
    scroll-snap-type: x mandatory;
    min-width: 0;
    box-sizing: border-box;
    justify-content: start;
    margin: 0 auto;
}

.useful-gallery::-webkit-scrollbar {
    height: 8px;
}
.useful-gallery::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

.useful-gallery .wp-block-image {
    background: var(--main-bg);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    min-width: 220px;
    max-width: 240px;
    flex: 0 0 220px;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
    transition: transform 0.25s cubic-bezier(.4,2,.6,1), box-shadow 0.25s;
    scroll-snap-align: start;
    margin-bottom: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transform: translateZ(0);
}

.useful-gallery .wp-block-image > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.useful-gallery .wp-block-image img {
    width: 100%;
    height: auto;
    align-self: stretch;
    object-fit: cover;
    border-radius: 8px;
    background: #f7f7f7;
    transition: box-shadow 0.2s;
    display: block;
}

.useful-gallery .wp-block-image img[alt="Instagram"] {
    object-fit: contain;
    background: #fff;
    padding: 12px;
    height: 90px;
    width: 90px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: none;
    align-self: center;
}

.useful-gallery .wp-block-image img[alt="StudIP"] {
    object-fit: contain;
    background: #fff;
    padding: 12px;
    height: 90px;
    width: 90px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: none;
    align-self: center;
}

.useful-gallery .wp-block-image img[alt="Klausurenpool"],
.useful-gallery .wp-block-image img[alt="Examensprotokolle"] {
    align-self: flex-start;
}

.useful-gallery .wp-block-image figcaption {
    position: absolute;
    top: -0.7rem;
    left: -0.7rem;
    width: calc(100% + 1.4rem);
    height: calc(100% + 1.4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(85,35,39,0.85);
    color: var(--button-text);
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(.4,2,.6,1);
    text-align: center;
    padding: 0.5rem;
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

.useful-gallery .wp-block-image:hover figcaption {
    opacity: 1;
}

.useful-gallery .wp-block-image:hover img {
    box-shadow: 0 4px 16px rgba(102,15,35,0.10);
    filter: blur(1px) brightness(0.7);
}

@media (max-width: 900px) {
    .useful-gallery {
        gap: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .useful-gallery .wp-block-image {
        min-width: 180px;
        max-width: 200px;
        flex-basis: 180px;
        height: 125px;
    }
}

@media (max-width: 600px) {
    .useful-gallery {
        gap: 0.75rem;
    }
    .useful-gallery .wp-block-image {
        min-width: 140px;
        max-width: 160px;
        flex-basis: 140px;
        height: 105px;
    }
    .useful-gallery .wp-block-image figcaption {
        font-size: 0.98rem;
        padding: 0.7rem 0.3rem;
        line-height: 1.2;
        white-space: normal;
    }
}

/* ===== WORDPRESS ADMIN BAR FIX ===== */

.admin-bar .header {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .header {
        top: 46px;
    }
}
