/* ================================================
   templates.css – page-specific styles only
   All variables (--brand-navy etc.) and base classes
   (btn-primary, btn-secondary, hero-badge, highlight)
   come from styles.css
   ================================================ */

/* Language info banner */
.lang-banner {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--brand-navy);
    padding: 10px 24px;
    transition:
        max-height 0.4s ease,
        padding 0.4s ease,
        opacity 0.3s ease;
    overflow: hidden;
}
.lang-banner.dismissed {
    max-height: 0 !important;
    padding: 0 24px;
    opacity: 0;
    pointer-events: none;
}
.lang-banner.dismissed + .lang-banner-spacer {
    height: 0;
}
.lang-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.lang-banner-spacer {
    height: 42px;
    transition: height 0.4s ease;
}
.lang-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    flex: 1;
}
.lang-text strong {
    color: var(--white);
}
.lang-text a {
    color: var(--brand-teal-light);
    font-weight: 600;
    text-decoration: none;
}
.lang-text a:hover {
    color: var(--white);
    text-decoration: underline;
}
.lang-dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}
.lang-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}
@media (max-width: 768px) {
    .lang-banner-inner {
        gap: 8px;
    }
    .lang-text {
        font-size: 0.75rem;
    }
}

/* Layout helpers */
.tpl-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}
.tpl-narrow {
    max-width: 720px;
}
.tpl-section {
    padding: 80px 0;
}
.tpl-bg {
    background: var(--brand-teal-bg);
}
.tpl-section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--brand-navy);
    text-align: center;
    margin-bottom: 16px;
    line-height: 1.2;
}
.tpl-sub {
    font-size: 1.05rem;
    color: var(--gray-600);
    line-height: 1.7;
    text-align: center;
    max-width: 680px;
    margin: 0 auto 48px;
}

/* Hero trust strip (supplements .hero from styles.css) */
.tpl-trust {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 40px;
}
.tpl-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
}
.tpl-trust svg {
    color: var(--brand-teal);
    flex-shrink: 0;
}

/* Problem cards */
.tpl-problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.tpl-pcard {
    padding: 32px 24px;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    text-align: center;
}
.tpl-pcard h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 8px;
}
.tpl-pcard p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}
.tpl-picon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.tpl-picon.red {
    background: rgba(231, 76, 60, 0.1);
    color: var(--critical-red);
}
.tpl-picon.orange {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
}
.tpl-picon.navy {
    background: var(--brand-teal-bg);
    color: var(--brand-teal-dark);
}

/* Mapping table */
.tpl-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(66, 83, 105, 0.08);
    margin-bottom: 20px;
}
.tpl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: var(--white);
}
.tpl-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
    background: var(--brand-navy);
    white-space: nowrap;
}
.tpl-table thead th:first-child {
    border-radius: 16px 0 0 0;
}
.tpl-table thead th:last-child {
    border-radius: 0 16px 0 0;
}
.tpl-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}
.tpl-table tbody tr:last-child td {
    border-bottom: none;
}
.tpl-table tbody tr:hover {
    background: var(--gray-50);
}
.tpl-table .nr {
    font-weight: 700;
    color: var(--brand-navy);
    text-align: center;
    width: 50px;
}
.tpl-table small {
    display: block;
    font-size: 0.72rem;
    color: var(--gray-500);
    margin-top: 3px;
}
.row-hl td {
    background: rgba(131, 159, 159, 0.06);
}
.ktag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}
.ktag.rm {
    background: #e8f0fe;
    color: #1a56db;
}
.ktag.ir {
    background: #fef3c7;
    color: #92400e;
}
.ktag.bcm {
    background: #d1fae5;
    color: #065f46;
}
.ktag.sc {
    background: #fce7f3;
    color: #9d174d;
}
.ktag.gl {
    background: #ede9fe;
    color: #5b21b6;
}
.st-ok {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--low-green);
}
.st-pt {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-teal-dark);
}
.tpl-legend {
    text-align: center;
    font-size: 0.82rem;
    color: var(--gray-500);
}

/* Kit cards */
.kit {
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    margin-bottom: 24px;
    overflow: hidden;
    background: var(--white);
    transition:
        border-color 0.3s,
        box-shadow 0.3s;
}
.kit:hover {
    border-color: var(--brand-teal);
    box-shadow: 0 12px 40px rgba(131, 159, 159, 0.12);
}
.kit-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.2s;
}
.kit-head:hover {
    background: var(--brand-teal-bg);
}
.kit.active .kit-head {
    background: var(--brand-teal-bg);
    border-bottom-color: var(--brand-teal);
}
.kit-ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.kit-ico.rm {
    background: #e8f0fe;
    color: #1a56db;
}
.kit-ico.ir {
    background: #fef3c7;
    color: #92400e;
}
.kit-ico.bcm {
    background: #d1fae5;
    color: #065f46;
}
.kit-ico.sc {
    background: #fce7f3;
    color: #9d174d;
}
.kit-ico.gl {
    background: #ede9fe;
    color: #5b21b6;
}
.kit-ti {
    flex: 1;
    min-width: 0;
}
.kit-ti h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0;
}
.kit-ti span {
    font-size: 0.76rem;
    color: var(--gray-500);
    display: block;
    margin-top: 2px;
}
.kit-pr {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--brand-navy);
    white-space: nowrap;
}
.kit-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}
.kit.active .kit-body {
    max-height: 2000px;
    opacity: 1;
}
.kit.active .kit-body-inner {
    padding: 24px 28px;
}
.kit-body-inner {
    padding: 0 28px;
}
/* Chevron */
.kit-chevron {
    margin-left: auto;
    color: var(--gray-400);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}
.kit.active .kit-chevron {
    transform: rotate(180deg);
    color: var(--brand-teal);
}
.kit-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 20px;
}
.kit-cols h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 10px;
}
.kit-cols ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.kit-cols li {
    font-size: 0.84rem;
    color: var(--gray-600);
    padding: 4px 0 4px 18px;
    position: relative;
    line-height: 1.5;
}
.kit-cols li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--brand-teal);
    font-weight: 600;
}
.kit-bens {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 20px;
}
.kit-bens div {
    font-size: 0.82rem;
    color: var(--gray-600);
    line-height: 1.5;
}
.kit-bens strong {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--brand-teal-dark);
    margin-bottom: 3px;
}
.kit-cta {
    animation: none;
    width: 100%;
    justify-content: center;
}

/* Bundle */
.bun-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 880px;
    margin: 0 auto;
}
.bun-card {
    background: var(--white);
    border-radius: 20px;
    padding: 36px 28px;
    border: 1px solid var(--gray-200);
    position: relative;
}
.bun-card.featured {
    border: 2px solid var(--brand-teal);
    box-shadow: 0 16px 50px rgba(131, 159, 159, 0.18);
}
.bun-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand-teal);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 100px;
    white-space: nowrap;
}
.bun-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin-bottom: 8px;
}
.bun-pr {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 24px;
}
.bun-big {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--brand-navy);
}
.bun-sm {
    font-size: 0.9rem;
    color: var(--gray-500);
}
.bun-was {
    font-size: 0.95rem;
    color: var(--gray-400);
    text-decoration: line-through;
}
.bun-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.bun-list li {
    padding: 10px 0;
    font-size: 0.9rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
}
.bun-list li span {
    font-weight: 600;
    color: var(--brand-navy);
}
.bun-list.check li {
    color: var(--brand-navy);
    font-weight: 500;
    justify-content: flex-start;
}
.bun-total {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 20px;
}
.bun-extras {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 24px;
}
.bun-extras span {
    font-size: 0.82rem;
    color: var(--brand-teal-dark);
    font-weight: 500;
}

/* How it works */
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}
.how-nr {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    background: var(--brand-teal);
    margin: 0 auto 16px;
}
.how-step h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 8px;
}
.how-step p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* NIS2 → BSIG Context */
.ctx-grid {
    display: flex;
    align-items: stretch;
    gap: 0;
    justify-content: center;
    margin-bottom: 48px;
}
.ctx-card {
    flex: 1;
    max-width: 420px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 32px 28px;
    position: relative;
}
.ctx-card.active {
    border: 2px solid var(--brand-teal);
    box-shadow: 0 8px 30px rgba(131, 159, 159, 0.12);
}
.ctx-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    margin-bottom: 8px;
}
.ctx-card.active .ctx-label {
    color: var(--brand-teal);
}
.ctx-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 10px;
}
.ctx-card p {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 16px;
}
.ctx-refs {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.ctx-refs span {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gray-500);
    padding: 4px 0;
    border-top: 1px solid var(--gray-100);
}
.ctx-card.active .ctx-refs span {
    color: var(--brand-teal-dark);
}
.ctx-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    color: var(--brand-teal);
}
.ctx-map-wrap {
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(66, 83, 105, 0.08);
}
.ctx-table .arrow {
    text-align: center;
    color: var(--brand-teal);
    font-weight: 700;
    font-size: 1.1rem;
    width: 40px;
    padding: 10px 8px;
}

/* Kit actions (buy + guide) */
.kit-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.guide-dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-teal-dark);
    padding: 10px 0;
    text-decoration: none;
    transition: color 0.2s;
}
.guide-dl:hover {
    color: var(--brand-navy);
    text-decoration: none;
}
.guide-dl svg {
    flex-shrink: 0;
}

/* Kit icon background */
.kit-ico.pol {
    background: #f0f5f5;
    color: #839f9f;
}

/* Kit tag in §30 mapping table */
.ktag.pol {
    background: #f0f5f5;
    color: #6b8585;
    border: 1px solid #d1dfdf;
}

/* Guide Modal */
.guide-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.guide-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}
.guide-modal {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 440px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.25s;
}
.guide-modal-overlay.active .guide-modal {
    transform: translateY(0);
}
.guide-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.guide-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}
.guide-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--brand-teal-bg);
    color: var(--brand-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.guide-modal h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 8px;
}
.guide-modal > p {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 24px;
}
.guide-modal form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}
.guide-modal input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.guide-modal input:focus {
    border-color: var(--brand-teal);
}
.guide-email-error {
    display: none;
    font-size: 0.78rem;
    color: var(--critical-red);
    text-align: left;
    padding: 0 4px;
    line-height: 1.4;
}
.guide-modal-hint {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin: 0;
}

/* FAQ */
.faq {
    background: var(--white);
    border-radius: 14px;
    padding: 0;
    margin-bottom: 12px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}
.faq summary {
    padding: 20px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq summary::-webkit-details-marker {
    display: none;
}
.faq summary::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--brand-teal);
    font-weight: 300;
    transition: transform 0.2s;
}
.faq[open] summary::after {
    content: "−";
}
.faq p {
    padding: 0 24px 20px;
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin: 0;
}

/* CTA */
.tpl-cta-section {
    padding: 80px 0;
}
.tpl-cta-card {
    text-align: center;
    background: linear-gradient(135deg, var(--brand-navy) 0%, #34495e 100%);
    border-radius: 24px;
    padding: 64px 48px;
}
.tpl-cta-card h2 {
    color: var(--white) !important;
    margin-bottom: 16px;
}
.tpl-cta-card .highlight {
    color: var(--brand-teal) !important;
}
.tpl-cta-card p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 32px;
}
.tpl-cta-sec {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: var(--white) !important;
}
.tpl-cta-sec:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .lang-banner-spacer {
        height: 52px;
    }
    .tpl-trust {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .tpl-inner {
        padding: 0 20px;
    }
    .tpl-section h2 {
        font-size: 1.7rem;
    }
    .tpl-problem-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .tpl-table {
        font-size: 0.8rem;
    }
    .tpl-table thead th,
    .tpl-table tbody td {
        padding: 10px 12px;
    }
    .kit-head {
        flex-wrap: wrap;
        padding: 16px 20px;
    }
    .kit-pr {
        margin-left: 0;
    }
    .kit-body {
        padding: 20px;
    }
    .kit-cols {
        grid-template-columns: 1fr;
    }
    .kit-bens {
        grid-template-columns: 1fr;
    }
    .ctx-grid {
        flex-direction: column;
        align-items: center;
    }
    .ctx-card {
        max-width: 100%;
    }
    .ctx-arrow {
        transform: rotate(90deg);
        padding: 12px 0;
    }
    .bun-grid {
        grid-template-columns: 1fr;
    }
    .how-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .tpl-cta-card {
        padding: 40px 24px;
    }
}
@media (max-width: 480px) {
    .tpl-section h2 {
        font-size: 1.5rem;
    }
    .bun-big {
        font-size: 2rem;
    }
}
