/* ===== Custom Styles for King's Automotive ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-float {
    animation: float 3.5s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 4s ease-in-out infinite;
    animation-delay: 1s;
}

/* Geometric background shapes */
.geo-shape {
    position: absolute;
    animation: float 6s ease-in-out infinite;
}

.shape-circle-1 {
    width: 400px;
    height: 400px;
    background: rgba(134, 25, 51, 0.06);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-circle-2 {
    width: 200px;
    height: 200px;
    background: rgba(255, 138, 133, 0.1);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    animation-delay: 2s;
}

.shape-circle-3 {
    width: 120px;
    height: 120px;
    background: rgba(134, 25, 51, 0.05);
    border-radius: 50%;
    top: 40%;
    right: 15%;
    animation-delay: 1s;
}

.shape-square-1 {
    width: 100px;
    height: 100px;
    background: rgba(255, 138, 133, 0.08);
    top: 20%;
    left: 8%;
    transform: rotate(45deg);
    animation-delay: 3s;
}

.shape-square-2 {
    width: 60px;
    height: 60px;
    background: rgba(134, 25, 51, 0.06);
    bottom: 20%;
    right: 10%;
    transform: rotate(30deg);
    animation-delay: 2.5s;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(255, 138, 133, 0.07);
    top: 60%;
    left: 3%;
    animation-delay: 1.5s;
}

.shape-dots {
    background-image: radial-gradient(circle, rgba(134, 25, 51, 0.1) 1px, transparent 1px);
    background-size: 24px 24px;
    width: 300px;
    height: 300px;
    top: 30%;
    right: 5%;
}

/* Hero badge animation */
.hero-badge {
    animation: slide-up 0.6s ease-out;
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #861933, #ff8a85);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Why cards */
.why-card {
    position: relative;
}

.why-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #861933, #ff8a85);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.why-card:hover::after {
    width: 60%;
}

/* Testimonial cards */
.testimonial-card {
    position: relative;
}

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(134, 25, 51, 0.08);
}

/* Mobile menu animation */
.menu-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    margin-left: 0;
    margin-right: 0;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #861933;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Navigation links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #861933;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #d94065 !important;
    box-shadow: 0 0 0 3px rgba(217, 64, 101, 0.1) !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FDF8F5;
}

::-webkit-scrollbar-thumb {
    background: #f9d0d9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f4a8b7;
}

/* Selection color */
::selection {
    background: rgba(134, 25, 51, 0.15);
    color: #3d0712;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .shape-circle-1 {
        width: 200px;
        height: 200px;
    }
    .shape-circle-2 {
        width: 100px;
        height: 100px;
    }
    .shape-square-1 {
        width: 50px;
        height: 50px;
    }
    .shape-dots {
        width: 150px;
        height: 150px;
    }
}
