/* ===================================
   ABOUT SECTION STYLES
   ===================================
   About section with tabs and content
*/

.about {
    padding: 0px 50px 100px 50px;
    text-align: center;
    background: #0a0a0a;
    position: relative;
    /* Không set height ở đây - sẽ set riêng cho desktop */
}

.about-header {
    position: relative;
    width: 100vw; /* Full viewport width */
    height: 100vh;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    /* min-height: 400px; */
    border-radius: 0; /* Remove border radius for full width */
    overflow: hidden; /* Enable to prevent image overflow */
}

.about-header img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-position: center;
    z-index: -1;
    opacity: 0.9;
    min-width: 100%; 
    min-height: 100%;
}
/* Desktop styles - chỉ áp dụng height cho desktop */

.about h2 {
    /* font-family: 'Orbitron', sans-serif; */
    font-size: 48px;
    color: #ffd700;
    margin-bottom: 40px;
}

.about .logo-large {
    /* height: 120px; */
    margin-bottom: 50px;
    max-width: 100%;
}

/* Tabs Container */
.about .tabs {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    position: relative;
    padding-top: 200px;
}

/* Individual Tab */
.about .tab {
    display: none;
    position: relative;
    cursor: pointer;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #6b7280;
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
}

/* .about .tab.active {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-5px);
} */

.about .tab.active {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
}

.about .tab:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    transform: translateY(-5px);
}

.about .tab span {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

.tab-contents {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Desktop Tab Content */
.about .tab-content {
    /* position: absolute; */
    display: none;
    position: static;
    top: 100%;
    left: 50%;
    /* transform: translateX(-50%); */
    width: 650px;
    max-width: 80vw;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 30px;
    display: none;
    z-index: 1000;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

 
.about .tab-content.active {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.about .tab-content h3 {
    /* font-family: 'Orbitron', sans-serif; */
    font-size: 24px;
    color: #ffd700;
    margin-bottom: 20px;
}

.about .tab-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #e5e5e5;
    margin-bottom: 15px;
    text-align: left;
}

.about .tab-content h4 {
    font-size: 18px;
    color: #ffd700;
    margin: 20px 0 10px 0;
    text-align: left;
}

/* Core Values Grid */
.about .core-values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.about .core-values-grid > div {
    text-align: left;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
}

/* Philosophy Rows */
.about .philosophy-rows {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.about .philosophy-rows > div {
    text-align: left;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #ffd700;
}

/* Mobile Tab Content Area */
.mobile-tab-content {
    display: none;
    margin-top: 30px;
    padding: 25px;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid #ffd700;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* Mobile About Styles */
@media (max-width: 768px) {
    .about {
        position: relative;
    }
}
/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .about {
        padding: 80px 30px;
        padding-top: 0px;
    }
    
    .about h2 {
        font-size: 40px;
        margin-bottom: 30px;
    }
    
    .about .logo-large {
        height: 100px;
        margin-bottom: 40px;
    }

    .about .tabs {
        gap: 20px;
        justify-content: center;
    }
    
    .about .tab {
        padding: 12px 20px;
        min-width: 130px;
    }
    
    .about .tab span {
        font-size: 16px;
        /* padding: 8px 15px; */
        padding: 0px 10px
    }
    
    /* Desktop hover behavior disabled on tablet */
    .about .tab:hover .tab-content {
        display: none;
    }
    
    /* Tab content moved below tabs */
    .about .tab-content {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 20px 0 0 0;
        left: auto;
        top: auto;
        display: none;
    }
    
    .about .tab-content {
        display: block;
        animation: fadeInDown 0.3s ease;
    }
    
    .mobile-tab-content {
        display: block;
    }
    
    .about .tab-content h3 {
        font-size: 22px;
        margin-bottom: 18px;
        text-align: center;
    }
    
    .about .tab-content p {
        font-size: 15px;
    }
    
    .about .core-values-grid {
        gap: 15px;
    }
    
    .about .core-values-grid > div {
        padding: 12px;
    }
    
    .about .philosophy-rows > div {
        padding: 18px;
    }

    .about-header img {
        height: 100%;
        width: 100%;
        object-fit: cover; /* Ensure the image covers the entire header */
        object-position: center; /* Center the image */
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .about {
        padding: 60px 20px;
        padding-top: 0px;
    }
    
    .about h2 {
        font-size: 32px;
        margin-bottom: 25px;
    }
    
    .about .logo-large {
        height: 80px;
        margin-bottom: 30px;
    }
    
    .about .tabs {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .about .tab {
        width: 100%;
        max-width: 300px;
        padding: 15px 20px;
        min-width: auto;
    }
    
    .about .tab span {
        font-size: 16px;
    }
    
    /* Disable desktop hover completely */
    .about .tab:hover .tab-content {
        display: none !important;
    }
    
    /* Mobile tab content in separate container */
    .about .tab-content {
        display: none !important;
    }
    
    .mobile-tab-content {
        display: block;
        margin-top: 20px;
        padding: 20px;
        min-height: 200px;
    }
    
    .mobile-tab-content.active {
        animation: fadeInDown 0.3s ease;
    }
    
    .mobile-tab-content h3 {
        /* font-family: 'Orbitron', sans-serif; */
        font-size: 20px;
        color: #ffd700;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .mobile-tab-content p {
        font-size: 14px;
        line-height: 1.5;
        color: #e5e5e5;
        margin-bottom: 12px;
        text-align: left;
    }
    
    .mobile-tab-content h4 {
        font-size: 16px;
        color: #ffd700;
        margin: 15px 0 8px 0;
        text-align: left;
    }
    
    .about .core-values-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .about .core-values-grid > div {
        padding: 15px;
        text-align: center;
    }
    
    .about .philosophy-rows > div {
        padding: 15px;
        text-align: center;
    }
     .about-header img {
        height: 100%;
        width: 100%;
        object-fit: cover; /* Ensure the image covers the entire header */
        object-position: center; /* Center the image */
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .about {
        
        padding: 50px 15px;
        padding-top: 0px;
    }
    
    .about h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .about .logo-large {
        height: 70px;
        margin-bottom: 25px;
    }
    
    .about .tab {
        max-width: 280px;
        padding: 12px 18px;
    }
    
    .about .tab span {
        font-size: 15px;
    }
    
    .mobile-tab-content {
        padding: 18px 15px;
        border-radius: 10px;
    }
    
    .mobile-tab-content h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .mobile-tab-content p {
        font-size: 13px;
    }
    
    .mobile-tab-content h4 {
        font-size: 15px;
    }
    
    .about .core-values-grid > div,
    .about .philosophy-rows > div {
        padding: 12px;
    }
}

/* Very Small Mobile */
@media (max-width: 360px) {
    .about {
        padding: 40px 12px;
        padding-top: 0px;
    }
    
    .about h2 {
        font-size: 24px;
    }
    
    .about .logo-large {
        height: 60px;
    }
    
    .about .tab {
        max-width: 250px;
        padding: 10px 15px;
    }
    
    .about .tab span {
        font-size: 14px;
    }
    
    .mobile-tab-content {
        padding: 15px 12px;
    }
    
    .mobile-tab-content h3 {
        font-size: 16px;
    }
    
    .mobile-tab-content p {
        font-size: 12px;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .about .tab {
        padding: 18px 25px;
    }
    
    .about .tab:hover {
        transform: none;
    }
    
    .about .tab:hover .tab-content {
        display: none !important;
    }
    
    .about .tab.active{
        background: rgba(255, 215, 0, 0.15);
        transform: scale(0.98);
    }
}

/* ===================================
   TAB CONTENT AUTO REVEAL ON SCROLL
   ===================================
*/

/* New container for all tab contents when revealed */
.all-tab-contents {
    display: none;
    margin-top: 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.all-tab-contents.revealed {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: smoothReveal 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.all-tab-contents .tab-content {
    display: block !important;
    position: static !important;
    transform: translateY(20px) !important;
    opacity: 0 !important;
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto 30px auto !important;
    left: auto !important;
    top: auto !important;
    z-index: auto !important;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.all-tab-contents.revealed .tab-content {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.all-tab-contents .tab-content:nth-child(1) {
    transition-delay: 0.1s !important;
}

.all-tab-contents .tab-content:nth-child(2) {
    transition-delay: 0.3s !important;
}

.all-tab-contents .tab-content:nth-child(3) {
    transition-delay: 0.5s !important;
}

.all-tab-contents .tab-content:last-child {
    margin-bottom: 0 !important;
}

/* Hide original tab contents when all are revealed */
.tab-contents.all-revealed .tab-content {
    display: none !important;
}

/* Visual indicator that content has been revealed */
.tabs.all-revealed .tab {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.4s ease;
}

.tabs.all-revealed .tab span {
    color: rgba(255, 255, 255, 0.7);
}

/* Smooth reveal animation */
@keyframes smoothReveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    50% {
        opacity: 0.7;
        transform: translateY(10px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced fadeInUp animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile adjustments for revealed content */
@media (max-width: 768px) {
    .all-tab-contents {
        margin-top: 30px;
        transform: translateY(20px);
    }
    
    .all-tab-contents .tab-content {
        max-width: 100% !important;
        padding: 20px !important;
        margin-bottom: 20px !important;
        transform: translateY(15px) !important;
    }
    
    .all-tab-contents .tab-content h3 {
        font-size: 20px !important;
    }
    
    .all-tab-contents .tab-content p {
        font-size: 14px !important;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .all-tab-contents {
        margin-top: 20px;
        transform: translateY(15px);
    }
    
    .all-tab-contents .tab-content {
        padding: 15px !important;
        border-radius: 10px !important;
        transform: translateY(10px) !important;
    }
    
    .all-tab-contents .tab-content h3 {
        font-size: 18px !important;
    }
    
    .all-tab-contents .tab-content:nth-child(1) {
        transition-delay: 0.05s !important;
    }
    
    .all-tab-contents .tab-content:nth-child(2) {
        transition-delay: 0.15s !important;
    }
    
    .all-tab-contents .tab-content:nth-child(3) {
        transition-delay: 0.25s !important;
    }
}

.about-header-name {
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 5.5rem;
    text-align: left;
    z-index: 1;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    letter-spacing: 1px;
    margin: 0;
    padding: 0 20px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
}

.about-header-name .line-1 {
    display: block;
}

.about-header-name .line-2 {
    display: block;
}

/* Color styling for specific words */
.about-header-name .vietnam {
    color: #0072c6;
}

.about-header-name .center {
    color: #FFFFFF;
}

.about-header-name .of {
    color: #FFFFFF;
}

.about-header-name .robotics {
    color: #2C2C2C;
}

.about-header-name .excellence {
    color: #F7C600;
}

/* Responsive font sizing */
@media (max-width: 1200px) {
    .about-header-name {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .about-header-name {
        font-size: 2.5rem;
        padding: 0 15px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .about-header-name {
        font-size: 1.8rem;
        padding: 0 10px;
        letter-spacing: 0px;
        line-height: 1.3;
    }
}

@media (max-width: 360px) {
    .about-header-name {
        font-size: 1.5rem;
        padding: 0 8px;
    }
}

