/**
 * NMQIDA Report Content Styles
 *
 * Styles for data report content: stat grids, findings, tables, TOC, FAQ sections.
 * All prefixed with nmq- to avoid conflicts.
 */

/* ===== REPORT CONTENT ===== */
.nmq-report-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.nmq-report-content h2 {
    padding-top: 1rem;
    border-top: 2px solid var(--nmq-border);
}

.nmq-report-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--nmq-radius);
    margin: 1.5rem 0;
}

/* ===== STAT GRID ===== */
.nmq-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.nmq-stat-box {
    background: #fff;
    border: 1px solid var(--nmq-border);
    border-radius: var(--nmq-radius);
    padding: 1.25rem;
    text-align: center;
}

.nmq-stat-box .nmq-stat-number {
    display: block;
    font-family: var(--nmq-font-display);
    font-size: 2rem;
    color: var(--nmq-green);
    line-height: 1.2;
}

.nmq-stat-box .nmq-stat-label {
    font-size: 0.8rem;
    color: var(--nmq-gray);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

.nmq-stat-box .nmq-stat-change {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.35rem;
}
.nmq-stat-change.up { color: #16a34a; }
.nmq-stat-change.down { color: var(--nmq-red); }

/* ===== KEY FINDING HIGHLIGHT ===== */
.nmq-finding {
    background: #fff;
    border-left: 4px solid var(--nmq-gold);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--nmq-radius) var(--nmq-radius) 0;
    font-size: 0.95rem;
}

.nmq-finding strong {
    color: var(--nmq-green);
}

.nmq-finding-icon {
    display: inline-block;
    margin-right: 0.35rem;
    font-size: 1.1rem;
}

/* ===== DATA TABLE ===== */
.nmq-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    background: #fff;
    border-radius: var(--nmq-radius);
    overflow: hidden;
    border: 1px solid var(--nmq-border);
}

.nmq-data-table thead {
    background: var(--nmq-green);
    color: var(--nmq-cream);
}

.nmq-data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nmq-data-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--nmq-border);
}

.nmq-data-table tr:last-child td {
    border-bottom: none;
}

.nmq-data-table tr:nth-child(even) {
    background: var(--nmq-gray-light);
}

.nmq-data-table .nmq-highlight-row {
    background: rgba(220,173,43,0.1);
    font-weight: 600;
}

/* ===== TABLE OF CONTENTS ===== */
.nmq-toc {
    background: #fff;
    border: 1px solid var(--nmq-border);
    border-radius: var(--nmq-radius);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.nmq-toc-title {
    font-family: var(--nmq-font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--nmq-gray);
    margin-bottom: 1rem;
}

.nmq-toc-list {
    list-style: none;
    padding: 0;
    columns: 2;
    column-gap: 2rem;
}

.nmq-toc-list li {
    break-inside: avoid;
    margin-bottom: 0.5rem;
}

.nmq-toc-list a {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--nmq-black);
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s;
}
.nmq-toc-list a:hover { color: var(--nmq-green); }

.nmq-toc-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--nmq-green);
    color: var(--nmq-cream);
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== SECTION WRAPPER ===== */
.nmq-section {
    margin: 2.5rem 0;
}

.nmq-section > h2:first-child {
    margin-top: 0;
}

/* ===== FAQ SECTION ===== */
.nmq-faq-section {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 2px solid var(--nmq-border);
}

.nmq-faq-section h2 {
    border-top: none;
    padding-top: 0;
}

.nmq-faq-item {
    border-bottom: 1px solid var(--nmq-border);
    padding: 1rem 0;
}

.nmq-faq-item:last-child {
    border-bottom: none;
}

.nmq-faq-q {
    font-weight: 700;
    font-size: 1rem;
    color: var(--nmq-green);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nmq-faq-q::after {
    content: '+';
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--nmq-gray);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nmq-faq-item.open .nmq-faq-q::after {
    content: '−';
}

.nmq-faq-a {
    display: none;
    padding-top: 0.75rem;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.7;
}

.nmq-faq-item.open .nmq-faq-a {
    display: block;
}

/* ===== COMPACT TABLE VARIANT ===== */
.nmq-data-table--compact th,
.nmq-data-table--compact td {
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
}

/* ===== SPAIN ROW HIGHLIGHT ===== */
.nmq-row-spain {
    background: rgba(209,0,0,0.06) !important;
    border-left: 3px solid var(--nmq-red);
}

/* ===== SAVING CELL ===== */
.nmq-saving {
    color: var(--nmq-green);
    font-weight: 700;
}

/* ===== METHODOLOGY BOX ===== */
.nmq-methodology-box {
    background: #fff;
    border: 1px solid var(--nmq-border);
    border-radius: var(--nmq-radius);
    padding: 2rem;
    margin: 2rem 0;
}

.nmq-methodology-box h3 {
    font-size: 1rem;
    margin-top: 1.5rem;
}

.nmq-methodology-box h3:first-child {
    margin-top: 0;
}

.nmq-methodology-box ol,
.nmq-methodology-box ul {
    padding-left: 1.5rem;
    margin: 0.5rem 0 1rem;
}

.nmq-methodology-box li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .nmq-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .nmq-toc-list { columns: 1; }
}

@media (max-width: 600px) {
    .nmq-stat-grid { grid-template-columns: 1fr; }
    .nmq-data-table { font-size: 0.8rem; }
    .nmq-data-table th, .nmq-data-table td { padding: 0.5rem 0.65rem; }
}
