/*
Theme Name:  Event Helfer
Theme URI:   https://meelo.ch
Description: Minimal companion theme for the Event Helfer volunteer plugin. Full-width, no sidebar, teal design system.
Author:      Patrick / Meelo
Version:     1.0.0
Text Domain: event-helfer-theme
*/

/* ══ Reset & Base ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --eh-teal:       #0d5c5c;
    --eh-teal-light: #2ebfb3;
    --eh-accent:     #00b4a0;
    --eh-bg:         #e8f4f4;
    --eh-navy:       #0a2e2e;
    --eh-surface:    #ffffff;
    --eh-font:       'Sora', system-ui, sans-serif;
    --eh-font-body:  'DM Sans', system-ui, sans-serif;
    --eh-radius:     12px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--eh-font-body);
    background: var(--eh-bg);
    color: var(--eh-navy);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ══ Typography ════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--eh-font);
    font-weight: 700;
    line-height: 1.25;
    color: var(--eh-navy);
}

a { color: var(--eh-teal-light); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ══ Layout ════════════════════════════════════════════════════════════════ */
#eht-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Site header – hidden on plugin pages, shown on blog/other pages */
#eht-header {
    background: var(--eh-teal);
    color: #fff;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

/* Hide default header on plugin pages (plugin renders its own top bar) */
body.eh-plugin-page #eht-header { display: none; }

#eht-site-name {
    font-family: var(--eh-font);
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    letter-spacing: -.3px;
}
#eht-site-name:hover { text-decoration: none; opacity: .85; }

#eht-nav { display: flex; gap: 8px; align-items: center; }
#eht-nav a {
    color: rgba(255,255,255,.85);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 7px;
    transition: background .15s;
    text-decoration: none;
}
#eht-nav a:hover,
#eht-nav a.current { background: rgba(255,255,255,.15); color: #fff; }

/* Mobile hamburger */
#eht-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
    border: none;
    background: none;
}
#eht-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}
#eht-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#eht-hamburger.open span:nth-child(2) { opacity: 0; }
#eht-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 680px) {
    #eht-hamburger { display: flex; }
    #eht-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--eha-teal, #0d5c5c);
        flex-direction: column;
        padding: 8px 16px 16px;
        box-shadow: 0 8px 20px rgba(0,0,0,.2);
        gap: 4px;
        z-index: 200;
    }
    #eht-nav.open { display: flex; }
    #eht-nav a { border-radius: 8px; padding: 10px 14px; font-size: 15px; }
    #eht-header { position: relative; }
}

/* Main content area */
#eht-main {
    flex: 1;
    width: 100%;
}

/* Full-width plugin pages: no padding */
body.page #eht-main,
body.single-eh_event #eht-main {
    padding: 0;
}

/* Regular content pages (blog, etc.) */
body:not(.page):not(.single-eh_event) #eht-main {
    max-width: 860px;
    margin: 40px auto;
    padding: 0 24px;
}

/* ══ Footer ════════════════════════════════════════════════════════════════ */
#eht-footer {
    background: var(--eh-navy);
    color: rgba(255,255,255,.6);
    text-align: center;
    padding: 18px 24px;
    font-size: 12px;
}
#eht-footer a { color: var(--eh-teal-light); }

/* Hide footer on plugin pages */
body.eh-plugin-page #eht-footer { display: none; }

/* ══ WP Admin Bar adjustment ═══════════════════════════════════════════════ */
.admin-bar #eht-header { top: 32px; }
@media (max-width: 782px) {
    .admin-bar #eht-header { top: 46px; }
}

/* ══ Minimal Blog/Archive styles ═══════════════════════════════════════════ */
.eht-posts { list-style: none; }
.eht-post-item {
    background: var(--eh-surface);
    border-radius: var(--eh-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.eht-post-item h2 { font-size: 20px; margin-bottom: 8px; }
.eht-post-item h2 a { color: var(--eh-navy); }
.eht-post-item h2 a:hover { color: var(--eh-teal-light); text-decoration: none; }
.eht-post-meta { font-size: 12px; color: #888; margin-bottom: 12px; }
.eht-post-excerpt { color: #555; font-size: 14px; margin-bottom: 16px; }
.eht-read-more {
    display: inline-block;
    padding: 7px 16px;
    background: var(--eh-teal);
    color: #fff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}
.eht-read-more:hover { background: var(--eh-teal-light); text-decoration: none; color: #fff; }

/* Pagination */
.eht-pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.eht-pagination a, .eht-pagination span {
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 13px;
    background: var(--eh-surface);
    color: var(--eh-teal);
    border: 1px solid #d1d5db;
}
.eht-pagination .current { background: var(--eh-teal); color: #fff; border-color: var(--eh-teal); }

/* ══ Responsive ════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    #eht-header { padding: 0 16px; }
    #eht-nav a span { display: none; }
}
