
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Serif+Display:ital@0;1&display=swap');


:root {
    --green-50: #f2f9e8;
    --green-100: #e0f2c8;
    --green-200: #c0dd97;
    --green-400: #94C84A;
    --green-500: #7eb835;
    --green-700: #3B6D11;
    --green-900: #1a2e0d;

    --surface: #ffffff;
    --surface-2: #f8faf5;
    --surface-3: #f0f5e8;
    --border: #e0ebd0;
    --border-2: #c8dba8;
    --text-1: #111810;
    --text-2: #3d4d30;
    --text-3: #6a7a5a;
    --text-muted: #9aab84;

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .1), 0 2px 8px rgba(0, 0, 0, .05);

    --transition: .18s cubic-bezier(.4, 0, .2, 1);
}


.dn-hero *,
.dn-stats *,
.dn-filters-section *,
.dn-listings-section * {
    box-sizing: border-box;
}

.dn-hero {
    background: linear-gradient(160deg, #f2f9e8 0%, #e8f5d5 40%, #f7fbf0 100%);
    border-bottom: 1px solid var(--border);
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}

.dn-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 80% 20%, rgba(148, 200, 74, .12) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(148, 200, 74, .08) 0%, transparent 40%);
    pointer-events: none;
}

.dn-hero__inner {
    max-width: 680px;
    position: relative;
}

.dn-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--green-500);
    background: rgba(148, 200, 74, .12);
    border: 1px solid rgba(148, 200, 74, .3);
    padding: 5px 12px;
    border-radius: 20px;
    margin: 0 0 20px;
}

.dn-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green-400);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .5;
        transform: scale(.7);
    }
}

.dn-hero__title {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 400;
    color: var(--green-900);
    margin: 0 0 16px;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.dn-hero__sub {
    font-family: var(--font-body);
    font-size: clamp(15px, 2vw, 17px);
    color: var(--text-3);
    line-height: 1.7;
    margin: 0;
    max-width: 520px;
}

.dn-stats {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.dn-stats__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.dn-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    position: relative;
    transition: background var(--transition);
}

.dn-stat::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--border);
}

.dn-stat:last-child::after {
    display: none;
}

.dn-stat:hover {
    background: var(--surface-2);
}

.dn-stat__num {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 400;
    color: var(--green-700);
    line-height: 1;
    letter-spacing: -.02em;
}

.dn-stat__label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
    letter-spacing: .04em;
    text-transform: uppercase;
}


.dn-filters-section {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.dn-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.dn-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dn-filter-group label {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-left: 2px;
}

.dn-filter-group select,
.dn-filter-group input[type="text"] {
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-1);
    background: var(--surface-2);
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
    min-width: 148px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aab84' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.dn-filter-group select:focus,
.dn-filter-group input[type="text"]:focus {
    border-color: var(--green-400);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(148, 200, 74, .15);
}

.dn-filter-group select:hover,
.dn-filter-group input[type="text"]:hover {
    border-color: var(--border-2);
}

.dn-filter-group--search {
    flex: 1 1 220px;
}

.dn-search-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-2);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.dn-search-wrap:focus-within {
    border-color: var(--green-400);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(148, 200, 74, .15);
}

.dn-search-wrap input[type="text"] {
    border: none;
    border-radius: 0;
    flex: 1;
    min-width: 0;
    background: transparent;
    box-shadow: none !important;
    background-image: none;
    padding-right: 12px;
}

.dn-search-wrap input[type="text"]:focus {
    border: none;
    box-shadow: none;
}

.dn-search-btn {
    background: var(--green-400);
    border: none;
    padding: 0 14px;
    height: 40px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    flex-shrink: 0;
}

.dn-search-btn:hover {
    background: var(--green-500);
}

.dn-search-btn:active {
    transform: scale(.97);
}

.dn-clear-filters {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    align-self: flex-end;
    padding: 10px 6px;
    white-space: nowrap;
    transition: color var(--transition);
    border-bottom: 1px dashed transparent;
    transition: color var(--transition), border-color var(--transition);
}

.dn-clear-filters:hover {
    color: #b03030;
    border-color: #b03030;
}

/* listing */
.dn-listings-section {
    background: var(--surface-2);
    padding: 36px 0 80px;
    min-height: 400px;
}

.dn-result-count {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: .02em;
    margin: 0 0 20px;
    text-transform: uppercase;
}

.dn-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 80px 20px;
    color: var(--text-muted);
    text-align: center;
}

.dn-empty svg {
    opacity: .3;
    color: var(--green-700);
}

.dn-empty p {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-3);
    margin: 0;
}

.dn-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: .01em;
}

.dn-btn--outline {
    border: 1.5px solid var(--green-400);
    color: var(--green-700);
    background: var(--surface);
}

.dn-btn--outline:hover {
    background: var(--green-50);
    border-color: var(--green-500);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}


.dn-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 14px;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
    position: relative;
    overflow: hidden;
}

.dn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green-400) 0%, var(--green-200) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}

.dn-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-2);
    transform: translateY(-2px);
}

.dn-card:hover::before {
    opacity: 1;
}

/* Card head */
.dn-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.dn-card__title-wrap {
    flex: 1;
    min-width: 0;
}

.dn-card__title {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0 0 6px;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.dn-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.dn-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--border-2);
    flex-shrink: 0;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.badge-active {
    background: #eaf3de;
    color: #3B6D11;
    border: 1px solid #c0dd97;
}

.badge-matched {
    background: #e6f1fb;
    color: #185FA5;
    border: 1px solid #b5d4f4;
}

.badge-fulfilled {
    background: #e1f5ee;
    color: #085041;
    border: 1px solid #9fe1cb;
}

.badge-withdrawn {
    background: #f1efe8;
    color: #5F5E5A;
    border: 1px solid #d3d1c7;
}

/* Card body grid */
.dn-card__body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dn-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dn-info__label {
    font-family: var(--font-body);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
}

.dn-info__val {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    line-height: 1.4;
}

/* School block */
.dn-school-block {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-top: 2px;
    transition: background var(--transition), border-color var(--transition);
}

.dn-school-block:hover {
    background: var(--green-100);
    border-color: var(--green-200);
}

.dn-school-icon {
    width: 40px;
    height: 40px;
    background: var(--green-200);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--green-700);
}

.dn-school-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dn-school-name {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--green-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dn-school-loc {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-3);
}

.dn-school-loc em {
    color: var(--green-500);
    font-style: normal;
    font-weight: 600;
}

/* No-school placeholder */
.dn-no-school {
    grid-column: 1 / -1;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    font-style: italic;
    padding: 8px 0 2px;
}

/* Photos strip */
.dn-photos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.dn-photo-wrap {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.dn-photo-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 46, 13, 0);
    transition: background var(--transition);
}

.dn-photo-wrap:hover::after {
    background: rgba(26, 46, 13, .12);
}

.dn-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.dn-photo-wrap:hover img {
    transform: scale(1.08);
}

/* School feedback */
.dn-feedback {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--surface-3);
    border-left: 3px solid var(--green-400);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 14px 18px;
    margin-top: 18px;
    font-style: normal;
}

.dn-feedback svg {
    flex-shrink: 0;
    color: var(--green-400);
    margin-top: 2px;
}

.dn-feedback p {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.65;
    margin: 0 0 5px;
}

.dn-feedback cite {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    font-style: normal;
    letter-spacing: .03em;
}


.dn-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 48px;
}

.dn-page-link {
    display: inline-flex;
    align-items: center;
    padding: 9px 20px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
    line-height: 1;
    letter-spacing: .01em;
}

.dn-page-link--info {
    background: var(--green-50);
    border-color: var(--green-200);
    color: var(--green-700);
    cursor: default;
    font-variant-numeric: tabular-nums;
}

a.dn-page-link:hover {
    background: var(--green-50);
    color: var(--green-700);
    border-color: var(--green-400);
    box-shadow: var(--shadow-sm);
}

a.dn-page-link:active {
    transform: scale(.97);
}

.dn-page-link--disabled {
    color: var(--border-2);
    cursor: default;
    pointer-events: none;
    background: var(--surface-2);
    border-color: var(--border);
}


@media (max-width: 900px) {
    .dn-stats__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dn-stat:nth-child(3)::after {
        display: none;
    }

    .dn-stat:nth-child(4),
    .dn-stat:nth-child(5) {
        border-top: 1px solid var(--border);
    }
}


@media (max-width: 768px) {
    .dn-hero {
        padding: 44px 0 36px;
    }

    .dn-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dn-stat::after {
        display: none;
    }

    .dn-stat {
        border-bottom: 1px solid var(--border);
    }

    .dn-stat:nth-child(odd) {
        border-right: 1px solid var(--border);
    }

    .dn-stats__grid .dn-stat:nth-last-child(-n+2):not(:nth-child(odd) ~ *) {
        border-bottom: none;
    }

    .dn-filters {
        flex-direction: column;
        gap: 8px;
    }

    .dn-filter-group {
        width: 100%;
    }

    .dn-filter-group select,
    .dn-filter-group input[type="text"] {
        min-width: 0;
        width: 100%;
    }

    .dn-filter-group--search {
        width: 100%;
    }

    .dn-clear-filters {
        align-self: flex-start;
    }

    .dn-card {
        padding: 20px 18px;
        border-radius: var(--radius-lg);
    }

    .dn-card:hover {
        transform: none;
    }

    .dn-card__body {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dn-card__head {
        flex-direction: column-reverse;
        gap: 10px;
        align-items: flex-start;
    }

    .dn-school-block {
        padding: 12px 14px;
    }

    .dn-photo-wrap {
        width: 66px;
        height: 66px;
    }

    .dn-photos {
        gap: 8px;
    }

    .dn-pagination {
        gap: 3px;
    }

    .dn-page-link {
        padding: 8px 14px;
        font-size: 12px;
    }
}


@media (max-width: 480px) {
    .dn-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dn-stat:last-child {
        grid-column: 1 / -1;
        border-right: none;
    }

    .dn-card__title {
        font-size: 15px;
    }

    .dn-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dn-page-link--info {
        order: -1;
        width: 100%;
        justify-content: center;
        border-radius: var(--radius-md);
        margin-bottom: 4px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}