/* Reset previous gradient overrides */
.engine,
.dynamo {
    background: initial !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}

/* Hero Section Specific Styles */
.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
}

/* Background image (cars) with cinematic lighting and brighter presentation */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* lighter overlay so the car photo reads brighter */
    background: linear-gradient(180deg, rgba(2,8,20,0.06), rgba(2,8,20,0.08));
    z-index: 1;
}

/* Use a dedicated layer for the car photography so we can brighten it with filters */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('../images/hero-car-1.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* brighter photo filter — increased brightness and slightly more saturation */
    filter: brightness(1.28) saturate(1.15) contrast(1.06) drop-shadow(0 18px 48px rgba(0,0,0,0.38));
    transform: scale(1.02);
    will-change: filter, transform;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
}

.hero-section .engine-dynamo {
    font-size: clamp(3rem, 10vw, 9rem) !important;
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    padding: 18px 36px;
    display: inline-block;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 1;
    transform: none;
    /* Rich, slightly vibrant highlight behind the title */
    background: linear-gradient(90deg, #0ea5d8 0%, #3b82f6 50%, #7c3aed 100%);
    border-radius: 6px;
    box-shadow: 0 12px 48px rgba(59,130,246,0.16);
    position: relative;
    overflow: hidden;
}

.hero-section .engine-dynamo .engine,
.hero-section .engine-dynamo .dynamo {
    /* Use gradient text provided by hero-gradient.css; fallback for older browsers */
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    font-weight: 900;
    padding: 0 10px;
    letter-spacing: -0.02em;
    font-size: 1.05em !important;
    filter: drop-shadow(0 6px 30px rgba(0,0,0,0.25));
}

/* Also support homepage markup that uses .hero-title (index.php) */
.hero-section .hero-content .hero-title,
.hero-section .hero-content .hero-title .engine,
.hero-section .hero-content .hero-title .dynamo {
    font-size: clamp(3rem, 10vw, 10rem) !important;
    font-weight: 900 !important;
    line-height: 0.95 !important;
    text-align: center !important;
}

.hero-section .hero-content .hero-title .engine {
    background: linear-gradient(135deg, #00b4ff 0%, #0074e4 50%, #004c9e 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0 8px 40px rgba(0,180,255,0.12) !important;
    display: inline-block;
    padding: 0 8px !important;
}

.hero-section .hero-content .hero-title .dynamo {
    background: linear-gradient(135deg, #ff4040 0%, #ff6b6b 60%, #ff9a9a 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    text-shadow: 0 8px 40px rgba(255,64,64,0.12) !important;
    display: inline-block;
    padding: 0 8px !important;
}

/* Button styling improvements */
.hero-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 150px;
    text-decoration: none;
    position: relative;
}

.hero-buttons .btn-primary {
    background: #2563EB;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.hero-buttons .btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    backdrop-filter: blur(5px);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(43, 110, 242, 0.3);
}

.hero-buttons .btn-primary:hover {
    background: #1e40af;
}

.hero-buttons .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFFFFF;
}

/* Improved loading screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0A0F1C;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 320px;
}

.loading-logo {
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

.loading-logo .loading-logo-img {
    max-width: 120px;
    height: auto;
}

.loading-text {
    color: #2B6EF2;
    font-size: 2rem;
    font-weight: 700;
    margin: 20px 0 18px 0;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.2s forwards;
}

.loading-bar {
    width: 220px;
    height: 5px;
    background: #2D3748;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 0.5s ease 0.4s forwards;
}

.loading-progress {
    width: 0;
    height: 100%;
    background: #2B6EF2;
    transition: width 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Shimmer effect for the background */
.hero-section .engine-dynamo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.12),
        transparent
    );
    /* a tad faster and more visible shimmer */
    animation: shimmerBg 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes shimmerBg {
    0% { left: -100%; }
    25% { left: 220%; }
    100% { left: 220%; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-section .engine-dynamo {
        font-size: 3rem;
        margin-top: 10vh;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .loading-text {
        font-size: 1.5rem;
    }
    
    .loading-bar {
        width: 180px;
    }
}