/* NAT Tool - Complete Interface Redesign - World-Class Standards */

/* ===== PAGE LAYOUT ===== */
.nat-tool-page {
    max-width: 2250px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

/* ===== HERO SECTION ===== */
.nat-tool-page .nat-hero {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
}

.nat-tool-page .nat-hero-icon {
    font-size: 3rem;
    color: #38bdf8;
    margin-bottom: 1rem;
}

.nat-tool-page .nat-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.nat-tool-page .nat-hero p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* ===== FORM GROUPS ===== */
.nat-tool-page .questions-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nat-tool-page .group-container {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    padding: 0;
}

.nat-tool-page .group-header {
    padding: 1.25rem 1.5rem;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid #e2e8f0;
}

.nat-tool-page .group-container[data-group="1"] .group-header {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
}

.nat-tool-page .group-container[data-group="1"] .group-title {
    color: #be185d;
}

.nat-tool-page .group-container[data-group="2"] .group-header {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.nat-tool-page .group-container[data-group="2"] .group-title {
    color: #1e40af;
}

.nat-tool-page .group-container[data-group="3"] .group-header {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
}

.nat-tool-page .group-container[data-group="3"] .group-title {
    color: #ca8a04;
}

.nat-tool-page .group-container[data-group="4"] .group-header {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}

.nat-tool-page .group-container[data-group="4"] .group-title {
    color: #6d28d9;
}

.nat-tool-page .group-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.nat-tool-page .group-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    padding: 1.25rem;
    border-bottom: none;
    margin-bottom: 0;
}

.nat-tool-page .group-container > .group-header {
    grid-column: 1 / -1;
}

.nat-tool-page .group-container .question-card {
    margin: 0;
}

/* ===== QUESTION CARDS ===== */
.nat-tool-page .question-card {
    margin: 1rem 1.25rem;
    padding: 0;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    background: #fafbfc;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.nat-tool-page .question-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.nat-tool-page .group-container .question-card:last-child {
    margin-bottom: 0;
}

.nat-tool-page .question-header {
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.nat-tool-page .question-body {
    padding: 1rem 1.25rem;
}

.nat-tool-page .question-body .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.75rem;
}

/* ===== CHOICE CARDS ===== */
.nat-tool-page .choice-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nat-tool-page .choice-cards .form-check {
    flex: 1 1 180px;
    min-width: 160px;
    margin: 0 !important;
    padding: 1rem 1.25rem !important;
    border-radius: 10px !important;
    background: #fff !important;
    border: 2px solid #e2e8f0 !important;
    transition: all 0.2s ease !important;
}

.nat-tool-page .choice-cards .form-check:hover {
    border-color: #94a3b8 !important;
}

.nat-tool-page .choice-cards .form-check:has(input:checked) {
    border-color: #0ea5e9 !important;
    background: #f0f9ff !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

.nat-tool-page .choice-points-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0ea5e9;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.nat-tool-page .choice-cards .form-check-label {
    font-size: 0.9rem !important;
    color: #334155 !important;
    cursor: pointer;
}

/* ===== SUBMIT AREA ===== */
.nat-tool-page .auto-calc-notice {
    padding: 1rem 1.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #166534;
    font-weight: 500;
}

/* ===== RESULTS SECTION ===== */
.nat-results-section {
    margin-top: 3rem;
}

.export-wrapper {
    background: #fff;
    max-width: 2250px;
    margin: 0 auto;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
}

.nat-results-v2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Results Hero */
.nat-results-hero {
    padding: 3rem 2.5rem;
}

.nat-hero-excellent {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.nat-hero-moderate {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.nat-hero-weak {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.nat-hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.nat-hero-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.nat-score-ring {
    position: relative;
    width: 180px;
    height: 180px;
}

.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: 4px;
}

.nat-score-main {
    font-size: 3.25rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
}

.nat-score-slash {
    font-size: 1.75rem;
    font-weight: 400;
    color: rgba(255,255,255,0.8);
}

.nat-score-max {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}

.nat-hero-badge {
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
}

.nat-hero-info {
    text-align: left;
}

.nat-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 0.25rem 0;
}

.nat-hero-date {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    margin: 0;
}

/* Results Groups */
.nat-results-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.nat-group-card {
    padding: 2rem 1.75rem;
    border: 1px solid #f1f5f9;
}

.nat-group-card:nth-child(2n) {
    border-left: none;
}

.nat-group-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent);
}

.nat-group-items {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nat-criterion {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8fafc;
}

.nat-criterion:last-child {
    border-bottom: none;
}

.nat-criterion-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.nat-criterion-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    color: var(--accent);
}

.nat-criterion-icon svg {
    width: 24px;
    height: 24px;
}

.nat-criterion-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.35;
}

.nat-criterion-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.nat-criterion-progress {
    width: 90px;
    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.95rem;
    font-weight: 700;
    color: #1e293b;
    width: 55px;
    text-align: right;
}

/* ===== RESPONSIVE - All Devices ===== */
@media (max-width: 992px) {
    .nat-tool-page .group-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        padding: 1rem;
    }
    
    .nat-tool-page .nat-hero h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .nat-tool-page {
        padding-bottom: 2rem;
    }
    
    .nat-tool-page .nat-hero {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .nat-tool-page .nat-hero h1 {
        font-size: 1.5rem;
    }
    
    .nat-tool-page .nat-hero p {
        font-size: 0.9rem;
    }
    
    .nat-tool-page .nat-hero-icon {
        font-size: 2.5rem;
    }
    
    .nat-tool-page .group-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .nat-tool-page .question-card {
        margin: 0.75rem 1rem;
    }
    
    .nat-tool-page .question-header,
    .nat-tool-page .question-body {
        padding: 0.875rem 1rem;
    }
    
    .nat-tool-page .choice-cards .form-check {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .nat-results-groups {
        grid-template-columns: 1fr;
    }
    
    .nat-group-card:nth-child(2n) {
        border-left: 1px solid #f1f5f9;
    }
}

@media (max-width: 576px) {
    .nat-tool-page .nat-hero {
        padding: 1.5rem 1rem;
    }
    
    .nat-tool-page .nat-hero h1 {
        font-size: 1.35rem;
    }
    
    .nat-tool-page .group-container {
        padding: 0.75rem;
        grid-template-columns: 1fr;
    }
    
    .nat-tool-page .question-card {
        margin: 0.5rem 0.75rem;
    }
    
    .nat-tool-page .question-header,
    .nat-tool-page .question-body {
        padding: 0.75rem;
    }
    
    .nat-tool-page .choice-cards .form-check {
        padding: 0.875rem 1rem !important;
    }
    
    .nat-tool-page .choice-cards .form-check-label {
        font-size: 0.85rem !important;
    }
}

/* Prevent horizontal overflow on very small screens */
@media (max-width: 400px) {
    .nat-tool-page {
        max-width: 100%;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .nat-tool-page .group-container {
        padding: 0.5rem;
    }
    
    .nat-tool-page .question-card {
        margin: 0.5rem;
    }
}

@media (max-width: 560px) {
    .nat-hero-content {
        flex-direction: column;
    }
    
    .nat-hero-info {
        text-align: center;
    }
    
    .nat-criterion {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nat-criterion-right {
        justify-content: space-between;
    }
}

/* Export button */
.nat-results-section .btn-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
}
