/* Custom styles for enhanced visual appeal */
:root {
    --primary: #255298;
    --secondary: #47a5de;
}

body {
    font-family: 'readex pro', sans-serif;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--secondary), var(--primary));
}

/* Text gradient animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Mobile menu animation */
.mobile-menu-enter {
    opacity: 0;
    transform: translateY(-10px);
}

.mobile-menu-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.mobile-menu-exit {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-exit-active {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    z-index: 9999;
    transition: width 0.1s ease;
}





/* Hero Slider Styles */
.slider-container {
    position: relative;
    overflow: hidden;
    background-color: #000;
    /* fallback to avoid grey flash */
}

/* Slides */
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

/* First slide visible instantly before JS */
.slide:first-child {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

/* Active slide */
.slide.active {
    opacity: 1 !important;
    pointer-events: auto;
    z-index: 2;
    /* always above others */
}

/* Slide text fade-up animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-content {
    opacity: 0;
}

.slide.active .slide-content {
    animation: fadeUp 1s ease forwards;
}

/* Fixed Arrow Navigation Styles */
#prevSlide,
#nextSlide {
    position: absolute;
    top: 50%;

    /* Center vertically */
    width: 50px;
    height: 80px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* Only transition background */
    z-index: 10;
}

#prevSlide:hover,
#nextSlide:hover {
    background: rgba(0, 0, 0, 0.6);
    /* Only change background on hover */

    /* Maintain position on hover */
}

#prevSlide {
    left: 0;
    border-radius: 0 6px 6px 0;
}

#nextSlide {
    right: 0;
    border-radius: 6px 0 0 6px;
}

/* Text shadows */
.slide-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .slide-content h1 {
        font-size: 2.5rem !important;
    }

    .slide-content p {
        font-size: 1.125rem !important;
    }

    #prevSlide,
    #nextSlide {
        display: none;
    }
}

.slide:not(.active) {
    z-index: 1;
}

.quality-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('/images/machine.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.quote-mark {
    font-size: 5rem;
    line-height: 1;
    color: rgba(37, 82, 152, 0.1);
}

.infra-highlight {
    border-left: 4px solid #255298;
    background-color: #f8fafc;
}

.border-primary {
    border-color: #255298;
}

.border-secondary {
    border-color: #47a5de;
}

.quality-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.quality-card:hover {
    border-left: 4px solid #255298;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.glider-slide {
    padding: 0 15px;
}

.bg-primary {
    background-color: #255298;
}

.bg-secondary {
    background-color: #47a5de;
}

.text-primary {
    color: #255298;
}

.text-secondary {
    background: linear-gradient(90deg, #1a4d9c, #47a5de);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}


.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
}

.spec-badge {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
}

.material-card {
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.material-card:hover {
    transform: translateY(-5px);
    border-bottom: 3px solid #47a5de;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.material-icon {
    background: linear-gradient(135deg, #255298, #47a5de);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.process-section {

    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.process-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.process-item:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: linear-gradient(135deg, #255298, #47a5de);
    border-radius: 50%;
}

.process-item:after {
    content: "";
    position: absolute;
    left: 0.5rem;
    top: 1.5rem;
    bottom: -1.5rem;
    width: 2px;
    background: linear-gradient(to bottom, #47a5de, transparent);
}

.process-item:last-child:after {
    display: none;
}

.process-category {
    border-left: 4px solid #255298;
    transition: all 0.3s ease;
}

.process-category:hover {
    transform: translateX(5px);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
}

.search-container {
    transition: all 0.3s ease;
}

.search-expanded {
    width: 250px;
}




.swiper-container {
    overflow: hidden;
    position: relative;
}

.logo-slider {
    display: flex;
    animation: slide 30s linear infinite;
    width: max-content;
}

.logo-slider:hover {
    animation-play-state: paused;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.logo-item {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.logo-item:hover {
    transform: scale(1.05);
}



.logo-item:hover .logo-img {
    filter: grayscale(0%);
    opacity: 1;
}

.nav-btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.gradient-overlay {
    pointer-events: none;
}



.bg-primary {
    background-color: #255298;
}

.bg-secondary {
    background-color: #47a5de;
}

.text-primary {
    color: #255298;
}

.text-secondary {
    color: #47a5de;
}

.border-primary {
    border-color: #255298;
}

.border-secondary {
    border-color: #47a5de;
}

.nav-link:hover {
    color: #47a5de;
}

/* Dropdown Menu Fix - Prevents flickering when hovering */
.group {
    position: relative;
}

/* Smooth transitions for dropdown */
.dropdown-menu {
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* Ensure dropdown stays visible when hovering over the group or the dropdown itself */
.group:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Bridge the gap - extend hover area to include the padding area */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: transparent;
    pointer-events: auto;
}

.btn-primary {
    background-color: #255298;
    color: white;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: #1d437a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #47a5de;
    color: white;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: #3a8bbd;
    transform: translateY(-2px);
}

.product-detail {
    transition: all 0.3s;
}

.product-detail:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item {
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 82, 152, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item .zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 2rem;
    z-index: 2;
    transition: transform 0.3s ease;
}

.gallery-item:hover .zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

.product-tab {
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.product-tab.active {
    border-bottom: 3px solid #255298;
    color: #255298;
    font-weight: 600;
}

.product-tab:hover:not(.active) {
    color: #47a5de;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 per row */
    gap: 1.5rem;
    /* space between items */
}


/* Tablet: 2 per row */
@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 per row */
@media (max-width: 640px) {
    .masonry-grid {
        grid-template-columns: 1fr;
    }
}

/* Ensure images fill nicely */
.masonry-item img {
    width: 100%;
    height: 250px;
    /* fixed height for uniform look */
    object-fit: cover;
    /* crop nicely */
    display: block;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #255298;
}

.industry-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.industry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.client-logo {
    height: 60px;

}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}



.prose h2 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #334155;
}

.date-badge {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-weight: bold;
}

.date-badge .month {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.date-badge .day {
    font-size: 1.5rem;
    line-height: 1.2;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    color: #64748b;
    transition: all 0.3s ease;
}

.share-button:hover {
    background-color: #10b981;
    color: white;
}