
/********** Template CSS - adapted for Kangda Technical Materials **********/
:root {
    --primary: #C95E1A;
    --secondary: #5F656F;
    --light: #F4F6F7;
    --dark: #0F2742;
    --charcoal: #202A33;
    --green: #2F5D50;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--secondary);
    background: #FFFFFF;
}

.skip-link {
    position: absolute;
    top: -48px;
    left: 16px;
    z-index: 100000;
    padding: 10px 16px;
    background: var(--dark);
    color: #FFFFFF;
    text-decoration: none;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 12px;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

h1, h2, .h1, .h2, .fw-bold { font-weight: 700 !important; }
h3, h4, .h3, .h4, .fw-medium { font-weight: 600 !important; }
h5, h6, .h5, .h6, .fw-semi-bold { font-weight: 500 !important; }
h1, h2, h3, h4, h5, h6 { color: var(--dark); font-family: 'Rubik', sans-serif; }

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}
#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn { transition: .5s; font-weight: 600; border-radius: 0; }
.btn-primary, .btn-outline-primary:hover { color: #FFFFFF; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background-color: #A94E16; border-color: #A94E16; }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-square { width: 38px; height: 38px; }
.btn-sm-square { width: 32px; height: 32px; }
.btn-lg-square { width: 48px; height: 48px; }
.btn-square, .btn-sm-square, .btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.bg-dark { background-color: var(--dark) !important; }
.bg-light { background-color: var(--light) !important; }
.text-primary { color: var(--primary) !important; }

.topbar-right { position: relative; background: var(--primary); }
.topbar-right::before {
    position: absolute;
    content: "";
    width: 30px;
    height: 100%;
    top: 0;
    left: -15px;
    transform: skewX(-30deg);
    background-color: var(--primary);
}

/*** Navbar ***/
.navbar.sticky-top { top: -100px; transition: .5s; }
.navbar .navbar-brand {
    position: relative;
    padding-right: 45px;
    min-height: 75px;
    display: flex;
    align-items: center;
    background: var(--dark);
    max-width: 470px;
}
.navbar .navbar-brand::after {
    position: absolute;
    content: "";
    width: 50px;
    height: 100%;
    top: 0;
    right: -25px;
    transform: skewX(-30deg);
    background-color: var(--dark);
}
.brand-text { position: relative; z-index: 1; line-height: 1.15; }
.brand-text .brand-name {
    display: block;
    color: #FFFFFF;
    font-family: 'Rubik', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: .2px;
}
.brand-text .brand-tagline { display: block; color: rgba(255,255,255,.72); font-size: 12px; margin-top: 3px; }
.navbar .navbar-nav .nav-link {
    margin-right: 20px;
    padding: 24px 0;
    color: var(--charcoal);
    font-size: 15px;
    font-weight: 600;
    outline: none;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active { color: var(--primary); }

@media (max-width: 1199.98px) {
    .navbar .navbar-nav .nav-link { margin-right: 13px; font-size: 14px; }
    .brand-text .brand-name { font-size: 19px; }
    .navbar .navbar-brand { max-width: 410px; }
}
@media (max-width: 991.98px) {
    .navbar .navbar-brand { max-width: 100%; min-height: 72px; }
    .navbar .navbar-brand::after { display: none; }
    .navbar .navbar-nav .nav-link { margin-right: 0; padding: 10px 0; }
    .navbar .navbar-nav { border-top: 1px solid #EEEEEE; }
}

/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-start;
    padding-top: 110px;
    background: linear-gradient(to right, rgba(15, 39, 66, .97) 0%, rgba(15, 39, 66, .78) 45%, rgba(15, 39, 66, .18) 100%);
    z-index: 1;
}
.hero-carousel .carousel-item { min-height: 620px; background: var(--dark); }
.hero-carousel .carousel-item img { min-height: 620px; object-fit: cover; }
@media (max-width: 768px) {
    .carousel-caption { padding-top: 72px; }
    .hero-carousel .carousel-item { min-height: 560px; }
    .hero-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        min-height: 560px;
        object-fit: cover;
    }
    .display-2 { font-size: calc(1.55rem + 3.2vw); }
}
.page-header {
    background: linear-gradient(to right, rgba(15, 39, 66, .96) 0%, rgba(15, 39, 66, .75) 55%, rgba(15, 39, 66, .20) 100%), url(../img/kangda/home-hero-roofing-underlayment.jpg) center center no-repeat;
    background-size: cover;
}
.page-header .breadcrumb-item+.breadcrumb-item::before { color: var(--light); }
.page-header .breadcrumb-item, .page-header .breadcrumb-item a { font-size: 18px; color: var(--light); }

/*** Facts ***/
.facts { position: relative; margin: 5rem 0; background: var(--dark); }
.facts .border { border-color: rgba(255, 255, 255, .13) !important; }
.facts h2 { color: var(--primary); font-size: 30px; }

/*** Industrial Cards ***/
.industrial-card,
.product-detail-card,
.application-card,
.application-detail-card,
.technical-card,
.oem-card,
.enquiry-form,
.contact-info,
.technical-disclaimer {
    background: #FFFFFF;
    border: 1px solid rgba(15, 39, 66, .10);
    box-shadow: 0 2px 14px rgba(15, 39, 66, .05);
}
.industrial-card img,
.product-detail-card img,
.application-card img,
.application-detail-card img { height: 230px; object-fit: cover; }
.product-card-img {
    height: 230px;
    overflow: hidden;
    background: var(--light);
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card .card-text {
    min-height: 52px;
}
.spec-chip {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 6px 6px 0;
    background: #F3F5F7;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}
.product-card .btn {
    white-space: nowrap;
}
.modal-content {
    border-radius: 0;
    border: 1px solid rgba(15, 39, 66, .12);
}
.modal-header {
    background: var(--dark);
    color: #FFFFFF;
    border-radius: 0;
}
.modal-header .modal-title {
    color: #FFFFFF;
}
.modal-header .btn-close {
    filter: invert(1) grayscale(100%);
}
.kangda-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.industrial-card h4,
.application-card h4,
.technical-card h4,
.oem-card h4 { margin-bottom: 15px; }
.product-detail-card h6,
.application-detail-card h6 { color: var(--dark); margin-top: 20px; margin-bottom: 8px; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; }
.spec-table {
    margin-bottom: 0;
    border-color: rgba(15, 39, 66, .10);
}
.spec-table th,
.spec-table td {
    padding: .55rem .75rem;
    font-size: 14px;
    vertical-align: top;
}
.spec-table th {
    width: 38%;
    color: var(--dark);
    font-weight: 600;
    background: var(--light);
}
.spec-table td {
    color: var(--secondary);
    background: #FFFFFF;
}
.technical-card .btn-link { color: var(--primary); text-decoration: none; }
.technical-card .btn-link:hover { color: var(--dark); }
.support-list p { margin-bottom: 8px; }
.final-cta { background: var(--dark); }
.technical-disclaimer { border-left: 5px solid var(--primary); }
.contact-info { border-left: 5px solid var(--green); }
#enquiry-form,
#request-documents { scroll-margin-top: 120px; }
.form-check-label { font-size: 14px; }
.form-control, .form-select { min-height: 52px; border-radius: 0; border-color: #D7DEE5; }
textarea.form-control { min-height: 140px; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .15rem rgba(201, 94, 26, .18); }

/*** Existing Template Components Kept For Compatibility ***/
.btn-play {
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--primary);
}
@media (max-width: 992px) {
    .btn-play { left: 50%; right: auto; transform: translate(-50%, -50%); }
}
.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}
.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    transition: all 200ms;
}
.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid #FFFFFF;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}
@keyframes pulse-border {
    0% { transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2); opacity: 0; }
}
.modal-video .modal-dialog { position: relative; max-width: 800px; margin: 60px auto 0 auto; }
.modal-video .modal-body { position: relative; padding: 0px; }
.modal-video .close { position: absolute; width: 30px; height: 30px; right: 0px; top: -30px; z-index: 999; font-size: 30px; font-weight: normal; color: #FFFFFF; background: #000000; opacity: 1; }

/*** Footer ***/
.footer { color: #B0B9AE; }
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #B0B9AE;
    font-weight: normal;
    text-transform: none;
    transition: .3s;
}
.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}
.footer .btn.btn-link:hover { color: var(--light); letter-spacing: 1px; box-shadow: none; }
.copyright { color: #B0B9AE; border-top: 1px solid rgba(255, 255, 255, .1); }
.copyright a, .footer a { color: #FFFFFF; }

@media (max-width: 575.98px) {
    .brand-text .brand-name { font-size: 16px; }
    .brand-text .brand-tagline { font-size: 10px; }
    .navbar .navbar-brand { padding-left: 15px !important; padding-right: 20px; }
    .facts { padding: 2rem !important; }
    .industrial-card img,
    .product-detail-card img,
    .application-card img,
    .application-detail-card img { height: 190px; }
}

/* Kangda safe hero refinement */
.carousel-caption {
    align-items: center;
    padding-top: 0;
}

.carousel-caption .container {
    transform: translateY(-8%);
}

.carousel-caption h1 {
    max-width: 820px;
    font-size: 54px;
    line-height: 1.12;
}

.carousel-caption .lead {
    max-width: 720px;
    font-size: 18px;
    line-height: 1.55;
}

.brand-text .brand-name {
    font-size: 22px;
    line-height: 1.1;
    margin-bottom: 2px;
}

.brand-text .brand-tagline {
    font-size: 11px;
    line-height: 1.2;
    opacity: .85;
}

.topbar-right {
    min-height: 28px;
    font-size: 12px;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.topbar-right a {
    font-size: 12px;
}

@media (max-width: 991.98px) {
    .carousel-caption h1 {
        font-size: 40px;
        line-height: 1.15;
    }
}

@media (max-width: 575.98px) {
    .carousel-caption {
        align-items: flex-start;
        padding-top: 28px;
    }

    .carousel-caption .container {
        transform: none;
    }

    .carousel-caption .fs-5 {
        font-size: 12px !important;
        line-height: 1.35;
        margin-bottom: 12px !important;
    }

    .carousel-caption h1 {
        font-size: 29px;
        line-height: 1.14;
        margin-bottom: 14px !important;
    }

    .carousel-caption .lead {
        font-size: 14px;
        line-height: 1.45;
        margin-bottom: 16px !important;
    }

    .carousel-caption .btn {
        padding: 10px 18px !important;
        font-size: 14px;
    }
}

/* Kangda contact layout fix */
.contact-note-section {
    position: relative;
    z-index: 1;
    clear: both;
    padding-top: 40px;
    padding-bottom: 80px;
}

.contact-note-card {
    background: #ffffff;
    border: 1px solid #e6e9ee;
    box-shadow: 0 10px 24px rgba(10, 34, 57, 0.06);
    padding: 32px;
    max-width: 100%;
}

.contact-note-card h3 {
    margin-bottom: 12px;
}

.contact-note-card p {
    margin-bottom: 0;
}

.contact-page-image {
    display: block;
    width: 100%;
    height: auto;
}

.footer,
.footer-section {
    position: relative;
    z-index: 1;
    clear: both;
}

.contact-note-image,
.documentation-note-image,
.contact-documentation-image {
    display: none !important;
}

/* Kangda applications image refinement */
.application-card,
.application-detail-card {
    height: 100%;
}

.application-card img,
.application-detail-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.application-card-text-only {
    background: #ffffff;
    border: 1px solid #e6e9ee;
    min-height: 100%;
}

.application-card-text-only .card-body {
    padding: 32px;
}

@media (max-width: 767px) {
    .application-card img,
    .application-detail-card img {
        height: 200px;
    }
}
