/* --- General Honor Section Styles --- */
.honor-tabs {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
    padding: 0;
    margin-bottom: 30px;
    gap: 12px;
    flex-wrap: nowrap;
}

.honor-tabs .tab-item {
    flex: 0 0 calc((100% - 24px) / 3);
    width: auto !important;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: clamp(8px, 1.4vw, 12px) 5px;
    font-size: clamp(18px, 3vw, 24px);
    line-height: 1.2;
}

@media (max-width: 992px) {
    .honor-tabs {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        justify-content: space-between;
    }
    .honor-tabs .tab-item {
        flex: 0 0 calc((100% - 24px) / 3) !important;
        width: auto !important;
        font-size: clamp(18px, 3vw, 24px);
        padding: clamp(8px, 2vw, 12px) 5px;
    }
}

.tech-section .tech-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.tech-section .tech-card p {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(18px, 3vw, 24px);
    line-height: 1.2;
}

.intro-section .intro-text h3 {
    font-size: clamp(22px, 2.4vw, 28px);
}

.intro-section .intro-text p {
    font-size: clamp(16px, 1.5vw, 20px);
}

.footer-top h2 {
    white-space: nowrap;
    font-size: clamp(28px, 3.2vw, 36px);
    line-height: 1.2;
}

footer#contact .footer-title-row {
    text-align: center;
}

footer#contact .contact-info {
    justify-content: center;
}

footer#contact .contact-info .details {
    text-align: center;
}

footer#contact .contact-info .details p {
    font-size: 18px;
}

footer#contact .copyright p {
    width: 100% !important;
    text-align: center !important;
}

@media (max-width: 992px) {
    .footer-top .content-wrapper {
        gap: 24px;
    }

    .footer-top img {
        margin-top: 4px;
    }
}

:root {
    --hd-font-caption: clamp(16px, 1.8vw, 20px);
    --hd-font-body: clamp(16px, 1.8vw, 20px);
}

.opt-item .caption,
.tightness-test .test-content .test-item-large p,
.tightness-test .test-content .test-items-right .test-item-small .caption,
.manufacturing-strength .strength-grid .row-grid .strength-item .caption,
.sealing-system-section .image-row .image-item .caption,
.sealing-system-section .seam-optimization-container .seam-images .seam-item .caption {
    font-size: var(--hd-font-caption);
}

.summary-card-row .card-text {
    font-size: var(--hd-font-body);
}

.floating-top-desc p {
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.6;
}

.floating-top-desc-inner {
    padding-left: clamp(16px, 2vw, 32px);
    padding-right: clamp(16px, 2vw, 32px);
}

/* Increase key paragraphs to max 22px while keeping responsive */
.opt-desc,
.tightness-test .test-desc,
.sealing-system-section .summary-text {
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.5;
}

html,
body {
    overflow-x: hidden;
}

.section-safety-cards {
    --bs-gutter-x: clamp(16px, 4vw, 35px) !important;
}

/* Safety cards body text: +2px at max width with responsive scaling */
.section-safety-cards .bg-card p {
    font-size: clamp(16px, 1.8vw, 18px) !important;
}

/* VOCs issues list: +4px at max width with responsive scaling */
.vocs-governance-section .issue-item {
    font-size: clamp(16px, 2.2vw, 20px);
}

.history-evolution-section .timeline-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-evolution-section .timeline-track {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0;
    justify-content: flex-start;
    flex-wrap: nowrap !important;
    gap: 11px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.history-evolution-section .timeline-track::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.history-evolution-section .timeline-item {
    width: 231px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    transition: transform .25s ease, box-shadow .25s ease;
}

.history-evolution-section .timeline-item.active {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.history-evolution-section {
    position: relative;
}

.history-evolution-section .timeline-controls {
    display: contents;
}

.history-evolution-section .timeline-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #c60a4b;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    flex: 0 0 auto;
}

.history-evolution-section .timeline-btn.prev {
    order: 1;
    margin-left: 6px;
}

.history-evolution-section .timeline-track {
    order: 2;
}

.history-evolution-section .timeline-btn.next {
    order: 3;
    margin-right: 6px;
}

@media (max-width: 768px) {
    .history-evolution-section .timeline-container {
        gap: 10px;
    }

    .history-evolution-section .timeline-btn {
        width: 32px;
        height: 32px;
    }

    .history-evolution-section .timeline-track {
        flex-direction: row;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0;
        gap: 10px;
        flex-wrap: nowrap !important;
    }

    .history-evolution-section .timeline-item {
        width: clamp(180px, 68vw, 231px) !important;
        flex: 0 0 auto;
    }

    .history-evolution-section .timeline-item.top-text {
        flex-direction: column;
    }

    .history-evolution-section .timeline-item img {
        height: clamp(100px, 28vw, 144px);
        aspect-ratio: auto;
        object-fit: cover;
    }

    .history-evolution-section .text-box {
        height: clamp(70px, 18vw, 85px) !important;
        padding: 10px 12px;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 2px;
    }

    .history-evolution-section .text-box .year {
        font-size: clamp(18px, 5.6vw, 22px);
    }

    .history-evolution-section .text-box .desc {
        font-size: clamp(13px, 4.2vw, 16px);
        line-height: 1.35;
    }
}

/* Specs table: raise max font sizes by 4px and keep responsive */
.specs-table .table-header .col-label,
.specs-table .table-header .col-value {
    font-size: clamp(16px, 1.6vw, 20px);
}
.specs-table .table-row .col-label,
.specs-table .table-row .col-value {
    font-size: clamp(14px, 1.4vw, 18px);
}

@media (max-width: 992px) {
    .specs-container {
        flex-direction: column;
        gap: 24px;
    }

    .specs-images {
        width: 100%;
    }
}

/* Comparison tables (custom and default): raise max by 4px */
.comparison-table-custom .table-header p,
.sealing-system-section .comparison-table .table-header div {
    font-size: clamp(16px, 1.6vw, 20px);
}
.comparison-table-custom .table-body p,
.sealing-system-section .comparison-table .table-body .table-row div {
    font-size: clamp(14px, 1.4vw, 18px);
}

/* Keep comparison tables horizontal at all widths without horizontal scrolling */
.sealing-system-section .comparison-table .table-header,
.sealing-system-section .comparison-table .table-body .table-row {
    flex-direction: row !important;
}

.comparison-table-custom .table-header {
    display: flex !important;
}

.comparison-table-custom .table-row {
    flex-direction: row !important;
}

.sealing-system-section .comparison-table .table-header div,
.sealing-system-section .comparison-table .table-body .table-row div {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    align-items: flex-start;
}

.sealing-system-section .comparison-table .table-header .col-metric {
    background: #004ba0 !important;
    color: #ffffff !important;
}

.comparison-table-custom .table-header p,
.comparison-table-custom .table-body p {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.comparison-table-custom .table-header .col-issue,
.comparison-table-custom .table-row .col-issue,
.comparison-table-custom .table-header .col-solution,
.comparison-table-custom .table-row .col-solution {
    min-width: 0;
}

@media (max-width: 768px) {
    .sealing-system-section .comparison-table .table-header div,
    .sealing-system-section .comparison-table .table-body .table-row div {
        padding: 10px 12px;
    }

    .sealing-system-section .comparison-table .table-header .col-metric,
    .sealing-system-section .comparison-table .table-body .table-row .col-metric {
        flex: 0 0 28% !important;
        justify-content: flex-start;
    }

    .sealing-system-section .comparison-table .table-header .col-elastic,
    .sealing-system-section .comparison-table .table-body .table-row .col-elastic,
    .sealing-system-section .comparison-table .table-header .col-bag,
    .sealing-system-section .comparison-table .table-body .table-row .col-bag {
        flex: 1 1 36% !important;
    }

    .comparison-table-custom .table-header .col-issue,
    .comparison-table-custom .table-row .col-issue {
        flex: 0 0 35% !important;
    }

    .comparison-table-custom .table-header .col-solution,
    .comparison-table-custom .table-row .col-solution {
        flex: 1 1 65% !important;
    }

    .comparison-table-custom .table-row .col-issue,
    .comparison-table-custom .table-row .col-solution {
        padding: 10px;
    }
}

/* Honor section description: +3px at max width with responsive scaling */
.honor-header .sub-description p {
    font-size: clamp(16px, 1.3vw, 19px);
}

/* VOCs visuals: always keep 2 items in one row (no stacking) */
.vocs-governance-section .governance-visuals {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
}

.vocs-governance-section .visual-item {
    flex: 0 0 calc((100% - 26px) / 2);
    max-width: calc((100% - 26px) / 2);
}

.vocs-governance-section .visual-item img {
    width: 100%;
    height: 229px;
    object-fit: contain;
}

@media (max-width: 992px) {
    .vocs-governance-section .governance-visuals {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        padding: 16px;
        align-items: flex-start;
    }

    .vocs-governance-section .visual-item {
        flex: 0 0 calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
        gap: 10px;
    }

    .vocs-governance-section .visual-item img {
        height: clamp(110px, 28vw, 180px);
    }
}

/* Sealing system image row: keep aspect ratio so height scales with width */
.sealing-system-section .image-row {
    gap: clamp(12px, 2.4vw, 35px);
}

.sealing-system-section .image-row .image-item img {
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.sealing-system-section .image-row .image-item .caption {
    padding: clamp(10px, 1.2vw, 20px) clamp(8px, 1vw, 10px);
}

/* Seam optimization images: keep intrinsic aspect ratio so height scales with width */
.sealing-system-section .seam-optimization-container .seam-images {
    gap: clamp(12px, 2.4vw, 35px);
}

.sealing-system-section .seam-optimization-container .seam-images .seam-item img {
    height: auto !important;
    object-fit: contain;
}

@media (min-width: 992px) {
    .intro-section .intro-content .row > .col-lg-6:first-child {
        display: flex;
    }

    .intro-section .intro-content .row > .col-lg-6:first-child img {
        height: 100%;
        object-fit: cover;
    }
}

/* --- Unified Grid Container Styles --- */
.honor-images,
.patent-list-container,
.cert-list-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    margin-top: 30px;
    margin-bottom: 30px;
    justify-content: flex-start; /* Ensure items align to start */
}

/* --- Unified Grid Item Styles --- */
.grid-item {
    /* Default: 3 columns for large screens */
    flex: 0 0 calc(33.333% - 14px);
    width: calc(33.333% - 14px);

    box-sizing: border-box; /* Ensure padding doesn't affect width */
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Styling for the "card" look */
    border: 1px solid #bababa;
    background: #ffffff;
    padding: 9px;
    display: flex; /* Keep content centered */
    justify-content: center;
    align-items: center;
}

/* Specific Override for Patent Items on Large Screens */
.patent-list-container .grid-item {
    /* 5 columns for large screens */
    flex: 0 0 calc(20% - 16px);
    width: calc(20% - 16px);
}

.cert-list-container .grid-item {
    flex: 0 0 calc(25% - 15px);
    width: calc(25% - 15px);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- Unified Image Styles --- */
.grid-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.honor-images .grid-item {
    display: block;
    overflow: hidden;
}

.honor-images .grid-item img {
    transform: scale(1.08);
    transform-origin: center;
}

/* --- Granular Responsive Breakpoints --- */

/* Large screens (e.g., desktops < 1200px) */
@media (max-width: 1200px) {
    .patent-list-container .grid-item {
        /* 4 columns */
        flex: 0 0 calc(25% - 15px);
        width: calc(25% - 15px);
    }

    .cert-list-container .grid-item {
        flex: 0 0 calc(33.333% - 14px);
        width: calc(33.333% - 14px);
    }
}

/* Medium screens (e.g., tablets < 992px) */
@media (max-width: 992px) {
    .cert-list-container .grid-item {
        /* 3 columns */
        flex: 0 0 calc(33.333% - 14px);
        width: calc(33.333% - 14px);
    }

    .patent-list-container .grid-item {
        /* 3 columns */
        flex: 0 0 calc(33.333% - 14px);
        width: calc(33.333% - 14px);
    }
}

/* Small screens (e.g., mobile phones < 768px) */
@media (max-width: 768px) {
    .honor-images {
        flex-direction: column;
        flex-wrap: wrap;
    }
    .honor-images .grid-item {
        /* 1 column - FORCE SINGLE COLUMN */
        flex: 0 0 100% !important;
        width: 100% !important;
        margin-bottom: 20px;
    }

    .cert-list-container .grid-item {
        /* 3 columns */
        flex: 0 0 calc(33.333% - 14px);
        width: calc(33.333% - 14px);
    }

    .patent-list-container .grid-item {
        /* 2 columns */
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
    }
}

/* Extra Small screens (e.g., small mobile phones < 576px) */
@media (max-width: 576px) {
    :root {
        --hd-font-caption: clamp(14px, 3.8vw, 16px);
        --hd-font-body: clamp(14px, 4vw, 16px);
    }

    .honor-tabs .tab-item,
    .tech-section .tech-card p {
        font-size: clamp(16px, 4.6vw, 18px);
    }

    .opt-desc,
    .tightness-test .test-desc,
    .sealing-system-section .summary-text {
        font-size: clamp(15px, 4.2vw, 17px);
    }

    .section-safety-cards .bg-card p {
        font-size: clamp(14px, 4vw, 16px) !important;
    }

    .vocs-governance-section .issue-item {
        font-size: clamp(14px, 4vw, 16px);
    }

    .specs-table .table-header .col-label,
    .specs-table .table-header .col-value {
        font-size: clamp(14px, 4vw, 16px);
    }

    .comparison-table-custom .table-header p,
    .sealing-system-section .comparison-table .table-header div {
        font-size: clamp(14px, 4vw, 16px);
    }

    footer#contact .contact-info .details p {
        font-size: clamp(14px, 4vw, 18px);
    }

    .floating-top-desc p {
        font-size: clamp(14px, 4vw, 16px);
    }

    .patent-list-container .grid-item {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
    }

    .cert-list-container .grid-item {
        /* 3 columns */
        flex: 0 0 calc(33.333% - 14px);
        width: calc(33.333% - 14px);
    }

    .grid-item {
        padding: 6px;
    }
}

/* Honor images: keep 3-in-a-row on >=768px without wrapping */
@media (min-width: 768px) {
    .honor-images {
        flex-wrap: nowrap;
    }
    .honor-images .grid-item {
        flex: 0 0 calc((100% - 40px) / 3);
        width: calc((100% - 40px) / 3);
    }
}
