@charset "utf-8";

.ksms-org-wrapper {
    max-width: 100%; /* Full width to allow internal container to define scroll */
    margin: 0 auto;
    padding: 60px 20px 100px; /* Reduced side padding to prevent PC scroll */
    font-family: 'Pretendard', sans-serif;
    color: #111;
    overflow-x: auto; /* Allow horizontal scroll if needed */
    -webkit-overflow-scrolling: touch;
}

.org-header {
    text-align: center;
    margin-bottom: 80px;
    padding: 0 20px;
}

.org-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #000;
}

.org-subtitle {
    font-size: 16px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Mobile Image (Default Hidden) */
.mobile-org-img {
    display: none;
    width: 100%;
    height: auto;
}

/* Tree Container - Min width ensures layout holds shape */
.org-chart-tree {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px; /* Constrain max width to prevent sprawl */
    padding-bottom: 50px;
    margin: 0 auto;
}

/* SVG Overlay */
#org-lines-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Nodes - "About" Style */
.org-node {
    background: #ffffff;
    /* Clean rounded shape */
    border-radius: 32px; 
    padding: 18px 30px; /* Compact padding */
    text-align: center;
    font-weight: 700;
    font-size: 17px; /* Slightly smaller font */
    color: #000;
    /* Deep Shadow from About */
    box-shadow: 0 10px 40px rgba(0, 57, 127, 0.08), 0 0 1px rgba(0,0,0,0.05);
    border: none;
    position: relative;
    z-index: 2;
    min-width: 150px; /* Reduced min-width */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.org-node:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 57, 127, 0.12);
}

/* Distinct Roles via Text Color or slight bg */
.role-exec {
    color: #00397f; /* KSMS Blue */
}

.role-oversight {
    color: #000; /* Muted Black */
}

/* Layout Grid System */

/* Level 1: President */
.level-1 {
    margin-bottom: 80px; 
}

/* Level 2: Left / Center / Right */
.level-2-wrapper {
    display: flex;
    justify-content: center;
    gap: 100px; /* Increased gap to spread columns evenly and provide space */
    align-items: flex-start;
}

.col-left, .col-right, .col-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.col-left { gap: 30px; }
.col-right { transform: translateX(50px); } /* Push Board slightly right on PC */

/* Center Column Logic */
.col-center {
    gap: 80px; /* Separates the VP and Secretariat since mid-spacer is above VP */
}

/* Spacer for Committees */
.mid-spacer {
    height: 220px; /* Vertical space for lines and committees */
    position: relative;
    width: 2px; /* Visual center helper */
    /* background: red; debug */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Committee List Style */
.committee-list {
    position: absolute;
    left: 40px; /* Offset to the right of the center line */
    background: #fff;
    border-radius: 16px;
    /* box-shadow: 0 5px 20px rgba(0,0,0,0.05); */ /* Optional container shadow */
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 160px;
    z-index: 2;
}

.comm-item {
    font-size: 15px;
    color: #444;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 50px; /* Pill */
    font-weight: 500;
    text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .org-header {
        margin-bottom: 40px; /* Reduce title margin */
    }

    /* 1. Show the HTML Tree and let JS scale it */
    .org-chart-tree {
        display: flex !important;
        width: 900px !important;
        min-width: 900px !important;
        margin: 0 auto !important;
        padding-bottom: 0 !important;
    }

    /* 2. Hide Mobile Image Fallback */
    .mobile-org-img {
        display: none !important;
    }

    /* 3. Wrapper ensures no horizontal scroll on mobile */
    .ksms-org-wrapper {
        padding: 40px 0 0 !important; 
        overflow: hidden !important; 
        width: 100% !important;
        /* Height is dynamically set by JS */
    }

    /* 4. Pull left column (Advisory) slightly to the right */
    .col-left {
        transform: translateX(40px) !important;
    }

    /* 5. Reset right column (Board) to default on mobile */
    .col-right {
        transform: none !important;
    }
}