/* =============================================
   Lawyer Widget — Sidebar & Inline variants
   ============================================= */

/* --- Shared base --- */
.lawyer-widget {
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 1px solid rgba(227, 195, 122, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.lawyer-widget__header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(227, 195, 122, 0.15);
}

.lawyer-widget__title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 16px;
    font-weight: 600;
    color: #f8f2e5;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Track (carousel) --- */
.lawyer-widget__track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* --- Card --- */
.lawyer-widget__card {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* --- Photo container with name overlay --- */
.lawyer-widget__photo {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    background: #e8e4dc;
    flex: 1;
}

.lawyer-widget__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.lawyer-widget__photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0a080;
}

/* Name overlay on photo */
.lawyer-widget__name {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 12px 28px;
    background: linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* --- Position: hidden in sidebar compact mode --- */
.lawyer-widget__position {
    display: none;
}

/* --- Bio: hidden in sidebar compact mode --- */
.lawyer-widget__bio {
    display: none;
}

/* --- Read more button: overlaid at bottom of photo --- */
.lawyer-widget__more {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: linear-gradient(0deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0) 100%);
    color: #f8f2e5;
    font-family: var(--font-main, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.25s ease;
    border: none;
    border-radius: 0;
}

.lawyer-widget__more:hover {
    background: linear-gradient(0deg, rgba(227,195,122,0.92) 0%, rgba(0,0,0,0) 100%);
    color: #1a1a2e;
}

.lawyer-widget__more svg {
    transition: transform 0.25s ease;
}

.lawyer-widget__more:hover svg {
    transform: translateX(3px);
}

/* --- Dots --- */
.lawyer-widget__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px 14px;
}

.lawyer-widget__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.lawyer-widget__dot--active {
    background: var(--color-primary, #e3c37a);
    width: 20px;
    border-radius: 4px;
}

/* =============================================
   Sidebar variant (right sidebar, 290px)
   Compact: photo fills widget, ~170px tall
   ============================================= */
.lawyer-widget--sidebar {
    margin-top: 16px;
}

.lawyer-widget--sidebar .lawyer-widget__header {
    padding: 10px 12px 8px;
}

.lawyer-widget--sidebar .lawyer-widget__title {
    font-size: 13px;
}

.lawyer-widget--sidebar .lawyer-widget__track {
    height: 170px;
}

.lawyer-widget--sidebar .lawyer-widget__card {
    height: 170px;
}

.lawyer-widget--sidebar .lawyer-widget__photo {
    height: 170px;
    flex: none;
}

.lawyer-widget--sidebar .lawyer-widget__dots {
    padding: 7px 12px 10px;
}

/* =============================================
   Inline variant (next to hero image)
   Fills full height of hero via align-items:stretch
   ============================================= */
.lawyer-widget--inline {
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.lawyer-widget--inline .lawyer-widget__header {
    flex-shrink: 0;
}

.lawyer-widget--inline .lawyer-widget__track {
    flex: 1;
    min-height: 0;
}

.lawyer-widget--inline .lawyer-widget__card {
    height: 100%;
}

.lawyer-widget--inline .lawyer-widget__photo {
    height: 100%;
}

.lawyer-widget--inline .lawyer-widget__dots {
    flex-shrink: 0;
}

.lawyer-widget--inline .lawyer-widget__name {
    font-size: 15px;
}

/* =============================================
   Responsive
   ============================================= */

/* Tablet: hide sidebar widget (sidebar hidden at 1200px) */
@media (max-width: 1200px) {
    .lawyer-widget--sidebar {
        display: none;
    }
}

/* Inline: stack on tablet */
@media (max-width: 900px) {
    .article-featured-image--with-lawyers {
        grid-template-columns: 1fr;
    }
    .article-featured-image--with-lawyers .lawyer-widget--inline {
        max-height: none;
    }
}

/* Mobile: hide inline widget below 600px for cleaner UX */
@media (max-width: 600px) {
    .article-featured-image--with-lawyers {
        grid-template-columns: 1fr;
    }
    .article-featured-image--with-lawyers .lawyer-widget--inline {
        display: block;
    }
}
