/* ========================================
   ABOUT PAGE STYLES
   ======================================== */

/* Global Fix for Horizontal Scroll */
html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    max-width: 100%;
    /* Don't set overflow-x hidden on body as it can break sticky positioning */
}

/* Hero Section */
.about-hero-section {
    position: relative;
    min-height: 25vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 100px 0;
}

.hero-badge {
    display: inline-block;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease;
}

.text-gradient {
    background: linear-gradient(90deg, #fff, #60efff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 50px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 50px 0;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    display: inline-block;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 800;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 30px;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
    transform: rotate(45deg);
    animation: scroll 2s infinite;
    opacity: 0;
}

.scroll-indicator span:nth-child(1) { animation-delay: 0s; }
.scroll-indicator span:nth-child(2) { animation-delay: 0.2s; }
.scroll-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* Introduction Section */
.intro-section {
    padding: 150px 0 100px 0;
    background: #fff;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 30px;
    line-height: 1.2;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 30px;
}

.tech-stack {
    margin: 40px 0;
}

.tech-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 8px 16px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    color: white;
    transform: translateY(-2px);
}

.intro-actions {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.intro-media {
    position: relative;
}

.media-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: visible; /* allow floating labels to overflow nicely */
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.intro-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px; /* keep rounded corners when wrapper overflows */
}

.floating-card {
    position: absolute;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 14px;
    animation: float 3s ease-in-out infinite;
    z-index: 5; /* ensure visible above image */
}

.floating-card i {
    font-size: 20px;
    color: var(--primary-color);
}

.floating-card span{ color:#0f172a; }

.card-1 {
    top: 20%;
    left: -30px;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: -30px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: -20px;
    animation-delay: 2s;
}

/* Vision & Mission */
.vision-mission-section {
    padding: 80px 0;
    background: #f8fafc;
}

.vm-card {
    position: relative;
    padding: 40px;
    background: white;
    border-radius: 20px;
    height: 100%;
    transition: all 0.3s ease;
    overflow: hidden;
}

.vm-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.vm-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
}

.vm-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.vm-text {
    color: #64748b;
    line-height: 1.7;
}

.vm-decoration {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    opacity: 0.05;
    border-radius: 50%;
}

/* Values Section */
.values-section {
    padding: 80px 0;
    background: white;
}

.value-card {
    text-align: center;
    padding: 30px;
    border-radius: 16px;
    background: #f8fafc;
    transition: all 0.3s ease;
    height: 100%;
}

.value-card:hover {
    background: white;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

.value-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.value-card p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Services Overview */
.services-overview {
    padding: 80px 0;
    background: #f8fafc;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    background: white;
    padding: 35px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #0052d4 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 100%;
    height: 100%;
}

.service-item h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-item p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.service-link:hover {
    gap: 10px;
}

/* Timeline */
.achievements-section {
    padding: 80px 0;
    background: #f8fafc;
}

.achievement-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.ach-stat {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ach-stat i {
    font-size: 28px;
    color: var(--primary-color);
}

.ach-stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.ach-stat span {
    font-size: 0.9rem;
    color: #64748b;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color) 0%, #0052d4 100%);
}

.timeline-item {
    position: relative;
    padding-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -44px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(0, 97, 255, 0.2);
}

.timeline-year {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-content h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.timeline-content p {
    color: #64748b;
    font-size: 0.95rem;
}

/* Partners */
.partners-section {
    padding: 80px 0;
    background: white;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.3s ease;
    height: 120px;
}

.partner-logo:hover {
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.partner-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Organization Chart */
.organization-section {
    padding: 80px 0;
    background: white;
}

.org-chart {
    max-width: 1000px;
    margin: 0 auto;
}

.org-level {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    position: relative;
}

.org-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 30px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    z-index: 1; /* above connector lines */
    /* prepare for top-down reveal */
    opacity: 0;
    transform: translateY(-16px);
}

.org-box:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 97, 255, 0.15);
}

.org-box.ceo {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    color: white;
    border: none;
}

.org-box.director {
    background: #f8fafc;
    border-color: var(--primary-color);
}

.org-box.deputy {
    min-width: 180px;
}

.org-box.dept {
    min-width: 120px;
    padding: 15px;
}

.org-box.dept i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.org-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
}

.org-desc {
    font-size: 0.85rem;
    color: #64748b;
}

.org-box.ceo .org-desc {
    color: rgba(255, 255, 255, 0.9);
}

/* Top-down cascade animation when section enters view */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.organization-section.in-view .level-0 .org-box { animation: fadeInDown .55s ease forwards; animation-delay: 0s; }
.organization-section.in-view .level-1 .org-box { animation: fadeInDown .55s ease forwards; animation-delay: .15s; }
.organization-section.in-view .level-2 .org-box { animation: fadeInDown .55s ease forwards; animation-delay: .30s; }
.organization-section.in-view .level-3 .org-box { animation: fadeInDown .55s ease forwards; animation-delay: .45s; }

/* Connector lines between levels */
.organization-section{ --org-line: rgba(30,111,255,.6); --org-line-strong: rgba(30,111,255,.8); }

/* From Level 0 (HĐTV) to Level 1 (Giám đốc) */
.level-1::before{
  content:""; position:absolute; top:-22px; left:50%; transform:translateX(-50%);
  width:2px; height:22px; background:var(--org-line-strong);
}

/* Baseline above Level 2 and vertical drops to each deputy */
.level-2{ padding-top:10px; }
.level-2::before{
  content:""; position:absolute; left:40px; right:40px; top:-10px; height:2px; background:var(--org-line);
}
.level-2 .org-box::before{
  content:""; position:absolute; top:-10px; left:50%; transform:translateX(-50%);
  width:2px; height:10px; background:var(--org-line);
}

/* Baseline above Level 3 and vertical drops to each department */
.level-3{ padding-top:12px; }
.level-3::before{
  content:""; position:absolute; left:20px; right:20px; top:-12px; height:2px; background:var(--org-line);
}
.level-3 .org-box::before{
  content:""; position:absolute; top:-12px; left:50%; transform:translateX(-50%);
  width:2px; height:12px; background:var(--org-line);
}

/* Offices */
.offices-section {
    padding: 80px 0;
    background: #f8fafc;
}

.office-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
}

.office-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.office-header {
    padding: 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.office-header i {
    font-size: 24px;
}

.office-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.office-body {
    padding: 25px;
}

.office-body p {
    margin-bottom: 12px;
    color: #475569;
    display: flex;
    align-items: start;
    gap: 10px;
}

.office-body i {
    color: var(--primary-color);
    width: 20px;
    margin-top: 2px;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0052d4 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: rgba(255, 255, 255, 0.05);
    transform: rotate(35deg);
}

.cta-wrapper {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-white {
    background: white;
    color: var(--primary-color);
}

.btn-white:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.btn-outline-white {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline-white:hover {
    background: white;
    color: var(--primary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scroll {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-20px, -20px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(20px, 20px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive */
@media (max-width: 991px) {
    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .org-level {
        flex-wrap: wrap;
    }
    
    .partners-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .intro-actions {
        flex-direction: column;
    }
    
    .intro-actions .btn {
        width: 100%;
    }
    
    .floating-card {
        display: none;
    }
    
    .achievement-stats {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

