/* ==========================================================
   Pfännerhall Events – Frontend Styles
   ========================================================== */
:root {
    --phe-primary: #c8102e;
    --phe-primary-dark: #a30d25;
    --phe-secondary: #1a1a1a;
    --phe-accent: #f5a623;
    --phe-bg: #ffffff;
    --phe-text: #333333;
    --phe-muted: #6a6a6a;
    --phe-border: #e5e5e5;
    --phe-radius: 14px;
    --phe-shadow: 0 4px 16px rgba(0,0,0,.08);
    --phe-shadow-hover: 0 12px 28px rgba(0,0,0,.14);
}

.phe-events-grid {
    display: grid;
    gap: 26px;
    margin: 28px 0;
}
.phe-cols-1 { grid-template-columns: 1fr; }
.phe-cols-2 { grid-template-columns: repeat(2, 1fr); }
.phe-cols-3 { grid-template-columns: repeat(3, 1fr); }
.phe-cols-4 { grid-template-columns: repeat(4, 1fr); }

.phe-card {
    background: var(--phe-bg);
    border-radius: var(--phe-radius);
    box-shadow: var(--phe-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
    border: 1px solid var(--phe-border);
}
.phe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--phe-shadow-hover);
}

.phe-card-media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--phe-primary), var(--phe-accent));
}
.phe-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.phe-card:hover .phe-card-media img { transform: scale(1.06); }

.phe-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    color: rgba(255,255,255,.7);
    background: linear-gradient(135deg, var(--phe-primary), var(--phe-accent));
}

.phe-badge {
    position: absolute;
    top: 12px;
    padding: 6px 12px;
    font-size: .75rem;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--phe-accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.phe-badge-today {
    left: 12px;
    background: var(--phe-primary);
    animation: phe-pulse 2s infinite;
}
.phe-badge-soon { left: 12px; background: var(--phe-accent); }
.phe-badge-price {
    right: 12px;
    background: var(--phe-secondary);
    text-transform: none;
    letter-spacing: 0;
    font-size: .8rem;
}

@keyframes phe-pulse {
    0%,100% { opacity: 1; }
    50%     { opacity: .7; }
}

.phe-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.phe-title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 700;
}
.phe-title a {
    color: var(--phe-secondary);
    text-decoration: none;
    transition: color .2s;
}
.phe-title a:hover { color: var(--phe-primary); }

.phe-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    font-size: .93rem;
    color: var(--phe-text);
}
.phe-meta li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(0,0,0,.06);
}
.phe-meta li:last-child { border-bottom: none; }
.phe-icon { flex: 0 0 18px; }

.phe-occurrences {
    background: linear-gradient(90deg, rgba(200,16,46,.06), rgba(245,166,35,.06));
    border-left: 3px solid var(--phe-primary);
    padding: 10px 14px;
    margin: 8px 0 14px;
    border-radius: 4px;
    font-size: .88rem;
}
.phe-occurrences ul { margin: 6px 0 0; padding-left: 18px; }
.phe-occurrences li { padding: 2px 0; }

.phe-excerpt {
    flex: 1;
    margin: 0 0 16px;
    color: var(--phe-muted);
    font-size: .93rem;
    line-height: 1.55;
}

.phe-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.phe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    border: none;
    min-height: 44px;
    line-height: 1.2;
}
.phe-btn-primary {
    background: var(--phe-primary);
    color: #fff !important;
    flex: 1;
    box-shadow: 0 2px 8px rgba(200,16,46,.25);
}
.phe-btn-primary:hover {
    background: var(--phe-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200,16,46,.35);
}
.phe-btn-outline {
    background: transparent;
    color: var(--phe-secondary) !important;
    border: 2px solid var(--phe-secondary);
}
.phe-btn-outline:hover {
    background: var(--phe-secondary);
    color: #fff !important;
}
.phe-btn-secondary { background: var(--phe-secondary); color: #fff !important; }
.phe-btn-secondary:hover { background: #000; }
.phe-btn-large { padding: 16px 28px; font-size: 1.05rem; }

.phe-single-info {
    background: linear-gradient(135deg, #fdf7f8, #fff);
    border: 1px solid var(--phe-border);
    border-radius: var(--phe-radius);
    padding: 28px;
    margin: 30px 0;
    box-shadow: var(--phe-shadow);
}
.phe-single-info h2 {
    margin-top: 0;
    color: var(--phe-secondary);
    border-bottom: 3px solid var(--phe-primary);
    padding-bottom: 10px;
    display: inline-block;
}
.phe-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.phe-info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: #fff;
    border-radius: 10px;
    border-left: 4px solid var(--phe-accent);
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.phe-info-icon { font-size: 1.4rem; flex: 0 0 auto; }
.phe-info-item strong {
    display: block;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--phe-muted);
    margin-bottom: 4px;
}
.phe-info-item span:not(.phe-info-icon) {
    color: var(--phe-secondary);
    font-weight: 600;
}
.phe-single-actions { text-align: center; margin-top: 24px; }

.phe-registration-wrap {
    background: linear-gradient(135deg, #fff, #fdf7f8);
    border: 2px solid var(--phe-primary);
    border-radius: var(--phe-radius);
    padding: 28px;
    margin: 30px 0;
    box-shadow: var(--phe-shadow);
}
.phe-registration-wrap h3 {
    margin-top: 0;
    color: var(--phe-primary);
    font-size: 1.3rem;
}
.phe-capacity {
    background: linear-gradient(90deg, var(--phe-accent), #ffca5c);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .92rem;
    display: inline-block;
    margin: 0 0 16px;
}
.phe-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.phe-registration-form label {
    display: block;
    font-weight: 600;
    font-size: .92rem;
    color: var(--phe-secondary);
    margin-bottom: 6px;
}
.phe-registration-form input,
.phe-registration-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--phe-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}
.phe-registration-form input:focus,
.phe-registration-form textarea:focus {
    outline: none;
    border-color: var(--phe-primary);
    box-shadow: 0 0 0 3px rgba(200,16,46,.15);
}
.phe-registration-form textarea { margin-bottom: 16px; }
.phe-registration-form button { width: 100%; }

.phe-registration-msg {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
}
.phe-success {
    background: #e6f7e9;
    color: #1b6e2e;
    border-left: 4px solid #1b6e2e;
}
.phe-error {
    background: #fdecea;
    color: #9b1c1c;
    border-left: 4px solid #9b1c1c;
}
.phe-registration-full {
    background: linear-gradient(135deg, #fdecea, #ffe4e0);
    color: #9b1c1c;
    padding: 20px;
    border-radius: 12px;
    margin: 16px 0;
    border-left: 4px solid #9b1c1c;
    font-size: 1.05rem;
}

.phe-map-wrap {
    margin: 30px 0;
    background: #fff;
    border: 1px solid var(--phe-border);
    border-radius: var(--phe-radius);
    padding: 24px;
    box-shadow: var(--phe-shadow);
}
.phe-map-wrap h3 {
    margin-top: 0;
    color: var(--phe-secondary);
    border-bottom: 3px solid var(--phe-primary);
    padding-bottom: 10px;
    display: inline-block;
}
.phe-map-frame {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.phe-map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.phe-map-link {
    margin-top: 10px;
    font-size: .92rem;
}
.phe-map-link a { color: var(--phe-primary); font-weight: 600; }

.phe-empty {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #fafafa, #f0f0f0);
    border-radius: var(--phe-radius);
    color: var(--phe-muted);
}
.phe-empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.phe-empty p { font-size: 1.05rem; margin: 0; }

@media (max-width: 900px) {
    .phe-cols-3, .phe-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .phe-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .phe-events-grid { grid-template-columns: 1fr !important; gap: 16px; margin: 20px 0; }
    .phe-card-body { padding: 16px; }
    .phe-title { font-size: 1.1rem; }
    .phe-actions { flex-direction: column; }
    .phe-btn { width: 100%; padding: 14px; }
    .phe-single-info { padding: 20px; }
    .phe-info-grid { grid-template-columns: 1fr; }
    .phe-registration-wrap { padding: 20px; }
    .phe-map-frame { aspect-ratio: 4/3; }
    .phe-badge { font-size: .7rem; padding: 5px 10px; }
}
/* ==========================================================
   Sidebar-Shortcode: [pfaennerhall_sidebar]
   ========================================================== */
.phe-sidebar {
    background: #fff;
    border-radius: var(--phe-radius);
    border: 1px solid var(--phe-border);
    box-shadow: var(--phe-shadow);
    padding: 16px;
    font-size: .92rem;
}

.phe-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.phe-sidebar-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0,0,0,.08);
}
.phe-sidebar-item:last-child { border-bottom: none; }

.phe-sidebar-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--phe-primary), var(--phe-accent));
    text-decoration: none;
}
.phe-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.phe-sidebar-thumb:hover img { transform: scale(1.08); }

.phe-sidebar-thumb-placeholder {
    font-size: 1.5rem;
    color: rgba(255,255,255,.8);
}

.phe-sidebar-content {
    flex: 1;
    min-width: 0;
}

.phe-sidebar-title {
    margin: 0 0 4px;
    font-size: .95rem;
    line-height: 1.3;
    font-weight: 700;
}
.phe-sidebar-title a {
    color: var(--phe-secondary);
    text-decoration: none;
    transition: color .2s;
}
.phe-sidebar-title a:hover { color: var(--phe-primary); }

.phe-sidebar-date {
    font-size: .82rem;
    color: var(--phe-muted);
    margin-bottom: 4px;
}

.phe-sidebar-more {
    font-size: .82rem;
    font-weight: 600;
    color: var(--phe-primary) !important;
    text-decoration: none;
}
.phe-sidebar-more:hover { text-decoration: underline; }

.phe-sidebar-all {
    margin: 0;
    text-align: center;
    padding-top: 12px;
    border-top: 2px solid var(--phe-primary);
}

.phe-sidebar-all-btn {
    display: block;
    padding: 10px 14px;
    background: var(--phe-primary);
    color: #fff !important;
    text-align: center;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: background .2s;
}
.phe-sidebar-all-btn:hover {
    background: var(--phe-primary-dark);
}

.phe-sidebar-empty {
    text-align: center;
    padding: 20px 10px;
    color: var(--phe-muted);
    font-size: .9rem;
}

/* Mobile – Sidebar oft schmal */
@media (max-width: 640px) {
    .phe-sidebar-item { gap: 10px; }
    .phe-sidebar-thumb { flex: 0 0 52px; width: 52px; height: 52px; }
    .phe-sidebar-title { font-size: .9rem; }
}