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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f7f4ed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px 0;
    background: linear-gradient(135deg, #000000 0%, #ceae5b 100%);
    color: white;
    border-radius: 10px;
    margin: -20px -20px 30px -20px;
}

/* Company Banner Logo */
.company-banner {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.banner-logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.banner-logo:hover {
    transform: scale(1.02);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 15px;
    opacity: 0.9;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    font-weight: 300;
}

/* Navigation Styles */
.navigation {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    border: 2px solid white;
}

/* Main Content */
.main-content {
    margin-bottom: 30px;
}

section {
    margin-bottom: 30px;
}

h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
    font-weight: 600;
}

h4 {
    font-size: 1.4rem;
    color: #34495e;
    margin-bottom: 15px;
    font-weight: 600;
}

h5 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 500;
}

/* Company Overview */
.company-overview {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #3498db;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Leadership Section */
.leadership {
    margin-bottom: 30px;
}

.position-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.position-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.position-card.executive {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
}

.position-card.executive h4 {
    color: white;
}

.position-card.chief-officer {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
}

.position-card.chief-officer h5 {
    color: white;
}

.position-details p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.position-details strong {
    font-weight: 600;
}

/* Department Styles */
.department {
    margin-bottom: 30px;
}

/* 3-column layout for departments after Finance */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.departments-grid .department {
    margin-bottom: 0;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.department-title {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.reporting {
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 3px solid #bdc3c7;
}

/* Summary Section */
.summary {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.summary-card h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.summary-card ul {
    list-style: none;
    padding-left: 0;
}

.summary-card li {
    padding: 5px 0;
    border-bottom: 1px solid #ecf0f1;
}

.summary-card li:last-child {
    border-bottom: none;
}

.total {
    background: #3498db;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
}

.notes {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.notes h4 {
    color: #856404;
    margin-bottom: 10px;
}

.notes ul {
    list-style: none;
    padding-left: 0;
}

.notes li {
    padding: 5px 0;
    color: #856404;
}

.notes li:before {
    content: "• ";
    color: #f39c12;
    font-weight: bold;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
    border-radius: 10px;
    margin: 30px -20px -20px -20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header h2 {
        font-size: 1.4rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .position-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.6rem;
    }
    
    .header h2 {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}

/* ===========================================
   ORG CHART VISUAL DIAGRAM STYLES
   =========================================== */

/* Org Chart Specific Body Override */
body.org-chart-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f7f4ed;
    min-height: 100vh;
}

/* Org Chart Navigation */
.org-chart-nav {
    text-align: center;
    margin-bottom: 30px;
}

.org-chart-nav .nav-link {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.org-chart-nav .nav-link.active {
    background: #3498db;
    color: white;
}

.org-chart-nav .nav-link:not(.active) {
    background: #ecf0f1;
    color: #2c3e50;
}

.org-chart-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 30px;
}

.org-chart-title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.org-chart-subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.2em;
    margin-bottom: 40px;
}

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* CEO Level */
.ceo-level {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ceo-box {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 10;
}

.ceo-name {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 5px;
}

.ceo-title {
    font-size: 1em;
    opacity: 0.9;
}

/* Finance Assistant */
.finance-assistant {
    position: absolute;
    right: -250px;
    top: 50%;
    transform: translateY(-50%);
}

.finance-box {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.3);
    min-width: 200px;
    max-width: 220px;
}

.finance-name {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.finance-title {
    font-size: 0.85em;
    opacity: 0.9;
    line-height: 1.3;
}

/* Connection Lines */
.connection-line {
    position: absolute;
    background: #34495e;
    z-index: 1;
}

.ceo-to-finance {
    width: 30px;
    height: 3px;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
}

/* Departments Level */
.departments-level {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 30px;
    position: relative;
}

.department {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.department-title {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
    width: 100%;
}

.department-title.operations {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.department-title.sales-marketing {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.department-title.customer-service {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

/* Org-chart.html specific position boxes - max-width constraint */
.position-box {
    background: white;
    border: 2px solid #ecf0f1;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
    position: relative;
}

.position-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.position-name {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1em;
}

.position-title {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 3px;
}

.position-count {
    color: #7f8c8d;
    font-size: 0.85em;
    font-style: normal;
    line-height: 1.3;
    margin-top: 5px;
}

/* CEO to Departments Connection */
.ceo-to-departments {
    position: absolute;
    width: 3px;
    height: 50px;
    background: #34495e;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
}

.ceo-to-departments::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: #34495e;
    top: 0;
    left: 0;
}

.ceo-to-departments::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: #34495e;
    bottom: 0;
    left: 0;
}

/* Department to Positions Connections */
.department-connection {
    position: absolute;
    width: 3px;
    height: 25px;
    background: #34495e;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}

.department-connection::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: #34495e;
    top: 0;
    left: 0;
}

/* Chief Officer Position Boxes - CEO Color */
.position-box.chief-officer {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: 2px solid #ff6b6b;
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

.position-box.chief-officer .position-name {
    color: white;
    font-weight: bold;
}

.position-box.chief-officer .position-title {
    color: rgba(255, 255, 255, 0.9);
}

.position-box.chief-officer .position-count {
    color: rgba(255, 255, 255, 0.8);
}

/* Position Box Connections */
.position-box::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 20px;
    background: #34495e;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.position-box::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: #34495e;
    top: -20px;
    left: 0;
}

/* Org Chart Responsive Design */
@media (max-width: 1200px) {
    .finance-assistant {
        position: static;
        transform: none;
        margin-top: 20px;
        order: 2;
    }
    
    .ceo-to-finance {
        display: none;
    }
    
    .ceo-level {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .departments-level {
        flex-direction: column;
        gap: 40px;
    }
    
    .org-chart-container {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .org-chart-title {
        font-size: 2em;
    }
    
    .org-chart-subtitle {
        font-size: 1em;
    }
    
    .ceo-box {
        padding: 15px 20px;
    }
    
    .ceo-name {
        font-size: 1.2em;
    }
}

/* Org Chart Summary Section */
.org-chart-summary {
    margin-top: 50px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.org-chart-summary h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

.org-chart-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    text-align: center;
}

.org-chart-summary-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.org-chart-summary-number {
    font-weight: bold;
    font-size: 1.5em;
}

.org-chart-summary-card:has(.org-chart-summary-number.total) {
    background: #3498db;
    color: white;
}

.org-chart-summary-card:has(.org-chart-summary-number.total) .org-chart-summary-label {
    color: rgba(255, 255, 255, 0.9);
}

.org-chart-summary-number.total {
    color: white;
}

.org-chart-summary-number.sales {
    color: #f39c12;
}

.org-chart-summary-number.operations {
    color: #e74c3c;
}

.org-chart-summary-number.customer-service {
    color: #9b59b6;
}

.org-chart-summary-label {
    color: #7f8c8d;
}

