.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tags li {
    margin: 0;
    float: none;
}

.tags li,
.tags a {
    position: relative;
    float: none;
    height: auto;
    line-height: 1.2;
    font-size: 13px;
}

.tags a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    padding: 10px 14px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #ffffff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 10px 25px rgba(29, 78, 216, 0.18);
    transition: all 0.22s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tags a:before,
.tags a:after {
    display: none;
    content: none;
}

.tags a:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1e293b, #2563eb);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.load-more {
    margin: 2rem 0;
    clear: both;
    text-align: center;
}

.load-more .allbtn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 180px;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    text-align: center;
}

div.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    text-align: center;
    padding: 14px 0;
    color: #64748b;
}

div.pagination a,
div.pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    margin: 0;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

div.pagination a {
    color: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

div.pagination a:hover,
div.pagination a:active {
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: transparent;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

div.pagination span.current {
    border: 1px solid transparent;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: 0 12px 28px rgba(29, 78, 216, 0.22);
}

div.pagination span.disabled {
    display: none;
}

.allbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-weight: 700;
    line-height: 1.1;
    padding: 12px 18px;
    text-shadow: none;
    transition: all 0.22s ease;
}

.allbtn:hover {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: rgba(37, 99, 235, 0.2);
    color: #0f172a;
    transform: translateY(-1px);
}

.allbtn:active,
.allbtn.active {
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.08);
    transform: translateY(0);
}

.allbtn:visited {
    color: #0f172a;
}

.allbtn.busy {
    background: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
    border-color: #cbd5e1;
    text-shadow: none;
}

.allbtn.busy:hover,
.allbtn.busy:active {
    background: #e2e8f0;
    cursor: not-allowed;
    text-shadow: none;
    transform: none;
    box-shadow: none;
}

.allbtn.small {
    font-size: 12px;
    padding: 9px 12px;
    border-radius: 12px;
}

.allbtn.small.follow {
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
}

.allbtn.flat {
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    box-shadow: none;
    font-weight: 600;
    min-height: 42px;
    line-height: 1.2;
    padding: 10px 14px;
    width: 100%;
}

#dconversions {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    width: 100%;
    max-width: 760px;
    text-align: left;
    border-collapse: separate;
    border-spacing: 0;
    margin: 18px auto 14px auto;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

#dconversions th {
    font-size: 13px;
    font-weight: 700;
    padding: 16px 18px;
    color: #0f172a;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

#dconversions td {
    padding: 16px 18px;
    border: none;
    color: #334155;
    font-weight: 500;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

#dconversions tr:hover td {
    background: rgba(37, 99, 235, 0.03);
}

.vzebra-odd,
.vzebra-even {
    background: transparent;
}

#dconversions #one,
#dconversions #two,
#dconversions #three,
#dconversions #four {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

#kmsruta,
#route,
strong#distanciaRuta,
#kmslinearecta,
#straight,
#tiempo {
    color: #1d4ed8;
    font-weight: 700;
}

.navbar-header img {
    max-width: 100%;
}

.three a {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    padding-bottom: 16px;
    position: relative;
    color: #0f172a !important;
    text-decoration: none;
    display: inline-block;
}

.three a:before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 6px;
    width: 62px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1d4ed8, #38bdf8);
}

.three a:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 2px;
    height: 1px;
    width: 100%;
    max-width: 260px;
    background: rgba(15, 23, 42, 0.18);
}

/* Extra polish */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    margin-top: 14px;
    padding: 10px 0;
}

.navbar-form .form-control {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: none;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.navbar-form .form-control:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.navbar-form .btn,
.btn-success {
    border-radius: 14px !important;
    min-height: 44px;
    padding: 10px 18px;
    font-weight: 700;
    border: none;
    background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
    transition: all 0.22s ease;
}

.navbar-form .btn:hover,
.btn-success:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1e40af, #1d4ed8) !important;
}

.route-card,
.route-summary-box,
.route-steps-box,
.tool-box,
.fact-box {
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    border-radius: 20px !important;
    background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08) !important;
}

.route-card strong,
.fact-box strong,
.tool-box h3,
.route-summary-box h3,
.route-steps-box h3 {
    color: #0f172a;
}

.route-list a,
.route-steps-list a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.route-list a:hover,
.route-steps-list a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.muted {
    color: #64748b !important;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 1px solid rgba(147, 197, 253, 0.35);
    border-radius: 999px;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
}

/* Mobile improvements */
@media (max-width: 767px) {
    .three a {
        font-size: 24px;
    }

    .navbar {
        border-radius: 18px;
        margin-top: 10px;
    }

    .navbar-form .form-group {
        display: block;
        margin-bottom: 10px;
    }

    #dconversions {
        font-size: 13px;
        border-radius: 16px;
    }

    #dconversions th,
    #dconversions td {
        padding: 12px 10px;
    }

    .tags {
        gap: 8px;
    }

    .tags a {
        padding: 9px 12px;
        font-size: 12px;
    }
}