/**
 * Frontend Styles for Flatsome Team Members
 */

/* Team Members Grid */
.ftm-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.ftm-member-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ftm-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.ftm-member-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ftm-member-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.ftm-member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ftm-member-card:hover .ftm-member-image img {
    transform: scale(1.05);
}

.ftm-member-placeholder {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #ccc;
}

.ftm-member-info {
    padding: 20px;
    text-align: center;
}

.ftm-member-name {
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: rgb(139, 0, 0);
    text-transform: capitalize;
}

.ftm-member-short h5 {
    font-size: 1em;
}

.ftm-member-short  .col-inner {
    border-radius: 5px;
    padding: 10px 5px 10px 5px;
}
.ftm-member-short .ftm-member-info {
    padding: 0px;
}
.ftm-member-short .col-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}
.ftm-member-position {
    font-size: 1em;
    color: #666;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.ftm-member-rank {
    font-size: 0.9em;
    color: #888;
    margin: 0 0 10px 0;
    font-style: italic;
}

.ftm-member-excerpt {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    margin-top: 10px;
}

/* Single Member Page */
.ftm-single-member-page {
    padding: 40px 0;
    background: #f9f9f9;
    min-height: 100vh;
}

.ftm-single-member-page .ftm-member-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb Navigation */
.ftm-member-breadcrumb {
    margin-bottom: 30px;
}

.ftm-back-navigation {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    background: transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.ftm-back-navigation:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.ftm-back-navigation i {
    font-size: 0.9em;
}

/* Three Column Layout */
.ftm-member-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 30px;
    align-items: start;
}

/* Left Sidebar - Member Card */
.ftm-member-sidebar-left {
    position: sticky;
    top: 20px;
}

.ftm-member-card-main {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
}

.ftm-member-photo-wrapper {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}

.ftm-member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ftm-member-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #ddd;
    background: #f5f5f5;
}

.ftm-member-info-header {
    padding: 25px;
    text-align: center;
    background: white;
}

.ftm-member-info-header h1 {
    font-size: 1.8em;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

.ftm-member-rank {
    font-size: 0.95em;
    color: #d4a574;
    margin: 8px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ftm-member-position {
    font-size: 0.9em;
    color: #666;
    margin: 8px 0 0 0;
    line-height: 1.5;
}

/* Action Buttons */
.ftm-member-actions {
    display: flex;
    gap: 10px;
    padding: 0 25px 20px 25px;
}

.ftm-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.ftm-btn-contact {
    background: #a73434;
    color: white;
}

.ftm-btn-contact:hover {
    background: #8b2a2a;
}

.ftm-btn-share {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
}

.ftm-btn-share:hover {
    border-color: #a73434;
    color: #a73434;
}

/* Social Links */
.ftm-member-socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0 25px 25px 25px;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.ftm-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1em;
}

.ftm-social-link:hover {
    background: #a73434;
    color: white;
    transform: translateY(-3px);
}

/* Main Content Area */
.ftm-member-content-main {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.ftm-content-section {
    margin-bottom: 40px;
}

.ftm-content-section:last-child {
    margin-bottom: 0;
}

.ftm-section-title {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 3px solid #a73434;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ftm-section-title i {
    color: #a73434;
    font-size: 1.2em;
}

.ftm-content-text {
    line-height: 1.8;
    color: #555;
    font-size: 1em;
}

.ftm-content-text p {
    margin-bottom: 15px;
}

.ftm-content-text p:last-child {
    margin-bottom: 0;
}

/* Departments List */
.ftm-departments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ftm-department-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95em;
}

.ftm-department-tag i {
    color: #a73434;
}

.ftm-department-tag:hover {
    background: #a73434;
    color: white;
}

.ftm-department-tag:hover i {
    color: white;
}

/* Right Sidebar - Additional Information */
.ftm-member-sidebar-right {
    position: sticky;
    top: 20px;
}

.ftm-info-box {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.ftm-info-box-title {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
    padding-bottom: 15px;
    border-bottom: 3px solid #a73434;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ftm-info-box-title i {
    color: #a73434;
}

.ftm-info-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.ftm-info-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ftm-info-item label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: #a73434;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ftm-info-item p {
    margin: 0;
    font-size: 1em;
    color: #333;
    line-height: 1.6;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .ftm-member-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ftm-member-sidebar-left,
    .ftm-member-sidebar-right {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .ftm-single-member-page {
        padding: 20px 0;
    }
    
    .ftm-member-wrapper {
        gap: 15px;
    }
    
    .ftm-member-content-main {
        padding: 20px;
    }
    
    .ftm-member-info-header {
        padding: 20px;
    }
    
    .ftm-member-actions,
    .ftm-member-socials {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .ftm-member-info-header h1 {
        font-size: 1.5em;
    }
    
    .ftm-section-title {
        font-size: 1.3em;
    }
}

/* Archive Page */
.ftm-archive-page {
    padding: 40px 0;
}

.ftm-archive-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.ftm-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.ftm-archive-header h1 {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    color: #333;
}

.ftm-archive-description {
    font-size: 1.1em;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.ftm-department-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.ftm-filter-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-weight: 500;
}

.ftm-filter-btn:hover,
.ftm-filter-btn.active {
    background: #333;
    color: #fff;
}

.ftm-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.ftm-pagination {
    margin-top: 40px;
    text-align: center;
}

/* Organization Chart */
.ftm-org-chart-container {
    margin: 40px 0;
    padding: 20px;
    background: #faf8f3;
    border-radius: 8px;
    overflow-x: auto;
}

.ftm-org-chart {
    min-height: 400px;
}

.orgchart {
    background: transparent;
}

.orgchart .node {
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
}

.orgchart .node:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.orgchart .node a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Level 1 - Top Level (Founders/Ancestors) - Dark Red */
.ftm-node-level-1 {
    background: #8B0000 !important;
    border: 3px solid #D4AF37 !important;
    color: #fff;
}

.ftm-node-level-1 .ftm-org-name {
    color: #fff;
    font-weight: 700;
    font-size: 1.2em;
    text-transform: uppercase;
}

.ftm-node-level-1 .ftm-org-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
}

.ftm-node-level-1 .ftm-org-image {
    border: 3px solid #D4AF37;
}

/* Level 2 - Sect Masters - Yellow/Gold */
.ftm-node-level-2 {
    background: #FFD700 !important;
    border: 3px solid #D4AF37 !important;
    color: #333;
}

.ftm-node-level-2 .ftm-org-name {
    color: #333;
    font-weight: 700;
    font-size: 1.15em;
}

.ftm-node-level-2 .ftm-org-title {
    color: #555;
    font-size: 0.9em;
}

.ftm-node-level-2 .ftm-org-image {
    border: 3px solid #D4AF37;
}

/* Level 3 - Senior Masters - Dark Gray/Black */
.ftm-node-level-3 {
    background: #2C2C2C !important;
    border: 3px solid #D4AF37 !important;
    color: #fff;
}

.ftm-node-level-3 .ftm-org-name {
    color: #fff;
    font-weight: 700;
    font-size: 1.1em;
}

.ftm-node-level-3 .ftm-org-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9em;
}

.ftm-node-level-3 .ftm-org-image {
    border: 3px solid #D4AF37;
}

/* Default Level - White */
.ftm-node-level-default {
    background: #fff !important;
    border: 3px solid #D4AF37 !important;
    color: #333;
}

.ftm-node-level-default .ftm-org-name {
    color: #333;
    font-weight: 600;
    font-size: 1em;
}

.ftm-node-level-default .ftm-org-title {
    color: #666;
    font-size: 0.85em;
}

.ftm-node-level-default .ftm-org-image {
    border: 3px solid #D4AF37;
}

/* Header bar for all levels */
.ftm-org-header {
    background: #8B0000;
    padding: 10px 15px;
    margin: -15px -15px 10px -15px;
    border-bottom: 2px solid #D4AF37;
    position: relative;
}

.ftm-node-level-2 .ftm-org-header {
    background: #FF8C00;
}

.ftm-node-level-3 .ftm-org-header {
    background: #8B0000;
}

.ftm-node-level-default .ftm-org-header {
    background: #8B0000;
}

.ftm-org-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ftm-org-menu-icon {
    color: #fff;
    font-size: 1em;
    cursor: pointer;
    flex-shrink: 0;
}

.ftm-node-level-2 .ftm-org-menu-icon {
    color: #fff;
}

.ftm-org-name-header {
    font-weight: 700;
    font-size: 0.95em;
    color: #fff;
    text-transform: lowercase;
    flex: 1;
}

.ftm-node-level-2 .ftm-org-name-header {
    color: #fff;
}

.ftm-org-title-header {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.95);
    margin-left: auto;
    text-transform: capitalize;
}

.ftm-node-level-2 .ftm-org-title-header {
    color: rgba(255, 255, 255, 0.95);
}

/* Image styling */
.ftm-org-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 10px auto;
    display: block;
    border: 3px solid #D4AF37;
}

.ftm-org-image-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f0f0f0;
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ccc;
    border: 3px solid #D4AF37;
}

/* Text styling */
.ftm-org-name {
    font-weight: 600;
    font-size: 1.1em;
    margin: 10px 0 5px 0;
    text-align: center;
    padding: 0 10px;
}

.ftm-org-title {
    font-size: 0.9em;
    text-align: center;
    padding: 0 10px;
    margin-bottom: 5px;
}

.ftm-org-rank {
    font-size: 0.85em;
    text-align: center;
    padding: 0 10px;
    margin-bottom: 10px;
    font-style: italic;
    opacity: 0.8;
}

/* Level number at bottom */
.ftm-org-level-number {
    font-size: 1.2em;
    font-weight: 700;
    text-align: center;
    padding: 5px 0;
    margin-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    color: inherit;
}

.ftm-node-level-1 .ftm-org-level-number {
    color: #fff;
}

.ftm-node-level-2 .ftm-org-level-number {
    color: #333;
}

.ftm-node-level-3 .ftm-org-level-number {
    color: #fff;
}

.ftm-node-level-default .ftm-org-level-number {
    color: #333;
}

/* Node padding */
.ftm-org-node {
    padding: 15px;
    min-width: 200px;
    text-align: center;
}

/* Orgchart lines - make them gold and more visible */
.orgchart .lines .downLine,
.orgchart .lines .topLine,
.orgchart .lines .leftLine,
.orgchart .lines .rightLine {
    background-color: #D4AF37 !important;
    width: 3px !important;
    height: 3px !important;
}

/* Vertical lines (connections between parent and child) */
.orgchart .lines .downLine {
    width: 3px !important;
    background-color: #D4AF37 !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

.orgchart .lines .topLine {
    width: 3px !important;
    background-color: #D4AF37 !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

/* Horizontal lines (connections between siblings) */
.orgchart .lines .leftLine {
    height: 3px !important;
    background-color: #D4AF37 !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

.orgchart .lines .rightLine {
    height: 3px !important;
    background-color: #D4AF37 !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

/* Edge lines for version 5.0.0 */
.orgchart .edge {
    background-color: #D4AF37 !important;
    border-color: #D4AF37 !important;
}

.orgchart .edge.verticalEdge {
    width: 3px !important;
    background-color: #D4AF37 !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

.orgchart .edge.horizontalEdge {
    height: 3px !important;
    background-color: #D4AF37 !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

/* Make connection lines more prominent */
.orgchart .hierarchy::before,
.orgchart .hierarchy::after {
    background-color: #D4AF37 !important;
    border-color: #D4AF37 !important;
}

/* Nodes connection styling */
.orgchart .nodes::before,
.orgchart .nodes::after {
    background-color: #D4AF37 !important;
    border-color: #D4AF37 !important;
}

/* Ensure all connecting lines are visible */
.orgchart .node::before,
.orgchart .node::after {
    border-color: #D4AF37 !important;
}

/* Connection lines between nodes */
.orgchart ul.nodes::before {
    background-color: #D4AF37 !important;
    height: 3px !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}

.orgchart li.hierarchy::before {
    background-color: #D4AF37 !important;
    width: 3px !important;
    box-shadow: 0 0 3px rgba(212, 175, 55, 0.5);
}
.ftm-member-bio {
    padding-bottom: 20px;
}
/* Responsive */
@media (max-width: 768px) {
    .ftm-team-grid,
    .ftm-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .ftm-member-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .ftm-member-image-wrapper {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .ftm-member-header-info h1 {
        font-size: 2em;
        text-align: center;
    }
    
    .ftm-member-contact {
        justify-content: center;
    }
    
    .ftm-org-chart-container {
        padding: 10px;
    }
}

