/* eMOTO - EV Bike Rental Platform */
/* AirAsia Ride inspired design with red and white colors */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #C1272D; /* AirAsia Red */
    --secondary-color: #2B2B2B; /* Dark Gray */
    --accent-color: #FFC72C; /* Yellow Accent */
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

/* Header and Navigation */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, 
        #a81f27 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo a {
    color: inherit;
    text-decoration: none !important;
    transition: color 0.3s;
    display: inline-block;
}

.logo a:visited {
    color: inherit;
}

.logo a:hover {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    margin-right: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.btn-primary:hover {
    background-color: #ffb81c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #bd2130;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

/* View Switch Dropdown */
.view-switch-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}


.view-switch-group {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.view-switch-toggle {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    margin-left: 0.5rem;
}

.view-switch-toggle:hover {
    background-color: white;
    color: var(--primary-color);
}

.view-switch-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.view-switch-dropdown.active {
    display: block;
}

.view-switch-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid #eee;
}

.view-switch-dropdown a:last-child {
    border-bottom: none;
}

.view-switch-dropdown a:hover {
    background-color: #f5f5f5;
}

/* Main Content */
main {
    margin-top: 160px;
    padding-top: 2rem;
    min-height: calc(100vh - 200px);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, 
        #a81f27 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(193, 39, 45, 0.3);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    background: white;
}

input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(193, 39, 45, 0.3);
}

input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.card-body {
    padding: 1rem 0;
}

/* Bike Package Cards */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.bike-package {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.bike-package:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(193, 39, 45, 0.2);
}

.bike-package.selected {
    border-color: var(--primary-color);
    background-color: rgba(193, 39, 45, 0.05);
}

.bike-type {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.price {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 1rem 0;
}

.price-period {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Bikes Management Table */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background-color: var(--bg-light);
}

.status-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-available {
    background-color: #d4edda;
    color: #155724;
}

.status-rented {
    background-color: #fff3cd;
    color: #856404;
}

.status-maintenance {
    background-color: #f8d7da;
    color: #721c24;
}

.status-offline {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Booking Status Badges */
.status-confirmed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-in_progress {
    background-color: #fff3cd;
    color: #856404;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

footer p {
    margin: 0.5rem 0;
}

/* Messages and Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error, .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Admin Dashboard */
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.dashboard-card {
    background: linear-gradient(135deg, var(--primary-color) 0%,
        #a81f27 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dashboard-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.dashboard-card .value {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 1024px) {
    nav {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .nav-buttons {
        margin-left: auto;
    }

    table {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.7rem;
    }

    .dashboard-card {
        padding: 1.5rem;
    }

    .dashboard-card .value {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .packages-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header {
        padding: 0.5rem 0;
    }

    .logo {
        font-size: 1.3rem;
    }

    .nav-buttons {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    main {
        margin-top: 120px;
    }

    .hero {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .bike-package {
        padding: 1.5rem;
    }

    .price {
        font-size: 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 1rem;
}

.w-100 {
    width: 100%;
}

.error {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.hidden {
    display: none;
}

/* How It Works Grid Layout */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

/* Force all 6 items on one line for screens 1200px and wider */
@media (min-width: 1200px) {
    .how-it-works-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }
}

/* Responsive breakpoints for smaller screens */
@media (max-width: 768px) {
    .how-it-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .how-it-works-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #20BA5A;
    transform: scale(1.1);
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.4);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

/* Alternate floating footer with helpline */
.floating-helpline {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), #a81f27);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.95rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.floating-helpline a {
    color: var(--accent-color);
    font-weight: bold;
    text-decoration: none;
}

.floating-helpline a:hover {
    text-decoration: underline;
}

/* New Bike Card Design with Background Image */
.bike-card-new {
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.4s ease;
    border: 3px solid transparent;
    height: 480px;
    display: flex;
    flex-direction: column;
}

.bike-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.bike-card-new.selected {
    border-color: var(--primary-color);
    box-shadow: 0 12px 35px rgba(193, 39, 45, 0.3);
}

.bike-card-image-bg {
    position: relative;
    height: 75%;
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.5rem;
}

.bike-card-image-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, white, transparent);
    pointer-events: none;
}

.bike-card-image-bg h3 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 
        -2px -2px 0 white,
        2px -2px 0 white,
        -2px 2px 0 white,
        2px 2px 0 white,
        0 0 10px rgba(255, 255, 255, 0.8);
    z-index: 10;
    margin: 0;
}

.bike-card-details {
    padding: 1.5rem 2rem 2rem;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bike-card-details p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.bike-card-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.bike-card-specs li {
    list-style: none;
    color: var(--text-dark);
    padding-left: 1.2rem;
    position: relative;
}

.bike-card-specs li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.bike-card-price {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.bike-card-price strong {
    font-size: 1.4rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 28px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
    
    .bike-card-new {
        height: 450px;
    }
    
    .bike-card-image-bg {
        height: 70%;
        padding: 1rem;
    }
    
    .bike-card-image-bg h3 {
        font-size: 1.6rem;
    }
}
