/* =========================================================
   ABOUT.CSS — Editorial / Magazine layout
   VERSION: 4.2 MOBILE FIX - OVERFLOW RESOLVED
   
   📝 OPTIMIZATIONS:
   - CSS Variables cho container padding (--container-pad)
   - Global img {max-width:100%; height:auto;}
   - prefers-reduced-motion support
   - Hero section: justify-content center thay vì margin-top
   - Overlay gradient tối ưu (ít stop hơn)
   - Mobile: Gộp padding vào .about-quality__text
   - ✅ FIX: Thêm overflow-x: hidden toàn bộ trang
   - ✅ FIX: Điều chỉnh margin âm cho full-bleed images
   
   📝 NOTES QUAN TRỌNG:
   - Mobile: Font-size TỐI THIỂU 16px (tránh auto-zoom iOS)
   - Icon: Kiểm tra FontAwesome đã load chưa
   - Responsive: 4 breakpoints (Desktop, Tablet, Mobile, Small)
   
   🎯 4 ẢNH SỬ DỤNG:
   1. Dong-lua-1.jpg (Hero - 480px desktop, 360px mobile)
   2. Nguoi-nong-dan.jpg (Quality section)
   3. Coffee.jpg (Products - full bleed)
   4. May-cay.jpg (Vision - 460px desktop, 300px mobile)
   ========================================================= */

/* =========================================================
   VARIABLES - DỄ CHỈNH SỬA MÀU SẮC & SPACING
   ========================================================= */
:root {
    --blue:     #1e5ba8;
    --blue-dk:  #15417a;
    --green:    #2e7d32;
    --gold:     #e6a817;
    --txt:      #2c2c2c;
    --txt-mid:  #4f4f4f;
    --txt-lt:   #6b6b6b;
    --bg:       #f7f8f9;
    
    /* Container padding - responsive, chỉnh 1 chỗ */
    --container-pad: 24px; /* Desktop default */
}

/* =========================================================
   GLOBAL - IMAGE & ACCESSIBILITY & OVERFLOW FIX
   ========================================================= */

/* ✅ FIX: Ngăn overflow ngang toàn bộ trang */
html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
}

.about-page {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   CONTAINER - SỬ DỤNG CSS VARIABLE
   ========================================================= */
.about-page .container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 var(--container-pad);
    overflow-x: hidden; /* ✅ FIX */
}

/* =========================================================
   LABEL - ICON TAG NHỎ
   📝 NOTE: Nếu icon không hiện, kiểm tra:
   - FontAwesome đã load? <link rel="stylesheet" href="fontawesome.css">
   - Class icon đúng? <i class="fas fa-award"></i>
   ========================================================= */
.label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--green);
    margin-bottom: 12px;
}

.label i { 
    font-size: 0.85rem;
    flex-shrink: 0; /* Ngăn icon bị co */
}

/* Label trắng dùng trên ảnh tối */
.label--white {
    color: rgba(255,255,255,0.92);
}
.label--white i { 
    color: rgba(255,255,255,0.75); 
}

/* =========================================================
   PHẦN 1: HERO SECTION - TỐI ƯU
   📝 THAY ĐỔI:
   - Dùng justify-content: center thay vì margin-top
   - Gradient đơn giản hơn (3 stop thay vì 4)
   ========================================================= */

.about-hero {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
}

.about-hero__bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

/* Gradient overlay tối ưu - giảm stop */
.about-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.15)  0%,
        rgba(0,0,0,0.50) 70%,
        rgba(0,0,0,0.70) 100%
    );
}

.about-hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* ✅ Thay vì margin-top */
    padding: 80px var(--container-pad) 40px;
    text-align: center;
    margin-top: 40px;
}

.about-hero__logo img {
    width: 140px;
    margin-bottom: 18px;
}

.about-hero__title {
    font-size: 3.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.about-hero__sub {
    font-size: 1.8rem;
    color: rgba(255,255,255,0.88);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
    font-weight: 500;
}

/* =========================================================
   PHẦN 2: GIỚI THIỆU - PLAIN TEXT
   ========================================================= */

.about-intro {
    padding: 56px 0 0;
    overflow-x: hidden; /* ✅ FIX */
}

.about-intro__text {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--txt);
    margin: 0;
    max-width: 820px;
    padding: 0 var(--container-pad); /* ✅ FIX: Thêm padding cho mobile */
}

.about-intro__text strong {
    color: var(--blue);
    font-weight: 700;
}

.about-intro__text--lead {
    color: var(--txt-mid);
    margin-top: 18px;
    font-size: 1rem;
    padding-left: 22px;
    border-left: 3px solid var(--green);
}

/* =========================================================
   PHẦN 3: CAM KẾT CHẤT LƯỢNG - ASYMMETRIC GRID
   ========================================================= */

.about-quality {
    padding: 64px 0 0;
    overflow-x: hidden; /* ✅ FIX */
}

.about-quality__grid {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 0;
    align-items: stretch;
    min-height: 420px;
    overflow-x: hidden; /* ✅ FIX */
}

/* Ảnh bleed sang trái */
.about-quality__image {
    position: relative;
    margin-left: calc(-1 * var(--container-pad));
    overflow: hidden;
}

.about-quality__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Text bên phải */
.about-quality__text {
    padding: 48px var(--container-pad) 48px 52px; /* ✅ FIX: Thêm padding trái/phải */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-quality__text h2 {
    font-size: 2.4rem;
    color: var(--blue);
    font-weight: 700;
    line-height: 1.25;
}

.about-quality__text p {
    font-size: 0.97rem;
    line-height: 1.75;
    color: var(--txt-mid);
    margin: 0 0 14px;
    margin-right: 10px;
}

.about-quality__text p:last-child { 
    margin-bottom: 0; 
}

.about-quality__text strong {
    color: var(--blue);
    font-weight: 600;
}

/* =========================================================
   PHẦN 4: SẢN PHẨM - FULL BLEED IMAGE
   ========================================================= */

.about-products {
    padding: 64px 0 0;
    overflow-x: hidden; /* ✅ FIX */
}

.about-products__visual {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}

.about-products__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Overlay tối ưu */
.about-products__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.60) 100%
    );
}

/* Chữ đè lên đáy ảnh */
.about-products__over-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 32px 36px;
    z-index: 2;
}

.about-products__over-text h2 {
    font-size: 2.4rem;
    color: #fff;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Text dưới ảnh */
.about-products__body {
    padding: 40px 0 0;
    max-width: 820px;
}

.about-products__desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--txt);
    margin: 0 0 28px;
}

.about-products__desc strong {
    color: var(--blue);
    font-weight: 700;
}

.about-products__detail {
    margin-bottom: 24px;
}

.about-products__detail:last-child {
    margin-bottom: 0;
}

.about-products__detail h3 {
    font-size: 1.25rem;
    color: var(--blue);
    font-weight: 700;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.about-products__detail h3 i {
    color: var(--green);
    font-size: 1.1rem;
}

.about-products__detail p {
    font-size: 0.97rem;
    line-height: 1.78;
    color: var(--txt-mid);
    margin: 0;
}

/* =========================================================
   PHẦN 5: TƯ VẤN - 3 CỘT
   ========================================================= */

.about-support {
    padding: 64px 0 0;
}

.about-support__title {
    font-size: 1.9rem;
    color: var(--blue);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.3;
}

.about-support__intro {
    font-size: 1.05rem;
    line-height: 1.78;
    color: var(--txt-mid);
    margin: 0 0 42px;
    max-width: 820px;
}

.about-support__cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 38px;
}

.about-support__col {
    padding-top: 26px;
    border-top: 3px solid var(--blue);
}

.about-support__col i {
    font-size: 2.1rem;
    color: var(--blue);
    margin-bottom: 16px;
    display: block;
}

.about-support__col h4 {
    font-size: 1.15rem;
    color: var(--txt);
    font-weight: 700;
    margin: 0 0 10px;
}

.about-support__col p {
    font-size: 0.97rem;
    line-height: 1.7;
    color: var(--txt-mid);
    margin: 0;
}

/* =========================================================
   PHẦN 6: VISION - CHỈ TIÊU ĐỀ TRÊN ẢNH
   ========================================================= */

.about-vision {
    padding: 64px 0 0;
    overflow-x: hidden; /* ✅ FIX */
}

.about-vision__image {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
}

.about-vision__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Overlay tối ưu */
.about-vision__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.60) 100%
    );
}

/* CHỈ TIÊU ĐỀ TRÊN ẢNH */
.about-vision__over-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 42px 36px 38px;
    z-index: 2;
}

.about-vision__over-text h2 {
    font-size: 2.4rem;
    color: #fff;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* NỘI DUNG DƯỚI ẢNH - TRONG CONTAINER */
.about-vision__content {
    padding: 40px 0 0;
}

.about-vision__text p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--txt);
    margin: 0 0 18px;
    max-width: 820px;
}

.about-vision__text p:last-child {
    margin-bottom: 0;
}

.about-vision__text strong {
    color: var(--blue);
    font-weight: 700;
}

/* 4 GIÁ TRỊ - DƯỚI ẢNH */
.about-vision__values {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding: 48px 0 0;
}

.about-vision__val {
    text-align: center;
}

.about-vision__val i {
    font-size: 2.6rem;
    color: var(--blue);
    margin-bottom: 14px;
    display: block;
}

.about-vision__val h4 {
    font-size: 1.1rem;
    color: var(--txt);
    font-weight: 700;
    margin: 0 0 8px;
}

.about-vision__val p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--txt-mid);
    margin: 0;
}

/* =========================================================
   PHẦN 7: CTA
   ========================================================= */

.about-cta {
    padding: 68px 0 80px;
    text-align: center;
}

.about-cta__title {
    font-size: 2.1rem;
    color: var(--blue);
    font-weight: 700;
    margin: 0 0 12px;
}

.about-cta__sub {
    font-size: 1.12rem;
    color: var(--txt-mid);
    margin: 0 0 32px;
}

.about-cta__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--blue);
    color: white;
}

.btn-primary:hover {
    background: var(--blue-dk);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 91, 168, 0.3);
}

.btn-zalo {
    background: linear-gradient(135deg, #0068ff, #00bcd4);
    color: white;
}

.btn-zalo:hover {
    background: linear-gradient(135deg, #0055cc, #0099aa);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.3);
}

/* =========================================================
   RESPONSIVE - TABLET (769px - 1023px)
   ========================================================= */

@media (max-width: 1023px) and (min-width: 769px) {
    .about-hero {
        height: 440px;
    }

    .about-hero__content {
        padding: 60px var(--container-pad) 40px;
    }

    .about-hero__title {
        font-size: 3rem;
    }

    .about-hero__sub {
        font-size: 1.6rem;
    }

    .about-support__cols {
        gap: 32px;
    }

    .about-support__col {
        padding-top: 22px;
    }

    .about-vision__values {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .about-vision__image { 
        height: 340px; 
    }
    
    .about-vision__over-text { 
        padding: 36px 28px 32px; 
    }
    
    .about-vision__over-text h2 { 
        font-size: 2.1rem; 
    }

    .about-vision__content {
        padding: 36px 0 0;
    }

    .about-vision__text p {
        font-size: 1rem;
    }
}

/* =========================================================
   RESPONSIVE - MOBILE (≤ 768px)
   📝 QUAN TRỌNG:
   - Font-size TỐI THIỂU 16px (tránh auto-zoom iOS)
   - Container padding từ CSS variable
   - Gộp margin rải rác vào padding của .about-quality__text
   - ✅ FIX: Không dùng margin âm, chỉ dùng trong container
   ========================================================= */

@media (max-width: 768px) {

    /* ✅ Cập nhật CSS variable cho mobile */
    :root {
        --container-pad: 20px;
    }

    /* === HERO === */
    .about-hero { 
        height: 360px;
    }

    .about-hero__content { 
        padding: 60px var(--container-pad) 40px;
    }

    .about-hero__logo img { 
        width: 110px;
        margin-bottom: 12px; 
    }

    .about-hero__title { 
        font-size: 1.75rem; /* ✅ 28px ≥ 16px */
        line-height: 1.2;
        margin-bottom: 8px;
    }

    .about-hero__sub { 
        font-size: 1.05rem; /* ✅ 16.8px ≥ 16px */
    }

    /* === INTRO === */
    .about-intro { 
        padding: 48px 0 0; 
    }

    .about-intro__text {
        font-size: 1rem; /* ✅ 16px */
        line-height: 1.75;
        padding: 0 var(--container-pad); /* ✅ Đảm bảo có padding */
    }

    .about-intro__text--lead {
        font-size: 0.97rem;
        padding-left: calc(16px + var(--container-pad)); /* ✅ Border + container pad */
        padding-right: var(--container-pad); /* ✅ Thêm padding phải */
        margin-top: 16px;
    }

    /* === QUALITY - GỘP PADDING + FIX OVERFLOW === */
    .about-quality { 
        padding: 48px 0 0; 
    }

    .about-quality__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* ✅ FIX: Không dùng margin âm trên mobile */
    .about-quality__image { 
        height: 240px;
        margin-left: 0; /* ✅ BỎ margin âm */
        margin-right: 0; /* ✅ BỎ margin âm */
        width: 100%; /* ✅ Đảm bảo không vượt quá */
    }

    /* ✅ GỘP margin-left/right vào padding thay vì hard-code nhiều nơi */
    .about-quality__text {
        padding: 28px var(--container-pad) 0; /* ✅ Dùng container-pad cho trái/phải */
    }

    .about-quality__text h2 { 
        font-size: 1.55rem; /* ✅ 24.8px */
        margin-bottom: 16px;
    }

    .about-quality__text p {
        font-size: 1rem; /* ✅ 16px - DỄ ĐỌC */
        line-height: 1.7;
        margin-bottom: 12px;
        margin-right: 0; /* ✅ Không cần margin-right riêng */
    }

    /* === PRODUCTS === */
    .about-products { 
        padding: 48px 0 0; 
    }

    .about-products__visual { 
        height: 280px;
        width: 100%; /* ✅ Đảm bảo không vượt quá */
    }

    .about-products__over-text {
        padding: 28px var(--container-pad) 24px;
    }

    .about-products__over-text h2 { 
        font-size: 1.85rem; /* ✅ 29.6px */
    }

    .about-products__body { 
        padding: 32px 0 0; 
    }

    .about-products__desc {
        font-size: 1rem; /* ✅ 16px */
        line-height: 1.75;
        margin-bottom: 24px;
    }

    .about-products__detail {
        margin-bottom: 20px;
    }

    .about-products__detail h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .about-products__detail p {
        font-size: 1rem; /* ✅ 16px */
        line-height: 1.7;
    }

    /* === SUPPORT === */
    .about-support { 
        padding: 48px 0 0; 
    }

    .about-support__title { 
        font-size: 1.6rem; 
    }

    .about-support__intro {
        font-size: 1rem; /* ✅ 16px */
        line-height: 1.7;
        margin-bottom: 32px;
    }

    .about-support__cols { 
        grid-template-columns: 1fr;
        gap: 28px; 
    }

    .about-support__col h4 {
        font-size: 1.08rem;
    }

    .about-support__col p {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    /* === VISION === */
    .about-vision { 
        padding: 48px 0 0; 
    }

    .about-vision__image { 
        height: 280px;
        width: 100%; /* ✅ Đảm bảo không vượt quá */
    }

    .about-vision__over-text {
        padding: 28px var(--container-pad) 24px;
    }

    .about-vision__over-text h2 { 
        font-size: 1.75rem; /* ✅ 28px */
    }

    .about-vision__content {
        padding: 32px 0 0;
    }

    .about-vision__text p {
        font-size: 1rem; /* ✅ 16px */
        line-height: 1.7;
        margin-bottom: 16px;
    }

    .about-vision__values {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 32px 0 0;
    }

    .about-vision__val h4 {
        font-size: 1rem; /* ✅ 16px */
    }

    .about-vision__val p {
        font-size: 0.9rem;
    }

    /* === CTA === */
    .about-cta { 
        padding: 56px 0 64px; 
    }

    .about-cta__title { 
        font-size: 1.6rem; 
    }

    .about-cta__sub {
        font-size: 1rem; /* ✅ 16px */
        margin-bottom: 24px;
    }

    .about-cta__buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px; /* ✅ Touch target ≥ 44px */
        font-size: 1rem; /* ✅ 16px */
    }
}

/* =========================================================
   RESPONSIVE - SMALL MOBILE (≤ 480px)
   ========================================================= */

@media (max-width: 480px) {

    :root {
        --container-pad: 16px;
    }

    .about-hero { 
        height: 340px; 
    }

    .about-hero__logo img { 
        width: 100px; 
    }

    .about-hero__title { 
        font-size: 1.6rem; 
    }

    .about-hero__sub {
        font-size: 1rem; /* ✅ 16px */
    }

    .about-quality__image { 
        height: 220px;
    }

    .about-quality__text h2 {
        font-size: 1.45rem;
    }

    .about-products__visual { 
        height: 260px; 
    }

    .about-products__over-text h2 { 
        font-size: 1.65rem; 
    }

    .about-vision__image { 
        height: 280px; 
    }

    .about-vision__over-text h2 { 
        font-size: 1.6rem; 
    }

    .about-vision__values {
        gap: 16px;
    }
}

/* =========================================================
   RESPONSIVE - EXTRA SMALL (≤ 400px)
   ========================================================= */

@media (max-width: 400px) {

    .about-hero { 
        height: 300px; 
    }
    
    .about-hero__title { 
        font-size: 1.5rem; 
    }
    
    .about-hero__logo img { 
        width: 90px; 
    }

    .about-quality__image { 
        height: 200px; 
    }

    .about-products__visual { 
        height: 240px; 
    }
    
    .about-products__over-text h2 { 
        font-size: 1.5rem; 
    }

    .about-vision__image { 
        height: 260px; 
    }
    
    .about-vision__over-text h2 { 
        font-size: 1.5rem; 
    }

    .about-vision__values {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =========================================================
   📝 END OF FILE - ABOUT.CSS V4.2 MOBILE OVERFLOW FIX
   
   ✅ MOBILE FIXES APPLIED:
   - [x] overflow-x: hidden trên html, body, .about-page
   - [x] overflow-x: hidden trên container
   - [x] Bỏ margin âm trên mobile cho .about-quality__image
   - [x] Thêm width: 100% cho các ảnh full-bleed
   - [x] Padding được điều chỉnh bởi container, không hard-code
   - [x] Mobile font-size ≥ 16px
   - [x] Touch targets ≥ 44px
   - [x] 4 breakpoints responsive
   
   🔧 CHỈNH SỬA NHANH:
   - Màu sắc: :root variables
   - Container padding: --container-pad variable
   - Hero height: .about-hero
   ========================================================= */