/* ==========================================================================
   Site-wide visual refinement layer.
   Loaded after every page's own <style> block, so rules here elevate the
   shared component classes (buttons, cards, section headers, page headers,
   badges, icon circles, CTA/why-us panels) consistently across all pages
   without touching any page copy or markup. Built on the existing brand
   tokens (--primary / --primary-dark / --secondary) already declared per
   page; falls back to the same values if a page ever omits them.
   ========================================================================== */

:root {
    --primary: #00568d;
    --primary-dark: #043b66;
    --secondary: #222;
    --white: #ffffff;
    --off-white: #fffcf8;
    --shadow-soft: 0 10px 30px rgba(6, 80, 143, 0.08);
    --shadow-lift: 0 24px 50px rgba(6, 80, 143, 0.18);
}

html {
    scroll-behavior: smooth;
}

::selection {
    background: var(--primary);
    color: #fff;
}

/* Slim brand-colored scrollbar (WebKit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
}

/* --------------------------------------------------------------------
   Scroll-reveal (progressive enhancement over existing fade-in-up)
   -------------------------------------------------------------------- */
.fade-in-up {
    opacity: 0;
    transform: translate3d(0, 34px, 0);
    animation: none !important;
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-up.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.fade-in-up.delay-100.in-view {
    transition-delay: 0.1s;
}

.fade-in-up.delay-200.in-view {
    transition-delay: 0.2s;
}

.fade-in-up.delay-300.in-view {
    transition-delay: 0.3s;
}

.fade-in-up.delay-400.in-view {
    transition-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* --------------------------------------------------------------------
   Buttons — richer gradient, shine sweep, consistent depth
   -------------------------------------------------------------------- */
.ttm-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 12px 24px -6px rgba(6, 80, 143, 0.45), 0 2px 6px rgba(6, 80, 143, 0.2);
    border-radius: 50px;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease;
    z-index: 1;
}

.ttm-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    z-index: -1;
}

.ttm-btn:hover::before {
    left: 125%;
}

.ttm-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px -6px rgba(6, 80, 143, 0.55), 0 4px 10px rgba(6, 80, 143, 0.25);
}

.ttm-btn.btn-outline {
    background: transparent !important;
    box-shadow: none;
}

.ttm-btn.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 14px 28px -6px rgba(6, 80, 143, 0.4);
}

/* --------------------------------------------------------------------
   Section headers — unify the pill sub-title + gradient heading accent
   across every page (some pages still used a plain uppercase label)
   -------------------------------------------------------------------- */
.section-header .sub-title {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(6, 80, 143, 0.1);
    border: 1px solid rgba(6, 80, 143, 0.22);
    box-shadow: 0 4px 14px rgba(6, 80, 143, 0.08);
}

.section-header .sub-title::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
    flex: 0 0 auto;
}

.section-header h2 {
    letter-spacing: -0.8px;
    position: relative;
}

.section-header h2 span {
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------
   Page title headers — subtle texture + curved divider into content
   -------------------------------------------------------------------- */
.page-header-enhanced {
    background-color: var(--secondary);
}

.page-header-enhanced::before {
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(6, 80, 143, 0.35) 0%, transparent 55%),
        linear-gradient(135deg, rgba(20, 24, 28, 0.92), rgba(6, 80, 143, 0.62));
}

.page-header-enhanced::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 46px;
    background: var(--white);
    clip-path: ellipse(60% 100% at 50% 100%);
    z-index: 2;
}

.page-title-large {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.breadcrumb-enhanced {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.breadcrumb-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.15);
}

/* --------------------------------------------------------------------
   Icon circles — shared by service/segment/why/trust icons
   -------------------------------------------------------------------- */
.service-icon,
.segment-icon,
.why-icon,
.trust-icon {
    background: linear-gradient(150deg, rgba(6, 80, 143, 0.16) 0%, rgba(6, 80, 143, 0.05) 100%) !important;
    border: 1px solid rgba(6, 80, 143, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 18px rgba(6, 80, 143, 0.1);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.segment-icon {
    border-radius: 20px;
}

.service-card:hover .service-icon,
.segment-card:hover .segment-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: var(--white);
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 14px 26px rgba(6, 80, 143, 0.3);
}

.why-feature:hover .why-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    box-shadow: 0 10px 20px rgba(6, 80, 143, 0.3);
}

/* --------------------------------------------------------------------
   Cards — segment / process / certificate / portal / contact / info
   Add a consistent top accent bar + deeper, softer hover lift
   -------------------------------------------------------------------- */
.segment-card,
.process-step,
.certificate-card,
.portal-card,
.contact-card,
.info-card,
.product-card {
    position: relative;
    border-radius: 16px !important;
    box-shadow: var(--shadow-soft);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}
/* .process-step::before, */
.segment-card::before,
.certificate-card::before,
/*.portal-card::before,*/
.product-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px 16px 0 0;
    z-index: 2;
}

.segment-card:hover,
.process-step:hover,
.certificate-card:hover,
.portal-card:hover,
.contact-card:hover,
.info-card:hover,
.product-card:hover {
    box-shadow: var(--shadow-lift);
}

.segment-card:hover::before,
.process-step:hover::before,
.certificate-card:hover::before,
.portal-card:hover::before,
.product-card:hover::before {
    opacity: 1;
}

.segment-card:hover,
.process-step:hover,
.product-card:hover {
    transform: translateY(-8px);
}

.portal-action {
    border-radius: 14px !important;
}

.portal-action:hover {
    transform: translateY(-3px) !important;
}

/* --------------------------------------------------------------------
   Why-choose-us dark panels — add depth with soft glow blobs
   -------------------------------------------------------------------- */
.why-us-section {
    position: relative;
    overflow: hidden;
}

.why-us-section::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(6, 80, 143, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.why-us-section::after {
    content: '';
    position: absolute;
    bottom: -140px;
    left: -140px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(6, 80, 143, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

.why-feature {
    padding: 14px;
    border-radius: 14px;
}

.why-feature:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* --------------------------------------------------------------------
   CTA banners — glow behind heading, stronger presence
   -------------------------------------------------------------------- */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

/* --------------------------------------------------------------------
   Badges (industries served / certifications)
   -------------------------------------------------------------------- */
.markets-badge,
.cert-badge {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.markets-badge:hover,
.cert-badge:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white) !important;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(6, 80, 143, 0.25);
}

/* --------------------------------------------------------------------
   Images — soft zoom-on-hover for single content images
   -------------------------------------------------------------------- */
.ttm_single_image-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lift);
}

.ttm_single_image-wrapper img {
    transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
    border-radius: 16px;
}

.ttm_single_image-wrapper:hover img {
    transform: scale(1.06);
}

/* --------------------------------------------------------------------
   Products Gallery — card grid, hover zoom, "view details" overlay
   -------------------------------------------------------------------- */
.product-card {
    display: block;
    background: var(--white);
    border: 1px solid #eee;
    overflow: hidden;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    border-color: var(--primary);
    color: inherit;
    text-decoration: none;
}

.product-card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--gray-light, #f5f5f5);
}

.product-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.product-card:hover .product-card-img-wrap img {
    transform: scale(1.08);
}

.product-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(6, 80, 143, 0.82), rgba(4, 59, 102, 0.88));
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.product-card:hover .product-card-overlay {
    opacity: 1;
}

.product-card-body {
    padding: 22px 24px;
}

.product-card-body h4 {
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--secondary);
}

.product-card-body p {
    font-size: 14px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------
   Pagination — restyle Bootstrap pagination to match brand
   -------------------------------------------------------------------- */
.product-pagination .pagination {
    gap: 6px;
    flex-wrap: wrap;
}

.product-pagination .page-link {
    border: none;
    border-radius: 10px !important;
    color: var(--secondary);
    font-weight: 600;
    padding: 10px 16px;
    transition: all 0.25s ease;
}

.product-pagination .page-link:hover {
    background: rgba(6, 80, 143, 0.1);
    color: var(--primary);
}

.product-pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 8px 18px rgba(6, 80, 143, 0.3);
}

.product-pagination .page-item.disabled .page-link {
    color: #b7b7b7;
}

/* --------------------------------------------------------------------
   Product Details Modal — large image gallery + inquiry CTA
   -------------------------------------------------------------------- */
.product-details-modal .modal-dialog {
    transform: scale(0.92) translateY(24px);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
}

.product-details-modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

.product-details-modal .modal-content {
    border: none;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 70px -12px rgba(6, 15, 30, 0.45);
}

/*.product-details-modal .modal-content::before {*/
/*    content: '';*/
/*    position: absolute;*/
/*    left: 0;*/
/*    right: 0;*/
/*    top: 0;*/
/*    height: 4px;*/
/*    background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));*/
/*    z-index: 7;*/
/*}*/

.product-details-modal .modal-body {
    padding: 0;
    overflow-y: auto;
}

.product-details-modal .modal-body .row {
    min-height: 100%;
}

/* Tint + blur the backdrop for a premium glass feel (only modal on-site). */
.modal-backdrop {
    background-color: #050b16;
}

.modal-backdrop.show {
    opacity: 0.72;
}

@supports (backdrop-filter: blur(1px)) {
    .modal-backdrop.show {
        backdrop-filter: blur(3px);
    }
}

.product-modal-close {
    /* Explicit box-sizing + zeroed padding/appearance: the site-wide
       `button` rule (main.css) sets padding: 11px 40px 11px, which is
       wide enough that browsers refuse to shrink a <button> below it
       even with an explicit width — the circle rendered as a stretched
       ~80x38 pill instead of a fixed 38x38 circle. Resetting appearance
       and padding here is what actually makes the size (and therefore
       the position) stick. */
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 6;
    width: 40px;
    height: 40px;
    flex: none;
    border: none;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: var(--secondary);
    border-radius: 50%;
    font-size: 15px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.product-modal-close:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(6, 80, 143, 0.4);
}

.product-modal-close:active {
    transform: scale(0.96);
}

.product-modal-gallery {
    position: relative;
    background: linear-gradient(160deg, #1c2b3a 0%, var(--secondary) 55%, #0d1013 100%);
    height: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.product-modal-gallery img.is-visible {
    opacity: 1;
    transform: scale(1);
}

.product-modal-gallery-shine {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
    pointer-events: none;
    z-index: 1;
}

.product-modal-nav {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    line-height: 1;
    flex: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 4;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-modal-nav:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 10px 22px rgba(6, 80, 143, 0.45);
}

.product-modal-prev {
    left: 16px;
}

.product-modal-next {
    right: 16px;
}

.product-modal-counter {
    position: absolute;
    bottom: 16px;
    right: 18px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: var(--white);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 4;
}

.product-modal-details {
    position: relative;
    padding: 40px 36px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.product-modal-details::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(6, 80, 143, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.product-modal-eyebrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 6px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: rgba(6, 80, 143, 0.1);
    border: 1px solid rgba(6, 80, 143, 0.22);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.product-modal-eyebrow i {
    font-size: 11px;
}

.product-modal-details h3 {
    position: relative;
    font-weight: 800;
    font-size: 28px;
    line-height: 1.25;
    margin-bottom: 16px;
    color: var(--secondary);
}

.product-modal-divider {
    position: relative;
    display: block;
    width: 52px;
    height: 4px;
    margin-bottom: 20px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}

.product-modal-details p {
    position: relative;
    color: #667085;
    margin-bottom: 30px;
    line-height: 1.75;
}

.product-modal-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
}

/* --------------------------------------------------------------------
   Responsive trims for the new decorative touches
   -------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .page-header-enhanced::after {
        height: 26px;
    }

    .why-us-section::before,
    .why-us-section::after {
        width: 240px;
        height: 240px;
    }

    .product-modal-gallery {
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .product-modal-details {
        padding: 26px 24px;
    }

    .product-modal-details h3 {
        font-size: 22px;
    }

    .product-modal-eyebrow {
        margin-bottom: 12px;
    }

    .product-modal-nav {
        width: 38px;
        height: 38px;
    }
}
