/* ============================================================
   MyLawyer Directory — 2.0 redesign layer
   Loaded after style.css; reskins the site without template changes.
   Palette: deep legal navy + gold accent, modern cards, softer shadows.
   ============================================================ */

:root {
    --ld-navy: #102a43;
    --ld-navy-2: #1b3a5c;
    --ld-gold: #c9a227;
    --ld-gold-soft: #f3e7c3;
    --ld-ink: #1f2937;
    --ld-muted: #6b7280;
    --ld-bg: #f6f7f9;
    --ld-radius: 14px;
    --ld-shadow: 0 6px 24px rgba(16, 42, 67, .10);
    --ld-shadow-hover: 0 14px 34px rgba(16, 42, 67, .18);
}

/* ---------- Typography ---------- */
body {
    color: var(--ld-ink);
    background: var(--ld-bg);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--ld-navy);
    letter-spacing: .2px;
}
a { color: var(--ld-navy-2); }
a:hover { color: var(--ld-gold); }

/* ---------- Top navigation (white header bar) ---------- */
.main-nav nav .navbar-nav .nav-item a,
.main-nav nav .navbar-nav .nav-item .nav-link {
    color: var(--ld-navy) !important;
    font-weight: 600;
    letter-spacing: .4px;
    transition: color .2s ease;
}
.main-nav nav .navbar-nav .nav-item a:hover,
.main-nav nav .navbar-nav .nav-item a:focus,
.main-nav nav .navbar-nav .nav-item:hover a {
    color: #7a5f10 !important;
}
.main-nav nav .navbar-nav .nav-item .dropdown-menu {
    border: 1px solid #e5e9f0;
    border-radius: 10px;
    box-shadow: var(--ld-shadow);
    padding: 8px 0;
    overflow-y: auto;
    max-height: 70vh;
}
.main-nav nav .navbar-nav .nav-item .dropdown-menu li a {
    color: var(--ld-ink);
    border-bottom: 1px solid #f1f3f6;
    padding: 9px 18px;
}
.main-nav nav .navbar-nav .nav-item .dropdown-menu li a:hover,
.main-nav nav .navbar-nav .nav-item .dropdown-menu li a:focus {
    background: var(--ld-navy-2);
    color: #fff !important;
}

/* ---------- Hero / search section ---------- */
.search-section {
    position: relative;
    padding: 90px 0 110px;
}
.search-section .bg {
    background: linear-gradient(135deg, rgba(16,42,67,.96) 0%, rgba(27,58,92,.92) 55%, rgba(16,42,67,.85) 100%);
    opacity: 1;
}
.search-section::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 60px;
    background: linear-gradient(to top, var(--ld-bg), transparent);
    pointer-events: none;
}
.search-section h1 {
    color: #fff;
    font-size: 2.6rem;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.search-section p {
    color: #d7e0ea;
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto 26px;
}
.search-section .box {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
    max-width: 980px;
    margin: 0 auto;
}
.search-section .input-group.input-box {
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(16,42,67,.08);
}
.search-section .search-input {
    border: 0;
    padding: 16px 18px;
    font-size: 1rem;
}
.search-section .input-group-append button,
.search-section button[type="submit"] {
    background: linear-gradient(135deg, var(--ld-navy-2), var(--ld-navy));
    color: #fff;
    border: 0;
    padding: 0 30px;
    font-weight: 700;
    letter-spacing: .5px;
    transition: background .2s ease, transform .15s ease;
}
.search-section .input-group-append button:hover {
    background: linear-gradient(135deg, var(--ld-gold), #a8851c);
    transform: translateY(-1px);
}

/* ---------- Page banners ---------- */
.page-banner {
    background: linear-gradient(135deg, var(--ld-navy) 0%, var(--ld-navy-2) 100%);
    color: #fff;
    padding: 46px 0;
    position: relative;
    overflow: hidden;
}
.page-banner::before {
    content: '⚖';
    position: absolute;
    right: 4%; top: 50%;
    transform: translateY(-50%);
    font-size: 9rem;
    opacity: .06;
    pointer-events: none;
}
.page-banner h1 {
    color: #fff;
    font-size: 2rem;
    position: relative;
}
.page-banner .breadcrumb-item a { color: var(--ld-gold-soft); }
.page-banner .breadcrumb-item.active { color: #cfd8e3; }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: #8fa3b8; }

/* ---------- Buttons ---------- */
.btn-primary, .filter-button, .lf-widget .btn-primary {
    background: linear-gradient(135deg, var(--ld-navy-2), var(--ld-navy));
    border-color: var(--ld-navy);
    border-radius: 10px;
    font-weight: 600;
    transition: all .2s ease;
}
.btn-primary:hover, .filter-button:hover {
    background: linear-gradient(135deg, var(--ld-gold), #a8851c);
    border-color: var(--ld-gold);
    transform: translateY(-1px);
    box-shadow: var(--ld-shadow-hover);
}
.btn-outline-primary {
    color: var(--ld-navy-2);
    border-color: var(--ld-navy-2);
    border-radius: 10px;
}
.btn-outline-primary:hover {
    background: var(--ld-navy-2);
    border-color: var(--ld-navy-2);
}
.btn-success { border-radius: 10px; }

/* ---------- Listing cards ---------- */
.listing-item {
    background: #fff;
    border-radius: var(--ld-radius);
    box-shadow: var(--ld-shadow);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    border: 1px solid #eef1f5;
}
.listing-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--ld-shadow-hover);
}
.listing-item .photo img {
    transition: transform .4s ease;
}
.listing-item:hover .photo img {
    transform: scale(1.05);
}
.listing-item .photo .category a {
    background: var(--ld-navy-2);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: .8rem;
    font-weight: 600;
}
.listing-item .photo .featured-text {
    background: linear-gradient(135deg, var(--ld-gold), #a8851c);
}
.listing-item .text h3 a { color: var(--ld-navy); }
.listing-item .text h3 a:hover { color: var(--ld-gold); }
.listing-item .review .fa-star, .listing-item .review .fa-star-half-alt { color: var(--ld-gold); }
.listing-item .wishlist .fa-heart { color: #e00445; }

/* ---------- Section headings ---------- */
.listing .heading h3,
.popular-category .heading h3,
.popular-city .heading h3 {
    color: var(--ld-navy);
    font-weight: 700;
    font-size: 1.6rem;
    position: relative;
    padding-bottom: 10px;
}
.listing .heading h3::after,
.popular-category .heading h3::after,
.popular-city .heading h3::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 56px; height: 3px;
    background: linear-gradient(90deg, var(--ld-gold), transparent);
    border-radius: 3px;
}

/* ---------- Sidebar / filters ---------- */
.listing-filter {
    background: #fff;
    border-radius: var(--ld-radius);
    box-shadow: var(--ld-shadow);
    border: 1px solid #eef1f5;
    overflow: hidden;
}
.listing-filter .lf-heading {
    background: linear-gradient(135deg, var(--ld-navy), var(--ld-navy-2));
    color: #fff !important;
    padding: 14px 18px;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-size: .85rem;
    border-bottom: 0;
    border-radius: 0;
}
.lf-widget { padding: 14px 18px; border-bottom: 1px solid #f1f3f6; }
.lf-widget:last-child { border-bottom: 0; }
.lf-widget select, .lf-widget input[type="text"], .lf-widget .form-control {
    border-radius: 8px;
    border: 1px solid #dfe5ec;
}
.lf-widget select:focus, .lf-widget input:focus {
    border-color: var(--ld-navy-2);
    box-shadow: 0 0 0 3px rgba(27,58,92,.12);
}

/* ---------- Content pages ---------- */
.page-content { padding: 40px 0 60px; }
.listing-page h2 {
    color: var(--ld-navy);
    font-size: 1.4rem;
    border-bottom: 3px solid var(--ld-gold-soft);
    padding-bottom: 8px;
    margin-bottom: 18px;
}
.listing-page h2 i { color: var(--ld-gold); margin-right: 6px; }
.sepia, .contact .card, .listing-filter .lf-widget {
    border-radius: var(--ld-radius);
}
.contact .card { border: 1px solid #eef1f5; }

/* ---------- Detail page elements ---------- */
.listing-single-banner {
    position: relative;
}
.listing-single-banner .bg {
    background: linear-gradient(135deg, rgba(16,42,67,.82), rgba(27,58,92,.75));
}
.badge.bg-success {
    background: linear-gradient(135deg, #1e8449, #27ae60) !important;
    border-radius: 20px;
    padding: 5px 14px;
    font-weight: 600;
}

/* ---------- Law dictionary ---------- */
.law-dict-letters .btn { border-radius: 8px; font-weight: 700; }
.law-dict-letter h2 {
    color: var(--ld-navy);
    border-bottom: 3px solid var(--ld-gold-soft);
    padding-bottom: 8px;
}
.law-dict-letter .list-group-item a { color: var(--ld-navy-2); font-weight: 600; }
.law-dict-letter .list-group-item a:hover { color: var(--ld-gold); }

/* ---------- Footer (Bootstrap bg-body-tertiary needs !important) ---------- */
footer.bg-body-tertiary {
    background: linear-gradient(135deg, var(--ld-navy) 0%, #0a1c2e 100%) !important;
    color: #dbe4ee !important;
}
footer.bg-body-tertiary .text-muted,
footer.bg-body-tertiary p,
footer.bg-body-tertiary small,
footer.bg-body-tertiary span {
    color: #c8d3df !important;
}
footer.bg-body-tertiary a,
footer.bg-body-tertiary a.text-reset {
    color: #dbe4ee !important;
}
footer.bg-body-tertiary a:hover {
    color: var(--ld-gold) !important;
}
footer.bg-body-tertiary h1, footer.bg-body-tertiary h2, footer.bg-body-tertiary h3,
footer.bg-body-tertiary h4, footer.bg-body-tertiary h5, footer.bg-body-tertiary h6,
footer.bg-body-tertiary .h6 {
    color: #fff !important;
}

/* ---------- Pagination ---------- */
.pagination .page-link {
    color: var(--ld-navy-2);
    border-radius: 8px !important;
    margin: 0 3px;
    border: 1px solid #dfe5ec;
}
.pagination .page-item.active .page-link {
    background: var(--ld-navy-2);
    border-color: var(--ld-navy-2);
}
.pagination .page-link:hover { color: var(--ld-gold); border-color: var(--ld-gold); }

/* ---------- Cards / panels / tables ---------- */
.card { border-radius: var(--ld-radius); border: 1px solid #eef1f5; }
.table-bordered th { background: var(--ld-bg); color: var(--ld-navy); }
.badge.bg-primary { background: var(--ld-navy-2) !important; }
.progress-bar, .bg-primary { background-color: var(--ld-navy-2) !important; }
.text-primary { color: var(--ld-navy-2) !important; }

/* ---------- Forms ---------- */
.form-control:focus {
    border-color: var(--ld-navy-2);
    box-shadow: 0 0 0 3px rgba(27,58,92,.12);
}
.btn-outline-secondary:hover { background: var(--ld-navy-2); border-color: var(--ld-navy-2); color: #fff; }

/* ---------- Misc polish ---------- */
hr, .sep { border-color: #e5e9f0; }
.img-thumbnail, .rounded { border-radius: var(--ld-radius) !important; }
.popular-category-item, .popular-city-item {
    border-radius: var(--ld-radius);
    box-shadow: var(--ld-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.popular-category-item:hover, .popular-city-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--ld-shadow-hover);
}
.popular-city-item:hover h4 { color: var(--ld-gold) !important; }
.list-group-item-action:hover { background: var(--ld-bg); }

@media (max-width: 768px) {
    .search-section { padding: 60px 0 90px; }
    .search-section h1 { font-size: 1.9rem; }
    .page-banner h1 { font-size: 1.5rem; }
    .page-banner::before { font-size: 6rem; opacity: .05; }
}
