@import url('/css/hero.css');

.hero-company .hero-content { grid-column: 2; justify-self: end; text-align: right; margin-left: 0; margin-right: 30%; }
.hero-company .hero-content h1 { font-size: 56px; letter-spacing: 8px; font-weight: 400; }
.hero-company .hero-content p { color: #c4122f; font-style: italic; letter-spacing: 2px; font-weight: 400; }

.hero-company { margin-top: 60px; }
.hero-company .hero-container { gap: 24px; padding: 0 40px; height: 500px; }

.company-page { margin-top: 100px; }

.company-nav { border-top: 1px solid #eee; border-bottom: 1px solid #eee; background: #fff; }
.company-nav .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; gap: 24px; overflow-x: auto; }
.company-nav a { display: inline-block; padding: 14px 0; color: #333; text-decoration: none; font-weight: 600; }
.company-nav a:hover { color: #b4001b; }

.company-section { background: #fff; padding: 48px 0; }
.company-section .container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.company-heading { font-size: 28px; letter-spacing: 4px; color: #1a1a1a; margin-bottom: 24px; display: flex; align-items: baseline; gap: 12px; }
.company-heading span { color: #b4001b; font-size: 16px; letter-spacing: 2px; font-weight: 700; }

/* Overview */
.overview-list { display: grid; grid-template-columns: 1fr; gap: 8px; border-top: 1px solid #eee; }
.overview-list .row { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid #eee; }
.overview-list dt { color: #666; font-weight: 700; }
.overview-list dd { margin: 0; color: #1a1a1a; }

/* Message */
.message { background: #f8f9fa; border-left: 4px solid #b4001b; border-radius: 8px; padding: 24px; }
.message h3 { margin: 0 0 12px 0; color: #b4001b; font-size: 20px; }
.message p { margin: 0 0 10px 0; color: #444; line-height: 1.7; }

/* CEO message with photo */
.message-with-photo { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
.message-photo { width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.06); }
.message-photo img { width: 100%; height: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover; }
.message-body h3 { margin-top: 0; }

/* Members */
.members-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.member-card { border: 1px solid #eee; border-radius: 12px; padding: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.member-photo { width: 100%; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; margin-bottom: 10px; background: #f5f5f5; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-card .role { color: #999; font-size: 12px; margin-bottom: 4px; }
.member-card .name { color: #1a1a1a; font-weight: 700; }

/* Group photos variant (large, 2-up layout) */
.members-grid.group-photos { grid-template-columns: repeat(2, 1fr); gap: 20px; }
.group-photo-card { border: none; padding: 0; background: transparent; box-shadow: none; }
.group-photo { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #f5f5f5; box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.group-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.group-photo-card:hover .group-photo img { transform: scale(1.02); }
.group-photo-caption { margin-top: 10px; }
.group-photo-caption .title { color: #1a1a1a; font-weight: 800; letter-spacing: 0.3px; }
.group-photo-caption .subtitle { color: #888; font-size: 12px; font-weight: 600; }

/* Organizational Chart Styles - Traditional Layout */
.org-chart-container { 
    padding: 40px 20px; 
    background: #fff;
    border: 3px solid #333;
    border-radius: 8px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    /* control the continuous center line margins */
    --center-line-top: 70px;    /* increase to shorten from top */
    --center-line-bottom: 70px; /* increase to shorten from bottom */
}

/* Continuous center vertical line */
.org-chart-container::before {
    content: '';
    position: absolute;
    top: var(--center-line-top);
    bottom: var(--center-line-bottom);
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: #333;
    z-index: 0;
}

.org-chart-level { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* hide segmented vertical stubs; we use a continuous line instead */
.org-line-vertical { display: none; }

.org-chart-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 4px;
    padding: 10px 16px;
    min-width: 240px;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 1;
}

.org-chart-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.member-modal-trigger {
    cursor: pointer;
}

.org-photo {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.org-info {
    flex: 1;
    min-width: 0;
}

.org-role {
    font-size: 11px;
    color: #666;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.org-name {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
}

/* Level specific styles */
.org-level-2, .org-level-3 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.org-level-4, .org-level-5, .org-level-6 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Supervisor level offset (slightly to the right under Wakil) */
.org-level-supervisor { 
    position: relative; 
    justify-content: center; 
    /* adjust once to move Pengawas */
    --supervisor-offset: 400px; 
    /* shorten the horizontal line length from center */
    --supervisor-line-shorten: 120px;
}
.org-level-supervisor .org-chart-box { margin-left: var(--supervisor-offset); position: relative; z-index: 1; }
.org-level-supervisor .org-connector-horizontal { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translateY(-50%);
    width: calc(var(--supervisor-offset) - var(--supervisor-line-shorten));
    height: 2px; 
    background: #333; 
    z-index: 1; /* above center vertical line */
}

@media (max-width: 768px) {
    .org-level-supervisor .org-chart-box { margin-left: 0; }
    .org-level-supervisor .org-connector-horizontal { display: none; }
}

@media (max-width: 768px) {
    .company-heading { font-size: 22px; }
    .overview-list .row { grid-template-columns: 140px 1fr; }
    .message-with-photo { grid-template-columns: 1fr; }
    .members-grid.group-photos { grid-template-columns: 1fr; }
}
/* =============================
   About Us Page Styles
   ============================= */

/* About Hero Section */
.about-hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23b4001b" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.about-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-hero-text h1 {
    font-size: 48px;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
}

.about-hero-text .highlight {
    color: #b4001b;
    position: relative;
}

.about-hero-text .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #b4001b, #ff6b6b);
    border-radius: 2px;
    animation: expandWidth 1.2s ease-out 0.5s forwards;
    width: 0;
}

.about-hero-text p {
    font-size: 20px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.about-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #b4001b;
    display: block;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.about-hero-visual {
    position: relative;
    animation: fadeInRight 0.8s ease-out 0.3s backwards;
}

.hero-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hero-image-container img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-container:hover img {
    transform: scale(1.05);
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    background: rgba(180, 0, 27, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 20%;
    right: -30px;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: 40px;
    height: 40px;
    bottom: 30%;
    left: -20px;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 20px;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Story Section */
.story-section {
    padding: 80px 0;
    background: #fff;
    position: relative;
}

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 40px;
    color: #1a1a1a;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s ease-out;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #b4001b, #ff6b6b, #b4001b);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

.timeline-item:nth-child(even) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(odd) {
    animation-delay: 0.4s;
}

.timeline-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 45%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
}

.timeline-year {
    font-size: 24px;
    font-weight: 800;
    color: #b4001b;
    margin-bottom: 12px;
}

.timeline-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.timeline-description {
    color: #666;
    line-height: 1.6;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 30px;
    width: 20px;
    height: 20px;
    background: #b4001b;
    border-radius: 50%;
    transform: translateX(-50%);
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px rgba(180, 0, 27, 0.2);
    z-index: 2;
}

/* Mission & Vision Section */
.mission-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

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

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.mission-card {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mission-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #b4001b, #ff6b6b);
}

.mission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.mission-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #b4001b, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: #fff;
    animation: pulse 2s ease-in-out infinite;
}

.mission-card h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin-bottom: 16px;
    font-weight: 700;
}

.mission-card p {
    color: #666;
    line-height: 1.6;
    font-size: 16px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Team Section */
.team-section {
    padding: 80px 0;
    background: #fff;
}

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

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.team-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-image {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image img {
    transform: scale(1.1);
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(180, 0, 27, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover .team-overlay {
    opacity: 1;
}

.team-info {
    padding: 30px;
    text-align: center;
}

.team-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.team-position {
    color: #b4001b;
    font-weight: 500;
    margin-bottom: 12px;
}

.team-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Values Section */
.values-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
}

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

.values-section .section-title {
    color: #fff;
}

.values-section .section-subtitle {
    color: #ccc;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.value-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.value-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #b4001b, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: #fff;
}

.value-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

.value-description {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .about-hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 0 20px;
    }
    
    .about-hero-text h1 {
        font-size: 32px;
    }
    
    .about-hero-text p {
        font-size: 18px;
    }
    
    .about-hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .mission-grid,
    .team-grid,
    .values-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .mission-card,
    .team-card {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .about-hero-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .mission-card,
    .team-card {
        padding: 20px 16px;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

/* =============================
   Member Modal Styles
   ============================= */
.member-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.member-modal[hidden] {
    display: none;
}

.member-modal[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.member-modal__overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    border: none;
    cursor: pointer;
}

.member-modal__content {
    position: relative;
    max-width: min(600px, 90vw);
    width: 100%;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(30px) scale(0.96);
    opacity: 0;
    animation: memberModalSlideIn 260ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.member-modal[aria-hidden="true"] .member-modal__content {
    animation: memberModalSlideOut 200ms ease forwards;
}

.member-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.member-modal__close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.member-modal__close span {
    line-height: 1;
}

.member-modal__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.member-modal__figure img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.member-modal__info {
    text-align: center;
    width: 100%;
}

.member-modal__role {
    font-size: 14px;
    color: #b4001b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.member-modal__name {
    font-size: 28px;
    color: #1a1a1a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .member-modal {
        padding: 20px;
    }
    
    .member-modal__content {
        padding: 30px 20px;
        max-width: 95vw;
    }
    
    .member-modal__figure img {
        max-width: 100%;
    }
    
    .member-modal__name {
        font-size: 22px;
    }
    
    .member-modal__role {
        font-size: 12px;
    }
}

@keyframes memberModalSlideIn {
    from {
        transform: translateY(30px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes memberModalSlideOut {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(30px) scale(0.96);
        opacity: 0;
    }
}
