/* ============================================================
   Quetta Police website — UI polish layer (loaded AFTER style.css)
   Branded page loader + light "eye-catching" touches.
   Kept separate so the base template stays untouched.
   ============================================================ */

/* ---------- Logo colour scheme ----------
   Sampled from the Quetta Police crest: indigo-navy + police red.
   Overriding --theme-color re-skins every template accent (buttons,
   links, icons) from the stock silver to the official colours. */
:root {
    --qp-navy: #2b2178;
    --qp-red:  #b91c1c;
    --theme-color: #2b2178;
}

/* ---------- Branded page loader (replaces the template dots) ---------- */
.preloader {
    transition: opacity .35s ease;
}
.preloader.qp-hidden {
    opacity: 0;
    pointer-events: none;
}
.qp-loader-box {
    text-align: center;
}
.qp-loader-box .qp-icon-wrap {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 14px;
}
.qp-loader-box img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    position: absolute;
    top: 18px;
    left: 18px;
    animation: qp-pulse 1.2s ease-in-out infinite;
}
.qp-loader-box .qp-ring {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(43, 33, 120, 0.12);
    border-top-color: var(--qp-navy);
    border-bottom-color: var(--qp-red);
    border-radius: 50%;
    animation: qp-spin 0.9s linear infinite;
}
.qp-loader-box .qp-loader-text {
    color: var(--qp-navy);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.qp-loader-box .qp-loader-text span {
    color: var(--qp-red);
}
@keyframes qp-spin  { to { transform: rotate(360deg); } }
@keyframes qp-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.9); opacity: .75; } }

/* ---------- Page entrance: gentle fade-up once loaded ---------- */
main.main {
    animation: qp-page-in .45s ease both;
}
@keyframes qp-page-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Cards / boxes: soft shadow + hover lift ---------- */
.service-item,
.team-item,
.blog-item,
.pricing-item,
.case-item,
.feature-item {
    border-radius: 14px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.service-item:hover,
.team-item:hover,
.blog-item:hover,
.case-item:hover,
.feature-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(15, 35, 70, 0.14);
}

/* ---------- Buttons: smoother hover ---------- */
.theme-btn {
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 35, 70, 0.25);
}

/* ---------- Navbar: subtle underline slide on links ---------- */
.main-navigation .navbar-nav .nav-link {
    position: relative;
}
.main-navigation .navbar-nav > .nav-item > .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 0;
    height: 2px;
    background: var(--theme-color, #0b2a5b);
    transition: width .25s ease, left .25s ease;
}
.main-navigation .navbar-nav > .nav-item > .nav-link:hover::after {
    width: 70%;
    left: 15%;
}

/* ---------- Forms: friendlier focus state ---------- */
.form-control:focus {
    border-color: #0b2a5b;
    box-shadow: 0 0 0 3px rgba(11, 42, 91, 0.12);
}

/* ---------- "File a Complaint" button in the top bar ---------- */
.header-top-right {
    display: flex;
    align-items: center;
    gap: 18px;
}
.qp-complaint-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(90deg, var(--qp-red) 0%, #e03131 100%);
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.55);
    animation: qp-btn-pulse 2s infinite;
    transition: transform .2s ease, box-shadow .2s ease;
}
.qp-complaint-btn:hover {
    transform: translateY(-1px) scale(1.03);
    color: #fff;
}
@keyframes qp-btn-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(185, 28, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0); }
}

/* ---------- Red page-name banner (every page except home) ---------- */
.qp-page-band {
    padding: 26px 0;
    background: #f7f7f9;
    text-align: center;
}
.qp-page-band-inner {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, #991b1b 0%, var(--qp-red) 35%, #ef4444 75%, rgba(239, 68, 68, 0.75) 100%);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 4px;
    text-transform: uppercase;
    padding: 12px 46px 12px 26px;
    border-radius: 4px 30px 30px 4px;
    box-shadow: 0 6px 18px rgba(185, 28, 28, 0.3);
    animation: qp-band-in .5s ease both;
}
.qp-page-band-inner i {
    font-size: 22px;
}
@keyframes qp-band-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}
@media (max-width: 767px) {
    .qp-page-band-inner { font-size: 15px; letter-spacing: 2px; padding: 10px 26px 10px 18px; }
}
/* Pages already render their own tagline chip inside the content — with the
   banner above it that's a duplicate, so hide it wherever the banner exists. */
body:has(.qp-page-band) .site-heading .site-title-tagline {
    display: none;
}

/* ---------- Pagination (shared by all listing pages) ---------- */
.qp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}
.qp-pagination a,
.qp-pagination span {
    display: inline-block;
    min-width: 38px;
    padding: 7px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    color: var(--qp-navy);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all .2s ease;
    background: #fff;
}
.qp-pagination a:hover {
    background: var(--qp-navy);
    color: #fff;
}
.qp-pagination .active {
    background: var(--qp-navy);
    border-color: var(--qp-navy);
    color: #fff;
}
.qp-pagination .disabled {
    color: #b9c0cc;
    pointer-events: none;
}
.qp-page-info {
    text-align: center;
    color: #757f95;
    font-size: 13px;
    margin-top: 8px;
}

/* ---------- Scroll-top button polish ---------- */
#scroll-top {
    transition: transform .2s ease;
}
#scroll-top:hover {
    transform: translateY(-3px);
}
