:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --content-max-width: 82.5rem;
}

/* Mobile Base */
body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.01em;
}

p, li, .form-label, .form-control, .form-select {
    overflow-wrap: anywhere;
    word-break: break-word;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -3.75rem;
    left: 1rem;
    z-index: 10000;
    background: #111827;
    color: #fff;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

.container,
.container-fluid {
    width: 100%;
}

.container {
    max-width: 100%;
}

html,
body {
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Navigation */

.navbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    background: #fff;
}

.navbar-custom {
    display: flex;
    align-items: center;
}

.navbar-custom .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}

.navbar-brand {
    font-weight: 800;
    font-size: clamp(1.35rem, 2vw, 2.1rem) !important;
    letter-spacing: -1px;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.navbar-center {
    flex: 1;
    display: flex !important;
    justify-content: center !important;
    width: 100%;
}

.navbar-center .navbar-nav {
    margin: 0;
}

.navbar-buttons {
    flex-shrink: 0;
    white-space: nowrap;
}

.navbar-collapse {
    width: 100%;
    padding-top: 0.75rem;
}

.brand-text {
    color: var(--primary-color);
    font-weight: 900;
    font-size: clamp(1.35rem, 2vw, 2.1rem);
    letter-spacing: -1px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
    font-size: clamp(1rem, 1.2vw, 1.2rem) !important;
    font-weight: 700 !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    letter-spacing: 0.01em;
}

.nav-main-link {
    font-size: clamp(1rem, 1.2vw, 1.2rem) !important;
    font-weight: 700 !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    letter-spacing: 0.01em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

small, .small, .text-muted, .form-text, .form-label, .form-control, .form-select, .alert, .btn, .lead, .card-text, .list-unstyled, .list-group-item, .invalid-feedback, .valid-feedback {
    font-size: clamp(0.9rem, 1vw, 1.02rem) !important;
}

.navbar-offset {
    height: clamp(4.25rem, 8vw, 5rem);
}

/* Buttons */
.btn {
    min-height: 2.75rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Alerts & Messages */
.alert {
    border-radius: 0.75rem;
    border: 2px solid;
    font-size: 1.08rem;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: #d4edda !important;
    border-color: #10b981 !important;
    color: #155724 !important;
}

.alert-danger {
    background: #f8d7da !important;
    border-color: #ef4444 !important;
    color: #721c24 !important;
}

.alert-warning {
    background: #fff3cd !important;
    border-color: #f59e0b !important;
    color: #856404 !important;
}

.alert-info {
    background: #d1ecf1 !important;
    border-color: #2563eb !important;
    color: #0c5460 !important;
}

.alert .btn-close {
    padding: 0.5rem;
}

/* Form Validation */
.form-control, .form-select {
    font-size: 1.08rem !important;
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus, .form-select.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25);
}

.form-control.is-valid, .form-select.is-valid {
    border-color: var(--success-color);
}

.form-control.is-valid:focus, .form-select.is-valid:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.invalid-feedback {
    display: none;
    color: var(--danger-color);
    font-size: 1rem !important;
    font-weight: 500;
    margin-top: 0.5rem;
}

.valid-feedback {
    display: none;
    color: var(--success-color);
    font-size: 1rem !important;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Show invalid feedback only when field has is-invalid class or form has was-validated */
.is-invalid ~ .invalid-feedback,
.was-validated .form-control.is-invalid ~ .invalid-feedback,
.was-validated .form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

.valid-feedback {
    display: block;
    color: var(--success-color);
    font-size: 1rem !important;
    font-weight: 500;
    margin-top: 0.5rem;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-size: 1.08rem !important;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(1.9rem, 4.5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-content .lead {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--gray-color);
}

/* Service Cards */

.service-card {
    background: #f3f4f6;
    border-radius: 1rem;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    min-height: min(26rem, 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.service-card .card-body {
    /* Avoid double padding (both .service-card and Bootstrap .card-body) */
    padding: 0;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 12px 32px rgba(37,99,235,0.10);
}

.service-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    color: #fff;
    font-size: 2rem;
    box-shadow: none;
}

/* Scoped Home Services styles */
.home-services-section .service-card {
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.05);
}

.home-services-section .service-card h4 {
    margin-bottom: 0.75rem;
}

.home-services-section .service-icon {
    box-shadow: none;
}

.home-services-section .service-icon i {
    font-size: 2.25rem;
}

/* Contact left card styles */
.contact-details-card {
    background: #e7eaee;
    border-radius: 18px;
    box-shadow: none !important;
}

.contact-details-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.contact-info-icon-nocircle {
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.contact-info-icon-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-info-label {
    font-size: 0.95rem;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 2px;
}

.contact-info-value {
    font-size: 0.98rem;
    color: #111827;
    font-weight: 600;
    line-height: 1.35;
}

.contact-social-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-social-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    background: transparent;
    font-size: 1.15rem;
}

.contact-social-circle:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

/* Make tel/mail links blue like screenshot */
.contact-info-value a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info-value a:hover {
    text-decoration: underline;
}

/* Contact page: both cards same background */
.contact-details-card,
.contact-form-card {
    background: #e7eaee;
    border-radius: 18px;
    box-shadow: none !important;
}

.contact-form-card .form-control,
.contact-form-card .form-select,
.contact-form-card textarea {
    background: #e7eaee;
    border: 1px solid #cfd6de;
}

.contact-form-card .form-control:focus,
.contact-form-card .form-select:focus,
.contact-form-card textarea:focus {
    background: #e7eaee;
}

.contact-map-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #cfd6de;
}

.contact-map-canvas {
    width: 100%;
    min-height: 280px;
    height: clamp(280px, 52vh, 480px);
    background: #e8edf2;
}

.contact-map-caption {
    color: #374151;
}

.contact-map-embed {
    border: 0;
    width: 100%;
    min-height: 17.5rem;
}

/* Home page quote form: match service-card light gray */
#quote-form .card {
    background: #f3f4f6;
}

#quote-form .form-control,
#quote-form .form-select,
#quote-form textarea {
    background: #f3f4f6;
}

.service-card ul {
    margin: 0 0 1rem 0;
    padding-left: 0.5rem;
}
.service-card ul li {
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    color: var(--success-color);
    font-weight: 500;
}
.service-card ul li i {
    margin-right: 0.5rem;
}

.service-toggle-btn {
    font-size: 0.95rem;
    margin-top: 0.25rem;
    border-radius: 0.5rem;
    transition: background 0.2s, color 0.2s;
}
.service-toggle-btn:active {
    background: var(--primary-color);
    color: #fff;
}

.service-card h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card ul {
    text-align: left;
    margin-top: 1rem;
}

.service-card ul li {
    margin-bottom: 0.5rem;
}

/* Fleet Cards */
.fleet-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.fleet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.fleet-card img {
    width: 100%;
    height: clamp(10rem, 25vw, 12.5rem);
    object-fit: cover;
}

.fleet-card h5 {
    font-weight: 700;
    margin: 1rem 1rem 0.5rem;
}

.fleet-card p {
    margin: 0 1rem 1rem;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.testimonial-text {
    font-style: italic;
    color: var(--gray-color);
    line-height: 1.8;
}

.stars {
    color: var(--warning-color);
}

/* Trust Badges */
.trust-badge {
    padding: 1.5rem 1rem;
    min-height: 150px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trust-badge h5 {
    font-size: 1.35rem;
    font-weight: 700;
}

/* Forms */
.form-control, .form-select {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

main {
    min-height: 60vh;
}

iframe {
    max-width: 100%;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Public pages consistency */
.public-section {
    padding-top: clamp(2.5rem, 5vw, 4.5rem) !important;
    padding-bottom: clamp(2.5rem, 5vw, 4.5rem) !important;
}

.page-header-public h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 0.6rem;
}

.page-header-public .lead {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 0;
}

.divider-accent {
    width: clamp(3.5rem, 8vw, 5rem);
    height: 0.1875rem;
    background: linear-gradient(90deg, #0d6efd, #0dcaf0);
    border-radius: 999px;
}

.hero-points {
    flex-wrap: wrap;
}

.hero-actions,
.cta-actions {
    flex-wrap: wrap;
}

.hero-actions .btn,
.cta-actions .btn {
    min-width: min(14rem, 100%);
}

.hero-actions,
.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem !important;
}

.hero-actions .btn,
.cta-actions .btn,
.navbar-buttons .btn {
    width: 100%;
    justify-content: center;
}

.navbar {
    padding: 0.5rem 0;
}

.navbar-custom .container-fluid {
    gap: 0.75rem;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.navbar-toggler {
    z-index: 1200;
}

.navbar-nav {
    width: 100%;
    text-align: left;
}

.nav-link,
.nav-main-link {
    margin: 0;
    padding: 0.65rem 0.25rem !important;
}

.hero-content h1 {
    font-size: clamp(1.55rem, 1.1rem + 3vw, 2.35rem);
}

.hero-section {
    text-align: center;
    padding: 2rem 0 2.5rem;
    min-height: auto;
}

.display-4,
.display-5,
.display-6 {
    font-size: clamp(1.55rem, 1.25rem + 2.5vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.service-card {
    margin-bottom: 1rem;
    min-height: auto;
    padding: 1.5rem 1.15rem;
}

.contact-info-item {
    gap: 0.75rem;
}

.contact-map-canvas {
    height: clamp(15rem, 45vh, 20rem);
}

.trust-badge {
    min-height: 7.5rem;
}

.quote-form-card .card-body {
    padding: clamp(1.1rem, 4vw, 3rem) !important;
}

.service-media-wrap {
    width: 100%;
    display: block;
}

.service-media {
    width: 100%;
    max-height: clamp(13rem, 36vw, 21rem);
    object-fit: cover;
}

.service-media-main {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 20rem;
    object-fit: cover;
}

.media-cover {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.public-feature-icon {
    width: clamp(3.8rem, 7vw, 5rem);
    height: clamp(3.8rem, 7vw, 5rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Breakpoint: Foldable / iPad Mini */
@media (min-width: 668px) {
    .navbar-buttons {
        width: 100%;
        margin-top: 0.75rem;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .hero-points > .d-flex {
        width: auto;
    }

    .hero-actions,
    .cta-actions {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
    }

    .hero-actions .btn,
    .cta-actions .btn {
        width: auto;
        min-width: 12.5rem;
    }

    .home-services-section .row.g-4 > [class*="col-"] {
        flex: 0 0 50%;
        width: 50%;
    }

    .public-section .row.g-4 > .col-md-4 {
        flex: 0 0 50%;
        width: 50%;
    }
}

/* Breakpoint: Tablet */
@media (min-width: 821px) {
    .container {
        max-width: 100%;
    }

    .navbar-custom .container-fluid {
        gap: 1rem;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .navbar-buttons {
        width: auto;
        margin-top: 0;
        display: flex !important;
        gap: 0.5rem;
    }

    .service-card {
        min-height: 23rem;
    }

    .home-services-section .row.g-4 > [class*="col-"],
    .public-section .row.g-4 > .col-md-4 {
        flex: 0 0 50%;
        width: 50%;
    }
}

@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding-top: 0;
    }

    .navbar-center {
        justify-content: center !important;
        min-width: 0;
    }

    .navbar-center .navbar-nav {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: auto;
        text-align: center;
    }

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

/* Breakpoint: Desktop / Laptop */
@media (min-width: 1024px) {
    html {
        font-size: 16px;
    }

    .container {
        max-width: min(92vw, var(--content-max-width));
    }

    .hero-section {
        text-align: left;
        min-height: 80vh;
    }

    .hero-actions .btn,
    .cta-actions .btn {
        width: auto;
    }

    .service-card {
        min-height: 24.5rem;
    }

    .home-services-section .row.g-4 > [class*="col-"],
    .public-section .row.g-4 > .col-md-4 {
        flex: 0 0 33.333333%;
        width: 33.333333%;
    }
}

/* Breakpoint: Large Desktop */
@media (min-width: 1441px) {
    html {
        font-size: 17px;
    }

    .container {
        max-width: min(90vw, 1500px);
    }

    .hero-content h1 {
        font-size: clamp(2.8rem, 2.4rem + 1.6vw, 3.8rem);
    }
}

/* Breakpoint: 4K / Ultrawide */
@media (min-width: 1921px) {
    .container,
    main > .container,
    .public-section > .container {
        max-width: 1800px !important;
        margin-left: auto;
        margin-right: auto;
    }

    .container-fluid {
        max-width: 1920px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (min-width: 320px) {
    html {
        font-size: 15px;
    }

    .navbar-buttons .btn {
        min-height: 2.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Specific */
.dashboard-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    padding: 2rem 1rem;
}

.dashboard-main {
    margin-left: 250px;
    padding: 2rem;
    background: var(--light-color);
    min-height: 100vh;
}

.dashboard-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Lead Status Badges */
.badge-new { background: var(--primary-color); }
.badge-contacted { background: var(--warning-color); }
.badge-qualified { background: var(--success-color); }
.badge-won { background: var(--success-color); }
.badge-lost { background: var(--danger-color); }

/* Hash navigation: keep contact quote form clear of fixed navbar */
#contact-quote-form {
    scroll-margin-top: 5.5rem;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}