/* ========================================
   ORGANIZATION PAGE STYLES
   ======================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Hero Section */
.organization-hero {
    position: relative;
    min-height: 40vh;
    background-image: url('../../images/aptech_organization.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 140px 30px 40px 30px;
    overflow: hidden;
    margin-top: 0;
}

.organization-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.organization-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.organization-hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 25px 0;
    letter-spacing: 1px;
    line-height: 1.1;
    color: white;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

.organization-hero-content p {
    font-family: 'Pretendard', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease 0.6s forwards;
    word-break: keep-all;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sub Navigation */
.sub-navigation {
    background: white;
    width: 100%;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 100;
}

.sub-nav-container {
    display: flex;
    border-bottom: 2px solid #f1f3f4;
    position: relative;
    max-width: 800px;
    width: 100%;
    margin: 0 20px;
}

.sub-nav-item {
    flex: 1;
    padding: 20px 15px;
    text-decoration: none;
    color: #2d3436;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    white-space: nowrap;
    font-family: 'Pretendard', sans-serif;
}

.sub-nav-item:not(:first-child) {
    border-left: 1px solid #f1f3f4;
}

.sub-nav-item:hover {
    color: #6c757d;
    border-bottom-color: #f58f27;
}

.sub-nav-item.active {
    color: #6c757d;
    font-weight: 600;
    border-bottom-color: #f58f27;
}

/* Main Content Section */
.organization-content {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    position: relative;
}

.organization-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
.organization-header {
    text-align: center;
    margin-bottom: 80px;
}

.organization-label {
    color: #f58f27;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.organization-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #2d3436;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.organization-subtitle {
    font-size: 16px;
    color: #6c757d;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
    word-break: keep-all;
    font-family: 'Pretendard', sans-serif;
}

/* Organization Chart - Desktop */
.org-chart-desktop {
    max-width: 1000px;
    margin: 0 auto;
}

.org-chart-mobile {
    display: none;
}

/* CEO Section */
.ceo-section {
    text-align: center;
    margin-bottom: 100px;
    position: relative;
}

.ceo-circle {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(108, 117, 125, 0.3);
    border: 6px solid white;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.ceo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: white;
    text-align: center;
    line-height: 1.3;
}

.ceo-line {
    position: absolute;
    bottom: -75px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 75px;
    background: #ddd;
    border-radius: 1px;
}

/* Departments Grid */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px;
    position: relative;
}

.horizontal-line {
    position: absolute;
    top: -25px;
    left: 11.5%;
    right: 11.5%;
    height: 3px;
    background: #ddd;
}

.vertical-line {
    position: absolute;
    top: -25px;
    width: 3px;
    height: 100px;
    background: #ddd;
}

.dept-item {
    text-align: center;
    position: relative;
}

.dept-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 40px auto;
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    border: 6px solid white;
}

.dept-circle.orange {
    background: linear-gradient(135deg, #f58f27, #e07c24);
}

.dept-circle.gray {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.dept-circle.teal {
    background: linear-gradient(135deg, #5A7A73, #6B8A82);
}

.dept-name {
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.3;
    font-family: 'Pretendard', sans-serif;
}

.dept-name.small {
    font-size: 13px;
    line-height: 1.2;
}

.dept-card {
    background: white;
    padding: 25px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: 220px;
    display: flex;
    flex-direction: column;
}

.dept-card.orange-border {
    border-left: 4px solid #f58f27;
}

.dept-card.gray-border {
    border-left: 4px solid #6c757d;
}

.dept-card.teal-border {
    border-left: 4px solid #5A7A73;
}

.dept-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.dept-label.orange-text {
    color: #f58f27;
}

.dept-label.gray-text {
    color: #6c757d;
}

.dept-label.teal-text {
    color: #5A7A73;
}

.dept-details {
    font-size: 13px;
    color: #2d3436;
    line-height: 1.9;
    font-weight: 500;
    flex: 1;
    font-family: 'Pretendard', sans-serif;
}

/* Mobile Organization Cards */
.mobile-org-card {
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.mobile-org-header {
    color: white;
    padding: 16px 20px;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    font-family: 'Pretendard', sans-serif;
}

.mobile-org-header.orange-bg {
    background: linear-gradient(135deg, #f58f27, #e07c24);
}

.mobile-org-header.gray-bg {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.mobile-org-header.teal-bg {
    background: linear-gradient(135deg, #5A7A73, #6B8A82);
}

.mobile-org-bar {
    width: 8px;
    height: 35px;
    background: rgba(255,255,255,0.3);
    margin-right: 15px;
}

.mobile-org-body {
    padding: 20px;
    color: #2d3436;
}

.mobile-org-label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.mobile-org-label.orange-text {
    color: #f58f27;
}

.mobile-org-label.gray-text {
    color: #6c757d;
}

.mobile-org-label.teal-text {
    color: #5A7A73;
}

.mobile-org-details {
    font-size: 13px;
    line-height: 1.8;
    font-weight: 500;
    font-family: 'Pretendard', sans-serif;
}

/* Contact Section */
.contact-section {
    margin-top: 100px;
}

.contact-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #2d3436;
    margin-bottom: 50px;
    text-align: center;
}

.contact-table {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto;
}

.contact-row:first-child .contact-label {
    grid-row: span 2;
}

.contact-row:last-child .contact-label {
    grid-row: span 3;
}

.contact-label {
    color: white;
    padding: 25px 20px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #f1f3f4;
    font-family: 'Pretendard', sans-serif;
    text-align: center;
}

.contact-label.overseas {
    background: #f58f27;
}

.contact-label.domestic {
    background: #5A7C6A;
}

.contact-email {
    padding: 20px 25px;
    font-size: 14px;
    color: #2d3436;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f3f4;
    font-family: 'Pretendard', sans-serif;
}

.contact-email:last-child {
    border-bottom: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .organization-hero {
        min-height: 35vh;
        padding: 100px 20px 30px 20px;
    }
    
    .organization-hero-content h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .organization-hero-content p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Sub Navigation Mobile */
    .sub-nav-container {
        overflow: visible;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
        scroll-snap-type: none;
        justify-content: center;
        margin: 0 auto;
        max-width: 520px;
    }
    
    .sub-nav-container::-webkit-scrollbar {
        display: none;
    }
    
    .sub-nav-item {
        font-size: 14px;
        padding: 16px 8px;
        flex: 1;
        min-width: 0;
        flex-shrink: 1;
    }
    
    /* Content Mobile */
    .organization-content {
        padding: 60px 0;
    }
    
    .organization-container {
        padding: 0 20px;
    }
    
    .organization-header {
        margin-bottom: 60px;
        text-align: center;
    }
    
    .organization-label {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .organization-title {
        font-size: 42px;
        margin-bottom: 15px;
    }
    
    .organization-subtitle {
        font-size: 15px;
        max-width: 280px;
        margin: 0 auto;
        word-break: keep-all;
        line-height: 1.6;
    }
    
    /* Hide desktop chart, show mobile */
    .org-chart-desktop {
        display: none;
    }
    
    .org-chart-mobile {
        display: block;
        max-width: 800px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    /* Contact Section Mobile */
    .contact-title {
        font-size: 24px;
        margin-bottom: 40px;
    }
    
    .contact-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .contact-row:first-child .contact-label,
    .contact-row:last-child .contact-label {
        grid-row: span 1;
    }
    
    .contact-label {
        padding: 20px;
        text-align: center;
        border-right: none;
        border-bottom: 1px solid #f1f3f4;
    }
    
    .contact-email {
        padding: 15px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .sub-nav-item {
        font-size: 13px;
        padding: 14px 6px;
    }
}

@media (max-width: 360px) {
    .sub-nav-container {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        justify-content: flex-start;
    }
    
    .sub-nav-item {
        font-size: 12px;
        padding: 12px 4px;
        flex: none;
        min-width: 80px;
        flex-shrink: 0;
    }
}

/* Animation Performance Optimization */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
