/* ==================== CERTIFICATIONS ==================== */
.certifications {
    margin: 60px 0;
}

.certifications h2 {
    color: var(--primary-color);
    font-size: clamp(1.8rem, 4.5vw, 2.4rem); /* To hơn, fluid */
    text-align: center;
    margin-bottom: 50px;
}

.cert-detailed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.cert-detailed-item {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.cert-detailed-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.cert-detailed-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.cert-detailed-item h3 {
    color: var(--primary-color);
    font-size: clamp(1.3rem, 3.2vw, 1.6rem); /* To hơn */
    margin-bottom: 10px;
    font-weight: 600;
}

.cert-detailed-item p {
    color: var(--text-light);
    font-size: clamp(1rem, 2.5vw, 1.2rem); /* To hơn */
    line-height: 1.6;
}

/* Certification Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    align-items: start; /* Giúp các ảnh đứng cạnh nhau không bị kéo dãn */
}

.cert-item {
    background: #ffffff;
    padding: 15px; /* Tăng padding cho dễ đọc */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eef2ed;
    display: flex;
    flex-direction: column;
}

.cert-img-wrapper {
    width: 100%;
    height: auto;
    max-height: none; 
    overflow: hidden;
    border-radius: 4px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
}

.cert-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.cert-item p {
    margin-top: 15px;
    font-size: clamp(1.1rem, 2.8vw, 1.3rem); /* To hơn rõ rệt */
    line-height: 1.5;
    font-weight: 600;
    color: #2d5a27;
    text-align: center;
    padding: 0 10px;
    min-height: auto;
}

.cert-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(45, 90, 39, 0.15);
}

.cert-item:hover img {
    transform: scale(1.03);
}

/* Certifications Preview */
.certifications-preview {
    margin-top: 60px;
}

.certifications-preview h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
    font-size: clamp(1.8rem, 4.5vw, 2.4rem);
}

.cert-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.cert-feature-col h3 {
    color: var(--primary-color);
    font-size: clamp(1.4rem, 3.5vw, 1.7rem);
    margin-bottom: 30px;
    text-align: center;
}

.cert-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.cert-preview-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.cert-preview-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.cert-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.cert-preview-item p {
    color: var(--primary-color);
    font-weight: 600;
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
    margin: 0;
}

/* Trang trí nền cho bớt trống */
.bg-glow {
    position: fixed;
    top: 20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(45, 90, 39, 0.05) 0%, transparent 70%);
    z-index: -1;
}

.page-title {
    font-size: clamp(2.4rem, 6vw, 3.2rem); /* To hơn */
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
}

.legal-intro {
    max-width: 800px;
    margin: 20px auto 60px;
    text-align: center;
    line-height: 1.8;
    color: var(--text-light);
    font-style: italic;
    font-size: clamp(1.3rem, 3.5vw, 1.6rem); /* To hơn */
}

.section-badge {
    font-size: clamp(1rem, 2.5vw, 1.3rem); /* To hơn */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 20px;
    background: rgba(45, 90, 39, 0.05);
    border-left: 3px solid var(--primary-color);
    display: inline-block;
}

.certifications {
    margin-bottom: 80px;
}

/* Lưới chứng nhận */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.center-grid {
    display: flex;
    justify-content: center;
}

.cert-item {
    background: white;
    padding: 20px; /* Tăng padding cho dễ đọc */
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    border: 1px solid rgba(232, 240, 228, 0.8);
}

.cert-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(45, 90, 39, 0.12);
}

.cert-img-wrapper {
    width: 100%;
    height: clamp(320px, 55vw, 420px); /* Tăng chiều cao linh hoạt */
    overflow: hidden;
    border-radius: 12px;
    background: #f9f9f9;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.cert-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: transform 0.6s ease;
}

.cert-item:hover img {
    transform: scale(1.1);
}

.cert-item p {
    font-weight: 600;
    color: var(--primary-color);
    font-size: clamp(1.1rem, 2.8vw, 1.4rem); /* To hơn */
    padding: 0 10px 10px;
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cam kết minh bạch - Glassmorphism */
.transparency-card {
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.03), rgba(212, 163, 115, 0.03));
    padding: clamp(3rem, 6vw, 5rem);
    border-radius: 30px;
    text-align: center;
    border: 1px dashed var(--primary-color);
    margin: 100px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.transparency-card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: clamp(1.8rem, 5vw, 2.4rem);
}

.transparency-card p {
    font-size: clamp(1.3rem, 3.5vw, 1.6rem);
    line-height: 1.8;
}

.header .logo {
    font-size: 1.5rem; /* Giữ nguyên gốc */
    font-weight: 700;
    letter-spacing: 1px;
}

.nav ul li a {
    font-size: 0.9rem; /* Giữ nguyên gốc */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .page-title {
        font-size: clamp(2rem, 5.5vw, 2.8rem);
    }

    .cert-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 25px;
    }

    .cert-img-wrapper {
        height: 320px;
    }
}

/* Điện thoại lớn (≤ 768px) */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .page-title {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
        margin-top: 30px;
    }

    .legal-intro {
        font-size: clamp(1rem, 3vw, 1.3rem);
        margin-bottom: 40px;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .cert-img-wrapper {
        height: clamp(250px, 50vw, 320px);
    }

    .section-badge {
        font-size: clamp(0.9rem, 2.2vw, 1.1rem);
        padding: 5px 15px;
    }

    .transparency-card {
        padding: 30px 15px;
        margin: 50px 0;
    }
}

/* Điện thoại nhỏ (≤ 480px) */
@media (max-width: 480px) {
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .cert-img-wrapper {
        height: auto;
        max-height: 400px;
    }

    .cert-item p {
        font-size: clamp(1rem, 3vw, 1.2rem);
        min-height: auto;
    }

    .bg-glow {
        display: none;
    }
}