/**
 * DCM Site Manager - Frontend Styles
 * Matches DCM Lawyers website design
 * Brand colors: #00426d (blue), #ee8434 (orange)
 */

/* ==========================================================================
   CSS Variables & Base
   ========================================================================== */

:root {
    --dcm-blue: #00426d;
    --dcm-blue-dark: #003355;
    --dcm-orange: #ee8434;
    --dcm-text: #333333;
    --dcm-text-light: #666666;
    --dcm-grey-bg: #f6f4f2;
    --dcm-grey-text: #8a817c;
}

/* Lato font for all DCM elements */
.dcm-hero-banner,
.dcm-practice-areas-bar,
.dcm-bio-page-wrapper,
.dcm-team-grid {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}


/* ==========================================================================
   Hero Banner (Team Member Name)
   ========================================================================== */

.dcm-hero-banner {
    background: linear-gradient(180deg, rgba(0,66,109,0.85) 0%, rgba(0,66,109,0.85) 100%),
                url('https://www.dcmlawyers.com/wp-content/uploads/2022/01/profile_hero.jpg');
    background-size: cover;
    background-position: center;
    height: 475px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.dcm-hero-content {
    text-align: center;
}

.dcm-hero-banner .dcm-hero-icon {
    width: 67px;
    height: auto;
    margin-bottom: 45px;
}

.dcm-hero-banner h1 {
    font-family: 'Lato', sans-serif;
    color: #fff;
    font-size: 64px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    line-height: 1.1;
}

.dcm-hero-role {
    font-family: 'Lato', sans-serif;
    color: var(--dcm-orange);
    font-size: 18px;
    font-weight: 600;
    margin: 15px 0 0 0;
    padding: 0;
    letter-spacing: 1px;
}

@media (max-width: 991px) {
    .dcm-hero-banner h1 {
        font-size: 48px;
    }
}

@media (max-width: 767px) {
    .dcm-hero-banner {
        height: 100vh;
    }

    .dcm-hero-banner .dcm-hero-icon {
        width: 50px;
        margin-bottom: 15px;
    }

    .dcm-hero-banner h1 {
        font-size: 32px;
        letter-spacing: 1px;
    }

    .dcm-bio-header {
        padding-top: 50px;
    }
}

@media (max-width: 479px) {
    .dcm-hero-banner h1 {
        font-size: 24px;
    }
}


/* ==========================================================================
   Practice Areas Bar
   ========================================================================== */

.dcm-practice-areas-bar {
    background: #000;
    padding: 18px 0;
}

.dcm-practice-areas-bar .dcm-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
}

.dcm-practice-areas-bar .dcm-bar-label {
    font-family: 'Lato', sans-serif;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dcm-practice-areas-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px 8px;
}

.dcm-practice-areas-bar li {
    margin: 0;
    padding: 0;
}

.dcm-practice-areas-bar li::before {
    content: "|";
    color: rgba(255,255,255,0.4);
    margin-right: 8px;
}

.dcm-practice-areas-bar li:first-child::before {
    display: none;
}

.dcm-practice-areas-bar a {
    font-family: 'Lato', sans-serif;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.dcm-practice-areas-bar a:hover {
    color: var(--dcm-orange);
}

@media (max-width: 767px) {
    .dcm-practice-areas-bar .dcm-bar-inner {
        flex-direction: column;
        gap: 10px;
    }

    .dcm-practice-areas-bar ul {
        justify-content: center;
    }

    .dcm-practice-areas-bar li:first-child::before {
        display: none;
    }
}


/* ==========================================================================
   Main Container - Override Avada padding
   ========================================================================== */

.single-dcm_team_member #main,
.single-dcm_team_member .fusion-row {
    padding: 0 !important;
}

.dcm-team-single-main {
    margin-top: -60px;
}


/* ==========================================================================
   Bio Page Layout - Two Column
   ========================================================================== */

.dcm-bio-page-wrapper {
    width: 100vw;
    max-width: 1920px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
}

.dcm-bio-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
}

@media (min-width: 1600px) {
    .dcm-bio-layout {
        grid-template-columns: 320px 1fr;
    }
}

@media (max-width: 900px) {
    .dcm-bio-page-wrapper {
        padding: 0;
    }

    .dcm-bio-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
}


/* ==========================================================================
   Team Sidebar (Left Column)
   ========================================================================== */

.dcm-team-sidebar {
    background: var(--dcm-grey-bg);
    padding: 40px 30px;
    align-self: stretch;
    margin: 0;
    position: relative;
}

/* Extend sidebar background to left edge of screen */
.dcm-team-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    width: 100vw;
    background: var(--dcm-grey-bg);
}

.dcm-team-sidebar h3 {
    font-family: 'Lato', sans-serif;
    color: var(--dcm-blue);
    font-size: 24px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 20px 0;
    padding: 0;
}

.dcm-team-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dcm-team-sidebar li {
    margin: 0;
    padding: 0;
}

.dcm-team-sidebar a {
    font-family: 'Lato', sans-serif;
    display: block;
    padding: 8px 0;
    color: var(--dcm-grey-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: color 0.2s ease;
}

.dcm-team-sidebar li:last-child a {
    border-bottom: none;
}

.dcm-team-sidebar a:hover {
    color: var(--dcm-orange);
}

.dcm-team-sidebar li.current a {
    color: var(--dcm-orange);
    font-weight: 700;
}

@media (max-width: 900px) {
    .dcm-team-sidebar {
        padding: 25px 20px;
        margin: 0 -20px;
        width: calc(100% + 40px);
    }

    .dcm-team-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px 20px;
    }

    .dcm-team-sidebar a {
        border-bottom: none;
        padding: 5px 0;
    }
}


/* ==========================================================================
   Bio Content (Right Column)
   ========================================================================== */

.dcm-bio-content {
    max-width: 100%;
    padding: 40px 60px 100px 60px;
    background: #fff;
}

@media (max-width: 1200px) {
    .dcm-bio-content {
        padding: 40px 40px 100px 40px;
    }
}

@media (max-width: 900px) {
    .dcm-bio-content {
        padding: 30px 25px 80px 25px;
    }
}

@media (max-width: 600px) {
    .dcm-bio-content {
        padding: 25px 20px 60px 20px;
    }
}

/* Header section - two columns */
.dcm-bio-header {
    display: flex;
    gap: 40px;
    padding-top: 75px;
    margin-bottom: 15px;
}

.dcm-bio-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dcm-bio-photo {
    flex: 1;
    padding: 0 15px;
}

.dcm-bio-photo img {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

@media (max-width: 700px) {
    .dcm-bio-header {
        flex-direction: column-reverse;
        gap: 25px;
    }

    .dcm-bio-photo {
        max-width: 100%;
    }
}

/* Catch Phrase / Tagline */
.dcm-bio-catchphrase {
    font-family: 'Lato', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: var(--dcm-blue);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

@media (max-width: 767px) {
    .dcm-bio-catchphrase {
        font-size: 28px;
    }
}

/* Qualifications List */
.dcm-bio-qualifications {
    margin: 0 0 auto 0;
    padding: 0;
    list-style: none;
}

.dcm-bio-qualifications li {
    font-family: 'Lato', sans-serif;
    font-style: italic;
    color: var(--dcm-grey-text);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 2px;
}

/* Contact Section - pushed to bottom */
.dcm-bio-contact {
    margin-top: auto;
    padding-top: 20px;
}

.dcm-bio-contact h4 {
    font-family: 'Lato', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin: 0 0 10px 0;
}

.dcm-contact-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dcm-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dcm-text);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s ease;
}

.dcm-contact-item:hover {
    color: var(--dcm-orange);
}

.dcm-contact-icon {
    width: 18px;
    height: 18px;
    color: var(--dcm-blue);
    flex-shrink: 0;
}

/* Bio Text */
.dcm-bio-text {
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: var(--dcm-text);
    margin-top: 40px;
}

.dcm-bio-text p {
    margin: 0 0 1em 0;
}

.dcm-bio-text p:last-child {
    margin-bottom: 0;
}

/* CTA Link */
.dcm-bio-cta {
    margin-top: 25px;
}

.dcm-bio-cta a {
    font-family: 'Lato', sans-serif;
    color: var(--dcm-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.dcm-bio-cta a:hover {
    color: var(--dcm-orange);
}

.dcm-bio-cta a::after {
    content: " >";
}

/* Not Available Message */
.dcm-team-not-available {
    font-family: 'Lato', sans-serif;
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
    color: var(--dcm-text-light);
}


/* ==========================================================================
   Hide Post Meta, Featured Image Slider, etc.
   ========================================================================== */

/* Hide Avada featured image slider */
.dcm-team-bio-page .fusion-flexslider,
.dcm-team-bio-page .fusion-post-slideshow,
.dcm-team-bio-page .post-slideshow,
.single-dcm_team_member .fusion-flexslider,
.single-dcm_team_member .fusion-post-slideshow,
.single-dcm_team_member .post-slideshow {
    display: none !important;
}

/* Hide post meta */
.dcm-team-bio-page .single-post-meta,
.dcm-team-bio-page .fusion-meta-info,
.dcm-team-bio-page .fusion-single-sharing,
.dcm-team-bio-page .about-author,
.dcm-team-bio-page .related-posts,
.dcm-team-bio-page .fusion-sharing-box,
.dcm-team-bio-page .post-meta,
.dcm-team-bio-page .entry-meta,
.dcm-team-bio-page .fusion-author,
.dcm-team-bio-page .fusion-author-widget,
.dcm-team-bio-page .share-box,
.single-dcm_team_member .single-post-meta,
.single-dcm_team_member .fusion-meta-info,
.single-dcm_team_member .fusion-single-sharing,
.single-dcm_team_member .about-author,
.single-dcm_team_member .related-posts,
.single-dcm_team_member .fusion-sharing-box,
.single-dcm_team_member .fusion-author,
.single-dcm_team_member .fusion-author-widget,
.single-dcm_team_member .share-box {
    display: none !important;
}


/* ==========================================================================
   Team Grid
   ========================================================================== */

.dcm-team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px;
    margin: 0;
    padding: 0;
    font-family: 'Lato', sans-serif;
}

/* Column-based sizing using flex-basis */
.dcm-team-grid-1-col .dcm-team-grid-item { flex: 0 0 320px; max-width: 320px; }
.dcm-team-grid-2-col .dcm-team-grid-item { flex: 0 0 290px; max-width: 290px; }
.dcm-team-grid-3-col .dcm-team-grid-item { flex: 0 0 260px; max-width: 260px; }
.dcm-team-grid-4-col .dcm-team-grid-item { flex: 0 0 230px; max-width: 230px; }
.dcm-team-grid-5-col .dcm-team-grid-item { flex: 0 0 200px; max-width: 200px; }
.dcm-team-grid-6-col .dcm-team-grid-item { flex: 0 0 180px; max-width: 180px; }

.dcm-team-grid-item {
    display: flex;
}

/* Team Card - Photo with Name Overlay */
.dcm-team-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #f0f0f0;
}

.dcm-team-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.dcm-team-card-link:hover {
    text-decoration: none;
}

/* Card Photo */
.dcm-team-card-photo {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    overflow: hidden;
}

.dcm-team-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(70%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.dcm-team-card:hover .dcm-team-card-img {
    filter: saturate(100%);
    transform: scale(1.03);
}

.dcm-team-card-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
}

.dcm-team-card-placeholder .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #999;
}

/* Name Overlay */
.dcm-team-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 15px 15px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

.dcm-team-card-name {
    font-family: 'Lato', sans-serif !important;
    color: #fff !important;
    font-size: 0.85em;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.dcm-team-card-role {
    font-family: 'Lato', sans-serif !important;
    color: var(--dcm-orange) !important;
    font-size: 0.65em;
    font-weight: 500;
    margin: 2px 0 0 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Avada override for card name link color */
.fusion-body .dcm-team-card-overlay .dcm-team-card-name,
.dcm-team-card-link .dcm-team-card-name,
a .dcm-team-card-name {
    color: #fff !important;
}

.fusion-body .dcm-team-card-overlay .dcm-team-card-role,
.dcm-team-card-link .dcm-team-card-role,
a .dcm-team-card-role {
    color: var(--dcm-orange) !important;
}

/* Hover border effect */
.dcm-team-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    pointer-events: none;
}

.dcm-team-card:hover::after {
    border-color: var(--dcm-blue);
}

/* No Members Message */
.dcm-team-no-members {
    font-family: 'Lato', sans-serif;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 4px;
    color: var(--dcm-text-light);
}


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

@media (max-width: 767px) {
    .dcm-team-grid {
        gap: 20px;
    }

    .dcm-team-grid-item {
        flex: 0 0 calc(50% - 12px) !important;
        max-width: calc(50% - 12px) !important;
    }
}

@media (max-width: 500px) {
    .dcm-team-grid {
        gap: 15px;
    }

    /* Single column on small phones */
    .dcm-team-grid-item {
        flex: 0 0 100% !important;
        max-width: 280px !important;
    }

    .dcm-team-card-name {
        font-size: 0.9em;
    }

    .dcm-team-card-role {
        font-size: 0.7em;
    }
}


/* ==========================================================================
   Avada Integration Overrides
   ========================================================================== */

/* Reset Avada's aggressive link styling */
.fusion-body .dcm-team-card-link:hover,
.fusion-body .dcm-team-sidebar a:hover,
.fusion-body .dcm-contact-item:hover,
.fusion-body .dcm-practice-areas-bar a:hover {
    text-decoration: none;
}

/* Ensure our heading styles aren't overridden */
.fusion-body .dcm-hero-banner h1 {
    font-family: 'Lato', sans-serif;
    color: #fff;
    font-size: 64px;
}

.fusion-body .dcm-bio-catchphrase {
    font-family: 'Lato', sans-serif;
    font-size: 36px;
    font-weight: 900;
    color: var(--dcm-blue);
}

.fusion-body .dcm-team-sidebar h3 {
    font-family: 'Lato', sans-serif;
    color: var(--dcm-blue);
    font-size: 24px;
    font-weight: 700;
}

.fusion-body .dcm-bio-contact h4 {
    font-family: 'Lato', sans-serif;
    font-size: 24px;
    color: #000;
}

/* Remove Avada container width restrictions for our full-width elements */
.dcm-hero-banner,
.dcm-practice-areas-bar {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
