/********** Template CSS **********/

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

.fw-medium {
    font-weight: 500;
}


/*** 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: 500;
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--bs-light);
}

.btn-secondary,
.btn-outline-secondary:hover {
    color: var(--bs-dark);
}

.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;
    border-radius: 50px;
    font-weight: normal;
}

.icon-box-danger,
.icon-box-light {
    position: relative;
    padding: 0 0 10px 10px;
    z-index: 1;
}

.icon-box-danger i,
.icon-box-light i {
    font-size: 60px;
    line-height: 0;
}

.icon-box-danger::before,
.icon-box-light::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 35px;
    left: 0;
    bottom: 0;
    border-radius: 35px;
    transition: .5s;
    z-index: -1;
}

.icon-box-danger::before {
    background: var(--bs-danger);
}

.icon-box-light::before {
    background: var(--bs-light);
}


/*** Navbar ***/
.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 20px 0;
    color: var(--bs-dark);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-danger);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 15px;
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .sticky-top {
        margin-top: -34px;
    }

    .navbar {
        height: 68px;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
@media (min-width: 992px) {
    .header-carousel,
    .page-header {
        margin-top: -34px;
    }
}

.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    background: rgba(3, 27, 78, .3);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 3.5rem;
    background-color: var(--bs-danger);
    border: 15px solid var(--bs-danger);
}

@media (max-width: 767.98px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    background: linear-gradient(rgba(220, 53, 69, .3), rgba(220, 53, 69, .3)), url(../img/testimonial.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--bs-white);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-size: 18px;
    color: var(--bs-white);
}


/*** About ***/
.about-fact {
    width: 220px;
    height: 220px;
    box-shadow: 0 0 30px rgba(0, 0, 0, .1);
}

@media (min-width: 576px) {
    .about-fact.mt-n130 {
        margin-top: -130px;
    }
}


/*** Service ***/
.container-service {
    position: relative;
}

.container-service::before {
    position: absolute;
    content: '';
    background: var(--bs-light);
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    clip-path: polygon(0 0, 100% 0, 100% 30%, 0 70%);
    z-index: -1;
}

.service-item {
    position: relative;
    height: 100%;
    padding: 45px 30px;
    background: var(--bs-white);
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.service-item::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    left: 0;
    bottom: 0;
    transition: .5s;
    background: var(--bs-danger);
}

.service-item:hover::before {
    height: 100%;
    top: 0;
}

.service-item * {
    position: relative;
    transition: .5s;
    z-index: 1;
}

.service-item:hover h5,
.service-item:hover p {
    color: var(--bs-white);
}

.service-item:hover .icon-box-danger::before {
    background: var(--bs-dark);
}

.service-item:hover .icon-box-danger i {
    color: var(--bs-white) !important;
}


/*** Team ***/
.container-team {
    position: relative;
}

.container-team::before {
    position: absolute;
    content: '';
    background: var(--bs-light);
    width: 100%;
    height: 100%;
    left: 0px;
    top: 0px;
    clip-path: polygon(0 70%, 100% 30%, 100% 100%, 0% 100%);
    z-index: -1;
}

.team-item {
    background: var(--bs-white);
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.team-item .team-social {
    position: absolute;
    width: 0;
    height: 100%;
    top: 0;
    right: 0;
    transition: .5s;
    background: var(--bs-danger);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-item:hover .team-social {
    width: 100%;
    left: 0;
}

.team-item .team-social .btn {
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-social .btn {
    opacity: 1;
}


/*** Contact ***/
@media (min-width: 992px) {
    .contact-info::after {
        position: absolute;
        content: "";
        width: 0px;
        height: 100%;
        top: 0;
        left: 50%;
        border-left: 1px dashed rgba(255, 255, 255, .2);
    }
}

@media (max-width: 991.98px) {
    .contact-info::after {
        position: absolute;
        content: "";
        width: 100%;
        height: 0px;
        top: 50%;
        left: 0;
        border-top: 1px dashed rgba(255, 255, 255, .2);
    }
}


/*** Footer ***/
.footer {
    /* use red-themed overlay and preserve world-map image */
    background: linear-gradient(rgba(220,53,69,.4), rgba(220,53,69,.4)), url(../img/footer.png) center center no-repeat;
    background-size: cover;
    background-size: contain;
}

@media (min-width: 992px) {
    .footer::after {
        position: absolute;
        content: "";
        width: 0px;
        height: 100%;
        top: 0;
        left: 50%;
        border-left: 1px dashed rgba(255, 255, 255, .2);
    }
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255, 255, 255, .5);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: rgba(255, 255, 255, .5);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--bs-danger);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    background: linear-gradient(rgba(220,53,69,.4), rgba(220,53,69,.4));
    border-top: none;
}

.copyright a {
    color: var(--bs-white);
}

.copyright a:hover {
    color: var(--bs-danger);
}


/*** Newsletter Input ***/
.newsletter-input {
    background: rgba(255, 255, 255, .1) !important;
}

/*** Section Header ***/
.section-header {
    max-width: 600px;
}

/*** Footer Link ***/
.footer-link {
    color: inherit;
    text-decoration: none;
}

/*** Textarea Message ***/
.textarea-message {
    height: 200px;
}

/*** Contact Iframe ***/
.contact-iframe {
    transition: filter .3s;
    /* always show a slight red tint */
    filter: hue-rotate(-45deg) saturate(1.3) brightness(0.95);
}
.contact-iframe:hover {
    /* intensify red on hover */
    filter: hue-rotate(-45deg) saturate(1.8) brightness(0.85);
    min-height: 300px;
    border: 0;
}


/*** Gallery ***/
.gallery-item {
    position: relative;
    overflow: hidden;
}
.gallery-item img {
    transition: transform .5s;
}
.gallery-item:hover img {
    transform: scale(1.1);
}

/*** Blog Item ***/
.blog-item {
    border: 1px solid #eee;
    transition: box-shadow .3s;
}
.blog-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.1);
}
.blog-item img {
    width: 100%;
    height: auto;
}
.blog-item .p-4 {
    background: #fff;
}

/*** Spinner Border ***/
#spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

/*** Laboratory Equipment ***/
.equipment-item {
    position: relative;
    background: var(--bs-white);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.equipment-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(220, 53, 69, .2);
}

.equipment-img-container {
    position: relative;
    overflow: hidden;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.equipment-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    max-width: 100%;
    max-height: 100%;
}

.equipment-item:hover .equipment-img {
    transform: scale(1.1);
}

.equipment-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 53, 69, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.equipment-item:hover .equipment-overlay {
    opacity: 1;
}

.equipment-overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.equipment-item:hover .equipment-overlay i {
    transform: scale(1);
}

.equipment-info {
    padding: 1.5rem;
    text-align: center;
    background: var(--bs-white);
}

.equipment-info h5 {
    color: var(--bs-dark);
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.equipment-item:hover .equipment-info h5 {
    color: var(--bs-danger);
}

/*** Sequencing Icon ***/
.sequencing-icon {
    position: relative;
    width: 60px;
    height: 60px;
    display: inline-block;
}

.sequencing-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 50px;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 50%, #d0d0d0 100%);
    border-radius: 8px;
    border: 2px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sequencing-icon::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 20px;
    background: linear-gradient(to bottom, #4a90e2, #357abd);
    border-radius: 3px;
    border: 1px solid #2968a3;
}

.sequencing-icon .screen-glow {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 16px;
    background: radial-gradient(ellipse at center, rgba(135, 206, 250, 0.8) 0%, rgba(74, 144, 226, 0.6) 50%, transparent 70%);
    border-radius: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/*** Contact Form Response Message ***/
.response-message {
    display: none;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    padding: 1rem;
}

.response-message.alert-success {
    display: block !important;
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.response-message.alert-danger {
    display: block !important;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}