/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;600;700&display=swap');

:root {
    /* Logo-inspired color palette: Dark teal/slate blues */
    --primary-color: #2d5f5d;
    /* Dark teal from logo */
    --primary-dark: #1f4645;
    /* Deeper teal */
    --secondary-color: #3d5a6b;
    /* Blue-grey from logo */
    --accent-color: #4a7c7a;
    /* Lighter teal accent */

    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --border-color: #ecf0f1;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

    --badge-bg: #e67e22;
    --badge-text: #ffffff;

    --font-heading: 'DM Sans', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white);
}

.logo span {
    color: var(--primary-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    /* Simple geometric triangle for logo placeholder */
    clip-path: polygon(50% 15%, 0% 100%, 100% 100%);
    background: linear-gradient(135deg, #1abc9c, #16a085);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    opacity: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-bar {
    background: #f1f2f6;
    border-radius: 50px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 260px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.page-header {
    padding: 60px 0 40px;
    margin-top: 0;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.page-subtitle {
    color: var(--text-light);
    max-width: 600px;
}

/* Layout */
.main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding-bottom: 60px;
}

/* Hero Banner */
.hero-banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1596701831862-299f24419965?q=80&w=2670&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 60px 40px;
    margin: 40px 0 40px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-banner h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.1;
}

.hero-banner p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

/* Sidebar */
.filters-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
}

.filter-group {
    margin-bottom: 32px;
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-list label,
.radio-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-color);
}

.range-slider {
    margin-top: 16px;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    width: 100%;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
}

.btn-primary:hover {
    opacity: 0.9;
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.results-count {
    font-weight: 600;
    color: var(--text-light);
}

.results-count strong {
    color: var(--secondary-color);
}

.sort-dropdown {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    font-family: inherit;
    cursor: pointer;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    border: 2px solid transparent;
    position: relative;
    box-shadow: 0 4px 16px rgba(45, 95, 93, 0.08);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(45, 95, 93, 0.15);
    border-color: var(--primary-color);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--badge-bg);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.card-featured-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--secondary-color);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f5f5f5;
    background: linear-gradient(to right, rgba(45, 95, 93, 0.03), rgba(74, 124, 122, 0.03));
    margin: 16px -20px -20px;
    padding: 16px 20px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.price span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.price strong {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 700;
}

.btn-sm {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.btn-sm:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: scale(1.05);
}

.btn-teal {
    background: var(--primary-color);
    color: white;
}

.btn-teal:hover {
    background: var(--primary-dark);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: var(--white);
    padding: 60px 0 40px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 24px;
    color: var(--white);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.newsletter-input {
    display: flex;
    gap: 8px;
}

.newsletter-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f9f9f9;
}

.btn-icon {
    width: 46px;
    height: 46px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Social Media Links */
.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.social-icon:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.copyright {
    text-align: center;
    margin-top: 60px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Specific Vehicle Card Styles from Mockup */
.vehicle-card-features {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.v-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
    gap: 4px;
}

.btn-book {
    background: var(--primary-color);
    color: white;
}

.btn-book:hover {
    background: var(--primary-dark);
    color: white;
}

/* =========================================
   MOBILE RESPONSIVE — HAMBURGER & NAV DRAWER
   ========================================= */

body.no-scroll {
    overflow: hidden;
}

/* Hamburger button — hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
    order: 3;
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}

/* Animate to X when open */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Dark overlay behind the drawer */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-nav-overlay.open {
    display: block;
    opacity: 1;
}

/* Slide-in drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    height: 100vh;
    background: linear-gradient(160deg, var(--primary-dark), var(--primary-color));
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-nav-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    gap: 4px;
    flex: 1;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.mobile-nav-links a ion-icon {
    font-size: 1.2rem;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(255, 255, 255, 0.18);
    color: white;
}

.mobile-nav-auth {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: all 0.2s;
}

.mobile-auth-btn.solid {
    background: white;
    color: var(--primary-color);
}

.mobile-auth-btn.solid:hover {
    opacity: 0.9;
}

.mobile-auth-btn.outline {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.mobile-auth-btn.outline:hover {
    background: rgba(255, 255, 255, 0.25);
}

.mobile-auth-btn.danger {
    background: rgba(204, 51, 51, 0.25);
    color: #ffaaaa;
    border: 1.5px solid rgba(204, 51, 51, 0.4);
}

.mobile-auth-btn.danger:hover {
    background: rgba(204, 51, 51, 0.4);
}

/* =========================================
   MEDIA QUERIES
   ========================================= */

@media (max-width: 768px) {

    /* Show hamburger, hide desktop nav & search */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .search-bar {
        display: none;
    }

    /* Keep only the user avatar on mobile header */
    .header-actions {
        gap: 8px;
    }

    /* Hide sign-in/sign-up text buttons on mobile */
    .header-actions>div>a[href="login.php"],
    .header-actions>div>a[href="signup.php"] {
        display: none;
    }

    /* Hero banner adjustments */
    .hero-banner {
        padding: 40px 20px;
        margin: 16px 0 24px;
    }

    .hero-banner h1 {
        font-size: 1.8rem;
    }

    .hero-banner p {
        font-size: 0.95rem;
    }

    /* Main content stack */
    .main-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Cards grid */
    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    /* Page header */
    .page-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-banner h1 {
        font-size: 1.5rem;
    }
}