/* ==================== History Page Modern Styles ==================== */
/* Design Tokens & Theme integration */

.history-page-wrapper {
    padding: 110px 20px 80px;
    min-height: calc(100vh - 350px);
}

.history-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================== Page Hero & Header ==================== */
.history-hero-header {
    text-align: center;
    margin-bottom: 35px;
}

.history-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff1f0;
    color: var(--tqp-primary, #b71c1c);
    border: 1px solid rgba(183, 28, 28, 0.2);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(183, 28, 28, 0.06);
}

.history-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tqp-primary, #b71c1c);
    box-shadow: 0 0 0 3px rgba(183, 28, 28, 0.2);
}

.history-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--tqp-text-dark, #1f2937);
    line-height: 1.3;
    margin-bottom: 14px;
}

.history-hero-title span {
    color: var(--tqp-primary, #b71c1c);
}

.history-hero-subtitle {
    font-size: 1.05rem;
    color: var(--tqp-text-muted, #64748b);
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Quick Navigation Pills */
.history-quick-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 30px auto 45px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(183, 28, 28, 0.12);
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(183, 28, 28, 0.05);
    max-width: 950px;
}

.quick-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--tqp-text-dark, #333);
    text-decoration: none;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
}

.quick-nav-link:hover {
    color: #fff;
    background: var(--tqp-primary, #b71c1c);
    border-color: var(--tqp-primary, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.2);
}

/* ==================== History Section Card Wrapper ==================== */
.history-main-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 35px rgba(183, 28, 28, 0.07);
    border: 1px solid rgba(183, 28, 28, 0.1);
    margin-bottom: 45px;
    position: relative;
    overflow: hidden;
}

.history-main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--tqp-primary, #b71c1c), #d97706, var(--tqp-primary, #b71c1c));
}

.history-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.history-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff1f0, #ffe4e2);
    color: var(--tqp-primary, #b71c1c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(183, 28, 28, 0.1);
}

.history-card-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--tqp-text-dark, #1f2937);
    line-height: 1.3;
}

.history-card-title small {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--tqp-text-muted, #64748b);
    margin-top: 4px;
}

/* ==================== Timeline Styling ==================== */
.timeline-wrapper {
    position: relative;
    padding-left: 36px;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 15px;
    bottom: 25px;
    width: 3px;
    background: linear-gradient(180deg, var(--tqp-primary, #b71c1c) 0%, rgba(217, 119, 6, 0.8) 50%, rgba(183, 28, 28, 0.3) 100%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--tqp-primary, #b71c1c);
    box-shadow: 0 0 0 4px rgba(183, 28, 28, 0.12);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--tqp-primary, #b71c1c);
    transform: scale(1.15);
}

.timeline-box {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 26px 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.timeline-item:hover .timeline-box {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(183, 28, 28, 0.08);
    border-color: rgba(183, 28, 28, 0.25);
}

.timeline-header-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.timeline-year-tag {
    background: linear-gradient(135deg, var(--tqp-primary, #b71c1c), #8e1414);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 30px;
    box-shadow: 0 3px 10px rgba(183, 28, 28, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.timeline-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tqp-text-dark, #1f2937);
}

.timeline-narrative {
    color: #4b5563;
    font-size: 0.985rem;
    line-height: 1.85;
    text-align: justify;
}

.timeline-narrative p {
    margin-bottom: 14px;
}

.timeline-narrative p:last-child {
    margin-bottom: 0;
}

/* Committee highlight box */
.committee-highlight-box {
    background: linear-gradient(145deg, #fffaf5, #fff5ed);
    border: 1px solid rgba(217, 119, 6, 0.2);
    border-left: 4px solid #d97706;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.95rem;
    line-height: 1.75;
    color: #374151;
}

.committee-highlight-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 3 Screening Steps */
.screening-steps-container {
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 16px;
}

.screening-step-card {
    background: #fafafa;
    border: 1px solid rgba(183, 28, 28, 0.12);
    border-radius: 14px;
    padding: 18px 20px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.screening-step-card:hover {
    background: #ffffff;
    border-color: var(--tqp-primary, #b71c1c);
    box-shadow: 0 6px 18px rgba(183, 28, 28, 0.08);
}

.screening-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff1f0;
    color: var(--tqp-primary, #b71c1c);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.screening-step-card p {
    font-size: 0.93rem;
    color: #4b5563;
    line-height: 1.65;
    margin: 0;
}

.sub-step-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-step-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
}

.sub-step-tag {
    font-weight: 700;
    color: var(--tqp-primary, #b71c1c);
    margin-right: 4px;
}

/* Feature/Bullet List within Timeline */
.highlight-bullet-list {
    list-style: none;
    margin: 14px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.highlight-bullet-item {
    background: #fffaf9;
    border: 1px solid rgba(183, 28, 28, 0.1);
    border-left: 3px solid var(--tqp-primary, #b71c1c);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6;
}

/* ==================== 2554 Award Categories Grid ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 24px;
}

.category-card {
    background: linear-gradient(145deg, #ffffff, #fafafa);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(183, 28, 28, 0.09);
    border-color: rgba(183, 28, 28, 0.3);
}

.category-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.category-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.category-card.type-1 .category-icon-box {
    background: #fee2e2;
    color: #b91c1c;
}

.category-card.type-2 .category-icon-box {
    background: #fef3c7;
    color: #d97706;
}

.category-card.type-3 .category-icon-box {
    background: #dbeafe;
    color: #1d4ed8;
}

.category-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tqp-text-dark, #1f2937);
    line-height: 1.35;
}

.category-card-desc {
    font-size: 0.92rem;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.6;
}

.category-sublist {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-subitem {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.category-subitem::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tqp-primary, #b71c1c);
    flex-shrink: 0;
}

.category-card.type-2 .category-subitem::before {
    background: #d97706;
}

.category-card.type-3 .category-subitem::before {
    background: #2563eb;
}

/* ==================== Objectives Section ==================== */
.definition-banner {
    background: linear-gradient(135deg, #fff7ed, #fff1f2);
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: 18px;
    padding: 24px 28px;
    margin-bottom: 30px;
    position: relative;
}

.definition-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d97706;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.definition-text {
    font-size: 1.05rem;
    color: #1f2937;
    line-height: 1.8;
}

.definition-text strong {
    color: var(--tqp-primary, #b71c1c);
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.objective-feature-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.objective-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(183, 28, 28, 0.08);
    border-color: rgba(183, 28, 28, 0.25);
}

.obj-card-num {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff1f0;
    color: var(--tqp-primary, #b71c1c);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.objective-feature-card p {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.75;
    margin: 0;
}

/* ==================== Why QCC Section ==================== */
.why-qcc-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.why-pillar-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    padding: 26px 28px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
}

.why-pillar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.why-pillar-icon {
    font-size: 1.4rem;
}

.why-pillar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tqp-text-dark, #1f2937);
}

.why-pillar-content {
    font-size: 0.985rem;
    color: #4b5563;
    line-height: 1.85;
    text-align: justify;
}

.why-pillar-content p {
    margin-bottom: 12px;
}

.why-pillar-content p:last-child {
    margin-bottom: 0;
}

/* 16 Drawbacks Grid */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.problem-chip {
    background: #fff8f8;
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.2s ease;
}

.problem-chip:hover {
    background: #fee2e2;
    border-color: rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.problem-num {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==================== Benefits (19 items) Grid ==================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.benefit-card {
    background: #ffffff;
    border: 1px solid rgba(217, 119, 6, 0.18);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.benefit-card:hover {
    background: linear-gradient(145deg, #fffaf5, #fff5ec);
    border-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.12);
}

.benefit-num {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fef3c7;
    color: #b45309;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.5;
}

/* ==================== 7 QC Story Steps ==================== */
.qcstory-flow {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.qcstory-step-card {
    background: #ffffff;
    border: 1px solid rgba(183, 28, 28, 0.15);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.qcstory-step-card:hover {
    background: #fff5f5;
    border-color: var(--tqp-primary, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(183, 28, 28, 0.1);
}

.qcstory-badge {
    background: linear-gradient(135deg, var(--tqp-primary, #b71c1c), #8e1414);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.qcstory-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

/* ==================== Emblem / Logo Showcase Section ==================== */
.emblem-showcase-box {
    background: linear-gradient(145deg, #ffffff, #fff7f2);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 24px;
    padding: 45px 30px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(217, 119, 6, 0.08);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.emblem-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.emblem-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 12px 24px rgba(217, 119, 6, 0.2));
    transition: transform 0.4s ease;
    margin-bottom: 20px;
}

.emblem-showcase-box:hover .emblem-img {
    transform: scale(1.05);
}

.emblem-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tqp-primary-dark, #8e1414);
    position: relative;
    z-index: 2;
    margin-bottom: 6px;
}

.emblem-desc {
    font-size: 1rem;
    color: var(--tqp-text-muted, #64748b);
    position: relative;
    z-index: 2;
}

.history-main-card,
.emblem-showcase-box,
.history-hero-header {
    scroll-margin-top: 100px;
}

/* ==================== Responsive Styles ==================== */
@media (max-width: 992px) {
    .history-page-wrapper {
        padding-top: 100px;
    }
    .categories-grid,
    .objectives-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .history-main-card {
        padding: 30px 24px;
    }
}

@media (max-width: 768px) {
    .history-page-wrapper {
        padding: 90px 15px 50px;
    }
    .history-hero-title {
        font-size: 1.85rem;
    }
    .history-quick-nav {
        padding: 8px 12px;
        gap: 6px;
    }
    .quick-nav-link {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
    .history-main-card {
        padding: 24px 16px;
        border-radius: 18px;
    }
    .history-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .timeline-wrapper {
        padding-left: 28px;
    }
    .timeline-wrapper::before {
        left: 10px;
    }
    .timeline-dot {
        left: -28px;
        width: 20px;
        height: 20px;
    }
    .timeline-box {
        padding: 18px 16px;
    }
    .categories-grid,
    .objectives-grid {
        grid-template-columns: 1fr;
    }
    .screening-steps-container {
        grid-template-columns: 1fr;
    }
    .problems-grid,
    .benefits-grid,
    .qcstory-flow {
        grid-template-columns: 1fr;
    }
}
