﻿* {
    box-sizing: border-box;
}

/*.wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 16px;
}*/

h1 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 50px;
}

.container {
    max-width: 1100px;
    margin: 25px auto;
}

header {
    text-align: center;
    margin-bottom: 28px;
}

    header h1 {
        margin: 0;
        font-size: 28px;
        color: var(--primary);
        letter-spacing: 0.2px;
        margin-bottom: 50px;
    }

    header p {
        margin: 8px 0 0;
        color: var(--muted);
        margin-bottom: 20px;
    }

.grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 18px;
    margin-bottom: 108px;
}

@media(max-width:980px) {
    .grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media(max-width:560px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.dd-card {
    background: linear-gradient(180deg, rgba(128,0,32,0.06), rgba(255,255,255,0.4));
    border-radius: 14px;
    padding: 20px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform .22s ease, box-shadow .22s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .dd-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 18px 40px rgba(2,6,23,.12);
    }

.dd-badge {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 6px 18px rgba(128,0,32,0.14);
}

.dd-card h3 {
    margin: 14px 0 6px;
    font-size: 18px;
    color: #1f1f1f;
}

.dd-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}

.dd-card .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.open-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
}

    .open-btn:hover {
        background: var(--primary);
        color: white !important;
        border-color: var(--primary-light);
    }

.modal-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,0.45);
    z-index: 10000;
    padding: 20px;
}

.modal {
    display: block !important;
    transform: translateY(18px) scale(.98);
    width: 100%;
    max-width: 920px;
    background: linear-gradient(180deg,var(--background-light), #fff);
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(2,6,23,.35);
    overflow: hidden;
    transform: translateY(18px) scale(.98);
    transition: all .22s cubic-bezier(.2,.9,.2,1);
    opacity: 0;
    position: relative;
    z-index: 10000001;
}

    .modal.open {
        transform: none !important;
        opacity: 1 !important;
    }

    .modal .header {
        padding: 18px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid #f2f2f4;
    }

        .modal .header h2 {
            margin: 0;
            color: var(--primary);
            font-size: 20px;
        }

    .modal .body {
        padding: 8px;
        max-height: 80vh;
        overflow-y: auto;
    }

.close {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
}

.tabs-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tab-btn {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #eee;
    background: #fafafa;
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
}

    .tab-btn.active {
        background: var(--primary);
        color: white;
        border-color: var(--primary);
        box-shadow: 0 8px 20px rgba(128,0,32,0.12);
    }

.tab-panel {
    display: none;
    animation: fadeIn .18s ease;
}

    .tab-panel.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    align-items: start;
}

@media(max-width:860px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

    .info-table td {
        padding: 0.6rem;
        border-bottom: 1px solid #eee;
        vertical-align: top;
    }

    .info-table tr td:first-child {
        font-weight: 700;
        color: #111827;
        width: 220px;
    }

.apply-btn {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

    .apply-btn:hover {
        background: var(--primary-light);
        color: #fff;
    }

.meta {
    background: linear-gradient(180deg,#fff, #fbfbfb);
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    color: var(--muted);
}

    .meta dt {
        font-weight: 700;
        margin-top: 8px;
        color: #111827;
        font-size: 13px;
    }

    .meta dd {
        margin: 0 0 8px 0;
        color: var(--muted);
        font-size: 14px;
    }

.kicker {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.9px;
}

.accent {
    color: var(--primary);
    font-weight: 700;
}

.content h3 {
    color: var(--primary);
    margin-top: 14px;
}

.content p, .content li {
    color: var(--muted);
    line-height: 1.6;
}

.content ul {
    margin-left: 18px;
}

.small-note {
    font-size: 13px;
    color: var(--muted);
}

.open-btn:focus, .close:focus, .card:focus, .tab-btn:focus {
    outline: 3px solid rgba(128,0,32,0.12);
    outline-offset: 3px;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.table-wrap th,
.table-wrap td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
}
