/* ==========================================================================
   FUSION2LIFE - ULTIMATE GLASS THEME (HARDMODE EDITION)
   ========================================================================== */

/* 1. FONTS & VARIABLES */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  /* --- COLORS --- */
  --f2l-orange: #F39200;
  --f2l-blue: #00AEEF;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  
  /* --- GLASS SYSTEM --- */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-card: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
  
  --header-height: 80px;
  --max-width: 1240px;
  --radius: 24px;
}

/* 2. RESET & BASE */
* { box-sizing: border-box; }

body, html {
  margin: 0; padding: 0; width: 100%; min-height: 100vh;
  font-family: 'Montserrat', sans-serif; color: var(--text-dark);
  background: #f0f9ff url('../images/bg_fusion.png') center/cover fixed no-repeat;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 174, 239, 0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--f2l-blue); }


/* 3. HEADER */
.site-header {
  position: sticky; top: 0; height: var(--header-height); width: 100%;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 1000; display: flex; align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.header-row {
  width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand-wrapper { display: flex; align-items: center; gap: 15px; }
.brand { text-decoration: none; display: flex; align-items: center; }
.brand img { display: none !important; }
.brand::after {
  content: "FUSION2LIFE EVENTS"; font-weight: 800; font-size: 1.2rem; letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--f2l-orange), var(--f2l-blue));
  background-clip: text; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
@media (min-width: 768px) { .brand::after { content: "FUSION2LIFE EVENTS"; } }


/* 4. BUTTONS & PILLS (HIGH END SYSTEM) */
.top-links { display: flex; align-items: center; gap: 12px; }

/* Base Class */
.btn-pill, .btn-blue, .btn-orange, .btn-glass, .btn-primary, .btn-join, .btn-home, .btn-nav {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none; font-weight: 700; font-size: 0.85rem;
    padding: 12px 24px; border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px;
    border: none; line-height: 1;
}

/* Variants */
.btn-blue, .btn-blue-glow, .btn-primary, .btn-join, .btn-nav {
    background: var(--f2l-blue); color: white !important;
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.25);
}
.btn-blue:hover, .btn-blue-glow:hover, .btn-primary:hover, .btn-nav:hover {
    background: #0099d3; transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 174, 239, 0.4);
}

.btn-orange, .btn-orange-glow {
    background: var(--f2l-orange); color: white !important;
    box-shadow: 0 4px 15px rgba(243, 146, 0, 0.25);
}
.btn-orange:hover, .btn-orange-glow:hover {
    background: #db8400; transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 146, 0, 0.4);
}

.btn-glass {
    background: transparent; color: var(--text-dark); border: 1px solid transparent;
}
.btn-glass.highlight { /* Zurück Button Style */
    background: rgba(255, 255, 255, 0.6); 
    border: 1px solid rgba(255,255,255,0.8);
    backdrop-filter: blur(4px);
}
.btn-glass:hover {
    background: white; color: var(--f2l-blue);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); transform: translateY(-2px);
}

.btn-home { background: white; color: var(--text-dark); border: 1px solid #e2e8f0; }


/* 5. LOCATIONS GRID (DESKTOP) */
.locations-section { margin-top: 40px; margin-bottom: 20px; }
.locations-grid {
    display: flex; flex-wrap: wrap; gap: 12px;
}
.location-pill {
    display: flex; align-items: center; gap: 10px;
    background: var(--glass-card); backdrop-filter: blur(10px);
    padding: 10px 18px; border-radius: 12px;
    text-decoration: none; color: var(--text-dark);
    font-weight: 600; font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}
.location-pill:hover {
    transform: translateY(-3px); background: white;
    box-shadow: 0 8px 20px rgba(0, 174, 239, 0.15);
    color: var(--f2l-blue);
}
.location-count {
    background: rgba(0, 174, 239, 0.1); color: var(--f2l-blue);
    padding: 2px 8px; border-radius: 6px; font-size: 0.8em; font-weight: 700;
}


/* 6. SIDEBAR (MOBILE) */
.hamburger {
    display: none; flex-direction: column; justify-content: center; gap: 6px;
    width: 40px; height: 40px; background: transparent; border: none; padding: 0;
    z-index: 2000; cursor: pointer;
}
.hamburger span { display: block; width: 28px; height: 3px; background: var(--text-dark); border-radius: 2px; }

.sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 85%; max-width: 320px;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
    z-index: 1500; transform: translateX(-105%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 100px 25px 40px; box-shadow: 10px 0 50px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }
.sidebar .brand { display: none; }
.sidebar .btn-pill { width: 100%; justify-content: flex-start; padding: 15px 20px; font-size: 0.9rem; }
.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1400; opacity: 0; pointer-events: none; transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}
body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
body.sidebar-open { overflow: hidden; }


/* 7. LAYOUT & CARDS */
@media (min-width: 981px) { .sidebar { display: none !important; } }
@media (max-width: 980px) {
    .top-links { display: none; } .hamburger { display: flex; } .content { padding: 20px 15px; }
    /* Mobile Locations Grid Stack */
    .locations-grid { justify-content: center; }
}

.content { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 40px 20px 80px; }
h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 40px; text-shadow: 0 2px 20px rgba(255,255,255,0.9); }
h2 { font-size: 1.6rem; margin-top: 50px; margin-bottom: 25px; display: flex; align-items: center; }
h2::before { content: ''; display: block; width: 6px; height: 24px; background: var(--f2l-orange); margin-right: 12px; border-radius: 4px; }

.cards-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
.card {
    background: var(--glass-bg); backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: var(--glass-shadow); transition: 0.3s;
}
.card:hover { transform: translateY(-5px); background: white; }
.card-media { height: 200px; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover img { transform: scale(1.05); }
.card-body { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.card .btn-primary { width: 100%; margin-top: auto; }


/* 8. ELEMENTS FIXES */
#map, .map {
    width: 100%; height: 500px !important; min-height: 400px;
    border-radius: var(--radius); border: 4px solid white;
    box-shadow: var(--glass-shadow); background: #e5e7eb; position: relative;
}
#site-calendar iframe {
    border-radius: var(--radius); box-shadow: var(--glass-shadow);
    background: rgba(255,255,255,0.95) !important; border: 1px solid white;
}

/* Detail Page Elements */
.frame-dark { background: transparent !important; padding: 0; }
.panel-dark {
    background: var(--glass-card); backdrop-filter: blur(20px);
    border-radius: var(--radius); padding: 40px; border: 1px solid white;
    box-shadow: var(--glass-shadow);
}
.event-title { color: var(--text-dark); font-size: 2rem; margin-top: 0; }
.hero-media img { border-radius: var(--radius); width: 100%; height: auto; max-height: 500px; object-fit: cover; }

/* Navigation Footer (Vorheriges/Nächstes) */
.event-navigation-footer {
    display: flex; gap: 20px; margin-top: 40px; flex-wrap: wrap;
}
.navigation-item { flex: 1; min-width: 250px; }
/* Button Alignment in Nav Footer */
.navigation-item .btn-nav { width: 100%; justify-content: center; } 
/* Special alignment for text inside buttons if needed */
.navigation-item small { font-weight: 400; opacity: 0.8; font-size: 0.8em; margin-left: 8px; }

/* Empty State */
.empty-state {
    background: var(--glass-card); border-radius: var(--radius); padding: 60px;
    border: 2px dashed rgba(0,0,0,0.1); text-align: center;
}
/* --- CALENDAR WRAPPER & LOADER (High End) --- */
.calendar-wrapper {
    position: relative;
    width: 100%;
    height: 900px; /* Gleiche Höhe wie Iframe */
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    border: 1px solid white;
}

/* Der Iframe startet unsichtbar */
.calendar-wrapper iframe {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Wenn geladen (per JS Klasse), sichtbar machen */
.calendar-wrapper.loaded iframe {
    opacity: 1;
}

/* Der Loader liegt drunter */
.calendar-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: #f8fafc;
}

/* Spinner Animation */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 174, 239, 0.1);
    border-radius: 50%;
    border-top-color: var(--f2l-blue);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Der neue "Vollbild" Link Style */
.btn-text-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}
.btn-text-link:hover {
    color: var(--f2l-blue);
}

/* Screenreader Utility */
.visually-hidden {
    position: absolute; 
    width: 1px; height: 1px; 
    margin: -1px; padding: 0; 
    overflow: hidden; 
    clip: rect(0, 0, 0, 0); 
    border: 0;
}
/* --- FORMULAR STYLING (High End) --- */
.input-glass {
    width: 100%;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px; /* Pill Shape Inputs */
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

.input-glass:focus {
    background: #fff;
    border-color: var(--f2l-blue);
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.15);
    outline: none;
}

.participation-form ::placeholder {
    color: #94a3b8;
    opacity: 1;
}

/* Status Nachrichten */
.status-message {
    padding: 15px; 
    border-radius: 12px; 
    margin-bottom: 20px; 
    font-weight: 500;
    text-align: center;
}
.status-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.status-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }