/*
Theme Name: FDP Reinickendorf
Theme URI: https://fdp-reinickendorf.de
Author: FDP Reinickendorf
Author URI: https://fdp-reinickendorf.de
Description: Modernes Block-Theme für FDP Reinickendorf mit Tailwind CSS
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fdp-reinickendorf
Tags: block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, full-site-editing, one-column, wide-blocks
*/

/* ============================================
   FDP BRAND COLORS (CSS Custom Properties)
   ============================================ */

:root {
    --fdp-yellow: #FFED00;
    --fdp-magenta: #E5007D;
    --fdp-dark: #1A1A1A;
    --fdp-gray: #666666;
    --fdp-gray-light: #F5F5F5;
    --fdp-white: #FFFFFF;
}

/* ============================================
   HERO SECTION - FDP BERLIN STYLE
   ============================================ */

.fdp-hero {
    background: var(--fdp-yellow);
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    text-align: center;
}

.fdp-hero-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    color: var(--fdp-magenta);
    line-height: 1.1;
    margin: 0 0 2rem 0;
    text-transform: none;
}

.fdp-hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.fdp-hero-cta a {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--fdp-magenta);
    color: white !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.fdp-hero-cta a:hover {
    background: var(--fdp-dark);
    transform: translateY(-2px);
}

.fdp-hero-cta a.fdp-btn-outline {
    background: transparent;
    color: var(--fdp-dark) !important;
    border: 2px solid var(--fdp-dark);
}

.fdp-hero-cta a.fdp-btn-outline:hover {
    background: var(--fdp-dark);
    color: white !important;
}

/* ============================================
   HIGHLIGHT GRID - POST + EVENT
   ============================================ */

.fdp-highlight-section {
    background: var(--fdp-gray-light);
    padding: 2rem;
}

.fdp-highlight-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hide wpautop garbage in highlight grid */
.fdp-highlight-grid > * {
    display: none !important;
}

.fdp-highlight-grid > .fdp-highlight-card {
    display: flex !important;
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
}

@media (max-width: 768px) {
    .fdp-highlight-grid > .fdp-highlight-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.fdp-highlight-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.fdp-highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.fdp-highlight-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.fdp-highlight-event {
    flex-direction: row;
}

.fdp-highlight-event-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--fdp-magenta);
    color: white;
    padding: 1.5rem;
    min-width: 100px;
}

.fdp-highlight-event-badge .fdp-event-day {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.fdp-highlight-event-badge .fdp-event-month {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.fdp-highlight-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.fdp-highlight-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fdp-magenta);
}

.fdp-highlight-date {
    font-size: 0.85rem;
    color: var(--fdp-gray);
}

.fdp-highlight-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fdp-dark);
    line-height: 1.3;
}

.fdp-highlight-excerpt {
    font-size: 0.9rem;
    color: var(--fdp-gray);
    line-height: 1.5;
}

.fdp-highlight-meta {
    font-size: 0.85rem;
    color: var(--fdp-gray);
}

.fdp-highlight-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fdp-magenta);
    margin-top: auto;
}

.fdp-highlight-card:hover .fdp-highlight-title {
    color: var(--fdp-magenta);
}

/* Highlight wrapper with "see all" link */
.fdp-highlight-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fdp-highlight-all-link {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fdp-magenta);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fdp-highlight-all-link:hover {
    color: var(--fdp-dark);
}

/* Fix wrapper display in grid */
.fdp-highlight-grid > .fdp-highlight-wrapper {
    display: flex !important;
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
}

@media (max-width: 768px) {
    .fdp-highlight-grid > .fdp-highlight-wrapper {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ============================================
   LAYOUT - STICKY FOOTER
   ============================================ */

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.wp-site-blocks {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.wp-site-blocks > main,
.wp-site-blocks > .wp-block-group[class*="main"] {
    flex: 1 0 auto;
}

.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part:last-child,
.site-footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* ============================================
   TAILWIND EXTENSIONS - FDP BRAND
   ============================================ */

.bg-fdp-yellow { background-color: var(--fdp-yellow) !important; }
.bg-fdp-magenta { background-color: var(--fdp-magenta) !important; }
.bg-fdp-dark { background-color: var(--fdp-dark) !important; }
.text-fdp-yellow { color: var(--fdp-yellow) !important; }
.text-fdp-magenta { color: var(--fdp-magenta) !important; }
.text-fdp-dark { color: var(--fdp-dark) !important; }

/* ============================================
   HEADER STYLES - BOLD & POP
   ============================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 4px solid var(--fdp-yellow);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.fdp-logo-img img {
    height: auto;
    max-height: 70px;
    width: auto !important;
}

/* Navigation styling - Bold like FDP Berlin */
.wp-block-navigation .wp-block-navigation-item__content {
    font-weight: 700 !important;
    color: var(--fdp-dark) !important;
    transition: all 0.2s ease;
    position: relative;
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
    color: var(--fdp-magenta) !important;
}

/* Mitmachen button in nav */
.nav-mitmachen .wp-block-navigation-item__content {
    background: var(--fdp-magenta) !important;
    color: white !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-mitmachen .wp-block-navigation-item__content:hover {
    background: #C70069 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 0, 125, 0.3);
}

/* ============================================
   TYPOGRAPHY - BOLD & IMPACTFUL
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    line-height: 1.1;
}

/* Giant headlines like FDP Berlin */
.hero-headline {
    font-size: clamp(3rem, 8vw, 6rem) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.hero-headline-accent {
    color: var(--fdp-magenta) !important;
}

/* ============================================
   STAFF DIRECTORY STYLES
   ============================================ */

/* Staff Grid - Compact Layout */
.fdp-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
    padding: 1rem 0;
}

.fdp-staff-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.fdp-staff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.fdp-staff-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: linear-gradient(135deg, var(--fdp-gray-light), #e0e0e0);
}

.fdp-staff-image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--fdp-yellow) 0%, var(--fdp-magenta) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: 800;
}

.fdp-staff-info {
    padding: 1rem;
}

.fdp-staff-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fdp-dark);
    margin: 0 0 0.15rem 0;
    line-height: 1.3;
}

.fdp-staff-position {
    font-size: 0.8rem;
    color: var(--fdp-magenta);
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.fdp-staff-contact {
    font-size: 0.75rem;
    color: var(--fdp-gray);
    word-break: break-word;
}

.fdp-staff-contact a {
    color: var(--fdp-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fdp-staff-contact a:hover {
    color: var(--fdp-magenta);
}

/* ============================================
   CTA BOXES - FDP BERLIN STYLE
   ============================================ */

.fdp-cta-box {
    transition: all 0.3s ease;
    min-height: 220px;
}

.fdp-cta-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 237, 0, 0.4);
}

.fdp-cta-box h3 {
    transition: color 0.2s ease;
}

.fdp-cta-box a {
    color: var(--fdp-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.fdp-cta-box a:hover {
    color: var(--fdp-magenta);
}

/* ============================================
   MITMACHEN GRID - FDP BERLIN STYLE
   ============================================ */

.fdp-mitmachen-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Fix wpautop inserting p tags inside grid - hide them completely */
.fdp-mitmachen-grid > p,
.fdp-mitmachen-card > p {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@media (max-width: 768px) {
    .fdp-mitmachen-grid {
        grid-template-columns: 1fr;
    }
}

.fdp-mitmachen-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--fdp-yellow);
    padding: 2.5rem 2rem;
    min-height: 200px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.fdp-mitmachen-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(255, 237, 0, 0.5);
}

.fdp-mitmachen-text {
    display: flex;
    flex-direction: column;
}

.fdp-mitmachen-text span {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--fdp-magenta);
}

.fdp-mitmachen-bold {
    font-weight: 900 !important;
}

.fdp-mitmachen-card h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--fdp-magenta);
    margin: 0;
}

.fdp-mitmachen-card h3 strong {
    font-weight: 900;
}

.fdp-mitmachen-arrow {
    font-size: 2rem;
    color: var(--fdp-magenta);
    align-self: flex-end;
    transition: transform 0.3s ease;
}

.fdp-mitmachen-card:hover .fdp-mitmachen-arrow {
    transform: translateX(8px);
}

/* ============================================
   BUTTON STYLES - BOLD
   ============================================ */

.wp-block-button__link {
    transition: all 0.2s ease;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wp-block-button__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Primary magenta button */
.is-style-fill .wp-block-button__link,
.wp-block-button__link.has-fdp-magenta-background-color {
    background: var(--fdp-magenta) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 1rem 2rem !important;
}

.wp-block-button__link.has-fdp-magenta-background-color:hover {
    background: #C70069 !important;
}

/* Yellow button */
.wp-block-button__link.has-fdp-yellow-background-color {
    background: var(--fdp-yellow) !important;
    color: var(--fdp-dark) !important;
    border-radius: 6px !important;
    padding: 1rem 2rem !important;
}

/* ============================================
   ARTICLE CARDS - POP STYLE
   ============================================ */

.article-card {
    transition: all 0.3s ease;
    border: none !important;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   COVER BLOCKS - BOLD GRADIENTS
   ============================================ */

.wp-block-cover.hero-cover {
    min-height: 85vh !important;
}

.wp-block-cover .wp-block-cover__background {
    background: linear-gradient(135deg, rgba(229, 0, 125, 0.9) 0%, rgba(26, 26, 26, 0.95) 50%) !important;
}

/* ============================================
   YELLOW ACCENT BAR
   ============================================ */

.yellow-accent-bar {
    height: 8px;
    background: var(--fdp-yellow);
    width: 80px;
    margin-bottom: 1.5rem;
}

/* ============================================
   EVENTS STYLES
   ============================================ */

.fdp-events-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Only event cards should be visible, hide wpautop garbage */
.fdp-events-grid > * {
    display: none !important;
}

.fdp-events-grid > .fdp-event-card {
    display: flex !important;
    flex: 0 0 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
}

@media (max-width: 900px) {
    .fdp-events-grid > .fdp-event-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.fdp-events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fdp-event-card {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--fdp-magenta);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    min-height: 120px;
}

.fdp-event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.fdp-event-card:hover .fdp-event-title {
    color: var(--fdp-magenta);
}

.fdp-event-past {
    opacity: 0.6;
    border-left-color: var(--fdp-gray);
}

.fdp-event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--fdp-magenta);
    color: white;
    padding: 1rem 1.25rem;
    min-width: 70px;
}

.fdp-event-past .fdp-event-date-badge {
    background: var(--fdp-gray);
}

.fdp-event-day {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.fdp-event-month {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.fdp-event-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.fdp-event-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fdp-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.fdp-event-time,
.fdp-event-location {
    display: block;
}

.fdp-event-time,
.fdp-event-location {
    font-size: 0.85rem;
    color: var(--fdp-gray);
    margin: 0.25rem 0;
}

/* Single Event Page Details */
.fdp-event-single-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fdp-event-detail {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.fdp-event-detail strong {
    color: var(--fdp-dark);
}

/* ============================================
   POSTS GRID STYLES
   ============================================ */

.fdp-posts-grid {
    display: grid;
    gap: 2rem;
}

.fdp-posts-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fdp-posts-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fdp-posts-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .fdp-posts-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .fdp-posts-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .fdp-posts-cols-4,
    .fdp-posts-cols-3,
    .fdp-posts-cols-2 { grid-template-columns: 1fr; }
    
    .fdp-events-grid {
        grid-template-columns: 1fr;
    }
}

.fdp-post-card,
.wp-block-query .wp-block-post {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fdp-post-card:hover,
.wp-block-query .wp-block-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* WordPress Query Block Grid Fix */
.wp-block-post-template.is-layout-grid {
    gap: 2rem !important;
}

.wp-block-post-template.is-layout-grid > .wp-block-post {
    margin: 0 !important;
}

/* Post card inner content */
.wp-block-post .wp-block-post-featured-image {
    margin: 0;
    height: 200px;
    overflow: hidden;
}

.wp-block-post .wp-block-post-featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.05);
}

.wp-block-post .wp-block-post-title a {
    text-decoration: none;
    color: var(--fdp-dark);
    transition: color 0.2s ease;
}

.wp-block-post .wp-block-post-title a:hover {
    color: var(--fdp-magenta);
}

.wp-block-post .wp-block-post-excerpt {
    flex-grow: 1;
}

.wp-block-post .wp-block-read-more {
    margin-top: auto;
}

.fdp-post-image-link {
    display: block;
    overflow: hidden;
}

.fdp-post-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.fdp-post-card:hover .fdp-post-image {
    transform: scale(1.05);
}

.fdp-post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fdp-post-date {
    font-size: 0.8rem;
    color: var(--fdp-gray);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.fdp-post-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.75rem 0;
}

.fdp-post-title a {
    color: var(--fdp-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fdp-post-title a:hover {
    color: var(--fdp-magenta);
}

.fdp-post-excerpt {
    font-size: 0.9rem;
    color: var(--fdp-gray);
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex: 1;
}

.fdp-post-readmore {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fdp-magenta);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fdp-post-readmore:hover {
    color: #C70069;
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.site-footer {
    background-color: var(--fdp-dark);
    color: white;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--fdp-yellow);
}

.site-footer h4,
.site-footer .wp-block-heading {
    color: var(--fdp-yellow) !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .fdp-logo-img img {
        max-height: 50px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.5rem 1rem !important;
    }
    
    .fdp-logo-img img {
        max-height: 45px;
    }
    
    .fdp-staff-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease forwards;
}
