/**
 * AGNP Relaunch Custom Styles (Design-Tokens derived from DGBP.de)
 */

:root {
    --agnp-color-primary: #212934;
    --agnp-color-accent-blue: #078cb2;
    --agnp-color-accent-teal: #5c9fb2;
    --agnp-color-accent-green: #6cad45;
    --agnp-color-bg-light: #f6f8fa;
    --agnp-color-border: #e2e8f0;
    --agnp-color-text: #2d3748;
    --agnp-color-text-muted: #64748b;
    --agnp-border-radius: 8px;
    --agnp-shadow-card: 0 4px 12px rgba(0, 0, 0, 0.05);
    --agnp-shadow-hover: 0 12px 28px rgba(7, 140, 178, 0.14);
    --agnp-transition: all 0.25s ease-in-out;
}

.agnp-card-grid,
.agnp-event-card-grid {
    display: grid;
    gap: 28px;
    margin: 24px 0 40px;
    width: 100%;
}

.agnp-card-grid.col-3,
.agnp-event-card-grid.col-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agnp-card-grid.col-2,
.agnp-event-card-grid.col-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 991px) {
    .agnp-card-grid.col-3,
    .agnp-event-card-grid.col-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .agnp-card-grid,
    .agnp-event-card-grid,
    .agnp-card-grid.col-3,
    .agnp-event-card-grid.col-3,
    .agnp-card-grid.col-2,
    .agnp-event-card-grid.col-2 {
        grid-template-columns: 1fr;
    }
}

.agnp-card {
    background: #ffffff;
    border: 1px solid var(--agnp-color-border);
    border-radius: var(--agnp-border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--agnp-shadow-card);
    transition: var(--agnp-transition);
    position: relative;
    height: 100%;
}

.agnp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--agnp-shadow-hover);
    border-color: var(--agnp-color-accent-teal);
}

.agnp-card-image-wrap {
    display: block;
    height: 190px;
    position: relative;
    overflow: hidden;
    background: var(--agnp-color-primary);
}

.agnp-card-bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.agnp-event-fallback-bg {
    background: linear-gradient(135deg, #212934 0%, #078cb2 100%);
}

.agnp-card:hover .agnp-card-bg-image {
    transform: scale(1.04);
}

.agnp-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(33,41,52,0.6) 100%);
    pointer-events: none;
}

.agnp-card-body {
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.agnp-card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--agnp-color-primary);
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.agnp-card-title a {
    color: var(--agnp-color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.agnp-card-title a:hover {
    color: var(--agnp-color-accent-blue);
}

.agnp-card-excerpt {
    color: var(--agnp-color-text-muted);
    font-size: 0.93rem;
    line-height: 1.55;
    margin-bottom: 20px;
    flex-grow: 1;
}

.agnp-card-footer {
    margin-top: auto;
    padding-top: 10px;
}

.agnp-btn-link {
    color: var(--agnp-color-accent-blue);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    transition: gap 0.2s ease;
}

.agnp-btn-link:hover {
    gap: 10px;
    color: var(--agnp-color-accent-green);
}

.agnp-event-card .agnp-card-image-wrap {
    height: 190px;
}

.agnp-event-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #078cb2;
    background: linear-gradient(135deg, #078cb2 0%, #056a88 100%);
    color: #ffffff;
    border-radius: 6px;
    padding: 6px 12px;
    text-align: center;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    min-width: 55px;
}

.agnp-event-badge-day {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.agnp-event-badge-month {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.agnp-event-meta-top {
    font-size: 0.84rem;
    color: var(--agnp-color-accent-blue);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 600;
}

.agnp-event-meta-top span {
    display: inline-flex;
    align-items: center;
}

.agnp-btn-secondary {
    display: inline-block;
    padding: 9px 18px;
    background-color: var(--agnp-color-bg-light);
    border: 1px solid var(--agnp-color-border);
    color: var(--agnp-color-primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--agnp-transition);
}

.agnp-btn-secondary:hover {
    background-color: var(--agnp-color-accent-blue);
    border-color: var(--agnp-color-accent-blue);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(7, 140, 178, 0.25);
}

/**
 * Homepage section bands: break out to full window width regardless of
 * Avada's page-template width setting (the "100% Width" template achieves
 * this natively, but it also drops the site header on this install, so
 * this is a manual, template-independent full-bleed instead).
 * Distinct tint + a faint CSS-only structural pattern per section, no images.
 */
.agnp-home-section {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Inside a hundred_percent="yes" container, Avada's .fusion-builder-row uses
   a gutter-based width (104% + negative margin) instead of the site width —
   that only gets capped at var(--site_width) on the "100% Width" page
   template (see note above), which we're not using. Avada also has its own
   `.hundred-percent-fullwidth .fusion-row { max-width: none !important }`
   rule fighting us at equal specificity, so this needs the extra
   `.fusion-row` class compounded on to outrank it, not just !important. */
.agnp-home-section .fusion-builder-row.fusion-row {
    max-width: var(--site_width, 1200px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Compounded with .fusion-fullwidth (and !important) because Avada's own
   inline dynamic CSS sets background-color/-image via CSS vars on
   .fusion-fullwidth with equal selector specificity, loads after this
   stylesheet, and wins the cascade otherwise. */
/* Only the events band carries a tint + pattern now — hero and groups stay
   plain white so a single accented section reads as a deliberate break in
   the rhythm rather than every section competing for attention. */
.fusion-fullwidth.agnp-home-hero {
    background-color: #ffffff !important;
    background-image: none !important;
}

.fusion-fullwidth.agnp-home-events {
    background-color: #eef5f7 !important;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(92, 159, 178, 0.12) 0px,
        rgba(92, 159, 178, 0.12) 1px,
        transparent 1px,
        transparent 16px
    ) !important;
}

.fusion-fullwidth.agnp-home-groups {
    background-color: #ffffff !important;
    background-image: none !important;
}

/**
 * CTA banner (Spenden / Mitglied werden), restored from the original
 * production homepage content.
 */
.agnp-cta-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--agnp-color-bg-light);
    border-top: 3px solid var(--agnp-color-accent-blue);
    border-radius: var(--agnp-border-radius);
    padding: 28px 32px;
    margin: 24px 0;
}

.agnp-cta-title {
    margin: 0 0 6px;
    font-size: 1.3rem;
    color: var(--agnp-color-primary);
}

.agnp-cta-subtext {
    margin: 0;
    color: var(--agnp-color-text-muted);
}

.agnp-cta-btn {
    flex-shrink: 0;
}
