/* Services Page Styles */

.car-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
}

.hotspot {
    position: absolute;
    width: 25px;
    height: 25px;
    background: rgba(142, 41, 54, 0.9);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hotspot:hover {
    background: #8e2936;
    transform: scale(1.2);
    animation: none;
}

.hotspot::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
}

/* Specific icons for each hotspot */
/* Front Lights */
.hotspot:nth-of-type(1)::before {
    content: '\f0eb'; /* fa-lightbulb */
}

/* Engine/Hood Area */
.hotspot:nth-of-type(2)::before {
    content: '\f013'; /* fa-cog */
}

/* Interior */
.hotspot:nth-of-type(3)::before {
    content: '\f4b8'; /* fa-couch */
}

/* Exhaust */
.hotspot:nth-of-type(4)::before {
    content: '\f75f'; /* fa-smog */
}

/* Body/Paint */
.hotspot:nth-of-type(5)::before {
    content: '\f1b9'; /* fa-car */
}

/* Front Wheels/Tires */
.hotspot:nth-of-type(6)::before {
    content: '\f1ce'; /* fa-life-ring */
}

/* Desktop-specific hotspot positions */
@media (min-width: 769px) {
    /* Front Lights - Desktop */
    .hotspot:nth-of-type(1) {
        top: 52% !important;
        left: 21% !important;
    }
    
    /* Engine/Hood Area - Desktop */
    .hotspot:nth-of-type(2) {
        top: 46% !important;
        left: 40% !important;
    }
    
    /* Interior - Desktop */
    .hotspot:nth-of-type(3) {
        top: 36% !important;
        left: 60% !important;
    }
    
    /* Exhaust - Desktop */
    .hotspot:nth-of-type(4) {
        top: 31% !important;
        left: 78% !important;
    }
    
    /* Body/Paint - Desktop */
    .hotspot:nth-of-type(5) {
        top: 66% !important;
        left: 40% !important;
    }
    
    /* Front Wheels/Tires - Desktop */
    .hotspot:nth-of-type(6) {
        top: 66% !important;
        left: 62% !important;
    }
}

/* Mobile-specific hotspot styles */
@media (max-width: 768px) {
    .hotspot {
        width: 18px;
        height: 18px;
        border: 2px solid #fff;
    }
    
    .hotspot::before {
        font-size: 12px;
    }
    
    .car-container {
        padding: 0 5px;
    }
}

/* Desktop hero section - ensure consistent sizing */
@media (min-width: 769px) {
    .hero-bg {
        padding-top: 64px !important; /* Match navigation height */
        padding-bottom: 24px !important; /* Minimal bottom padding */
        min-height: 35vh !important; /* Consistent height with mobile */
    }
}

/* Enhanced mobile styles for interactive car section */
@media (max-width: 768px) {
    .car-container {
        padding: 0 8px;
        margin-bottom: 2rem;
    }
    
    .car-image {
        border-radius: 12px;
    }
    
    /* Services section mobile spacing */
    .py-12.md\\:py-16 {
        padding: 3rem 0; /* 48px top/bottom on mobile */
    }
    
    /* Hero section mobile - match other pages */
    .hero-bg {
        padding-top: 64px !important; /* Match navigation height */
        padding-bottom: 20px !important; /* Minimal bottom padding */
        min-height: 35vh !important; /* Smaller height to match other pages */
    }
    
    .hero-section .text-center h2 {
        font-size: 1.75rem; /* 28px */
        margin-bottom: 1rem;
    }
    
    .hero-section .text-center p {
        font-size: 1rem; /* 16px */
        margin-bottom: 1.5rem;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(142, 41, 54, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(142, 41, 54, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(142, 41, 54, 0);
    }
}

.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 15px;
    box-sizing: border-box;
}

.service-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    margin: auto;
}

/* Mobile modal styles */
@media (max-width: 768px) {
    .service-modal {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-content {
        max-height: 90vh;
        border-radius: 10px;
        margin-top: 0;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 1001;
    padding: 5px;
}

.close-modal:hover {
    color: #8e2936;
}

/* Mobile close button */
@media (max-width: 768px) {
    .close-modal {
        top: 10px;
        right: 15px;
        font-size: 28px;
        padding: 8px;
    }
}

.car-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.service-item {
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateX(-5px);
    background: #f8f9fa;
}

/* Mobile service item styles */
@media (max-width: 768px) {
    .service-item:hover {
        transform: none;
        background: #f8f9fa;
    }
}

/* Mobile navigation menu styles - matching homepage */
.mobile-menu {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 50;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .mobile-menu a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid #f3f4f6;
        text-decoration: none;
        color: #374151;
        font-weight: 500;
    }
    
    .mobile-menu a:last-child {
        border-bottom: none;
    }
    
    .mobile-menu a:hover {
        color: #8e2936;
    }
}

/* Mobile menu fixes for services page */
#mobileMenu {
    position: relative;
    z-index: 1000;
}

#mobileMenu.hidden {
    display: none !important;
}

#mobileMenu:not(.hidden) {
    display: block !important;
}

#mobileMenuButton {
    position: relative;
    z-index: 1001;
}

/* Ensure mobile menu appears above all content */
nav {
    position: relative;
    z-index: 1000;
}

/* Card hover effect with button */
.card-hover {
    position: relative;
    transition: all 0.3s ease;
    margin-bottom: 50px; /* Add space for the button */
}

/* Real HTML hover button */
.card-hover-btn {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: #8e2936;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(142, 41, 54, 0.3);
    z-index: 10;
    text-decoration: none;
    display: inline-block;
}

/* Desktop hover behavior */
@media (min-width: 769px) {
    .card-hover:hover .card-hover-btn,
    .card-hover.keep-hover .card-hover-btn {
        opacity: 1;
        visibility: visible;
        bottom: -40px;
    }
    
    .card-hover:hover,
    .card-hover.keep-hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    }
    
    .card-hover-btn:hover {
        background: #7a2330;
    }
}

/* Mobile behavior - show button when card is in focus */
@media (max-width: 768px) {
    .card-hover {
        margin-bottom: 60px; /* More space for button on mobile */
    }
    
    .card-hover-btn {
        transition: all 0.4s ease-out;
        transform: translateX(-50%) translateY(10px);
    }
    
    .card-hover.in-focus .card-hover-btn {
        opacity: 1;
        visibility: visible;
        bottom: -40px;
        transform: translateX(-50%) translateY(0);
    }
    
    .card-hover.in-focus {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    }
}

/* Enhanced mobile responsiveness for service cards */
@media (max-width: 768px) {
    /* Service cards optimization */
    .card-hover {
        padding: 20px !important;
        margin-bottom: 70px; /* More space for button */
    }
    
    .card-hover h3 {
        font-size: 1.125rem !important; /* 18px */
        line-height: 1.4;
    }
    
    .card-hover p {
        font-size: 0.95rem !important; /* 15px */
        line-height: 1.5;
        margin-bottom: 16px !important;
    }
    
    .card-hover ul {
        font-size: 0.875rem !important; /* 14px */
    }
    
    .card-hover i.fas {
        font-size: 2.5rem !important; /* Slightly smaller icons on mobile */
    }
    
    /* Button styling for mobile */
    .card-hover-btn {
        padding: 12px 24px;
        font-size: 15px;
        border-radius: 10px;
        bottom: -50px;
    }
    
    .card-hover.in-focus .card-hover-btn {
        bottom: -45px;
    }
    
    /* Grid improvements */
    .grid.grid-cols-1 {
        gap: 1.5rem; /* 24px gap on mobile */
    }
}

/* Hide hover buttons in modals */
.service-modal .hover-btn {
    display: none;
}
