/* NAT Results - Clean Modern Design v3 */
/* Circular Gauge Indicator (16 segments + legend) */

.nat-gauge-container {
    padding: 2.5rem 1.5rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nat-gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.nat-gauge-svg {
    width: 100%;
    max-width: 900px;
    height: auto;
}

/* Large screens: bigger gauge */
@media (min-width: 992px) {
    .nat-gauge-svg {
        max-width: 950px;
    }
}

@media (min-width: 1200px) {
    .nat-gauge-svg {
        width: 1100px;
        max-width: 1100px;
    }
}

.nat-gauge-segment {
    transition: filter 0.2s ease;
}

.nat-gauge-segment:hover {
    filter: brightness(1.08);
}

.nat-gauge-svg path[stroke-dasharray] {
    transition: stroke-dasharray 0.5s ease-out;
}

.nat-gauge-needle {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.nat-gauge-center-value {
    font-size: 2.35rem;
    font-weight: 800;
    fill: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nat-gauge-center-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nat-gauge-seg-num,
.nat-gauge-seg-label {
    font-size: 0.4rem;
    font-weight: 600;
    fill: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nat-gauge-seg-label {
    font-size: 0.35rem;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.nat-gauge-legend-label {
    font-size: 0.65rem;
    font-weight: 600;
    fill: #475569;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Export mode - larger badge, shift gauge left */
.nat-exporting .nat-gauge-badge { font-size: 1.1rem; padding: 0.6rem 1.75rem; }
.nat-exporting .nat-gauge-container { transform: translateX(-175px); }

.nat-gauge-badge {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.nat-results-section {
    margin-top: 2.5rem;
    padding-top: 0;
}

.export-wrapper {
    background: #fff;
    width: 100%;
    max-width: 2250px;
    margin: 0 auto;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.nat-results-v2 {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hero - Score section */
.nat-results-hero {
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

.nat-results-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
}

.nat-hero-excellent {
    background: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
}

.nat-hero-moderate {
    background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #92400e 100%);
}

.nat-hero-weak {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
}

.nat-hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.nat-hero-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.nat-score-ring {
    position: relative;
    width: 160px;
    height: 160px;
}

.nat-score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.nat-score-ring circle:last-of-type {
    stroke: white;
    transition: stroke-dasharray 0.8s ease;
}

.nat-score-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.nat-score-main {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -0.02em;
}

.nat-score-slash {
    font-size: 1.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
}

.nat-score-max {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.nat-hero-badge {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.3);
}

.nat-hero-info {
    text-align: left;
}

.nat-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.nat-hero-date {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

/* Groups grid */
.nat-results-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.nat-group-card {
    padding: 28px 24px;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
}

.nat-group-card:nth-child(2n) {
    border-right: none;
}

.nat-group-card:nth-last-child(-n+2) {
    border-bottom: none;
}

.nat-group-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
    letter-spacing: 0.01em;
}

.nat-group-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nat-criterion {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f8fafc;
}

.nat-criterion:last-child {
    border-bottom: none;
}

.nat-criterion-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.nat-criterion-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    color: var(--accent);
}

.nat-criterion-icon svg {
    width: 22px;
    height: 22px;
}

.nat-criterion-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.3;
}

.nat-criterion-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    min-width: 140px;
}

.nat-criterion-progress {
    width: 80px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.nat-criterion-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.nat-bar-high .nat-criterion-fill {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.nat-bar-mid .nat-criterion-fill {
    background: linear-gradient(90deg, #eab308, #ca8a04);
}

.nat-bar-low .nat-criterion-fill {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.nat-criterion-score {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    width: 50px;
    text-align: right;
}

/* ===== RESPONSIVE - Gauge & Results ===== */
@media (max-width: 768px) {
    .nat-gauge-container {
        padding: 1.5rem 1rem;
    }
    
    .nat-gauge-svg {
        max-width: 100%;
    }
    
    .nat-gauge-center-value {
        font-size: 1.75rem;
    }
    
    .nat-gauge-center-label {
        font-size: 0.85rem;
    }
    
    .nat-gauge-badge {
        font-size: 0.85rem;
        padding: 0.4rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .nat-gauge-container {
        padding: 1rem 0.5rem;
    }
    
    .nat-gauge-center-value {
        font-size: 1.5rem;
    }
    
    .nat-gauge-center-label {
        font-size: 0.75rem;
    }
    
    .nat-gauge-badge {
        font-size: 0.8rem;
        padding: 0.35rem 1rem;
    }
}

@media (max-width: 720px) {
    .nat-results-groups {
        grid-template-columns: 1fr;
    }
    
    .nat-group-card {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .nat-group-card:last-child {
        border-bottom: none;
    }
}

@media (max-width: 520px) {
    .nat-hero-content {
        flex-direction: column;
        gap: 24px;
    }
    
    .nat-hero-info {
        text-align: center;
    }
    
    .nat-criterion {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .nat-criterion-right {
        min-width: auto;
        justify-content: space-between;
    }
}

/* Export wrapper & button - responsive */
@media (max-width: 768px) {
    .export-wrapper {
        border-radius: 16px;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
    
    .nat-results-hero {
        padding: 32px 24px;
    }
    
    .nat-hero-title {
        font-size: 1.5rem;
    }
    
    .nat-score-ring {
        width: 140px;
        height: 140px;
    }
    
    .nat-score-main {
        font-size: 2.5rem;
    }
    
    .nat-group-card {
        padding: 20px 16px;
    }
    
    .nat-group-name {
        font-size: 0.85rem;
    }
    
    .nat-criterion-icon {
        width: 36px;
        height: 36px;
    }
    
    .nat-criterion-name {
        font-size: 0.85rem;
    }
    
    #exportBtn {
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .export-wrapper {
        margin-left: 0.25rem;
        margin-right: 0.25rem;
        border-radius: 12px;
    }
    
    .nat-results-hero {
        padding: 24px 16px;
    }
    
    .nat-hero-title {
        font-size: 1.25rem;
    }
    
    .nat-hero-date {
        font-size: 0.9rem;
    }
    
    .nat-score-ring {
        width: 120px;
        height: 120px;
    }
    
    .nat-score-main {
        font-size: 2rem;
    }
    
    .nat-score-slash,
    .nat-score-max {
        font-size: 1.25rem;
    }
    
    .nat-group-card {
        padding: 16px 12px;
    }
    
    .nat-group-name {
        font-size: 0.8rem;
    }
    
    .nat-criterion {
        padding: 10px 0;
    }
    
    .nat-criterion-icon {
        width: 32px;
        height: 32px;
    }
    
    .nat-criterion-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .nat-criterion-name {
        font-size: 0.8rem;
    }
    
    .nat-criterion-progress {
        width: 60px;
    }
    
    #exportBtn {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }
}
