/* ==========================================================
   Dubani & Co - additions on top of the theme
   ========================================================== */

/* links inside dark areas and lists keep the surrounding colour */
.h-phone a { color: inherit; }
footer .ul-style-2 a, footer address a, .subfooter a { color: inherit; }
footer .ul-style-2 a:hover, .subfooter a:hover { color: var(--primary-color); }
#section-practice-areas .ul-style-2 a { color: inherit; }
#section-practice-areas .ul-style-2 a:hover { color: var(--primary-color); }
.f-profile h4 a { color: inherit; }
footer p { opacity: .85; }

/* keep anchored sections clear of the sticky header */
section[id] { scroll-margin-top: 110px; }

/* accessibility helper (Bootstrap 4 does not include it) */
.visually-hidden {
    position: absolute !important; width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}

/* contact form */
/* the theme only styles text inputs; give email, phone and dropdowns the same look */
.form-border input[type=email],
.form-border input[type=tel] {
    padding: 8px; margin-bottom: 20px; border: none; border-radius: 3px;
    background: rgba(255, 255, 255, .1); box-shadow: none; color: #fff; height: auto;
}
.form-border input[type=email]:focus,
.form-border input[type=tel]:focus { background: rgba(255, 255, 255, .3); color: #fff; }
.form-border select.form-control { height: auto; min-height: 40px; color: rgba(255, 255, 255, .75); }
.form-border select.form-control option { color: #111; background: #fff; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.map-embed { display: block; width: 100%; height: 420px; border: 0; }

/* practice area detail sections */
.practice-detail .pa-icon { font-size: 48px; display: block; margin-bottom: 15px; }

/* articles */
.article-body h3 { margin-top: 30px; }
.article-body ul { margin-bottom: 20px; }
.article-disclaimer {
    margin-top: 40px; padding: 20px 24px; font-size: 14px;
    background: #f6f8fb; border-left: 4px solid var(--primary-color);
}
.post-info { font-size: 14px; opacity: .8; }
.sidebar-cta { padding: 30px; border-radius: 4px; }
.sidebar-cta h4, .sidebar-cta a { color: #fff; }
#sidebar .widget { margin-bottom: 40px; }
#sidebar .ul-style-2 a { color: inherit; }

/* privacy policy */
.legal-text h2 { margin-top: 30px; }

/* ---------- Home hero (carousel) ----------
   The template makes the hero a full screen tall and centres the text in it,
   which leaves a big empty gap under the navbar. Size it to the content instead,
   with a fixed, even gap below the header.
   All slides sit in one grid cell, so the hero is always as tall as the
   longest slide and the page below never jumps when the slide changes
   (the fade effect still hides the inactive slides). */
#de-carousel,
#de-carousel .carousel-inner,
#de-carousel .carousel-item,
#de-carousel .carousel-item.active { height: auto; }
#de-carousel .carousel-inner { display: grid; }
#de-carousel .carousel-item {
    display: flex; flex-direction: column;
    grid-area: 1 / 1; float: none; margin-right: 0;
}
#de-carousel .carousel-item:not(.active) { pointer-events: none; }
#de-carousel .mask { display: flex; flex: 1; box-shadow: none; }
#de-carousel .mask > .h-100 {
    height: auto !important; width: 100%;
    /* desktop: the 90px menu bar sits on top of the hero (the topbar is above it),
       so 160px leaves a ~70px gap between the menu and the text */
    padding: 160px 0 90px;
    min-height: clamp(540px, 70vh, 640px);
}

/* buttons: the theme leaves them as inline text, so on narrow screens a label
   could break over two lines and the second half overlapped the button
   beside it. Keep every button a single solid box. */
a.btn-custom, .btn-custom { display: inline-block; text-align: center; }
#de-carousel .btn-custom { white-space: nowrap; margin-bottom: 4px; }
.ms-2 { margin-left: .5rem; }

/* below desktop the slide arrows sit on top of the text;
   the dots (and swiping on phones) still change slides */
@media (max-width: 1199px) {
    #de-carousel .carousel-control-prev,
    #de-carousel .carousel-control-next { display: none; }
}

/* tablet and phone: the header is fixed at the top and covers the first
   50px of the hero (the hidden 40px topbar sits above it), so pad for that.
   Text starts at the top so the gap under the menu is the same on every slide. */
@media (max-width: 993px) {
    #de-carousel .mask > .h-100 {
        padding: 100px 0 80px; min-height: 0;
        align-items: flex-start !important;
    }
}
@media (max-width: 767px) {
    #de-carousel .mask > .h-100 { padding: 86px 0 64px; }
    #de-carousel .carousel-indicators { margin-bottom: 22px; }
    #de-carousel .carousel-indicators [data-mdb-target] { width: 10px; height: 10px; }
    .carousel-item.img-ph-slide::after { right: 20px; bottom: 20px; font-size: 40px; }
}
/* ---------- Inner pages on tablet and phone ---------- */
@media (max-width: 993px) {
    /* page-title banner: smaller gap under the fixed menu */
    #subheader { padding: 60px 0 60px; }
    #subheader h1 { margin-top: 20px; }
    /* side photos (team, about, home) stack under the text instead of
       covering half of it; the placeholder stays inside the photo box */
    .image-container.img-ph-section {
        position: relative; top: auto; display: block; float: none;
        width: 100%; max-width: 100%; height: 400px; margin-top: 40px;
    }
}
@media (max-width: 767px) {
    /* the theme keeps 90px above and below every section even on phones */
    section { padding: 60px 0; }
    #subheader { padding-bottom: 50px; }
    .image-container.img-ph-section { height: 300px; }
    /* about page: the "10+ years" badge and small photo hung off the screen edge */
    .de-images .di-text { left: 0; }
    .de-images .di-small-2 { right: 0; }
}

/* small phones: stack the two buttons at full width */
@media (max-width: 575px) {
    #de-carousel .btn-custom { display: block; width: 100%; max-width: 340px; text-align: center; }
    #de-carousel .btn-custom.ms-2 { margin-left: 0 !important; margin-top: 10px; }
}

/* ---------- Page loader: scales of justice ---------- */
#preloader {
    display: flex; align-items: center; justify-content: center;
    position: fixed; inset: 0; z-index: 20000;
    background: radial-gradient(circle at 50% 42%, #123a6b 0%, #0b2545 58%, #061629 100%);
    color: #fff;
    transition: transform .9s cubic-bezier(.77, 0, .18, 1);
    /* safety net: never block the page for more than 8s, even if a script fails */
    animation: pl-failsafe .5s ease 8s forwards;
}
#preloader.is-done { transform: translateY(-100%); }
#preloader .pl-inner { text-align: center; transition: opacity .35s ease, transform .35s ease; }
#preloader.is-done .pl-inner { opacity: 0; transform: translateY(-24px); }

.pl-mark { display: block; margin: 0 auto 24px; overflow: visible; }
.pl-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 2; }
.pl-arc {
    fill: none; stroke: var(--primary-color, #1974cd); stroke-width: 2.5; stroke-linecap: round;
    stroke-dasharray: 85 255;          /* circle length is about 340 */
    transform-origin: 60px 60px;
    animation: pl-spin 1.3s linear infinite;
}
.pl-draw {
    fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 130; stroke-dashoffset: 130;
    animation: pl-draw .9s ease forwards;
}
.pl-d2 { animation-delay: .3s; }
.pl-d3 { animation-delay: .55s; }
.pl-dot { fill: var(--primary-color, #1974cd); opacity: 0; animation: pl-fade .4s ease .9s forwards; }
.pl-beam { transform-origin: 60px 38px; animation: pl-sway 2.6s ease-in-out 1.1s infinite; }

.pl-name {
    font: 700 22px/1.2 "Libre Baskerville", Georgia, serif; letter-spacing: .5px;
    opacity: 0; animation: pl-rise .7s ease .45s forwards;
}
.pl-name em { font-style: normal; color: var(--primary-color-accent, #2765ea); }
.pl-sub {
    font: 500 11px/1 "Jost", Arial, sans-serif; letter-spacing: 4px; text-transform: uppercase;
    color: rgba(255, 255, 255, .7); margin-top: 10px;
    opacity: 0; animation: pl-rise .7s ease .65s forwards;
}
.pl-bar {
    width: 150px; height: 2px; margin: 22px auto 0; overflow: hidden; border-radius: 2px;
    background: rgba(255, 255, 255, .12);
}
.pl-bar span {
    display: block; width: 40%; height: 100%; border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color, #1974cd), #fff);
    animation: pl-load 1.2s ease-in-out infinite;
}

@keyframes pl-spin { to { transform: rotate(360deg); } }
@keyframes pl-draw { to { stroke-dashoffset: 0; } }
@keyframes pl-fade { to { opacity: 1; } }
@keyframes pl-sway { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes pl-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pl-load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes pl-failsafe { to { opacity: 0; visibility: hidden; } }

/* visitors who turn off animations get a calm, static loader */
@media (prefers-reduced-motion: reduce) {
    .pl-arc, .pl-beam, .pl-bar span { animation: none; }
    .pl-draw { animation: none; stroke-dashoffset: 0; }
    .pl-dot, .pl-name, .pl-sub { animation: none; opacity: 1; }
    #preloader { transition: opacity .3s ease; }
    #preloader.is-done { transform: none; opacity: 0; }
}
