/********** Template CSS **********/
/* Original color scheme - uncomment to restore
:root {
    --primary: #FF5E14;
    --secondary: #5F656F;
    --light: #F5F5F5;
    --dark: #02245B;
}
*/

/* Black and gray color scheme - preserved
:root {
    --primary: #000000;
    --secondary: #6B7280;
    --light: #F9FAFB;
    --dark: #374151;
}
*/

/* New blue color scheme */
:root {
    --primary: #323E5A;
    --secondary: #6B7280;
    --light: #FFFFFF;
    --dark: #1E2538;
    --sustainability-green: #28a745;
}

.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;
}


/*** 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: #FFFFFF;
}

.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;
}


.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: 50px;
    height: 75px;
    display: flex;
    align-items: center;
    background: var(--primary);
}

.navbar .navbar-brand::after {
    position: absolute;
    content: "";
    width: 50px;
    height: 100%;
    top: 0;
    right: -25px;
    transform: skewX(-30deg);
    background-color: var(--primary);
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 20px 0;
    color: var(--secondary);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.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 {
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .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 ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, rgba(50, 62, 90, 1) 0%, rgba(50, 62, 90, 0) 100%);
    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;
    background-color: var(--primary);
    border: 15px solid var(--primary);
    border-radius: 3.5rem;
}

@media (max-width: 768px) {
    #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(to right, rgba(50, 62, 90, 1) 0%, rgba(50, 62, 90, 0) 100%), url(../img/carousel-1.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: 6rem 0;
    background: var(--primary);
}

.facts .row {
    display: flex;
    align-items: stretch;
}

.facts .border {
    border-color: rgba(107, 114, 128) !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}


/*** Features ***/
.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;
}


/*** Service ***/
.service-item {
    position: relative;
    margin: 65px 0 25px 0;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
}

.service-item .service-img {
    position: absolute;
    padding: 12px;
    width: 130px;
    height: 130px;
    top: -65px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    box-shadow: 0 0 45px rgba(0, 0, 0, .09);
    z-index: 2;
}

.service-item .service-detail {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
}

.service-item .service-title {
    position: absolute;
    padding: 65px 30px 25px 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #FFFFFF;
    transition: .5s;
}

.service-item:hover .service-title {
    top: -100%;
}

.service-item .service-text {
    position: absolute;
    overflow: hidden;
    padding: 65px 30px 25px 30px;
    width: 100%;
    height: 100%;
    top: 100%;
    left: 0;
    display: flex;
    align-items: center;
    text-align: center;
    background: rgba(50, 62, 90, .7);
    transition: .5s;
}

.service-item:hover .service-text {
    top: 0;
}

.service-item .service-text::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100px;
    top: -100%;
    left: 0;
    transform: skewY(-12deg);
    background: #FFFFFF;
    transition: .5s;
}

.service-item:hover .service-text::before {
    top: -55px;
}

.service-item .btn {
    position: absolute;
    width: 130px;
    height: 50px;
    left: 50%;
    bottom: -25px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    background: #FFFFFF;
    border: none;
    box-shadow: 0 0 45px rgba(0, 0, 0, .09);
    z-index: 2;
}

.service-item .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Project ***/
.project-carousel {
    position: relative;
    background: var(--primary);
}

.project-item {
    position: relative;
    display: block;
}

.project-item img {
    transition: .5s;
}

.project-item:hover img,
.project-carousel .owl-item.center img {
    margin-top: -60px;
}

.project-item .project-title {
    position: absolute;
    padding: 0 15px;
    width: 100%;
    height: 80px;
    bottom: -110px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--primary);
    transition: .5s;
}

.project-item:hover .project-title,
.project-carousel .owl-item.center .project-title  {
    bottom: -60px;
}

.project-item .project-title::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 30px;
    top: -15px;
    left: 0;
    transform: skewY(-5deg);
    background: var(--primary);
    transition: .5s;
}

.project-carousel .owl-nav {
    position: absolute;
    width: 100%;
    height: 45px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    transition: .5s;
    opacity: 0;
    z-index: 1;
}

.project-carousel:hover .owl-nav {
    opacity: 1;
}

.project-carousel .owl-nav .owl-prev,
.project-carousel .owl-nav .owl-next {
    margin: 0 30px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}


/*** Clients ***/
.clients-carousel {
    position: relative;
    background: transparent;
    padding: 5px 0 10px 0;
}

.client-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    height: 140px;
}

.client-logo {
    max-height: 195px;
    max-width: 429px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.clients-carousel .owl-nav {
    display: none;
}

.clients-carousel .owl-dots {
    display: none;
}

/* Ensure smooth infinite loop */
.clients-carousel .owl-stage-outer {
    overflow: hidden;
}

.clients-carousel .owl-stage {
    display: flex;
    align-items: center;
}


/*** Team ***/
.team-item .team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    display: flex;
    align-items: center;
    background: var(--primary);
    transition: .5s;
}

.team-item:hover .team-social {
    left: 0;
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}

.testimonial-carousel .testimonial-img img {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .testimonial-img .btn-square {
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-carousel .owl-item .testimonial-text {
    margin-bottom: 30px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    transform: scale(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: capitalize;
    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);
}
/* Industry name highlighting */
.industry-name {
    color: var(--primary);
}

/* Custom background using CSS variables */
.bg-custom-dark {
    background-color: var(--dark) !important;
}

.bg-custom-primary {
    background-color: var(--primary) !important;
}

.bg-custom-light {
    background-color: rgba(50, 62, 90, 0.05) !important;
}

/* Custom styles for primary buttons */
.btn-custom-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--light) !important;
}

.btn-custom-primary:hover {
    background-color: var(--dark) !important;
    border-color: var(--dark) !important;
    color: var(--light) !important;
}

/* Custom text color classes */
.text-custom-secondary {
    color: var(--secondary) !important;
}

.text-custom-primary {
    color: var(--primary) !important;
}

.text-sustainability-green {
    color: var(--sustainability-green) !important;
}

.bg-sustainability-green {
    background-color: var(--sustainability-green) !important;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin: 80px 0;
    display: flex;
    align-items: center;
}

/* Desktop alternating layout - odd items on left, even on right */
.timeline-item:nth-child(odd) {
    justify-content: flex-start;
}

.timeline-item:nth-child(even) {
    justify-content: flex-end;
}

/* Remove the conflicting timeline-item-right class behavior on desktop */
@media (min-width: 769px) {
    .timeline-item-right {
        justify-content: flex-end !important;
    }
}

.timeline-dot {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    border: 4px solid var(--light);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 0 rgba(50, 62, 90, 0.3);
}

.timeline-content {
    width: 45%;
    background: var(--light);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.timeline-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(50, 62, 90, 0.1), rgba(107, 114, 128, 0.1));
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    opacity: 0.7;
}

/* Camera watermark removed
.timeline-image-placeholder::before {
    content: '📸';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.3;
    z-index: 1;
}
*/

.timeline-year {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    transform: none;
    transition: color 0.3s ease;
}

.timeline-title {
    color: var(--dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-description {
    line-height: 1.6;
    font-size: 1rem;
}

/* Hover Effects */
.timeline-item:hover .timeline-content {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, var(--light), rgba(50, 62, 90, 0.05));
}

.timeline-item:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    background-color: var(--dark);
    box-shadow: 0 0 0 10px rgba(30, 37, 56, 0.2);
}

.timeline-item:hover .timeline-image-placeholder {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.timeline-item:hover .timeline-image-placeholder img {
    transform: scale(1.1);
    opacity: 1;
}

.timeline-item:hover .timeline-year {
    color: var(--dark);
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-title {
    color: var(--primary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item {
        justify-content: flex-start !important;
        margin: 50px 0;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 60px;
    }
    
    .timeline-image-placeholder {
        height: 150px;
    }
    
    .timeline-year {
        font-size: 2rem;
    }
    
    .timeline-title {
        font-size: 1.25rem;
    }
}

/* Enhanced JavaScript-triggered animations */
.timeline-item.timeline-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot.animated {
    animation: dotBounce 0.6s ease-out;
}

.timeline-content.hovered {
    transform: scale(1.05) translateY(-5px);
}

.timeline-dot.dot-hovered {
    transform: translateX(-50%) scale(1.4);
    background-color: var(--dark);
    box-shadow: 0 0 0 15px rgba(30, 37, 56, 0.15);
}

.timeline-image-placeholder img.img-hovered {
    transform: scale(1.15) rotate(2deg);
}

.timeline-content.clicked {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

@keyframes dotBounce {
    0% {
        transform: translateX(-50%) scale(0);
    }
    50% {
        transform: translateX(-50%) scale(1.3);
    }
    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* Initial state for timeline items (for scroll animations) */
.timeline-item {
    opacity: 0.7;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

/* Scroll margin for anchor links to account for sticky navbar */
#gravity-die-casting,
#sand-casting,
#air-set-casting,
#high-pressure-die-casting {
    scroll-margin-top: 120px;
}
