/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&family=Pacifico&display=swap');

/* ===================== Root Variables ===================== */
:root {
  --primary-color: #008080;
  --accent-color: #FF6F61;
  --bg-light: #f0f8f8;
  --text-dark: #333;
  --blue: #3498db;
  --red: #c0392b;
  --admin-bar-bg: #23282d;
  --admin-bar-text: #eee;
}

/* ===================== Admin Bar ===================== */
body.admin-logged-in {
    padding-top: 40px; 
}
.admin-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--admin-bar-bg);
    color: var(--admin-bar-text);
    z-index: 9999;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
}
.admin-bar-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
}
.admin-bar a {
    color: var(--admin-bar-text);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
}
.admin-bar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.admin-bar-left, .admin-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.admin-bar-desktop-links a {
    padding-top: 10px;
    padding-bottom: 10px;
}
.notification-badge {
    background-color: var(--red);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.5rem;
    line-height: 1;
}
.admin-bar-mobile-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    color: var(--admin-bar-text);
    font-size: 1.2rem;
    cursor: pointer;
}
.admin-bar-mobile-nav {
    display: none;
    background: var(--admin-bar-bg);
    border-top: 1px solid #444;
}
.admin-bar-mobile-nav.open {
    display: flex;
    flex-direction: column;
}
.admin-bar-mobile-nav a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #444;
}
.admin-bar-mobile-nav a:last-child {
    border-bottom: none;
}

/* Responsive Styles for Admin Bar */
@media (max-width: 768px) {
    .admin-bar-desktop-links {
        display: none;
    }
    .admin-bar-mobile-toggle {
        display: block;
    }
}


/* ===================== Base Layout & Sticky Footer ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}
main {
  flex-grow: 1;
  background: #fff;
}

/* ===================== General Styles ===================== */
.site-header {
  background: #fff;
  padding: 0.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
body.admin-logged-in .site-header {
    top: 40px; /* Makes sticky header respect the admin bar */
}
.site-header .site-title {
  font-family: 'Pacifico', cursive;
  font-size: 1.5rem;
  color: var(--primary-color);
  transform: rotate(-2deg);
}
.site-header .site-title a { color: inherit; text-decoration: none; }
.main-navigation ul { list-style: none; display: flex; gap: 1.5rem; }
.main-navigation a {
  text-decoration: none;
  font-weight: 700;
  color: var(--text-dark);
  transition: color .3s;
}
.main-navigation a:hover, .main-navigation .current-menu-item a { color: var(--accent-color); }
.hero {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #a0e7e5, #b4f8c8);
}
.hero h2 {
  font-family: 'Pacifico', cursive;
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 1.5rem; }
.btn, button.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform .3s, background .3s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
.btn:hover, button.btn:hover {
  transform: translateY(-3px) scale(1.05);
  background: #e65a50;
}
.section { padding: 4rem 2rem; }
.section.bg-gray { background: var(--bg-light); }
.section-content { max-width: 1100px; margin: 0 auto; }
.section h3 { font-family: 'Pacifico', cursive; text-align: center; font-size: 2.5rem; margin-bottom: 2rem; color: var(--primary-color); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; justify-items: center; }
.card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: 100%;
    position: relative; /* This is needed for admin buttons */
}
.card h4 { color: var(--accent-color); margin-bottom: 0.75rem; }
.card ul { list-style: none; padding: 0; }
.center { text-align: center; margin-top: 2rem; }
.section.bg-gray .card { background: #fff; }
.section:not(.bg-gray) .card { background: var(--bg-light); }

/* ===================== Blog Styles ===================== */
.blog-list { display: flex; flex-direction: column; gap: 2rem; }
.blog-post-summary { position: relative; background: var(--bg-light); padding: 2rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.3s, box-shadow 0.3s; }
.blog-post-summary:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.blog-post-summary .card-link { text-decoration: none; color: inherit; }
.blog-post-summary:hover .card-link h2 { color: var(--accent-color); }
.blog-post-summary .card-link::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; }
.post-meta { font-size: 0.9rem; color: #666; margin: 0.5rem 0 1rem 0; }
.single-post.section-content { position: relative; }
.single-post h1 { font-family: 'Pacifico', cursive; font-size: 2.5rem; color: var(--primary-color); text-align: center; margin-bottom: 1rem; }
.single-post .post-content { font-size: 1.1rem; line-height: 1.8; }
.post-admin-actions {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}
.single-post-admin-actions { position: absolute; top: 0; right: 0; display: flex; gap: 0.5rem; z-index: 2; }
.page-admin-actions { position: absolute; top: -1rem; right: 0; z-index: 2; }
.admin-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: none; color: white; cursor: pointer; transition: transform 0.2s; text-decoration: none; }
.admin-btn:hover { transform: scale(1.1); }
.admin-btn.edit { background: var(--blue); }
.admin-btn.delete { background: var(--red); }
.no-posts-card { text-align: center; padding: 3rem 2rem; background: var(--bg-light); border-radius: 12px; }
.no-posts-card i { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }

/* ===================== Breadcrumbs (NEW) ===================== */
.breadcrumb {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    color: #888;
}
.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}
.breadcrumb span {
    font-weight: bold;
    color: var(--text-dark);
}

/* ===================== Footer ===================== */
.site-footer {
    flex-shrink: 0;
    padding: 2rem 1rem;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
}
.site-footer a {
    color: #fff;
}
.footer-disclaimer {
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 1rem;
    opacity: 0.8;
}

/* ===================== Event Page Layout ===================== */
.event-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.event-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    position: relative;
    transition: opacity 0.3s;
}
.event-date-box {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.event-date-box .month {
    font-size: 1rem;
    text-transform: uppercase;
}
.event-date-box .day {
    font-size: 2.5rem;
    line-height: 1.1;
}
.event-details h4 {
    margin: 0 0 0.5rem;
    color: var(--accent-color);
    font-size: 1.5rem;
}
.event-details .event-time {
    margin-bottom: 0.5rem;
    color: #555;
}
.section-divider {
    border: none;
    border-top: 2px solid var(--bg-light);
    margin: 4rem auto;
}
.past-event-item {
    opacity: 0.65;
}
.past-event-item:hover {
    opacity: 1;
}
.past-event-item .event-date-box {
    background: #aaa;
}
.event-admin-actions {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}


/* ===================== Submissions Page ===================== */
.submission-card {
  background: var(--bg-light);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.submission-meta p {
  margin: 0 0 0.5rem 0;
  color: #555;
  font-size: 0.9rem;
}
.submission-message blockquote {
  margin: 0;
  padding: 1rem;
  background: #fff;
  border-left: 4px solid var(--primary-color);
  font-style: italic;
  color: #333;
}
.submission-meta a {
    color: var(--primary-color);
    text-decoration: none;
}
.submission-meta a:hover {
    text-decoration: underline;
}

/* ===================== Contact Form ===================== */
.contact-spiel {
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem; 
}
.contact-buttons-container {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.collapsible-content.open {
  max-height: 500px;
}
