/* Machinery Page Styles - Enhanced Modern Design */

/* Performance optimization - Faster animations */
.machinery-hero *,
.capability-card *,
.tab-navigation *,
.machinery-table * {
    transition-duration: 0.25s !important;
    animation-duration: 0.25s !important;
}

/* Hero Section */
.machinery-hero {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 180px 0 100px;
    overflow: hidden;
}

.machinery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
    animation: patternMove 60s linear infinite;
}

@keyframes patternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}
/* Speed up pattern animation */
.machinery-hero::before {
    animation-duration: 30s !important;
}

.machinery-hero .container {
    position: relative;
    z-index: 1;
}

@media (max-width: 991px) {
    .machinery-hero {
        padding: 140px 0 80px;
    }
}

@media (max-width: 767px) {
    .machinery-hero {
        padding: 120px 0 60px;
    }
}

/* Capability Cards - Sleek Horizontal Design */
.capability-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 60px;
    padding: 20px 35px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 25px rgba(30, 60, 114, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(30, 60, 114, 0.1);
    margin: 0 8px 15px;
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.capability-card:hover::before {
    opacity: 1;
}

.capability-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 40px rgba(30, 60, 114, 0.3);
    border-color: #1e3c72;
}

.capability-card:hover .capability-title,
.capability-card:hover .capability-icon i {
    color: #ffffff;
    z-index: 1;
}

.capability-icon {
    width: 50px;
    height: 50px;
    margin: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.25);
    z-index: 1;
    position: relative;
}

.capability-card:hover .capability-icon {
    transform: rotate(360deg) scale(1.15);
    background: #ffffff;
}

.capability-card:hover .capability-icon i {
    color: #1e3c72;
}

.capability-icon i {
    font-size: 24px;
    color: #ffffff;
    transition: color 0.4s ease;
}

.capability-title {
    font-size: 17px;
    font-weight: 700;
    color: #232323;
    margin: 0;
    white-space: nowrap;
    transition: color 0.4s ease;
    z-index: 1;
    position: relative;
    letter-spacing: 0.5px;
}

.capability-description {
    display: none;
}

/* Responsive layout for capability cards */
@media (max-width: 991px) {
    .capability-card {
        padding: 16px 28px;
        margin: 0 6px 12px;
    }
    
    .capability-icon {
        width: 45px;
        height: 45px;
    }
    
    .capability-icon i {
        font-size: 20px;
    }
    
    .capability-title {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .capability-card {
        padding: 14px 20px;
        border-radius: 50px;
        margin: 0 4px 10px;
        gap: 12px;
    }
    
    .capability-icon {
        width: 38px;
        height: 38px;
    }
    
    .capability-icon i {
        font-size: 18px;
    }
    
    .capability-title {
        font-size: 13px;
        letter-spacing: 0.3px;
    }
}

/* Tabs Navigation - Sleek 4+2 Row Design */
.machinery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px;
}

.machinery-tab {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 2px solid rgba(30, 60, 114, 0.12);
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 700;
    color: #232323;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(30, 60, 114, 0.1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.4px;
    white-space: nowrap;
    width: 250px;
    flex-shrink: 0;
}

.machinery-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
}

.machinery-tab:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 30px rgba(30, 60, 114, 0.25);
    border-color: #2a5298;
}

.machinery-tab:hover::before {
    opacity: 0.12;
}

.machinery-tab.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-color: #1e3c72;
    color: #ffffff !important;
    box-shadow: 0 8px 35px rgba(30, 60, 114, 0.4);
    transform: translateY(-4px) scale(1.06);
}

.machinery-tab.active::before {
    opacity: 1;
}

.tab-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.tab-label i {
    font-size: 18px;
}

.machinery-tab i {
    transition: transform 0.35s ease;
    position: relative;
    z-index: 1;
    color: inherit;
    flex-shrink: 0;
}

.machinery-tab:hover i {
    transform: rotate(20deg) scale(1.1);
}

.machinery-tab.active i {
    transform: rotate(360deg);
    color: #ffffff !important;
}

.machinery-tab.active .tab-label {
    color: #ffffff !important;
}

.machinery-tab span {
    position: relative;
    z-index: 1;
}

.unit-badge {
    background: rgba(30, 60, 114, 0.15);
    padding: 5px 13px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.35s ease;
    color: #232323;
    flex-shrink: 0;
}

.machinery-tab.active .unit-badge {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
}

@media (max-width: 1200px) {
    .machinery-tab {
        width: 230px;
        font-size: 13px;
        padding: 13px 18px;
    }
    
    .machinery-tab i {
        font-size: 16px;
    }
}

@media (max-width: 991px) {
    .machinery-tabs {
        gap: 10px;
    }
    
    .machinery-tab {
        width: calc(50% - 5px);
        font-size: 13px;
        padding: 12px 18px;
    }
    
    .machinery-tab i {
        font-size: 15px;
    }
    
    .unit-badge {
        font-size: 10px;
        padding: 4px 11px;
    }
}

@media (max-width: 767px) {
    .machinery-tabs {
        gap: 8px;
    }
    
    .machinery-tab {
        width: calc(50% - 4px);
        font-size: 12px;
        padding: 11px 15px;
        gap: 8px;
    }
    
    .machinery-tab i {
        font-size: 14px;
    }
    
    .unit-badge {
        font-size: 9px;
        padding: 3px 9px;
    }
}

@media (max-width: 576px) {
    .machinery-tab {
        font-size: 11px;
        padding: 10px 12px;
        gap: 6px;
    }
    
    .machinery-tab i {
        font-size: 13px;
    }
    
    .unit-badge {
        font-size: 8px;
        padding: 3px 8px;
    }
}

/* Table Cards */
.machinery-table-card {
    display: none;
    animation: fadeInSlide 0.5s ease;
    padding: 0;
}

.machinery-table-card.active {
    display: block;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Table styles removed for this page per request */

/* Simple, scoped table styles for this page */
.machinery-table-card > div {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.machinery-table-card table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    /* Gradient accent border matching site theme */
    border: 2px solid transparent;
    border-radius: 10px;
    background-image:
        linear-gradient(#ffffff, #ffffff),
        linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #764ba2 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    overflow: hidden;
}

.machinery-table-card thead th {
    background: inherit;
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 2;
}

.machinery-table-card tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f2f7;
    color: #2f3542;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.machinery-table-card tbody tr:last-child td {
    border-bottom: none;
}

.machinery-table-card tbody tr:nth-child(even) {
    background: #fafbfe;
}

.machinery-table-card tbody tr:hover {
    background: #f5f8ff;
}

.machinery-table-card tbody td:first-child {
    font-weight: 600;
    color: #1e3c72;
}

/* Elevated, appealing header bar */
.machinery-table-card thead {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #764ba2 100%);
}

.machinery-table-card thead th:first-child {
    border-top-left-radius: 10px;
}

.machinery-table-card thead th:last-child {
    border-top-right-radius: 10px;
}

@media (max-width: 991px) {
    .machinery-table-card thead th {
        padding: 12px 14px;
        font-size: 13px;
    }
    .machinery-table-card tbody td {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .machinery-table-card table {
        font-size: 12px;
        min-width: 520px; /* allow horizontal scroll instead of cramping */
    }
    .machinery-table-card thead th {
        padding: 10px 12px;
    }
    .machinery-table-card tbody td {
        padding: 9px 12px;
    }
}

/* Stats Section */
.machinery-stats {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 70px 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.stat-item {
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

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

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.stat-label {
    display: block;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

@media (max-width: 767px) {
    .machinery-stats {
        padding: 50px 0;
        margin-top: 0;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 13px;
    }
}
