/* General Reset and Setup (Keep this the same as before) */
:root {
    --bg-light: #f5f5f5;
    --text-dark: #333;
    --brand-orange: #ff6600; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: var(--text-dark);
}

/* --- Container and Card Layout --- */

.container {
    display: flex;
    max-width: 98%; 
    margin: 20px auto; 
    padding: 0 10px;
    gap: 20px;
}

.card {
    flex: 1;
    background-color: var(--bg-light);
    border-radius: 10px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden; 
    min-height: 85vh; /* Ensure height for image placement */
}

/* --- Header and Button Styling (Keep this the same) --- */
/* .card-header { }
.card-title { }
.logo { }
.logo-text { }
.btn { }
.btn:hover { } */


/* --- Parts Card Image Styling (Right Side) --- */

.parts-card .card-image {
   z-index: 5; 
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 94%; /* Use 100% height to ensure background covers the whole area */
    top: 0; /* Changed from 100px to 0 to use 100% height */

    /* SET INITIAL IMAGE AS BACKGROUND */
    background-image: url('2.png');
    background-size: 60%; /* Scale to fit, similar to the previous img width */
    background-repeat: no-repeat;
    background-position: center bottom; /* Position the image at the bottom center */
    
    /* Optional: Add a smooth transition for the swap effect */
    transition: transform 0.25s ease-out, filter .5s ease, background-image 0.25s ease;
}
/* --- HOVER EFFECT: Image Swap --- */

.parts-card:hover .card-image {
    /* Replace with your new image URL for the hover state */
    background-image: url('1.png');

    /* Optional: Add a slight transform on hover for visual interest */
    transform: scale(1.0);
}

.parts-card .responsive-img {
    width: 90%;
    height: auto;
    object-fit: contain; 
}

.parts-card:hover .btn, .motors-card:hover .btn{
    background-color: var(--brand-orange); /* Fills button with orange */
    color: #fff; /* Changes text color to white for contrast */
    border-color: var(--brand-orange); /* Changes border to orange */
}

/* --- Header and Logo Styling Confirmation --- */

.card-header {
    /* CRITICAL: Enables Flexbox for side-by-side layout */
    display: flex;
    /* CRITICAL: Pushes the first item (title) to the left edge and the second item (logo) to the right edge */
    justify-content: space-between;
    /* Aligns items vertically at the top of the header area */
    align-items: flex-start;
    margin-bottom: 10px;
}

.card-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-dark);
}

.logo-img {
    /* Ensures the logo is visible and sized like in the original image */
    width: 200px; 
    height: auto;
    display: block;
}

/* ... (rest of the CSS remains the same for buttons and images) ... */
/* --- Motors Card Image Styling (Left Side - NEW MULTI-IMAGE LOGIC) --- */

.car-group {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Take up the full height of the card */
    pointer-events: none; /* Allows clicks to go to the button/links */
}
.btn {
    text-decoration: none; /* Removes underline from link */
    color: var(--text-dark); /* Default text color (dark gray/black) */
    
    /* Button shape and border */
    border: 1px solid var(--brand-orange); /* Subtle border outline */
    padding: 16px 50px;
    border-radius: 40px; /* Makes the button fully rounded (pill shape) */
    
    /* Layout and positioning */
    width: fit-content; /* Button only takes up necessary width */
    margin-top: 10px;
    
    /* Transition for smooth hover effect */
    transition: background-color 0.5s, color 0.5s, border-color 0.5s;
    font-size: 16px;
    font-weight: 500;
    
    /* CRITICAL FOR CLICKABILITY (as discussed before) */
    position: relative; 
    z-index: 20; 
    cursor: pointer; /* Indicates it is interactive */
}

/* --- HOVER EFFECT (Turning Orange) --- */
.btn:hover {
    background-color: var(--brand-orange); /* Fills button with orange */
    color: #fff; /* Changes text color to white for contrast */
    border-color: var(--brand-orange); /* Changes border to orange */
}
.car-img {
    position: absolute;
    height: 100%; /* Ensure the image fills the vertical space */
    bottom: 0;
    object-fit: contain;
    transition: transform 0.25s ease-out, filter 0.25s ease; /* Added transition for animation */
    pointer-events: auto; /* Make images clickable/hoverable */
    width: 100%; /* Start by filling the width */
    top: 15%;
}

/* Specific positioning to make them look like the original group photo */
/* These values might need fine-tuning based on your actual sliced images */

.car-1 { /* Tesla (Far Left) */
    left: 8%;
    top: 23%;
    z-index: 1;
    max-width: 100%;
}

.car-2 { /* Mercedes (Center/Front) */
    left: 32%;
    top: 21%; 
    z-index: 3; /* Highest Z-index for the front car */
    max-width: 100%; 
}

.car-3 { /* Other SUV (Far Right) */
    left: 50%;
    top: 21%;
    z-index: 3; 
    max-width: 100%;
}

/* --- HOVER ANIMATION (Move slightly left) --- */

.motors-card:hover .car-img {
    transform: translateY(-1%) scale(1.02); /* Move left and slightly enlarge */
    filter: brightness(1.05); /* Slight brightness change for visual effect */
}

.fixed-tel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  line-height: 50px;
  z-index: 9999;
  text-align: center;
}

.fixed-tel:before {
  content: "";
  width: 50px;
  height: 50px;
  background-color: #ff5f13;
  position: absolute;
  border-radius: 100%;
  box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, .12), 0 1px 1px 0 rgba(0, 0, 0, .24);
  z-index: 1;
  top: 0;
  left: 0;
}

.fixed-tel i {
  vertical-align: middle;
  z-index: 2;
  position: relative;
  color: #030f27;
  font-size: 1.5rem;
}


/* --- Responsiveness (Mobile View) --- */

@media (max-width: 768px) {
    .container {
        flex-direction: column; 
        gap: 15px;
    }

    .card {
        padding: 15px;
        min-height: 400px;
        align-items: center;
        padding-top: 24px;
    }
    
    /* Repositioning for stacked cars on mobile */
    .car-img:hover {
        transform: translateX(-1%) scale(1.01); /* Reduced movement for smaller screens */
    }

    .card-header{
        flex-direction: column-reverse;
    }
    .card-title, .logo{
        width: 100%;
        text-align: center;
    }
    .logo{
        display: flex;
        justify-content: center;
    }
    .logo-img{
        width: 150px;
    }
    .card-title{
        font-size: 20px;
    }
    .btn{
        padding: 10px 25px;
    }
    /* Parts card mobile adjustment */
    .parts-card .card-image{
        background-size: 50%;
        background-image: url('2.png');

    }
    
}