/* ==========================================================================
   Our Expertise section
   Uses the site's existing theme tokens (defined in main.min.css):
   --tp-theme-color (navy), --tp-orange-color / --tp-secoundery-color (gold),
   --tp-gray-color, --tp-body-color, --tp-white-color
   Entrance animation reuses the site-wide .tp_fade_anim / GSAP ScrollTrigger
   system already driven by assets/js/main.min.js — no extra JS needed.
   ========================================================================== */

.tp-expertise-area {
    position: relative;
    background-color: var(--tp-white-color);
    overflow: hidden;
}

/* TEST: soft gold glow behind the bottom row of cards (04/05/06). Easy to
   remove — delete this rule and the position/overflow additions above and
   on .tp-expertise-container below have no other purpose than this. */
.tp-expertise-area::before {
    content: "";
    position: absolute;
    left: 45%;
    bottom: -15%;
    width: 900px;
    height: 500px;
    background: radial-gradient(circle, rgba(182, 146, 93, 0.16) 0%, rgba(182, 146, 93, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

.tp-expertise-container {
    position: relative;
    z-index: 1;
    padding-left: 0;
    padding-right: 60px;
    max-width: 1720px;
    margin: 0 auto;
}

/* ---- Left photo ----
   Was height:100%, stretching to match the right column's height — but that
   column's height varies a lot with content (e.g. the card grid drops to
   2-per-row under 1200px, adding a 3rd card row), which forced this landscape
   photo into an extreme portrait crop at common laptop widths (as narrow as
   ~0.29 width:height, i.e. showing under a quarter of the photo's width) —
   read as "too zoomed in". A fixed aspect ratio decouples the photo's crop
   from the sibling column's height entirely. */
.tp-expertise-area .col-xl-4.col-lg-5 {
    display: flex;
    align-items: center;
}

.tp-expertise-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 820px;
    border-radius: 0 30px 30px 0;
    overflow: hidden;
}

.tp-expertise-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* concave corner cut-out, top right of the photo */
.tp-expertise-thumb::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    background: var(--tp-white-color);
    border-bottom-left-radius: 90px;
    pointer-events: none;
}

@media (max-width: 991px) {
    .tp-expertise-thumb {
        aspect-ratio: 16 / 10;
        max-height: none;
        border-radius: 0 0 30px 30px;
        margin-bottom: 40px;
    }
    .tp-expertise-thumb::after {
        border-radius: 0;
        display: none;
    }
}

/* ---- Right content ---- */
.tp-expertise-content-wrap {
    padding: 90px 0 90px 60px;
}

@media (max-width: 991px) {
    /* .tp-expertise-container's base padding-left:0/padding-right:60px is
       intentional on desktop (the photo bleeds flush to the left edge) but
       left the whole mobile-stacked layout — photo and card grid alike —
       shoved left with a lopsided 60-80px gap on the right vs ~20px on the
       left. Give the container itself symmetric mobile gutters and let
       content-wrap's own padding go flush (0), so it's not double-padded. */
    .tp-expertise-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    .tp-expertise-content-wrap {
        padding: 0 0 60px;
    }
}

.tp-expertise-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid rgba(22, 50, 79, 0.15);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tp-theme-color);
    margin-bottom: 26px;
}

.tp-expertise-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tp-orange-color, var(--tp-secoundery-color));
    display: inline-block;
}

.tp-expertise-title {
    font-family: "Playfair Display", "Manrope", serif;
    font-size: 52px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--tp-theme-color);
    margin: 0 0 20px;
}

.tp-expertise-title span {
    font-style: italic;
    font-weight: 500;
    color: var(--tp-orange-color, var(--tp-secoundery-color));
}

.tp-expertise-intro p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--tp-body-color);
    margin: 0;
}

.tp-expertise-intro strong {
    color: var(--tp-theme-color);
    font-weight: 700;
}

.tp-expertise-sub-row {
    margin-top: 20px;
    margin-bottom: 55px;
    align-items: center;
}

.tp-expertise-sub {
    font-size: 15px;
    line-height: 1.7;
    color: var(--tp-body-color);
    margin: 0;
}

.tp-expertise-sub strong {
    color: var(--tp-theme-color);
    font-weight: 700;
}

.tp-expertise-btn {
    background: var(--tp-theme-color);
    color: var(--tp-white-color);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 6px 6px 6px 26px;
    font-size: 14px;
    font-weight: 600;
}

.tp-expertise-btn .tp-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tp-orange-color, var(--tp-secoundery-color));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-theme-color);
    transition: transform 0.35s ease;
}

.tp-expertise-btn:hover .tp-btn-icon {
    transform: rotate(45deg);
}

@media (max-width: 991px) {
    .tp-expertise-sub-row {
        margin-bottom: 40px;
    }
    .tp-expertise-sub-row .tp-text-end {
        text-align: left !important;
        margin-top: 20px;
    }
    .tp-expertise-title {
        font-size: 38px;
    }
}

/* ---- Card grid ---- */
.tp-expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1199px) {
    .tp-expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .tp-expertise-grid {
        grid-template-columns: 1fr;
    }
}

.tp-expertise-card {
    position: relative;
    border: 1px solid rgba(22, 50, 79, 0.1);
    border-radius: 18px;
    padding: 28px 26px 60px;
    overflow: hidden;
    background: var(--tp-white-color);
    transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.tp-expertise-card:hover {
    transform: translateY(-6px);
    border-color: rgba(22, 50, 79, 0.25);
    box-shadow: 0 24px 48px rgba(22, 50, 79, 0.12);
}

/* faded background photo, bottom-right of each card */
.tp-expertise-card-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    -webkit-mask-image: linear-gradient(135deg, transparent 35%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.85) 100%);
    mask-image: linear-gradient(135deg, transparent 35%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.85) 100%);
}

.tp-expertise-card:hover .tp-expertise-card-photo {
    opacity: 1;
}

.tp-expertise-card-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 26px;
}

.tp-expertise-num {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 26px;
    color: var(--tp-orange-color, var(--tp-secoundery-color));
    line-height: 1;
}

.tp-expertise-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tp-theme-color);
    color: var(--tp-white-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.35s ease, transform 0.35s ease;
}

.tp-expertise-card:hover .tp-expertise-icon {
    background: var(--tp-orange-color, var(--tp-secoundery-color));
    transform: scale(1.08);
}

.tp-expertise-card-body {
    position: relative;
    z-index: 1;
}

.tp-expertise-card-body h3 {
    font-size: 21px;
    font-weight: 700;
    color: var(--tp-theme-color);
    line-height: 1.25;
    margin: 0 0 12px;
}

.tp-expertise-card-body p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--tp-body-color);
    margin: 0;
}

.tp-expertise-card-arrow {
    position: absolute;
    left: 26px;
    bottom: 26px;
    z-index: 1;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(22, 50, 79, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tp-theme-color);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.tp-expertise-card:hover .tp-expertise-card-arrow {
    background: var(--tp-theme-color);
    border-color: var(--tp-theme-color);
    color: var(--tp-white-color);
    transform: rotate(45deg);
}

@media (max-width: 575px) {
    .tp-expertise-card {
        padding: 24px 22px 54px;
    }
}
