/* KCS Auto Repair Shop - index csst */

body { 
    font-family: 'Poppins', sans-serif; 
    background-color: #f8f9fa;
}

.hero-bg {
    position: relative;
    overflow: hidden; /* Ensures pseudo-element doesn't overflow */
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/cover.jpg');
    background-size: cover;
    background-position: center;
    filter: grayscale(100%);
    opacity: 0.85; /* opacity */
    z-index: -1; /* Place behind the content */
}

.text-primary { color: #d63031; }
.bg-primary { background-color: #d63031; }
.border-primary { border-color: #d63031; }

.hover-lift { transition: all 0.3s ease; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }

.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.car-hotspot { 
    position: absolute; 
    width: 40px; 
    height: 40px; 
    background: #d63031; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    cursor: pointer; 
    animation: pulse 2s infinite;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* Tablet responsive */
@media (max-width: 768px) {
    .car-hotspot {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .car-hotspot {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@keyframes pulse { 
    0%, 100% { transform: scale(1); } 
    50% { transform: scale(1.1); } 
}

.accordion-content { display: none; transition: all 0.3s ease; }
.accordion-content.active { display: block; }

.form-input { transition: border-color 0.3s ease; }
.form-input:focus { border-color: #d63031; box-shadow: 0 0 0 3px rgba(214, 48, 49, 0.1); }
.form-error { border-color: #e74c3c !important; }

.loader { 
    border: 3px solid #f3f3f3; 
    border-top: 3px solid #d63031; 
    border-radius: 50%; 
    width: 20px; 
    height: 20px; 
    animation: spin 1s linear infinite; 
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

.blend-multiply { mix-blend-mode: multiply; }

/* About us animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Image overlay effect */
.image-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

.image-overlay img {
    transition: transform 0.5s ease;
}

.image-overlay:hover img {
    transform: scale(1.1);
}

/* Hero section buttons responsive styling */
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-buttons button {
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
}

/* Tablet and mobile responsive for hero buttons */
@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .hero-buttons button {
        min-width: 200px;
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .hero-buttons button {
        min-width: 180px;
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Smooth scrolling */
html {
    scroll-padding-top: 50px; /* Adjust to your navbar height - prevents content from hiding behind fixed header */
    scroll-behavior: smooth;
}

/* ================== Navbar Responsive Styles ================== */

/* Mobile hamburger menu button - hidden by default */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #374151;
    margin-right: 1rem; /* Add spacing from logo */
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
    order: -1;
}

.mobile-menu-btn:hover {
    background-color: #f3f4f6;
}

/* Show hamburger button on mobile regardless of login status */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* Customer navbar responsive styles */
@media (max-width: 1024px) {
    /* Reduce spacing between navbar items */
    .flex.items-center.space-x-4 {
        gap: 0.5rem;
    }
    
    /* Make greeting text smaller */
    .flex.items-center.space-x-4 span {
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    /* Adjust book button */
    .bg-primary.text-white.px-6.py-2 {
        padding: 0.375rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Reduce settings dropdown menu button size */
    .relative.group button {
        padding: 0.375rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Adjust scroll padding for tablet */
    html {
        scroll-padding-top: 75px;
    }
}

@media (max-width: 768px) {
    /* Hide main navigation links */
    .hidden.md\:flex {
        display: none !important;
    }
    
    /* Mobile header book button styling */
    .flex.items-center.space-x-3.md\:hidden a[href="customer_booking.php"] {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    /* Adjust navbar layout for mobile */
    nav.container {
        padding: 1rem 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
    
    /* Ensure login button is properly positioned when not logged in */
    nav.container > a[href="login.php"] {
        order: 2;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    /* Shorten logo text when customer is logged in - show only "KCS" */
    body:has(.flex.items-center.space-x-4) .text-2xl.font-bold {
        font-size: 1.5rem;
    }
    
    body:has(.flex.items-center.space-x-4) .text-2xl.font-bold .text-gray-800 {
        display: none;
    }
    
    /* Keep full logo when not logged in */
    .text-2xl.font-bold {
        font-size: 1.25rem;
    }
    
    /* Reorder customer section elements when logged in */
    .flex.items-center.space-x-4 {
        gap: 0.5rem;
        flex-wrap: nowrap;
        display: flex;
        align-items: center;
        order: 2;
        flex-shrink: 0;
    }
    
    /* Move greeting text after notification elements */
    .flex.items-center.space-x-4 span {
        order: 3; /* Place after book button and notification bell */
        font-size: 0.875rem;
        white-space: nowrap;
        margin-left: 0.5rem;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Book button order */
    .bg-primary.text-white.px-6.py-2 {
        order: 1;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    /* Notification wrapper order */
    .notification-wrapper {
        order: 2;
        flex-shrink: 0;
    }
    
    /* Hide dropdown menu on mobile */
    .relative.group {
        display: none !important;
    }
    
    /* Adjust notification bell */
    .notification-bell {
        padding: 6px;
    }
    
    .notification-bell i {
        font-size: 16px;
    }
    
    .notification-badge {
        font-size: 0.6rem;
        min-width: 16px;
        height: 16px;
    }
    
    /* Adjust scroll padding for mobile */
    html {
        scroll-padding-top: 70px;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile adjustments */
    nav.container {
        padding: 0.75rem 1rem;
        gap: 0.25rem;
    }
    
    /* Mobile header book button for small screens */
    .flex.items-center.space-x-3.md\:hidden a[href="customer_booking.php"] {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    
    /* Reduce hamburger button margin */
    .mobile-menu-btn {
        margin-right: 0.5rem;
        padding: 0.25rem;
        font-size: 1.25rem;
    }
    
    /* Make logo smaller */
    .text-2xl.font-bold {
        font-size: 1rem;
        flex: 1;
        min-width: 0;
    }
    
    /* Further reduce logo size when customer is logged in */
    body:has(.flex.items-center.space-x-4) .text-2xl.font-bold {
        font-size: 0.875rem;
    }
    
    /* Further adjust customer elements */
    .flex.items-center.space-x-4 {
        gap: 0.25rem;
        flex-shrink: 0;
        max-width: 60%;
    }
    
    /* Keep user name visible but smaller, positioned after bell */
    .flex.items-center.space-x-4 span {
        order: 3 !important;
        font-size: 0.7rem !important;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-left: 0.25rem !important;
    }
    
    /* Smaller book button */
    .bg-primary.text-white.px-6.py-2 {
        order: 1;
        padding: 0.375rem 0.5rem;
        font-size: 0.65rem;
    }
    
    /* Notification wrapper order */
    .notification-wrapper {
        order: 2;
        flex-shrink: 0;
    }
    
    /* Smaller notification bell */
    .notification-bell {
        padding: 4px;
    }
    
    .notification-bell i {
        font-size: 14px;
    }
    
    .notification-badge {
        font-size: 0.55rem;
        min-width: 14px;
        height: 14px;
        padding: 0 3px;
    }
    
    /* Ensure dropdown stays hidden on small mobile */
    .relative.group {
        display: none !important;
    }
    
    /* Login button on mobile */
    nav.container > a[href="login.php"] {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    /* Mobile header book button for extra small screens */
    .flex.items-center.space-x-3.md\:hidden a[href="customer_booking.php"] {
        padding: 0.35rem 0.5rem;
        font-size: 0.65rem;
    }
    
    /* Adjust scroll padding for small mobile */
    html {
        scroll-padding-top: 65px;
    }
}

/* Notification dropdown responsive adjustments */
@media (max-width: 480px) {
    .notification-dropdown {
        width: 280px;
        right: -50px; /* Adjust positioning to prevent cutoff */
    }
}

@media (max-width: 360px) {
    .notification-dropdown {
        width: 250px;
        right: -70px;
    }
    
    /* Further reduce navbar padding */
    nav.container {
        padding: 0.625rem 0.75rem;
        gap: 0.25rem;
    }
    
    /* Smaller hamburger button */
    .mobile-menu-btn {
        margin-right: 0.375rem;
        padding: 0.2rem;
        font-size: 1.125rem;
    }
    
    /* Even smaller logo */
    .text-2xl.font-bold {
        font-size: 0.875rem;
    }
    
    body:has(.flex.items-center.space-x-4) .text-2xl.font-bold {
        font-size: 0.8rem;
    }
    
    /* Adjust customer section */
    .flex.items-center.space-x-4 {
        gap: 0.2rem;
        max-width: 55%;
    }
    
    /* Smaller user name */
    .flex.items-center.space-x-4 span {
        font-size: 0.65rem !important;
        max-width: 70px !important;
        margin-left: 0.2rem !important;
    }
    
    /* Smaller book button */
    .bg-primary.text-white.px-6.py-2 {
        padding: 0.3rem 0.45rem;
        font-size: 0.6rem;
    }
    
    /* Smaller notification bell */
    .notification-bell {
        padding: 3px;
    }
    
    .notification-bell i {
        font-size: 13px;
    }
    
    .notification-badge {
        font-size: 0.5rem;
        min-width: 13px;
        height: 13px;
    }
    
    /* Login button */
    nav.container > a[href="login.php"] {
        padding: 0.5rem 0.625rem;
        font-size: 0.7rem;
    }
    
    /* Adjust scroll padding for extra small mobile */
    html {
        scroll-padding-top: 60px;
    }
}

/* Extra small screens - below 350px */
@media (max-width: 350px) {
    /* Notification dropdown */
    .notification-dropdown {
        width: 230px;
        right: -80px;
    }
    
    /* Further reduce user name size */
    .flex.items-center.space-x-4 span {
        font-size: 0.6rem !important;
        max-width: 60px !important;
        margin-left: 0.15rem !important;
    }
    
    /* Make book button even smaller */
    .bg-primary.text-white.px-6.py-2 {
        padding: 0.25rem 0.4rem;
        font-size: 0.575rem;
    }
    
    /* Reduce notification bell size */
    .notification-bell {
        padding: 2px;
    }
    
    .notification-bell i {
        font-size: 12px;
    }
    
    .notification-badge {
        font-size: 0.45rem;
        min-width: 12px;
        height: 12px;
        padding: 0 2px;
    }
    
    /* Further reduce hamburger button */
    .mobile-menu-btn {
        margin-right: 0.25rem;
        padding: 0.15rem;
        font-size: 1rem;
    }
    
    /* Make logo even smaller */
    .text-2xl.font-bold {
        font-size: 0.8rem;
    }
    
    body:has(.flex.items-center.space-x-4) .text-2xl.font-bold {
        font-size: 0.75rem;
    }
    
    /* Reduce container padding */
    nav.container {
        padding: 0.5rem 0.625rem;
        gap: 0.2rem;
    }
    
    /* Customer section adjustments */
    .flex.items-center.space-x-4 {
        gap: 0.15rem;
        max-width: 52%;
    }
    
    /* Login button */
    nav.container > a[href="login.php"] {
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
    }
}

/* Ultra small screens - below 320px */
@media (max-width: 320px) {
    /* Hide user name on ultra small screens */
    .flex.items-center.space-x-4 span {
        display: none !important;
    }
    
    /* Adjust customer section without name */
    .flex.items-center.space-x-4 {
        gap: 0.25rem;
        max-width: auto;
    }
    
    /* Logo adjustments */
    .text-2xl.font-bold {
        font-size: 0.75rem;
    }
    
    body:has(.flex.items-center.space-x-4) .text-2xl.font-bold {
        font-size: 0.7rem;
    }
    
    /* Hamburger button */
    .mobile-menu-btn {
        margin-right: 0.2rem;
        padding: 0.1rem;
        font-size: 0.9rem;
    }
    
    /* Book button */
    .bg-primary.text-white.px-6.py-2 {
        padding: 0.2rem 0.35rem;
        font-size: 0.55rem;
    }
    
    /* Notification */
    .notification-bell {
        padding: 2px;
    }
    
    .notification-bell i {
        font-size: 11px;
    }
    
    .notification-dropdown {
        width: 200px;
        right: -90px;
    }
    
    /* Container */
    nav.container {
        padding: 0.4rem 0.5rem;
        gap: 0.15rem;
    }
    
    /* Login button */
    nav.container > a[href="login.php"] {
        padding: 0.35rem 0.45rem;
        font-size: 0.6rem;
    }
    
    /* Adjust scroll padding for ultra small mobile */
    html {
        scroll-padding-top: 55px;
    }
}

/* Mobile menu overlay styles */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    backdrop-filter: blur(2px);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: white;
    z-index: 50;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.mobile-menu-close:hover {
    color: #d63031;
}

.mobile-menu-content {
    padding: 1rem;
}

.mobile-menu-content a {
    display: block;
    padding: 0.875rem 0.5rem;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.mobile-menu-content a:hover {
    color: #d63031;
    background: #fef2f2;
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .mobile-menu-overlay.active,
    .mobile-menu {
        display: block;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 260px;
    }
    
    .mobile-menu-header {
        padding: 0.875rem;
    }
    
    .mobile-menu-content {
        padding: 0.75rem;
    }
    
    .mobile-menu-content a {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 350px) {
    .mobile-menu {
        width: 240px;
    }
    
    .mobile-menu-header {
        padding: 0.75rem;
    }
    
    .mobile-menu-content {
        padding: 0.625rem;
    }
    
    .mobile-menu-content a {
        padding: 0.625rem 0.5rem;
        font-size: 0.875rem;
    }
}


