/* ==========================================================================
   ChemCo Systems - CCS™ Chemical Grouts Product Guide
   Colors, Fonts, Layout, and Full Responsive Styling
   ========================================================================== */

/* ------------------ Theme Variables & Typography ------------------ */
:root {
    --navy-dark: #002347;
    --navy-header: #003366;
    --navy-primary: #003b71;
    --navy-deep: #001f3f;
    --blue-royal: #0054a6;
    --blue-medium: #0284c7;
    --cyan-bright: #00a3e0;
    --cyan-light: #38bdf8;
    --cyan-accent: #009ac7;
    --cyan-glow: #e0f2fe;
    --purple-acrylate: #8b80b6;
    --purple-bg: #f8f6fc;
    --bg-page-container: #e6ebf0;
    --bg-metric-box: #f1f6fa;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --border-card: #e1e7ee;
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: "Roboto";
    --page-shadow: 0 12px 36px -4px rgba(0, 32, 64, 0.14), 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ------------------ Reset & Base ------------------ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-secondary);
    background-color: #ffffff; 
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ------------------ Top Toolbar / Navigation ------------------ */

.main_container {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 16px !important;
    display: block !important;
    box-sizing: border-box !important;
}

.top-action-bar {
    background: #091a2f;
    color: #ffffff;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.brand-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cyan-bright);
    box-shadow: 0 0 8px var(--cyan-bright);
    display: inline-block;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-btn, .print-btn {
    border: none;
    padding: 7px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-body);
}

.view-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #f1f5f9;
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.view-btn.active {
    background: var(--blue-royal);
    border-color: var(--cyan-bright);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 163, 224, 0.4);
}

.print-btn {
    background: var(--blue-royal);
    color: #ffffff;
}

.print-btn:hover {
    background: #0066cc;
    transform: translateY(-1px);
}

/* ------------------ Document Main Container ------------------ */
.document-wrapper {
    max-width: 980px;
    margin: 30px auto;
    padding: 0 16px;
}

.pdf-page {
    background: #ffffff;
    width: 100%;
    margin-bottom: 18px;
    box-shadow: var(--page-shadow);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   PAGE 1: 
   ========================================================================== */
.hero-banner {
    position: relative;
    min-height: 650px;
    padding: 24px 0 28px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.hero-banner-header {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    width: 100%;
    margin: 0;
}

.brand-logo-white {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: static;
    margin: 0;
}

.brand-logo-img {
    max-width: 100%;
    height: auto;
    max-height: 48px;
    object-fit: contain;
}

.logo-box-svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.4));
}

.brand-name-white {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1;
}

.hero-content {
    margin-top: auto;
    padding-bottom: 2px;
    text-align: left;
}

.hero-category {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #c7e3f8;
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.125em;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-title sup {
    font-size: 0.45em;
    top: -0.7em;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.5625em;
    font-weight: 400;
    color: #f1f7fc;
    letter-spacing: 0.1px;
    max-width: 820px;
    line-height: 1.45;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.hero-accent-strip {
    height: 6px;
    width: 100%;
    background: #02afef;
    position: relative;
}

/* Page 1 Body */
.page1-body {
    padding: 28px 36px 24px;
    box-sizing: border-box;
    width: 100%;
}

.intro-paragraph {
    font-size: 14.5px;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy-primary);
    margin-bottom: 16px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

.product-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: 4px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 16px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 59, 113, 0.1);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.product-card.theme-cyan::before { background-color: var(--cyan-accent); }
.product-card.theme-navy::before { background-color: var(--navy-primary); }
.product-card.theme-lavender::before { background-color: var(--purple-acrylate); }

.card-category {
    font-family: var(--font-heading);
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.theme-cyan .card-category { color: var(--cyan-accent); }
.theme-navy .card-category { color: var(--navy-primary); }
.theme-lavender .card-category { color: var(--purple-acrylate); }

.card-title {
    font-family: var(--font-heading);
    font-size: 16.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-desc {
    font-size: 12.5px;
    color: #334155;
    line-height: 1.45;
    margin-bottom: 14px;
    min-height: 48px;
}

.card-nsf-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1em;
    font-weight: 700;
    color: var(--navy-primary);
    margin-bottom: 12px;
    min-height: 20px;
}

.card-nsf-badge.empty-placeholder {
    visibility: hidden;
}

.card-nsf-badge svg {
    width: 14px;
    height: 14px;
    fill: #0284c7;
    flex-shrink: 0;
}

.card-metrics-box {
    background: var(--bg-metric-box);
    border-radius: 4px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 8px;
    margin-top: auto;
    border: 1px solid rgba(0, 59, 113, 0.05);
}

.metric-col {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 2px;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--navy-primary);
    white-space: nowrap;
}

/* Page 1 Bottom Footer */
.chemco-bottom-section {
    width: 100%;
    padding: 14px 20px;
    border-top: 1px solid #cfd5df;
    box-sizing: border-box;
    background: #f8fafc;
}

.chemco-bottom-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    color: #252d3d;
    font-family: var(--font-body);
    font-size: 1.4em;
    font-weight: 600;
    text-align: center;
}

.chemco-bottom-content a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    background: none;
    padding: 0px 0px;
    margin: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
}

.chemco-bottom-content a:hover {
    text-decoration: underline;
    color: var(--blue-royal);
}

.chemco-divider {
    display: inline-block;
    width: 2px;
    height: 18px;
    background-color: #1596c5;
    flex-shrink: 0;
}

/* ==========================================================================
   PAGE 2: Selection Guide, Applications, APN Section
   ========================================================================== */
.page2-header-bar {
    background: rgba(0, 66, 161, 0.95);
    color: #ffffff;
    padding: 20px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page2-header-title {
    font-family: var(--font-heading);
    font-size: 2.14em;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.page2-header-title sup {
    font-size: 11px;
    top: -8px;
}

.page2-body {
    padding: 24px 36px;
    width: 100%;
    box-sizing: border-box;
}

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

.selection-guide-header .title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--navy-primary);
    white-space: nowrap;
}

.selection-guide-header .divider-line {
    flex-grow: 1;
    height: 1px;
    background: #cbd5e1;
}

.table-responsive-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid var(--border-light);
    display: block;
}

.selection-table {
    width: 100%;
    min-width: 580px;
    border-collapse: collapse;
    font-size: 1.35em;
    background: #ffffff;
    text-align: center;
}

.selection-table thead tr th {
    padding: 10px 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 12px;
}

.selection-table thead tr th.col-condition {
    text-align: left;
    color: #475569;
    background: #ffffff;
    font-size: 1em;
    font-weight: 600;
    width: 32%;
    padding-left: 12px;
}

.selection-table thead tr th.col-product {
    background: var(--navy-primary);
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}

.selection-table thead tr th.col-product:last-child {
    border-right: none;
}

.selection-table tbody tr {
    border-bottom: 1px solid #edf2f7;
}

.selection-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.selection-table tbody td {
    padding: 7px 8px;
    vertical-align: middle;
}

.selection-table tbody td.condition-cell {
    text-align: left;
    color: #1e293b;
    font-weight: 500;
    padding-left: 12px;
    white-space: nowrap;
}

.dot-primary {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #0042a1;
    border-radius: 50%;
}

.dot-suitable {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--cyan-accent);
    background-color: transparent;
    border-radius: 50%;
}

.selection-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.35em;
    color: #475569;
    padding: 8px 4px 18px;
    flex-wrap: wrap;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Two Columns */
.two-col-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 24px;
    width: 100%;
}

.col-heading-wrap {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--navy-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.col-heading-wrap .line {
    flex: 1;
    height: 1px;
    background-color: #cbd5e1;
}

.pdf-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pdf-bullet-list li {
    position: relative;
    padding-left: 18px;
    font-size: 1.35em;
    line-height: 1.5;
    color: #334155;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.pdf-bullet-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background-color: #02afef;
    border-radius: 1px;
}

/* ==========================================================================
   Who is ChemCo Systems Banner (With APN Logo )
   ========================================================================== */
.page2-body > .hero-accent-strip {
    margin-left: -36px;
    margin-right: -36px;
    width: auto;
}

.who-chemco-banner {
    background: linear-gradient(135deg, #0054a6 0%, #00376b 100%);
    border-radius: 0 0 4px 4px;
    padding: 24px 32px;
    color: #ffffff;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
    position: relative;
    overflow: hidden;
    margin-left: -36px;
    margin-right: -36px;
    margin-bottom: -24px;
    width: auto;
}

.who-chemco-left {
    display: flex;
    flex-direction: column;
}

.who-chemco-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
    margin-bottom: 10px;
}

.who-chemco-title .accent {
    color: var(--cyan-light);
}

.who-chemco-body {
    font-size: 12.5px;
    line-height: 1.5;
    color: #e0f2fe;
    margin-bottom: 14px;
}

.who-chemco-body .highlight-cyan {
    color: #7dd3fc;
    font-weight: 600;
}

.who-chemco-usa {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.who-chemco-contact {
    font-size: 13px;
    color: #bae6fd;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.who-chemco-contact a {
    color: #bae6fd;
    text-decoration: none;
    font-weight: 600;
    background: none;
    padding: 0px 0px;
    margin: 0px;
    font-size: 0.9em;
    font-family: 'Montserrat', sans-serif;
}

.who-chemco-contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.who-chemco-contact .divider {
    color: rgba(255, 255, 255, 0.4);
}

/* Right Section APN Logo Styling */
.who-chemco-right {
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    padding-left: 24px;
}
.apn-logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.apn-box-frame {
    border: 1.5px solid #ffffff;
    padding: 2px 7px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
}
.apn-box-frame .star-icon {
    font-size: 13px;
    color: #ffffff;
    line-height: 1;
}
.apn-box-frame .apn-letters {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.5px;
}
.apn-logo-badge .apn-subtitle {
    font-family: var(--font-heading);
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.15;
}

.apn-logo-wrap {
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
}
.apn-logo-img {
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.apn-capabilities-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.apn-capabilities-list li {
    position: relative;
    padding-left: 16px;
    color: #e0f2fe;
    font-size: 1.1em;
    line-height: 1.45;
    margin-bottom: 4px;
}
.apn-capabilities-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    background-color: var(--cyan-light);
    border-radius: 1px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES 
   ========================================================================== */

/* Tablet & Mobile Screens */
@media (max-width: 768px) {
	
    .apn-logo-wrap {
        margin-bottom: 12px;
    }
    .apn-logo-img {
        max-width: 170px;
        max-height: 42px;
        width: auto;
        height: auto;
    }
	
    .hero-subtitle {
        font-size: 1.1em !important;
        line-height: 1.4 !important;
    }
    .intro-paragraph {
        font-size: 1.1em !important;
        line-height: 1.5 !important;
    }
    .card-category {
        font-size: 1.1em !important;
    }
    .card-title {
        font-size: 1.1em !important;
    }
    .card-subtitle {
        font-size: 1.1em !important;
    }
    .card-desc {
        font-size: 1.1em !important;
        min-height: auto !important;
    }
    .card-nsf-badge {
        font-size: 1.1em !important;
    }
    .metric-label {
        font-size: 1.1em !important;
    }
    .metric-value {
        font-size: 1.1em !important;
    }
    .page2-header-title {
        font-size: 1.4em !important;
    }
    .pdf-bullet-list li {
        font-size: 1.1em !important;
        line-height: 1.45 !important;
    }
    .selection-legend {
        font-size: 1.1em !important;
        gap: 12px !important;
        padding-bottom: 12px !important;
    }
    .who-chemco-title {
        font-size: 1.1em !important;
    }
    .apn-capabilities-list li {
        font-size: 1em !important;
    }
	
    .main_container {
        padding: 0 10px !important;
    }

    .hero-banner {
        min-height: 240px !important;
        padding: 16px 0 20px !important;
        justify-content: space-between !important;
    }

    .hero-banner-header {
        justify-content: flex-end !important;
        margin-top: 0 !important;
    }

    .brand-logo-white {
        position: static !important;
        top: 0 !important;
        margin: 0 !important;
    }

    .brand-logo-img {
        max-height: 38px !important;
    }

    .hero-content {
        margin-top: auto !important;
    }

    .hero-title {
        font-size: 28px !important;
    }

    .page1-body, .page2-body {
        padding: 18px 15px !important;
    }

    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .two-col-details {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .col-heading-wrap {
        font-size: 1.1em;
        flex-wrap: wrap;
    }

    .page2-header-bar {
        padding: 16px 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .page2-body > .hero-accent-strip {
        margin-left: -15px !important;
        margin-right: -15px !important;
        width: auto !important;
    }

    .who-chemco-banner {
        grid-template-columns: 1fr !important;
        padding: 20px 16px !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        margin-bottom: -18px !important;
        width: auto !important;
        gap: 20px;
    }

    .who-chemco-right {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-left: 0;
        padding-top: 18px;
    }

    .apn-logo-img {
        max-width: 170px;
        max-height: 42px;
    }

    .chemco-bottom-content {
        flex-direction: column;
        gap: 8px;
        font-size: 1.1em;
    }

    .chemco-divider {
        width: 35px;
        height: 2px;
    }

    .selection-table {
        min-width: 100% !important;
        font-size: 1.1em;
    }

    .selection-table thead tr th.col-product {
        white-space: normal !important;
        padding: 6px 4px;
        font-size: 0.9em;
        line-height: 1.2;
    }

    .selection-table thead tr th.col-condition {
        width: 38% !important;
        padding-left: 6px;
        padding-right: 4px;
        font-size: 1.1em;
    }

    .selection-table tbody td.condition-cell {
        white-space: normal !important;
        padding: 6px;
        font-size: 1.1em;
        line-height: 1.3;
    }

    .selection-table tbody td {
        padding: 6px 2px;
    }

    .dot-primary, .dot-suitable {
        width: 10px;
        height: 10px;
    }
}

/* Small Mobile Screens (480px) */
@media (max-width: 480px) {
    .brand-logo-img {
        max-height: 32px !important;
    }

    .hero-banner {
        padding: 14px 0 18px !important;
    }

    .hero-title {
        font-size: 24px !important;
    }

    .card-metrics-box {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .apn-logo-img {
        max-width: 150px;
        max-height: 38px;
    }
	
    .hero-subtitle {
        font-size: 13px !important;
    }
    
    .page2-header-title {
        font-size: 16px !important;
    }
       	
    .apn-logo-img {
        max-width: 140px;
        max-height: 36px;
    }
}

/* Print Styles */
@media print {
    .pdf-page {
        box-shadow: none !important;
        margin: 0 !important;
        border: none !important;
        page-break-after: always;
        break-after: page;
    }
}