/* ============================================
   DePraktijkDigitaal.nl — Shared Component Styles
   Gebruikt door: trainingen-pagina, dashboard, shortcodes
   ============================================ */

/* --- Keyframes (shared) --- */
@keyframes dpdStatReveal {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes dpdProgressFill {
    from { width: 0; }
}

/* --- Container --- */
.dpd-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 var(--dpd-space-lg, 24px);
}

/* ===== BUTTONS (shared across pages) ===== */
.dpd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--dpd-font, 'DM Sans', system-ui, sans-serif);
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: -.01em;
    border-radius: 9999px;
    transition: all 250ms cubic-bezier(.16,1,.3,1);
}
.dpd-btn:active { transform: scale(.97); }

.dpd-btn--lg {
    font-size: 15px;
    padding: 14px 28px;
}

.dpd-btn--primary {
    background: var(--dpd-primary, #1A73B5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,115,181,.22);
}
.dpd-btn--primary:hover {
    background: var(--dpd-primary-hover, #155E95);
    box-shadow: 0 8px 28px rgba(26,115,181,.30);
    transform: translateY(-2px);
    color: #fff;
}

.dpd-btn--outline {
    background: transparent;
    color: var(--dpd-gray-700, #334155);
    box-shadow: inset 0 0 0 1.5px var(--dpd-gray-200, #E2E8F0);
}
.dpd-btn--outline:hover {
    box-shadow: inset 0 0 0 1.5px var(--dpd-blue-200, #9DC4E8);
    background: var(--dpd-blue-50, #EEF4FB);
    color: var(--dpd-blue-600, #155F96);
}

.dpd-btn--white {
    background: #fff;
    color: var(--dpd-blue-600, #155F96);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
.dpd-btn--white:hover {
    box-shadow: 0 12px 36px rgba(0,0,0,.18);
    transform: translateY(-2px);
}

/* ===== LABELS / PILLS (shared) ===== */
.dpd-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--dpd-primary, #1A73B5);
    background: var(--dpd-primary-light, #EEF4FB);
    border: 1px solid var(--dpd-blue-100, #D0E2F4);
    padding: 6px 16px;
    border-radius: 9999px;
    margin-bottom: 16px;
}
.dpd-label--green {
    color: var(--dpd-green-700, #096B4A);
    background: var(--dpd-green-50, #EDFAF4);
    border-color: var(--dpd-green-100, #C7F0DE);
}
.dpd-label--red {
    color: #DC2626;
    background: #FEF2F2;
    border-color: #FEE2E2;
}
.dpd-label--blue {
    color: var(--dpd-primary, #1A73B5);
    background: var(--dpd-primary-light, #EEF4FB);
    border-color: var(--dpd-blue-100, #D0E2F4);
}

/* ===== SECTION STYLES (used by shortcodes on other pages) ===== */
.dpd-section {
    padding: 60px 0;
}
.dpd-section--alt {
    background: var(--dpd-gray-50, #F8FAFC);
    border-top: 1px solid var(--dpd-border-light, #F1F5F9);
    border-bottom: 1px solid var(--dpd-border-light, #F1F5F9);
}
.dpd-section--trainingen { padding: 60px 0 96px; }

@media (min-width: 768px) {
    .dpd-section { padding: 120px 0; }
    .dpd-section--trainingen { padding: 120px 0 96px; }
}

.dpd-section__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 72px;
}
.dpd-section__title {
    font-size: clamp(26px, 3.8vw, 42px);
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 18px;
    color: var(--dpd-gray-900, #0F172A);
    line-height: 1.12;
}
.dpd-section__sub {
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--dpd-gray-500, #64748B);
    margin: 0;
}
.dpd-section__more {
    text-align: center;
    margin-top: 52px;
}

/* ===== TRAININGEN GRID (homepage + trainingen page) ===== */
.dpd-trainingen-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}
.dpd-trainingen-grid .dpd-tiles {
    display: contents;
}
.dpd-trainingen-grid .dpd-tile {
    flex: 1 1 300px;
    max-width: 320px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid var(--dpd-border, #E2E8F0);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(15,23,42,.05);
    transition: all .35s cubic-bezier(.16,1,.3,1);
}
.dpd-trainingen-grid .dpd-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(15,23,42,.10);
    border-color: var(--dpd-blue-200, #9DC4E8);
}

/* Tile internals */
.dpd-tile__header {
    padding: 10px 14px;
    position: relative;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}
.dpd-tile__header::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.15) 1px, transparent 0);
    background-size: 22px 22px;
    pointer-events: none;
}
.dpd-tile__icon,
.dpd-tile__price {
    position: relative;
    z-index: 2;
}
.dpd-tile__icon {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,.18);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dpd-tile__icon svg {
    width: 16px;
    height: 16px;
}
.dpd-tile__price {
    font-family: var(--dpd-font, 'DM Sans', sans-serif);
    font-size: 13px;
    font-weight: 700;
    background: rgba(255,255,255,.20);
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.dpd-tile__price--free {
    background: rgba(16,185,129,.85) !important;
    color: #fff !important;
}
.dpd-tile__price--owned {
    background: rgba(16,185,129,.85) !important;
    color: #fff !important;
}
.dpd-tile__body {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: var(--dpd-font, 'DM Sans', sans-serif);
}
.dpd-tile__badges { margin-bottom: 10px; }
.dpd-badge {
    display: inline-flex;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 10px;
    border-radius: 999px;
    background: #EEF4FB;
    color: #1A73B5;
    border: 1px solid #D0E2F4;
}
.dpd-badge--free {
    background: #EDFAF4;
    color: #096B4A;
    border-color: #C7F0DE;
}
.dpd-badge--doelgroep {
    background: #EEF4FB;
    color: #1A73B5;
    border: none;
}
.dpd-badge--done {
    background: #EDFAF4;
    color: #096B4A;
    border-color: #C7F0DE;
}
.dpd-badge--active {
    background: #EEF4FB;
    color: #1A73B5;
    border-color: #D0E2F4;
}
.dpd-badge--new {
    background: #F8FAFC;
    color: #475569;
    border-color: #E2E8F0;
}
.dpd-tile__title {
    font-family: var(--dpd-font-display, 'Sora', sans-serif);
    font-size: 17px;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 8px;
    letter-spacing: -.01em;
}
.dpd-tile__desc {
    font-size: 14px;
    line-height: 1.65;
    color: #64748B;
    margin: 0 0 auto;
}
.dpd-progress { margin-top: 14px; }
.dpd-progress__labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 6px;
}
.dpd-progress__track {
    height: 4px;
    background: #F1F5F9;
    border-radius: 999px;
    overflow: hidden;
}
.dpd-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #1A73B5, #0FA573);
    border-radius: 999px;
    transition: width .6s cubic-bezier(.16,1,.3,1);
}
.dpd-tile__footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F1F5F9;
}
.dpd-tile__cta {
    font-size: 14px;
    font-weight: 600;
    color: #1A73B5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.dpd-tile__cta svg {
    width: 14px;
    height: 14px;
    transition: transform .25s;
}
.dpd-tile:hover .dpd-tile__cta svg {
    transform: translateX(3px);
}

/* Empty state */
.dpd-empty {
    text-align: center;
    padding: 48px 24px;
    color: #64748B;
    font-family: var(--dpd-font, 'DM Sans', sans-serif);
}

@media (max-width: 640px) {
    .dpd-trainingen-grid .dpd-tile {
        max-width: 100%;
        flex-basis: 100%;
    }
}
.dpd-empty__icon { margin-bottom: 12px; }
.dpd-empty__title { font-size: 15px; font-weight: 500; margin: 0; }

/* ===== SECTION LABEL ===== */
.dpd-section-label,
.dpd-trainingen-page .dpd-section-label {
    display: block;
    font-family: var(--dpd-font, 'DM Sans', sans-serif);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #155F96 !important;
    margin-bottom: 20px;
}

/* ===== ALLE-TRAININGEN PAGINA ===== */
.dpd-trainingen-page {
    font-family: var(--dpd-font, 'DM Sans', system-ui, sans-serif);
    background: var(--dpd-gray-50, #F8FAFC);
    min-height: 100vh;
    padding: 40px 16px 80px;
    -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) {
    .dpd-trainingen-page { padding: 80px 16px 80px; }
}
.dpd-trainingen-page__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}
.dpd-trainingen-page__title {
    font-family: var(--dpd-font-display, 'Sora', sans-serif);
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -.025em;
    margin: 0 0 32px;
    color: #0F172A;
    line-height: 1.12;
}
.dpd-trainingen-page__intro {
    font-family: var(--dpd-font, 'DM Sans', system-ui, sans-serif);
    font-size: 17px;
    line-height: 1.7;
    color: #64748B;
    margin: 0;
}
.dpd-trainingen-grid--full {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}
.dpd-trainingen-grid--full .dpd-tiles {
    display: contents;
}
.dpd-trainingen-grid--full .dpd-tile {
    flex: 1 1 280px;
    max-width: 320px;
}
.dpd-trainingen-page__footer {
    text-align: center;
    margin-top: 48px;
    font-size: 14px;
    color: #64748B;
}
.dpd-trainingen-page__footer a {
    color: #1A73B5;
    text-decoration: none;
    font-weight: 600;
}
.dpd-trainingen-page__footer a:hover { text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .dpd-trainingen-grid .dpd-tile { max-width: 100%; flex-basis: 100%; }
    .dpd-section { padding: 80px 0; }
}
@media (max-width: 640px) {
    .dpd-section { padding: 64px 0; }
    .dpd-section__header { margin-bottom: 48px; }
}
@media (max-width: 620px) {
    .dpd-trainingen-grid--full .dpd-tile {
        max-width: 100%;
    }
}
