/* SheriffGSM modern responsive UI layer.
 * This file intentionally styles existing markup only; it does not change
 * Smarty variables, form actions, URLs, or payment/order behavior.
 */
:root {
    --sg-primary: #0f5bd7;
    --sg-primary-dark: #0b3f9b;
    --sg-teal: #0aa7a0;
    --sg-ink: #10233f;
    --sg-muted: #66758a;
    --sg-bg: #f4f8fc;
    --sg-surface: #ffffff;
    --sg-border: #dce6f2;
    --sg-shadow: 0 10px 30px rgba(16, 35, 63, .08);
    --sg-radius: 14px;
}

html { scroll-behavior: smooth; }
body {
    color: var(--sg-ink);
    background: var(--sg-bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.index,
body.page-index,
body.transparent { background: #fff; }

a { color: var(--sg-primary); transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--sg-primary-dark); }

header {
    position: relative;
    z-index: 30;
    background: var(--sg-surface);
    box-shadow: 0 1px 0 rgba(16, 35, 63, .06);
}
.header-top {
    background: linear-gradient(90deg, var(--sg-primary-dark), var(--sg-primary));
    color: #fff;
}
.header-top a,
.header-top .nav-link { color: rgba(255,255,255,.9); }
.header-top a:hover,
.header-top .nav-link:hover { color: #fff; }
.header-middle {
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--sg-border);
}
.header-bottom { background: var(--sg-surface); }
.navbar-brand {
    color: var(--sg-ink) !important;
    font-weight: 800;
    letter-spacing: -.02em;
}
.navbar-brand img { max-height: 48px; width: auto; object-fit: contain; }
.navbar-nav .nav-link {
    color: var(--sg-ink);
    font-weight: 600;
    border-radius: 9px;
    padding: .65rem .8rem;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active > .nav-link {
    color: var(--sg-primary);
    background: #eef5ff;
}
.navbar-toggler {
    border: 1px solid var(--sg-border);
    border-radius: 10px;
    color: var(--sg-primary);
    background: #fff;
}
.dropdown-menu {
    border: 1px solid var(--sg-border);
    border-radius: 12px;
    box-shadow: var(--sg-shadow);
    padding: .5rem;
}
.dropdown-item { border-radius: 8px; padding: .55rem .75rem; }
.dropdown-item:hover,
.dropdown-item:focus { color: var(--sg-primary); background: #eef5ff; }

.bg-gray,
.page-content,
.min-height { background: var(--sg-bg); }
.page-title {
    color: var(--sg-ink);
    font-size: clamp(1.45rem, 2.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.025em;
}
.breadcrumb {
    color: var(--sg-muted);
    padding: 1rem 0 .5rem;
    background: transparent;
}
.breadcrumb a { color: var(--sg-primary); }

.card,
.panel,
.well,
.app-content,
.app-content-header,
.table-invoice-items,
.form-wrapper {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow);
}
.card,
.panel,
.well,
.app-content,
.form-wrapper { background: var(--sg-surface); }
.card-header,
.panel-heading,
.app-content-header {
    color: var(--sg-ink);
    border-bottom: 1px solid var(--sg-border);
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.btn {
    border-radius: 9px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary,
.btn-info,
.bg-primary {
    color: #fff !important;
    border-color: var(--sg-primary) !important;
    background: linear-gradient(135deg, var(--sg-primary), #3187eb) !important;
    box-shadow: 0 6px 16px rgba(15, 91, 215, .2);
}
.btn-primary:hover,
.btn-info:hover { background: linear-gradient(135deg, var(--sg-primary-dark), var(--sg-primary)) !important; }
.btn-success { background: linear-gradient(135deg, #0b9b83, var(--sg-teal)); border-color: #0b9b83; }
.btn-danger { background: linear-gradient(135deg, #d93f56, #ef6b62); border-color: #d93f56; }
.btn-outline-primary { color: var(--sg-primary); border-color: var(--sg-primary); }
.btn-outline-primary:hover { color: #fff; background: var(--sg-primary); }

.form-control,
.custom-select,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea {
    min-height: 42px;
    color: var(--sg-ink);
    border: 1px solid var(--sg-border);
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
}
.form-control:focus,
.custom-select:focus,
select:focus,
textarea:focus,
input:focus {
    border-color: var(--sg-primary);
    box-shadow: 0 0 0 3px rgba(15, 91, 215, .12);
    outline: 0;
}
label { color: var(--sg-ink); font-weight: 650; }

.table { color: var(--sg-ink); background: #fff; }
.table thead th {
    color: #47617e;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #f3f7fb;
    border-top: 0;
    border-bottom: 1px solid var(--sg-border);
}
.table td,
.table th { vertical-align: middle; border-color: var(--sg-border); }
.table-striped tbody tr:nth-of-type(odd) { background-color: #fbfdff; }
.table-hover tbody tr:hover { background-color: #eef6ff; }

.alert { border: 0; border-radius: 10px; box-shadow: 0 4px 14px rgba(16, 35, 63, .06); }
.badge { border-radius: 999px; font-weight: 700; padding: .42em .7em; }
.pagination .page-link { color: var(--sg-primary); border-color: var(--sg-border); }
.pagination .active .page-link { color: #fff; background: var(--sg-primary); border-color: var(--sg-primary); }

footer {
    color: #d6e4f3;
    background: linear-gradient(135deg, #0b2342, #102f57);
}
footer a { color: #bfe8f4; }
footer a:hover { color: #fff; }

/* Prevent the historical black strip above the public header. */
body.index header,
body.page-index header { margin-top: 0 !important; }
body.index .header-top,
body.page-index .header-top { background: linear-gradient(90deg, var(--sg-primary-dark), var(--sg-primary)); }

@media (max-width: 991.98px) {
    .header-middle { padding: .55rem 0; }
    .navbar-brand img { max-height: 40px; }
    .navbar-nav .nav-link { padding: .75rem .85rem; }
    .page-title { margin-bottom: 1rem; }
    .card, .panel, .well, .app-content, .form-wrapper { border-radius: 11px; }
    .table-responsive { border-radius: 10px; }
}

@media (max-width: 575.98px) {
    .container { padding-left: 15px; padding-right: 15px; }
    .btn { white-space: normal; }
    .page-title { font-size: 1.45rem; }
    .table { font-size: .86rem; }
    .form-control, .custom-select, select { min-height: 40px; }
}

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

/* Modal polish shared by login, search, AJAX, and advertisement dialogs. */
.modal-content {
    overflow: hidden;
    border: 1px solid var(--sg-border);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(16, 35, 63, .22);
}
.modal-header {
    color: #fff;
    border-bottom: 0;
    background: linear-gradient(135deg, var(--sg-primary-dark), var(--sg-primary));
}
.modal-header .close { color: #fff; opacity: .9; text-shadow: none; }
.modal-header .close:hover { color: #fff; opacity: 1; }
.modal-body { background: #fff; }
.modal-backdrop.show { opacity: .58; }
.modal-body-login .form-group { margin-bottom: 1rem; }
.modal-body-login .btn { width: 100%; min-height: 44px; }
@media (max-width: 575.98px) {
    .modal-dialog { margin: .75rem; }
    .modal-content { border-radius: 13px; }
}

/* Homepage product and service gallery. */
.index-products,
.index-items { padding: 1.25rem 0; }
.index-items .page-container { padding: 0; }
.index-items .title {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0 0 1.15rem;
    color: var(--sg-ink);
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -.02em;
}
.index-items .title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--sg-border), transparent);
}
.col-product { margin-bottom: 1.25rem; }
.card-product {
    overflow: hidden;
    border: 1px solid var(--sg-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(16, 35, 63, .07);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card-product:hover {
    border-color: rgba(15, 91, 215, .34);
    box-shadow: 0 16px 34px rgba(15, 91, 215, .14);
    transform: translateY(-4px);
}
.card-product > a { color: inherit; text-decoration: none; }
.card-product-img {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 205px;
    padding: 1rem;
    background: linear-gradient(145deg, #f8fbff, #eef5fb);
}
.card-product-img > div { width: 100%; }
.card-product-img img,
.card-product .card-img-top {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .25s ease;
}
.card-product:hover .card-product-img img { transform: scale(1.035); }
.card-product .card-body { padding: .95rem 1rem 1.1rem; }
.product-info { min-height: 78px; }
.service-name,
.card-info .truncate-text {
    display: -webkit-box;
    overflow: hidden;
    color: var(--sg-ink);
    font-size: .95rem;
    font-weight: 750;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.product-info .price,
.card-info .price {
    margin-top: .45rem;
    color: var(--sg-primary);
    font-size: 1.08rem;
    font-weight: 800;
}
.product-info del { color: var(--sg-muted); font-size: .86rem; font-weight: 500; }
.product-info mark {
    display: inline-block;
    margin-top: .25rem;
    padding: .2rem .45rem;
    color: #087964;
    border-radius: 999px;
    background: #d9f7ed;
    font-size: .72rem;
    font-weight: 750;
}
.card-product .hot {
    position: absolute;
    top: .8rem;
    left: .8rem;
    z-index: 2;
    padding: .38rem .6rem;
    font-size: .7rem;
}
.card-product .quick-view {
    position: absolute;
    right: .7rem;
    bottom: .7rem;
    z-index: 2;
}
.card-product .quick-view a {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: var(--sg-primary);
    border: 1px solid var(--sg-border);
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    box-shadow: 0 5px 14px rgba(16, 35, 63, .12);
}
.card-product .quick-view a:hover { color: #fff; background: var(--sg-primary); }
.card-product .image-not-found {
    min-height: 170px;
    color: var(--sg-muted);
    background: #eef4fa;
}
.card-group .card-product-img { min-height: 175px; }
.card-group .card-product-img img { height: 160px; }
.index-products .row,
.index-items .row { margin-right: -.65rem; margin-left: -.65rem; }
.index-products .col-product,
.index-items .col-product { padding-right: .65rem; padding-left: .65rem; }
@media (max-width: 767.98px) {
    .index-products,
    .index-items { padding: .75rem 0; }
    .card-product-img { min-height: 155px; padding: .7rem; }
    .card-product-img img,
    .card-product .card-img-top { height: 145px; }
    .card-product .card-body { padding: .75rem; }
    .service-name { font-size: .86rem; }
}
@media (max-width: 420px) {
    .index-products .col-product,
    .index-items .col-product { width: 50%; padding-right: .4rem; padding-left: .4rem; }
    .index-products .row,
    .index-items .row { margin-right: -.4rem; margin-left: -.4rem; }
    .card-product-img { min-height: 130px; }
    .card-product-img img,
    .card-product .card-img-top { height: 118px; }
    .card-product .card-body { padding: .6rem; }
    .service-name { font-size: .78rem; }
    .product-info { min-height: 68px; }
}

/* Public currency and language controls: keep them visible in the header. */
.navbar-mastermenu .nav-item-curlang {
    display: flex;
    align-items: center;
    margin-left: .25rem;
}
.navbar-mastermenu .nav-item-curlang .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: 36px;
    padding: .42rem .7rem;
    color: var(--sg-ink) !important;
    border: 1px solid var(--sg-border);
    border-radius: 8px;
    background: #fff;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}
.navbar-mastermenu .nav-item-curlang .nav-link:hover,
.navbar-mastermenu .nav-item-curlang.show .nav-link {
    color: var(--sg-primary) !important;
    border-color: rgba(15,91,215,.35);
    background: #eef5ff;
}
.navbar-mastermenu .nav-item-curlang .dropdown-menu {
    z-index: 1050;
    min-width: 145px;
    margin-top: .35rem;
}
.navbar-mastermenu .nav-item-curlang .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 34px;
    font-size: .82rem;
}
.navbar-mastermenu .nav-item-curlang .flag { flex: 0 0 auto; }
@media (max-width: 991.98px) {
    .navbar-mastermenu .nav-item-curlang { display: none; }
}

/* Premium homepage feature section. */
.sg-feature-section {
    position: relative;
    overflow: hidden;
    padding: clamp(3.5rem, 7vw, 6.5rem) 0;
    background: radial-gradient(circle at 8% 10%, rgba(10,167,160,.12), transparent 32%), linear-gradient(180deg, #f7fbff 0%, #eef5fb 100%);
}
.sg-feature-section::before,
.sg-feature-section::after {
    position: absolute;
    width: 260px;
    height: 260px;
    content: "";
    border: 1px solid rgba(15,91,215,.09);
    border-radius: 50%;
    pointer-events: none;
}
.sg-feature-section::before { top: -120px; right: -60px; }
.sg-feature-section::after { bottom: -180px; left: -100px; }
.sg-feature-heading {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto 2.5rem;
    text-align: center;
}
.sg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .65rem;
    color: var(--sg-teal);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.sg-eyebrow::before,
.sg-eyebrow::after {
    width: 22px;
    height: 2px;
    content: "";
    border-radius: 2px;
    background: var(--sg-teal);
}
.sg-feature-heading h2 {
    margin: 0;
    color: var(--sg-ink);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 850;
    letter-spacing: -.045em;
}
.sg-feature-heading p {
    max-width: 560px;
    margin: .85rem auto 0;
    color: var(--sg-muted);
    font-size: 1rem;
}
.sg-feature-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.sg-feature-card {
    position: relative;
    display: flex;
    min-height: 275px;
    flex-direction: column;
    overflow: hidden;
    padding: 1.55rem;
    border: 1px solid rgba(220,230,242,.9);
    border-radius: 20px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 12px 35px rgba(16,35,63,.07);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.sg-feature-card::after {
    position: absolute;
    right: -30px;
    bottom: -45px;
    width: 120px;
    height: 120px;
    content: "";
    border: 1px solid rgba(15,91,215,.08);
    border-radius: 50%;
}
.sg-feature-card:hover {
    border-color: rgba(15,91,215,.3);
    box-shadow: 0 20px 45px rgba(15,91,215,.14);
    transform: translateY(-7px);
}
.sg-feature-card-accent { background: linear-gradient(145deg, #fff, #f2fbfc); }
.sg-feature-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 1.15rem;
    place-items: center;
    color: #fff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--sg-primary), var(--sg-teal));
    box-shadow: 0 10px 20px rgba(15,91,215,.2);
    font-size: 1.45rem;
}
.sg-feature-card-accent .sg-feature-icon { background: linear-gradient(135deg, var(--sg-teal), #57c9ba); }
.sg-feature-content { position: relative; z-index: 1; }
.sg-feature-content h3 {
    margin: 0 0 .65rem;
    color: var(--sg-ink);
    font-size: 1.13rem;
    font-weight: 800;
}
.sg-feature-content p {
    margin: 0;
    color: var(--sg-muted);
    font-size: .91rem;
    line-height: 1.65;
}
.sg-feature-number {
    position: absolute;
    right: 1.35rem;
    bottom: 1.15rem;
    color: rgba(15,91,215,.13);
    font-size: 2.35rem;
    font-weight: 900;
    letter-spacing: -.06em;
}
@media (max-width: 991.98px) {
    .sg-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .sg-feature-section { padding: 3.25rem 0; }
    .sg-feature-grid { grid-template-columns: 1fr; gap: 1rem; }
    .sg-feature-card { min-height: 0; padding: 1.35rem; }
    .sg-feature-content p { font-size: .88rem; }
}
