/* Motorx Theme Redesign - Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --mx-red: #e62229;
    --mx-red-hover: #c91a20;
    --mx-dark: #0e1525;
    --mx-darker: #0b111e;
    --mx-text-dark: #1a1a1a;
    --mx-text-gray: #6b7280;
    --mx-bg-light: #f8f9fa;
    --mx-white: #ffffff;
    --mx-border: #eaecf0;
    --mx-font: 'Plus Jakarta Sans', sans-serif;
    --mx-transition: all 0.3s ease;
}

body {
    font-family: var(--mx-font);
    color: var(--mx-text-gray);
    background-color: var(--mx-white);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--mx-font);
    font-weight: 700;
    color: var(--mx-dark);
}

a {
    text-decoration: none;
    color: var(--mx-dark);
    transition: var(--mx-transition);
}

a:hover {
    color: var(--mx-red);
}

/* Typography Utilities */
.text-red { color: var(--mx-red) !important; }
.bg-red { background-color: var(--mx-red) !important; }
.bg-dark { background-color: var(--mx-dark) !important; }

/* Buttons */
.btn-mx {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--mx-transition);
    border: 2px solid transparent;
}

.btn-mx-red {
    background-color: var(--mx-red);
    color: var(--mx-white);
}

.btn-mx-red:hover {
    background-color: var(--mx-dark);
    color: var(--mx-white);
}

.btn-mx-dark {
    background-color: var(--mx-dark);
    color: var(--mx-white);
}

.btn-mx-dark:hover {
    background-color: var(--mx-red);
    color: var(--mx-white);
}

.btn-mx-outline {
    border-color: var(--mx-border);
    color: var(--mx-dark);
}

.btn-mx-outline:hover {
    border-color: var(--mx-red);
    background-color: var(--mx-red);
    color: var(--mx-white);
}

/* Topbar */
.topbar {
    background-color: var(--mx-red);
    color: var(--mx-white);
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
}

.topbar a {
    color: var(--mx-white);
}

.topbar .topbar-info i {
    margin-right: 8px;
}

.topbar .topbar-info span {
    margin-right: 24px;
}

.topbar .topbar-social a {
    margin-left: 16px;
    font-size: 14px;
}

/* Header */
.header-main {
    background-color: var(--mx-dark);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Logo Animation */
@keyframes floatLogo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

.header-main .navbar-brand {
    display: inline-block;
    animation: floatLogo 3s ease-in-out infinite;
    transition: var(--mx-transition);
}

.header-main .navbar-brand:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}

.header-main .navbar-brand img {
    height: 85px; /* Increased height for the new gold logo */
}

.header-main .nav-link {
    font-weight: 600;
    color: var(--mx-white) !important;
    padding: 10px 15px !important;
    text-transform: capitalize;
}

.header-main .nav-link:hover, .header-main .nav-link.active {
    color: var(--mx-red) !important;
}

.header-main .nav-link i {
    font-size: 12px;
    margin-left: 4px;
}

.header-right {
    display: flex;
    align-items: center;
}

.header-auth {
    font-weight: 600;
    color: var(--mx-white);
    margin-right: 20px;
}

.header-auth a {
    color: var(--mx-white);
}

.header-auth a:hover {
    color: var(--mx-red);
}

.header-auth span {
    color: var(--mx-text-gray);
    margin: 0 5px;
}

/* Hero Section */
.mx-hero {
    position: relative;
    padding: 120px 0 160px;
    background-size: cover;
    background-position: center;
    background-color: #3f5573;
}
.mx-hero::before {
    content: '';
    position: absolute;
    top:0; left:0; width:100%; height:100%;
    background: linear-gradient(90deg, rgba(16,28,52,0.95) 0%, rgba(16,28,52,0.6) 50%, rgba(16,28,52,0) 100%);
}
.mx-hero .container {
    position: relative;
    z-index: 2;
}
.mx-hero-subtitle {
    color: #aeb5c5;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
    position: relative;
    padding-bottom: 5px;
}
.mx-hero-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--mx-white);
}
.mx-hero-title {
    color: var(--mx-white);
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
}
.mx-hero-desc {
    color: #d0d5df;
    font-size: 18px;
    max-width: 500px;
    margin-bottom: 40px;
}
.play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--mx-white);
    color: var(--mx-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-left: 20px;
    transition: var(--mx-transition);
}
.play-btn:hover {
    transform: scale(1.1);
    color: var(--mx-red);
}

/* Machinery Card (Adapted from Car Card) */
.machinery-card {
    background: var(--mx-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: var(--mx-transition);
    border: 1px solid var(--mx-border);
    margin-bottom: 30px;
    position: relative;
}

.machinery-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.machinery-card .card-media {
    position: relative;
    overflow: hidden;
    height: 240px; /* Fixed height for consistency */
}

.machinery-card .card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.machinery-card:hover .card-media img {
    transform: scale(1.05);
}

.machinery-card .badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.machinery-card .badge-featured {
    background: var(--mx-red);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.machinery-card .badge-year {
    background: var(--mx-red);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.machinery-card .card-content {
    padding: 24px;
}

.machinery-card .subtitle {
    font-size: 13px;
    color: var(--mx-red);
    font-weight: 600;
    margin-bottom: 5px;
}

.machinery-card .title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--mx-dark);
}

.machinery-card .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--mx-red);
    margin-bottom: 20px;
}

.machinery-card .specs {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--mx-border);
    padding-top: 15px;
}

.machinery-card .spec-item {
    text-align: center;
    font-size: 13px;
    color: var(--mx-text-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.machinery-card .spec-item i {
    font-size: 18px;
    color: var(--mx-dark);
    margin-bottom: 5px;
}

.machinery-card .spec-item span {
    font-weight: 500;
    color: var(--mx-dark);
    display: block;
    margin-top: 2px;
}

/* Horizontal card specifically for the Popular Makes section */
.machinery-card.horizontal-dark {
    background: var(--mx-dark);
    border-color: var(--mx-darker);
    display: flex;
    flex-direction: row;
    height: 100%;
}
.machinery-card.horizontal-dark .card-media {
    width: 40%;
    height: auto;
}
.machinery-card.horizontal-dark .card-content {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.machinery-card.horizontal-dark .title {
    color: var(--mx-white);
    font-size: 22px;
}
.machinery-card.horizontal-dark .spec-item span,
.machinery-card.horizontal-dark .spec-item i {
    color: var(--mx-white);
}
.machinery-card.horizontal-dark .specs {
    border-color: rgba(255,255,255,0.1);
    margin-bottom: 20px;
}
.machinery-card.horizontal-dark .price {
    color: var(--mx-red);
    margin-bottom: 0;
}
.machinery-card.horizontal-dark .price span {
    color: var(--mx-text-gray);
    font-size: 14px;
    font-weight: 500;
    text-decoration: line-through;
    margin-left: 8px;
}
.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.card-actions-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    color: var(--mx-white);
    margin-left: 10px;
    transition: var(--mx-transition);
}
.card-actions-icons a:hover {
    background: var(--mx-red);
}

/* Section Headings */
.section-padding {
    padding: 80px 0;
}

.mx-section-title {
    font-size: 40px;
    font-weight: 800;
    color: var(--mx-dark);
    margin-bottom: 0;
}
.mx-section-subtitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--mx-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

/* Tabs */
.mx-tabs {
    border: none;
    justify-content: flex-end;
}
.mx-tabs .nav-link {
    border: 1px solid var(--mx-border);
    color: var(--mx-text-gray);
    font-weight: 600;
    border-radius: 4px;
    padding: 8px 24px;
    margin-left: 10px;
}
.mx-tabs .nav-link.active, .mx-tabs .nav-link:hover {
    background-color: var(--mx-red);
    color: var(--mx-white);
    border-color: var(--mx-red);
}

.mx-tabs-pills {
    border: none;
}
.mx-tabs-pills .nav-link {
    border: 1px solid var(--mx-border);
    color: var(--mx-text-gray);
    font-weight: 600;
    border-radius: 4px;
    padding: 8px 20px;
    margin-right: 10px;
    margin-bottom: 10px;
}
.mx-tabs-pills .nav-link.active, .mx-tabs-pills .nav-link:hover {
    background-color: var(--mx-red);
    color: var(--mx-white);
    border-color: var(--mx-red);
}

/* Footer Placeholder */
.site-footer {
    background-color: var(--mx-dark);
    color: #a0a0a0;
    padding: 80px 0 40px;
}
.site-footer h4 {
    color: var(--mx-white);
}

/* ============================================
   PAGE BANNER
   ============================================ */
.mx-page-banner {
    background: var(--mx-dark);
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
}
.mx-page-banner h1 {
    color: var(--mx-white);
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 12px;
}
.mx-page-banner p {
    color: #a0a0a0;
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
}
.mx-page-banner .breadcrumb {
    justify-content: center;
    margin-top: 20px;
}
.mx-page-banner .breadcrumb-item a {
    color: var(--mx-red);
}
.mx-page-banner .breadcrumb-item.active {
    color: #a0a0a0;
}

/* ============================================
   SERVICE / INFO CARDS
   ============================================ */
.mx-info-card {
    background: var(--mx-white);
    border: 1px solid var(--mx-border);
    border-radius: 8px;
    padding: 35px 25px;
    transition: var(--mx-transition);
    height: 100%;
}
.mx-info-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transform: translateY(-4px);
    border-color: var(--mx-red);
}
.mx-info-card .icon {
    width: 55px;
    height: 55px;
    background: rgba(230, 34, 41, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--mx-red);
    margin-bottom: 18px;
}
.mx-info-card:hover .icon {
    background: var(--mx-red);
    color: var(--mx-white);
}
.mx-info-card h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--mx-dark);
    margin-bottom: 10px;
}
.mx-info-card p {
    font-size: 14px;
    color: var(--mx-text-gray);
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.mx-contact-card {
    background: var(--mx-dark);
    border-radius: 8px;
    padding: 40px 30px;
    color: var(--mx-white);
    height: 100%;
}
.mx-contact-card h4 {
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--mx-white);
}
.mx-contact-card .info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 22px;
}
.mx-contact-card .info-item .icon {
    width: 40px;
    height: 40px;
    background: rgba(230, 34, 41, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mx-red);
    flex-shrink: 0;
}
.mx-contact-card .info-item h6 {
    font-weight: 600;
    margin-bottom: 3px;
    color: var(--mx-white);
    font-size: 14px;
}
.mx-contact-card .info-item p {
    color: #a0a0a0;
    font-size: 13px;
    margin: 0;
}

.mx-form .form-control,
.mx-form .form-select {
    padding: 12px 16px;
    border: 1px solid var(--mx-border);
    border-radius: 4px;
    font-size: 14px;
    background: #f9fafb;
}
.mx-form .form-control:focus,
.mx-form .form-select:focus {
    border-color: var(--mx-red);
    box-shadow: 0 0 0 0.15rem rgba(230, 34, 41, 0.1);
}
.mx-form label {
    font-weight: 600;
    font-size: 13px;
    color: var(--mx-dark);
    margin-bottom: 5px;
}

/* ============================================
   GALLERY
   ============================================ */
.mx-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.mx-gallery-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 4/3;
    border: 1px solid var(--mx-border);
}
.mx-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.mx-gallery-item:hover img {
    transform: scale(1.08);
}
.mx-gallery-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(14, 21, 37, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--mx-transition);
}
.mx-gallery-item:hover .overlay {
    opacity: 1;
}
.mx-gallery-item .overlay i {
    font-size: 28px;
    color: var(--mx-white);
}

/* ============================================
   MOBILE TOGGLER
   ============================================ */
.header-main .navbar-toggler {
    border: none;
    padding: 5px;
}
.header-main .navbar-toggler:focus {
    box-shadow: none;
}
.header-main .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .header-main .navbar-collapse {
        background: var(--mx-darker);
        padding: 20px;
        border-radius: 8px;
        margin-top: 15px;
    }
    
    .mx-hero {
        padding: 80px 0 100px;
    }
    .mx-hero-title {
        font-size: 40px;
    }
    .mx-hero-desc {
        font-size: 15px;
    }
    
    .mx-section-title {
        font-size: 30px;
    }
    
    .mx-page-banner {
        padding: 100px 0 50px;
    }
    .mx-page-banner h1 {
        font-size: 34px;
    }
    
    .machinery-card.horizontal-dark {
        flex-direction: column;
    }
    .machinery-card.horizontal-dark .card-media {
        width: 100%;
        height: 200px;
    }
    .machinery-card.horizontal-dark .card-content {
        width: 100%;
    }
    
    .section-padding {
        padding: 60px 0;
    }
}

@media (max-width: 767px) {
    .mx-hero {
        padding: 60px 0 80px;
    }
    .mx-hero-title {
        font-size: 32px;
    }
    .mx-hero-desc {
        font-size: 14px;
    }
    
    .mx-section-title {
        font-size: 26px;
    }
    
    .mx-page-banner h1 {
        font-size: 28px;
    }
    
    .mx-tabs, .mx-tabs-pills {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .mx-tabs .nav-link, .mx-tabs-pills .nav-link {
        padding: 6px 14px;
        font-size: 12px;
        margin-bottom: 8px;
    }
    
    .machinery-card .card-media {
        height: 200px;
    }
    
    .mx-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .header-main .navbar-brand img {
        height: 55px;
    }
}

@media (max-width: 480px) {
    .mx-hero-title {
        font-size: 26px;
    }
    .mx-hero-subtitle {
        font-size: 12px;
    }
    
    .mx-section-title {
        font-size: 22px;
    }
    
    .mx-page-banner h1 {
        font-size: 24px;
    }
    
    .machinery-card .specs {
        flex-wrap: wrap;
        gap: 10px;
    }
    .machinery-card .spec-item {
        flex: 1 1 45%;
    }
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================
   HERO SLIDER
   ============================================ */
.mx-hero-slider {
    position: relative;
    overflow: hidden;
}

.mx-hero-slider .swiper-slide .mx-hero {
    padding: 140px 0 160px;
}

.mx-hero-slider .hero-pagination {
    bottom: 30px !important;
}

.mx-hero-slider .hero-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transition: var(--mx-transition);
}

.mx-hero-slider .hero-pagination .swiper-pagination-bullet-active {
    background: var(--mx-red);
    width: 28px;
    border-radius: 5px;
}

.mx-hero-slider .hero-nav {
    color: #fff;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    transition: var(--mx-transition);
}

.mx-hero-slider .hero-nav:hover {
    background: var(--mx-red);
}

.mx-hero-slider .hero-nav::after {
    font-size: 16px;
    font-weight: 700;
}

@media (max-width: 991px) {
    .mx-hero-slider .swiper-slide .mx-hero {
        padding: 100px 0 120px;
    }
    .mx-hero-slider .hero-nav {
        display: none;
    }
}

@media (max-width: 767px) {
    .mx-hero-slider .swiper-slide .mx-hero {
        padding: 80px 0 100px;
    }
}

/* Hero Slide Content Animation - Throw In */
.mx-hero-slider .swiper-slide .mx-hero-subtitle,
.mx-hero-slider .swiper-slide .mx-hero-title,
.mx-hero-slider .swiper-slide .mx-hero-desc,
.mx-hero-slider .swiper-slide .d-flex {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mx-hero-slider .swiper-slide-active .mx-hero-subtitle {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.2s;
}

.mx-hero-slider .swiper-slide-active .mx-hero-title {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.4s;
}

.mx-hero-slider .swiper-slide-active .mx-hero-desc {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.6s;
}

.mx-hero-slider .swiper-slide-active .d-flex {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.8s;
}

.mx-hero-slider .swiper-slide {
    overflow: hidden;
}

/* ============================================
   FLOATING ACTION BUTTONS
   ============================================ */
.floating-buttons {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9990;
}

.float-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-decoration: none;
}

.float-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.whatsapp-btn {
    background: #25d366;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:hover {
    background: #1fb855;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.phone-btn {
    background: var(--mx-red);
    box-shadow: 0 4px 15px rgba(230, 34, 41, 0.4);
}

.phone-btn:hover {
    background: var(--mx-red-hover);
    box-shadow: 0 6px 20px rgba(230, 34, 41, 0.5);
}

/* Pulse animation on WhatsApp */
.whatsapp-btn::after {
    content: '';
    position: absolute;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: pulse-ring 2s infinite;
    z-index: -1;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

@media (max-width: 767px) {
    .floating-buttons {
        bottom: 20px;
        right: 15px;
    }
    .float-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    .whatsapp-btn::after {
        width: 48px;
        height: 48px;
    }
}
