/* ============================
   About Page - Timeline Styles
   ============================ */

/* Tổng quan nền tối cho phần About */
#main-about {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 60px 20px;
    overflow-x: hidden;
}

.timeline-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    padding: 40px 0;
}

/* Đường thẳng ở giữa */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%; /* Trục cắm thẳng ở giữa */
    transform: translateX(-50%);
    width: 2px;
    background-color: #4a4a6a;
}

/* Mỗi item trên dòng thời gian */
.timeline-item {
    position: relative;
    margin-bottom: 50px;
    width: 50%; /* Moi item chieu rong nua man hang */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-in-out;
}

/* Item lẻ (1, 3, 5..) -> Nằm bên phải */
.timeline-item:nth-child(odd) {
    left: 50%;
    padding-left: 60px;
}

/* Item chẵn (2, 4, 6..) -> Nằm bên trái */
.timeline-item:nth-child(even) {
    left: 0;
    padding-right: 60px;
    text-align: right; /* Text bên trái thì căn lề phải cho áp sát trục giữa */
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nội dung công việc */
.timeline-content {
    background-color: transparent;
    border-left: none;
    position: relative;
}

/* Đường gạch ngang nối từ vòng tròn vào nội dung - Item Lẻ (bên Phải) */
.timeline-item:nth-child(odd) .timeline-content::before {
    content: '';
    position: absolute;
    top: 40px; /* Bằng một nửa chiều cao vòng tròn */
    left: -60px; /* Đâm ngược về bên trái tới trục */
    width: 40px;
    height: 2px;
    background-color: #ffd700; /* Màu vàng */
}

/* Đường gạch ngang nối từ vòng tròn vào nội dung - Item Chẵn (bên Trái) */
.timeline-item:nth-child(even) .timeline-content::before {
    content: '';
    position: absolute;
    top: 40px;
    right: -60px; /* Đâm ngược về bên phải tới trục */
    width: 40px;
    height: 2px;
    background-color: #ffd700;
}


/* Vòng tròn hiển thị năm */
.timeline-year {
    position: absolute;
    top: 0;
    width: 80px;
    height: 80px;
    background-color: #3b3b55;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1em;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Căn chỉnh lại vòng tròn cho Item lẻ (nằm phía bên phải của trục) */
.timeline-item:nth-child(odd) .timeline-year {
    left: -40px; /* Kéo vòng tròn lùi lại 40px để tâm vòng tròn trùng trục giữa */
}

/* Căn chỉnh lại vòng tròn cho Item chẵn (nằm phía bên trái của trục) */
.timeline-item:nth-child(even) .timeline-year {
    right: -40px; /* Kéo vòng tròn chòi qua phải 40px để tâm trùng trục giữa */
}


.timeline-title {
    color: #ffffff;
    font-size: 1.8em;
    font-weight: 800;
    margin-bottom: 5px;
}

.timeline-org {
    color: #a0a0c0;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timeline-desc {
    color: #b0b0b0;
    line-height: 1.6;
    font-size: 1em;
}

/* Desktop tweak: keep 2-column timeline, widen and right-align even items */
@media screen and (min-width: 769px) {
    .timeline-item:nth-child(even) {
        left: -6%;
        width: 56%;
        padding-right: 60px;
        padding-left: 0;
        text-align: right;
    }

    .timeline-item:nth-child(even) .timeline-content {
        margin-left: auto;
    }

    .timeline-item:nth-child(even) .timeline-title,
    .timeline-item:nth-child(even) .timeline-org,
    .timeline-item:nth-child(even) .timeline-desc {
        text-align: right;
    }
}

/* ============================
   About Page - Donation Modal Styles
   ============================ */
#donation-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 20px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease-in-out;
}

#donation-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.donation-modal-content {
    background: #242943;
    border: 1px solid rgba(212, 212, 255, 0.1);
    border-radius: 8px;
    padding: 2.5em 2em;
    max-width: 650px;
    width: 95%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    text-align: center;
    position: relative;
    margin: auto;
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#donation-modal-overlay.show .donation-modal-content {
    transform: scale(1);
}

.donation-modal-title {
    color: #ffffff;
    margin-bottom: 1.5em;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.donation-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3em;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 1em;
}

.donation-column {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.donation-group {
    margin-bottom: 1.5em;
    width: 100%;
}

.donation-group h4 {
    color: #ffd700;
    margin-bottom: 0.8em;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.qr-container {
    background: #fff;
    padding: 0;
    border-radius: 12px;
    display: inline-block;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    transition: transform 0.2s ease;
    overflow: hidden;
}

.qr-container:hover {
    transform: scale(1.02);
}

.qr-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.donation-modal-actions {
    border-top: 1px solid rgba(212, 212, 255, 0.1);
    padding-top: 1.5em;
    display: flex;
    justify-content: center;
}

.donation-modal-actions .button {
    min-width: 150px;
}

/* Light Theme Adjustments for Modal */
body.light-theme #donation-modal-overlay {
    background: rgba(255, 255, 255, 0.7);
}

body.light-theme .donation-modal-content {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

body.light-theme .donation-modal-title {
    color: #242943;
}

body.light-theme .donation-modal-subtitle {
    color: #444;
}

body.light-theme .donation-group h4 {
    color: #e44d26;
}

body.light-theme .donation-modal-actions {
    border-top-color: #e0e0e0;
}

/* QR Zoom Overlay */
#qr-zoom-overlay {
    display: flex;
    position: fixed;
    z-index: 10000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
}

#qr-zoom-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#qr-zoom-img {
    margin: auto;
    display: block;
    width: auto;
    max-width: 80%;
    max-height: 80%;
    animation-name: zoom;
    animation-duration: 0.3s;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255,255,255,0.1);
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.qr-zoom-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.qr-zoom-close:hover,
.qr-zoom-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media screen and (max-width: 480px) {
    .donation-modal-content {
        padding: 1.5em 1em;
    }

    .donation-options {
        flex-direction: column;
        gap: 1.5em;
    }
    
    .donation-column {
        min-width: 100%;
    }

    .qr-container {
        width: 220px;
        height: 220px;
    }

    .donation-modal-actions .button {
        width: 100%;
    }
}
/* Responsive cho màn hình nhỏ - Trở về thẳng hàng */
@media screen and (max-width: 768px) {
    .timeline-container::before {
        left: 40px;
        transform: none;
    }
    
    .timeline-item {
        width: 100%;
        margin-bottom: 30px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 100px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-year,
    .timeline-item:nth-child(even) .timeline-year {
        left: 0;
        right: auto;
    }

    /* Ẩn gạch vàng ngang lúc xài mobile */
    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
         display: none;
    }
}

/* Fade-up animation khi scroll tới */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-in-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   About Page - Download Portfolio Modal Styles
   ============================ */
#portfolio-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease-in-out;
}

#portfolio-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.portfolio-modal-content {
    background: #242943;
    border: 1px solid rgba(212, 212, 255, 0.1);
    border-radius: 8px;
    padding: 2.5em 2em;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#portfolio-modal-overlay.show .portfolio-modal-content {
    transform: scale(1);
}

.portfolio-modal-title {
    color: #ffffff;
    margin-bottom: 0.5em;
    font-size: 1.5em;
    font-weight: 600;
    text-align: center;
}

.portfolio-modal-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9em;
    margin-bottom: 2em;
    text-align: center;
}

#portfolio-password {
    width: 100%;
    padding: 0 1em;
    height: 2.75em;
    border: 2px solid rgba(212, 212, 255, 0.1);
    border-radius: 4px;
    background: rgba(212, 212, 255, 0.05);
    color: #fff;
    font-size: 1em;
    margin-bottom: 0.5em;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

#portfolio-password:focus {
    border-color: #9bf1ff;
    background: rgba(212, 212, 255, 0.08);
}

#portfolio-error {
    color: #ff6b6b;
    font-size: 0.85em;
    margin-bottom: 1.5em;
    min-height: 1.2em;
    text-align: left;
    padding-left: 5px;
}

.portfolio-modal-actions {
    display: flex;
    gap: 1em;
    justify-content: space-between;
}

.portfolio-modal-actions .button {
    flex: 1; /* Chia đều không gian cho 2 nút */
    min-width: 10px; /* Bỏ giới hạn min-width mặc định của theme */
    padding: 0 1em;
    height: 3em;
    line-height: 3em;
    font-size: 0.8em;
    letter-spacing: 0.15em;
    margin: 0;
    text-align: center;
}

/* Responsive cho màn hình điện thoại, xếp 2 nút nằm dọc */
@media screen and (max-width: 480px) {
    .portfolio-modal-actions {
        flex-direction: column;
        gap: 0.8em;
    }
    
    .portfolio-modal-actions .button {
        width: 100%;
    }
}

/* ============================
   About Page - Extra Sections
   ============================ */

.header-full-width {
    width: 100% !important;
    max-width: 100% !important;
}

.section-subtitle {
    text-align: center;
    margin-top: 0.2em;
    margin-bottom: 2.5em;
    color: var(--text-muted);
    font-size: 1.15em;
    line-height: 1.6;
    white-space: normal !important;
    display: block;
    max-width: 100%;
    word-wrap: break-word;
}

.section-divider {
    margin-top: 1.5em; 
    margin-bottom: 1.5em;
    border: 0;
    border-bottom: 2px solid var(--border-color);
}

.section-icon {
    font-size: 0.8em; 
    margin-right: 15px;
}

.ask-me-list {
    list-style-type: disc; 
    margin-left: 20px;
}

.ask-me-list li {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-main);
}

.ask-me-list li strong {
    font-weight: 600;
}

.support-section-left {
    text-align: left; 
    margin-top: 1.5em; 
}

.support-title {
    margin-bottom: 0.8em;
}

.support-item {
    display: flex; 
    align-items: center; 
}

/* Google Ads */
.support-ads {
    margin-top: 28px;
    display: block;
    max-width: 760px;
}

.support-ads-label {
    display: block;
    font-size: 1.05em;
    margin-bottom: 10px;
    color: var(--text-main);
}

/* Responsive Extra Sections */
@media screen and (max-width: 768px) {
    .section-divider {
        margin-top: 2em; 
        margin-bottom: 2em;
    }
    
    .ask-me-list {
        margin-left: 15px;
    }
    
    .ask-me-list li {
        margin-bottom: 10px;
        font-size: 0.95em;
    }

    .support-section-left {
        margin-bottom: 1.5em; 
    }
}

/* ============================
   About Page - Core Values (Field of Activity)
   ============================ */
.core-values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 2em;
    margin-bottom: 2em;
}

.core-value-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
}

.core-value-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.core-value-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.core-value-card .card-icon {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffd700;
    transition: transform 0.3s ease;
}

.core-value-card:hover .card-icon {
    transform: scale(1.1);
}

.core-value-card .card-title {
    color: #ffffff;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.core-value-card .card-description {
    color: #b0b0b0;
    line-height: 1.6;
    font-size: 0.95em;
    margin-bottom: 0;
}

/* Light Theme Adjustments */
body.light-theme .core-value-card {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .core-value-card:hover {
    background: #fdfdfd;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.light-theme .core-value-card .card-title {
    color: #242943;
}

body.light-theme .core-value-card .card-description {
    color: #666;
}

.field-contact-wrapper {
    text-align: center;
    margin-top: 1em;
    margin-bottom: 3.5em;
    font-size: 1.15em;
    color: #e0e0e0;
}

.field-contact-wrapper a.field-contact-link {
    color: #ffd700;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 2px solid #ffd700;
    transition: all 0.3s ease;
    display: inline-block;
    padding-bottom: 2px;
}

.field-contact-wrapper a.field-contact-link:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
    padding-left: 5px;
    padding-right: 5px;
}

/* Light Theme Adjustments for Global Contact Link */
body.light-theme .field-contact-wrapper {
    color: #444;
}

body.light-theme .field-contact-wrapper a.field-contact-link {
    color: #e44d26;
    border-bottom-color: #e44d26;
}

body.light-theme .field-contact-wrapper a.field-contact-link:hover {
    color: #242943;
    border-bottom-color: #242943;
}
