:root {
    --rm-primary: #1e407c;
    --rm-primary-strong: #17315f;
    --rm-accent: #f38b31;
    --rm-accent-strong: hsl(28, 78%, 48%);
    --rm-accent-soft: #fab34d;
    --rm-dark: #0f172a;
    --rm-light: #f8fafc;
    --rm-surface: #ffffff;
    --rm-border: rgba(15, 23, 42, 0.12);
    --rm-shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
    --rm-road-line: rgba(30, 64, 124, 0.16);
    --rm-road-dash: rgba(243, 139, 49, 0.35);
}

body {
    background-color: var(--rm-light);
    color: var(--rm-dark);
    font-family: Inter, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.navbar.navbar-dark.bg-dark {
    background:
        linear-gradient(100deg, #132a52 10%, #1e407c 56%, #244f99 100%) !important;
    border-bottom: 1px solid rgba(250, 179, 77, 0.35);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.88);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link.active {
    color: #ffffff;
}

.navbar-brand {
    font-family: Montserrat, Inter, Arial, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.rm-navbar-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: 0.15rem;
}

.rm-logo {
    display: block;
    height: auto;
    filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.08));
}

.rm-logo-horizontal {
    width: clamp(132px, 18vw, 198px);
}

.rm-logo-vertical {
    display: none;
    width: 42px;
}

.navbar .dropdown-menu {
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 0.85rem;
    box-shadow: 0 0.8rem 1.8rem rgba(23, 32, 51, 0.14);
}

.navbar .dropdown-item {
    font-size: 0.95rem;
}

.card {
    border-color: var(--rm-border);
}

.shadow-sm {
    box-shadow: var(--rm-shadow) !important;
}

.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(243, 139, 49, 0.22), transparent 40%),
        radial-gradient(circle at left bottom, rgba(30, 64, 124, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 1));
    animation: rm-hero-fade 600ms ease-out both;
}

.hero::before {
    content: "";
    position: absolute;
    inset: auto -5% 10% -5%;
    height: 140px;
    background:
        repeating-linear-gradient(-8deg,
            transparent 0,
            transparent 18px,
            var(--rm-road-line) 18px,
            var(--rm-road-line) 21px);
    opacity: 0.45;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    right: 6%;
    top: 18%;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: radial-gradient(circle at 35% 35%, var(--rm-accent-soft), var(--rm-accent));
    box-shadow:
        0 0 0 8px rgba(243, 139, 49, 0.18),
        0 0 0 18px rgba(243, 139, 49, 0.08);
    pointer-events: none;
    animation: rm-pin-pulse 2200ms ease-in-out infinite;
}

.hero-home {
    border-bottom: 1px solid rgba(23, 32, 51, 0.06);
}

.search-shell,
.motel-shell {
    position: relative;
}

.route-guide {
    border: 1px solid rgba(30, 64, 124, 0.18);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(30, 64, 124, 0.08), rgba(255, 255, 255, 1));
    padding: 1rem;
}

.route-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.route-step {
    position: relative;
    padding: 0.8rem 0.9rem;
    border-radius: 0.85rem;
    background: #ffffff;
    border: 1px solid rgba(30, 64, 124, 0.16);
    font-size: 0.92rem;
}

.route-step strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rm-primary);
    margin-bottom: 0.15rem;
}

.route-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    border: 1px dashed rgba(30, 64, 124, 0.44);
    background: rgba(248, 250, 252, 0.95);
    color: var(--rm-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

.route-kicker {
    color: var(--rm-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}

.route-hero-card {
    position: relative;
    overflow: hidden;
}

.route-hero-card::before {
    content: "";
    position: absolute;
    inset: auto -10% 0 -10%;
    height: 74px;
    background:
        repeating-linear-gradient(12deg,
            transparent 0,
            transparent 14px,
            rgba(30, 64, 124, 0.14) 14px,
            rgba(30, 64, 124, 0.14) 17px);
    opacity: 0.55;
    pointer-events: none;
}

.route-hero-card .card-body {
    position: relative;
    z-index: 1;
}

.motel-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    animation: rm-card-rise 420ms ease both;
}

.motel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1.2rem 2rem rgba(31, 41, 55, 0.12);
}

.motel-card-featured {
    border: 1px solid rgba(243, 139, 49, 0.36);
}

.motel-card-search {
    border: 1px solid rgba(30, 64, 124, 0.24);
}

.motel-hero {
    background: linear-gradient(135deg, rgba(30, 64, 124, 0.11), rgba(255, 255, 255, 1));
}

.badge-highlight {
    background: rgba(243, 139, 49, 0.16);
    color: #8a470b;
    border: 1px solid rgba(243, 139, 49, 0.28);
}

.price-stack {
    display: grid;
    gap: 0.5rem;
}

.price-stack-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid var(--rm-border);
}

.price-row-large {
    background: rgba(30, 64, 124, 0.08);
}

.offer-callout {
    border-radius: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(243, 139, 49, 0.12), rgba(255, 255, 255, 1));
    border: 1px solid rgba(243, 139, 49, 0.24);
}

.offer-feature-card .offer-callout+.offer-callout {
    margin-top: 0.75rem;
}

.ad-banner-card {
    overflow: hidden;
    border: 1px solid rgba(23, 32, 51, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 820px;
    margin-inline: auto;
}

.ad-banner-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 1rem 2rem rgba(23, 32, 51, 0.12);
}

.ad-banner-card-inline {
    background: #fff;
}

.ad-banner-link {
    color: inherit;
}

.ad-banner-media {
    display: block;
    width: 100%;
    aspect-ratio: 21 / 8;
    object-fit: cover;
    background: #e5e7eb;
}

.ad-banner-media-sm {
    aspect-ratio: 21 / 9;
}

.nearby-services-block {
    background: linear-gradient(180deg, rgba(30, 64, 124, 0.09), rgba(255, 255, 255, 1));
}

.nearby-service-card {
    background: #ffffff;
    border-color: rgba(23, 32, 51, 0.1) !important;
}

.nearby-service-card .btn {
    border-radius: 0.75rem;
}

.category-badge {
    font-weight: 700;
    color: var(--rm-primary);
}

.btn {
    border-radius: 0.9rem;
    padding-left: 1rem;
    padding-right: 1rem;
    transition: transform 160ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.14);
}

.btn-lg {
    border-radius: 1rem;
}

.btn-success {
    background-color: var(--rm-accent);
    border-color: var(--rm-accent);
    color: #1f2937;
}

.btn.btn-success {
    background-color: var(--rm-accent) !important;
    border-color: var(--rm-accent) !important;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--rm-accent-strong);
    border-color: var(--rm-accent-strong);
    color: #ffffff;
}

.btn.btn-success:hover,
.btn.btn-success:focus {
    background-color: var(--rm-accent-strong) !important;
    border-color: var(--rm-accent-strong) !important;
}

.btn-outline-success {
    color: var(--rm-primary);
    border-color: rgba(30, 64, 124, 0.4);
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background-color: rgba(30, 64, 124, 0.1);
    color: var(--rm-primary-strong);
}

.btn-outline-dark {
    border-color: rgba(23, 32, 51, 0.14);
    color: var(--rm-primary);
}

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

.btn.btn-dark {
    background-color: var(--rm-primary) !important;
    border-color: var(--rm-primary) !important;
}

.btn-dark:hover,
.btn-dark:focus {
    background-color: var(--rm-primary-strong);
    border-color: var(--rm-primary-strong);
}

.btn.btn-dark:hover,
.btn.btn-dark:focus {
    background-color: var(--rm-primary-strong) !important;
    border-color: var(--rm-primary-strong) !important;
}

.badge {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.form-control,
.form-select {
    border-radius: 0.9rem;
    border-color: rgba(23, 32, 51, 0.12);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(30, 64, 124, 0.48);
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 124, 0.14);
}

.btn[data-track-tipo="ruta"] {
    border-style: dashed;
    border-width: 2px;
    border-color: rgba(30, 64, 124, 0.5);
    background-image: linear-gradient(90deg, rgba(30, 64, 124, 0.06), rgba(243, 139, 49, 0.1));
}

.btn[data-track-tipo="ruta"]:hover,
.btn[data-track-tipo="ruta"]:focus {
    border-color: var(--rm-primary);
    background-image: linear-gradient(90deg, rgba(30, 64, 124, 0.12), rgba(243, 139, 49, 0.16));
}

.ratio {
    background: #e5e7eb;
}

#location-message {
    max-width: 36rem;
}

@keyframes rm-hero-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rm-card-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rm-pin-pulse {
    0% {
        box-shadow:
            0 0 0 8px rgba(243, 139, 49, 0.16),
            0 0 0 18px rgba(243, 139, 49, 0.08);
    }

    50% {
        box-shadow:
            0 0 0 10px rgba(243, 139, 49, 0.2),
            0 0 0 22px rgba(243, 139, 49, 0.05);
    }

    100% {
        box-shadow:
            0 0 0 8px rgba(243, 139, 49, 0.16),
            0 0 0 18px rgba(243, 139, 49, 0.08);
    }
}

@media (prefers-reduced-motion: reduce) {

    .hero,
    .hero::after,
    .motel-card,
    .btn {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

@media (max-width: 767.98px) {
    .rm-logo-horizontal {
        display: block;
        width: clamp(124px, 42vw, 172px);
    }

    .rm-logo-vertical {
        display: none;
    }

    .hero::before {
        height: 96px;
        opacity: 0.32;
    }

    .hero::after {
        width: 14px;
        height: 14px;
        right: 8%;
        top: 15%;
    }

    .price-stack-inline {
        grid-template-columns: 1fr;
    }

    .route-steps {
        grid-template-columns: 1fr;
    }

    .hero .display-5,
    .motel-hero .display-6 {
        font-size: calc(1.35rem + 2vw);
    }
}