/*
Author: rahn
Datum: 22.07.2025
Version: 1.4
Beschreibung: Haupt-Stylesheet für Bodensee Storymaps Landingpage
ÄNDERUNG 22.07.2025: Themenspezifische Button-Farben für bessere UX
*/

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c2c2c;
    overflow-x: hidden;
}

body.theme-page .hero-title,
body.theme-page .hero-subtitle,
body.theme-page .hero-meta span,
.embedded-header .storymap-title {
    color: inherit;
}

/* === BODENSEE FARBPALETTE === */
:root {
    --color-header-bg: #283239;
    --color-tab-active: #BEAB94;
    --color-tab-inactive: #7B7572;
    --color-text-light: #ffffff;
    --color-surface: #ffffff;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-shadow: rgba(15, 20, 24, 0.25);
    --color-body-bg: #f4f1eb;
}

/* === HINTERGRUND GRADIENT === */
body {
    background: #ffffff;
    min-height: 100vh;
    position: relative;
}

body.theme-page {
    background: #ffffff;
    color: #283239;
    overflow: hidden;
    height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(40, 50, 57, 0.25), transparent 65%);
    z-index: -1;
    opacity: 0;
}

body.theme-page::before {
    opacity: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* === GLASSMORPHISMUS CONTAINER === */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}


/* === SURFACE PANELS (THEMEN-SEITEN) === */
.surface-panel {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 26px 65px rgba(15, 20, 24, 0.16);
    padding: 2.5rem 2.5rem 2.8rem;
    max-width: 1240px;
    margin: 0 auto;
}


.surface-panel p {
    color: rgba(40, 50, 57, 0.85);
}

/* === HEADER NAVIGATION === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 1rem;
    background: var(--color-header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    width: 100%;
}

.nav-container {
    max-width: none;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.zhaw-logo {
    height: 40px;
    width: auto;
    margin-left: 1rem;
}

.nav-link {
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 10px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    color: var(--color-text-light);
}

/* === MAIN CONTENT === */
.main-content {
    margin-top: 80px;
    padding: 2rem 2.5rem;
    min-height: calc(100vh - 80px);
    background: #ffffff;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background: #ffffff;
}

/* === HERO SECTION === */
.hero {
    text-align: center;
    padding: 4rem 2rem 1rem 2rem;
    margin-bottom: 2em;
    position: relative;
    background: #ffffff;
}

/* Spezifische Abstände für Startseite */
.container > .hero:first-of-type {
    margin-bottom: 3em !important;
    padding-bottom: 2rem;
}

.container > .hero:last-of-type {
    margin-top: 2em !important;
    padding-top: 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: #283239;
    margin-bottom: 1rem;
    text-shadow: none;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(40, 50, 57, 0.75);
    margin-bottom: 0;
    animation: fadeInUp 1s ease 0.3s both;
}

/* === THEME PAGE HERO === */
body.theme-page .main-content {
    padding: 0;
    max-width: none;
    height: calc(100vh - 80px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

body.theme-page .hero {
    text-align: left;
    padding: 5.5rem 0 2.5rem;
    margin-bottom: 1.8rem;
    display: flex;
    justify-content: center;
}

body.theme-page .hero .hero-shell {
    width: 100%;
    max-width: 1240px;
}

body.theme-page .hero-panel {
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 26px 78px rgba(15, 20, 24, 0.16);
    padding: 2.8rem 3rem 2.6rem;
}

body.theme-page .hero-title {
    color: #283239;
    text-shadow: none;
    font-size: 2.6rem;
    letter-spacing: -0.01em;
}

body.theme-page .hero-subtitle {
    color: rgba(40, 50, 57, 0.7);
    max-width: 760px;
}

.theme-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(28, 46, 52, 0.65);
    margin-bottom: 1.2rem;
}

.hero-meta {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: rgba(28, 46, 52, 0.55);
    font-size: 0.95rem;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(28, 46, 52, 0.08);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme grid (Startseite) bleibt, Theme-Seiten erhalten Tabs */

/* === BUTTONS - THEMENSPEZIFISCH === */

/* Standard Theme Button */
.theme-button {
    color: var(--color-text-light);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.03em;
    box-shadow: 0 8px 16px rgba(15, 20, 24, 0.15);
    font-family: inherit;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-tab-inactive);
}


.theme-button:focus-visible {
    outline: 3px solid rgba(190, 171, 148, 0.45);
    outline-offset: 3px;
}

/* Varianten nutzen Basisfarben */
.theme-button.immoerbo,
.theme-button-immoerbo,
.theme-button.lekulab,
.theme-button-lekulab,
.theme-button.neutral,
.theme-button-neutral {
    background: var(--color-tab-inactive);
}


/* === STORYMAP GALLERY === */
/* Storymap Cards entfallen zugunsten Tabs */

/* === IFRAME VIEWER === */
.iframe-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 120px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.storymap-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.iframe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bodensee-weiss);
    font-size: 1.2rem;
    z-index: 10;
    text-align: center;
}

/* === BACK BUTTON === */
.back-button {
    position: fixed;
    top: 96px;
    left: 3rem;
    z-index: 999;
    background: rgba(40, 50, 57, 0.92);
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1.6rem;
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 500;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 12px 25px rgba(15, 20, 24, 0.25);
}

.back-button:hover {
    transform: translateY(-2px);
    background: rgba(40, 50, 57, 0.98);
    box-shadow: 0 18px 35px rgba(15, 20, 24, 0.3);
}

.back-button:active {
    transform: translateY(-1px) scale(0.99);
}

.back-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

@media (min-width: 1240px) {
    .back-button {
        left: calc((100vw - 1240px) / 2 + 0.5rem);
    }
}

@media (max-width: 768px) {
    .back-button {
        left: 1.5rem;
        padding: 0.65rem 1.3rem;
        font-size: 0.9rem;
    }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .theme-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .storymap-gallery {
        grid-template-columns: 1fr;
    }
    
    .storymap-card {
        padding: 1.5rem;
        min-height: 260px;
    }
    
    .back-button {
        left: 1.5rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        background: rgba(40, 50, 57, 0.9);
        border-radius: 50px;
    }
    
    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .theme-card {
        padding: 1.5rem;
    }
    
    .storymap-card {
        padding: 1.2rem;
        min-height: 240px;
    }
    
    .iframe-container {
        height: calc(100vh - 100px);
        border-radius: 10px;
    }
}

/* === ANIMATIONEN === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}

/* === LOADING ANIMATION === */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--bodensee-weiss);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === REGISTER NAVIGATION FÜR THEMENSEITEN === */
.theme-tabs-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    background: #ffffff;
    padding: 0.05rem 0 0.15rem 0;
    flex-shrink: 0;
}

.theme-tabs {
    width: 100%;
    max-width: none;
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.2rem;
    background: rgba(40, 50, 57, 0.2);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.theme-tabs::-webkit-scrollbar {
    height: 6px;
}

.theme-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.theme-tabs::-webkit-scrollbar-thumb {
    background: rgba(28, 46, 52, 0.15);
    border-radius: 999px;
}

.theme-tab-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 4px;
    background: var(--color-tab-inactive);
    color: var(--color-text-light);
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    position: relative;
    white-space: normal;
    text-align: left;
}

.theme-tab-button::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    border: 1px solid transparent;
}


.theme-tab-button.active {
    background: var(--color-tab-active);
    color: var(--color-text-light);
}

.theme-tab-button.active::after {
    border-color: rgba(0, 0, 0, 0.2);
}

.theme-tab-button:focus-visible {
    outline: 3px solid rgba(190, 171, 148, 0.5);
    outline-offset: 4px;
}

.tab-indicator {
    width: 100%;
    max-width: none;
    height: 5px;
    background: rgba(123, 117, 114, 0.35);
    border-radius: 999px;
    margin: 0.15rem auto 0;
    position: relative;
    overflow: hidden;
}

.tab-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: var(--indicator-width, 20%);
    transform: translateX(var(--indicator-offset, 0%));
    height: 100%;
    border-radius: 999px;
    background: var(--color-tab-active);
}

.theme-tab-panels {
    max-width: none;
    margin: 0;
    width: 100%;
}

.theme-tab-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.theme-tab-panel.active {
    display: block;
}

.theme-panel-header {
    margin-bottom: 1.5rem;
}

.theme-panel-header h3 {
    font-size: 1.9rem;
    color: var(--bodensee-tab-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.theme-panel-header p {
    color: var(--bodensee-text-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.feature-list {
    margin: 1.9rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.3rem;
}

.feature-list li {
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: rgba(28, 46, 52, 0.06);
    color: var(--bodensee-tab-text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.feature-list li::before {
    content: '•';
    font-size: 1.6rem;
    color: #3e7a71;
    transform: translateY(-1px);
}

.theme-cta {
    margin-top: 2.3rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.theme-cta a {
    text-decoration: none;
}

body.theme-page .hero .hero-shell,
.theme-tabs,
.tab-indicator,
.theme-tab-panels,
body.theme-page .info-section .surface-panel {
    max-width: none;
}

body.theme-page .hero-panel,
.embedded-storymap .surface-panel,
body.theme-page .info-section .surface-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 50px rgba(15, 20, 24, 0.15);
}


/* === EMBEDDED STORYMAP === */
.embedded-storymap {
    width: 100%;
    padding: 0;
    margin: 0;
    height: calc(100vh - 80px - 120px);
    overflow: hidden;
}

.embedded-storymap iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #f0f4f5;
    display: block;
}

.theme-tab-button,
.theme-tab-button.active,
.theme-tab-button:hover {
    color: var(--color-text-light);
}

/* === THEME CARDS (STARTSEITE) === */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2rem;
    margin-bottom: 3em;
    margin-top: 2em;
    position: relative;
}

.theme-card {
    position: relative;
    padding: 1.2rem;
    text-align: left;
    background: transparent;
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(15, 20, 24, 0.12);
    color: #283239;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}


.theme-card::before {
    content: '';
    position: absolute;
    inset: 0.6rem;
    border-radius: 18px;
    border: 2px solid #ffffff;
    pointer-events: none;
    z-index: 1;
}

.theme-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(1);
    z-index: 0;
    transition: filter 0.25s ease;
}

.theme-card.immoerbo-card::after {
    background-image: url('../images/Konstanz-Stephansplatz-Fasnacht-Umzug-Konstanzer-Teufel-03_Copyright_MTK-Joy-Abdulahovic.png');
}

.theme-card.lekulab-card::after {
    background-image: url('../images/25_IMG_4447verstehen.jpg');
}


.theme-card-content {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    box-shadow: 0 6px 15px rgba(15, 20, 24, 0.1);
    display: flex;
    justify-content: center;
    width: fit-content;
    margin: 0 auto 0.4rem;
}

.theme-card .theme-button {
    margin: 0;
    align-self: center;
}
