/* Car Grid Layout for DreamDrive Home Page - Sportosabb, versenyzősebb stílus */
.cars-grid-container {
    width: 100%;
    margin: 0 auto;
    padding: 30px 3%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
    position: relative;
}

.modern-car-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff, #f5f5f5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    min-height: 480px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    position: relative;
    z-index: 1;
    color: #333;
}

.modern-car-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(var(--accent-color-rgb), 0.4);
    z-index: 5;
}

.modern-car-card:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color), var(--accent-color));
    z-index: -1;
    border-radius: 13px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modern-car-card:hover:before {
    opacity: 0.9;
    animation: race-glow 3s linear infinite;
}

@keyframes race-glow {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}

.racing-track-lines {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-image: repeating-linear-gradient(to right, var(--accent-color), var(--accent-color) 60px, transparent 60px, transparent 120px);
    opacity: 0.25;
    transform: skewX(-15deg);
    box-shadow: 0 0 20px rgba(var(--accent-color-rgb), 0.5);
}

.car-bg-block {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(var(--primary-color-rgb), 0.05), transparent),
                linear-gradient(135deg, rgba(255,255,255,0.9), rgba(245,245,245,0.95));
    opacity: 1;
    z-index: 0;
}

/* Sebesség vonalak effektus - feljavítva */
.car-speed-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s;
}

.modern-car-card:hover .car-speed-lines {
    opacity: 0.5;
}

.speed-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-color-rgb), 0.3), transparent);
    animation: speed-line 2s linear infinite;
}

@keyframes speed-line {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }
    100% {
        transform: translateX(100%) skewX(-15deg);
    }
}

.speed-blur {
    position: absolute;
    width: 150px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-color-rgb), 0.3), transparent);
    z-index: -1;
    transform: skewX(-25deg);
    animation: speed-blur 3s infinite;
    opacity: 0.3;
}

@keyframes speed-blur {
    0% {
        transform: translateX(-100%) skewX(-25deg);
    }
    100% {
        transform: translateX(2000px) skewX(-25deg);
    }
}

.speed-blur:nth-child(1) {
    animation-delay: 0s;
    animation-duration: 4s;
}

.speed-blur:nth-child(2) {
    animation-delay: 1s;
    animation-duration: 3.5s;
}

.speed-blur:nth-child(3) {
    animation-delay: 2s;
    animation-duration: 4.5s;
}

.speed-blur:nth-child(4) {
    animation-delay: 3s;
    animation-duration: 3s;
}

.modern-car-image {
    position: relative;
    width: 100%;
    min-height: 220px;
    height: auto;
    overflow: hidden;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: transparent;
    transform-style: preserve-3d;
    perspective: 800px;
    padding-top: 0px;
    padding: 0px!important;
}

.modern-car-image:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 0;
    background: linear-gradient(to top, rgba(var(--primary-color-rgb), 0.1), transparent);
    z-index: 2;
    transform: translateY(50%);
    opacity: 0;
    transition: all 0.5s;
}

.modern-car-card:hover .modern-car-image:before {
    transform: translateY(0);
    opacity: 1;
}

.modern-car-image img {
    width: auto;
    height: 90%;
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.5s;
    margin: 0 auto;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
    transform: translateZ(0);
}

.modern-car-card:hover .modern-car-image img {
    transform: scale(1.05);
}

.modern-car-info {
    padding: 20px;
    flex-grow: 1;
    z-index: 1;
    position: relative;
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.2);
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(250,250,250,0.95));
}

.modern-car-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.modern-car-name:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 40%;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 0 5px rgba(var(--primary-color-rgb), 0.3);
}

.car-specs {
    margin: 0 0 20px 0;
    background: rgba(0,0,0,0.03);
    border-radius: 10px;
    padding: 12px;
    border-left: 3px solid var(--primary-color);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* Már nem használjuk ezt a stílust */
.specs-overlay {
    display: none;
}

.row-specs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    margin: 10px 0 15px 0;
    padding: 8px;
    background: rgba(var(--primary-color-rgb), 0.05);
    border-radius: 8px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.car-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9rem;
    padding: 6px 2px;
    position: relative;
    overflow: hidden;
    flex: 1;
    transition: all 0.3s ease;
}

.row-specs .car-spec {
    border-right: 1px solid rgba(var(--primary-color-rgb), 0.2);
    margin: 0;
    padding: 0 5px;
}

.row-specs .car-spec:last-child {
    border-right: none;
}

.car-spec:hover {
    transform: translateY(-2px);
}

.row-specs:hover {
    background: rgba(var(--primary-color-rgb), 0.08);
    border-color: rgba(var(--primary-color-rgb), 0.2);
}

.car-spec i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
    text-align: center;
    display: block;
    text-shadow: none;
}

.row-specs .car-spec i {
    font-size: 1rem;
    display: inline-block;
    margin-right: 4px;
    margin-bottom: 0;
    vertical-align: middle;
}

.spec-label {
    color: #777;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
    display: block;
    width: 100%;
}

.row-specs .spec-label {
    display: none;
}

.spec-value {
    color: #333;
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    width: 100%;
    text-shadow: none;
}

.row-specs .spec-value {
    font-size: 0.8rem;
    font-weight: 600;
    display: inline;
    vertical-align: middle;
}

.row-specs .spec-value small {
    font-size: 0.7rem;
}

.original-price {
    font-size: 0.9rem;
    color: #777;
    text-decoration: line-through;
    margin-bottom: 8px;
    text-align: center;
}

.sale-price {
    font-size: 1.8rem;
    color: var(--accent-color);
    font-weight: 800;
    text-align: center;
    text-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.3);
    margin: 15px 0;
    letter-spacing: 1px;
}

.only-price {
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 800;
    text-align: center;
    text-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3);
    margin: 15px 0;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    width: 100%;
    padding: 10px 0;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.only-price:before {
    content: "Induló ár";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 2px 15px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.multiple-prices {
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 800;
    text-align: center;
    text-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3);
    margin: 15px 0;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    width: 100%;
    padding: 10px 0;
    background-color: rgba(var(--primary-color-rgb), 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.multiple-prices:before {
    content: "Induló ár";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 2px 15px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.price-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), transparent);
    margin: 25px 0 15px 0;
    position: relative;
}

.price-divider:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
}

.car-buttons {
    display: flex;
    justify-content: center;
    padding: 0 20px 20px;
    z-index: 1;
    gap: 10px;
    position: relative;
}

.view-experience-btn, .booking-btn {
    display: inline-block;
    padding: 12px 0;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    transition: all 0.3s;
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-experience-btn:before, .booking-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-25deg);
    transition: all 0.5s;
    z-index: -1;
}

.view-experience-btn:hover:before, .booking-btn:hover:before {
    left: 100%;
}

.view-experience-btn {
    background-color: var(--primary-color);
    color: #fff;
    margin-right: 10px;
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.booking-btn {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(var(--accent-color-rgb), 0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.view-experience-btn:hover, .booking-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(var(--accent-color-rgb), 0.5);
}

.view-experience-btn:active, .booking-btn:active {
    transform: translateY(1px);
}

.no-cars-message {
    text-align: center;
    font-size: 1.2rem;
    color: #888;
    padding: 40px 0;
}

/* Kiegészítő stílusok a sportosabb megjelenéshez */
.highlight-text {
    color: var(--accent-color);
    position: relative;
    display: inline-block;
}

.racing-specs .car-spec {
    position: relative;
    overflow: visible;
}

.racing-specs .car-spec:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.4s ease;
}

.racing-specs .car-spec:hover:after {
    width: 100%;
}

.racing-specs .spec-value small {
    font-size: 0.6rem;
    opacity: 0.7;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reszponzív beállítások */
@media (max-width: 1200px) {
    .cars-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .modern-car-name {
        font-size: 1.2rem;
    }
    
    .racing-bg-section h2 {
        font-size: 2.4rem;
    }
}

@media (max-width: 900px) {
    .cars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .modern-car-name {
        font-size: 1.1rem;
    }
    
    .car-spec i {
        font-size: 1.6rem;
    }
    
    .spec-value {
        font-size: 1.1rem;
    }
    
    .racing-bg-section h2 {
        font-size: 2rem;
    }
    
    .modern-car-image {
        height: 180px;
    }
    
    .modern-car-card {
        min-height: 420px;
    }
}

@media (max-width: 600px) {
    .cars-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .car-buttons {
        flex-direction: column;
    }
    
    .view-experience-btn {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .modern-car-image {
        height: 200px;
    }
    
    .modern-car-card {
        min-height: 450px;
        max-width: 90%;
        margin: 0 auto;
    }
    
    .racing-bg-section h2 {
        font-size: 1.8rem;
        padding: 0 15px;
    }
    
    .racing-bg-section h2:after {
        width: 80px;
    }
}
