/*
 * Stylesheet cho trang Mô tả Công việc
 * Tập trung vào giao diện sạch, chuyên nghiệp và có thể xem trên mọi thiết bị
 */

/* ============ Phông chữ và biến màu ============ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Poppins:wght@600;700&display=swap');

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --text-color: #6c757d;
    --light-bg: #f8f9fa;
    --dark-bg: #e9ecef;
}

/* ============ Các thành phần chung ============ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff !important;
}

.jd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.jd-section {
    margin-top: 2rem;
}

.jd-section h3, .jd-aside h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.jd-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.jd-list {
    list-style-type: none;
    padding-left: 0;
}

.jd-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.jd-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* ============ Bố cục ============ */
.jd-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* ============ Phần Hero và thương hiệu ============ */
.jd-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.jd-hero-brand {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.jd-hero-brand img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jd-company {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
}

.jd-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2.8rem;
    color: var(--secondary-color);
    line-height: 1.05;
    position: relative;
    padding-bottom: 8px;
}

/* Animated underline that grows from left */
.jd-title::after{
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 6px;
    width: 36px;
    border-radius: 6px;
    background: linear-gradient(90deg,var(--primary-color) 0%, rgba(52,152,219,0.6) 100%);
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform .5s cubic-bezier(.2,.9,.2,1);
}

/* reveal underline when hero visible */
.jd-hero.animate-fade .jd-title::after{ transform: scaleX(1); }

/* per-word styling for title and reveal */
.jd-title-word{ display:inline-block; margin-right:8px; opacity:0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.jd-hero.animate-fade .jd-title-word{ opacity:1; transform:none; }

/* subtle background gradient for hero */
.jd-container{ background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); border-radius:12px; }

/* ============ Sidebar ============ */
.jd-aside {
    background-color: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.jd-aside p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.jd-aside p strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.download-btn {
    display: inline-block;
    width: 100%;
    padding: 0.5rem 1rem;
    background-color: #8046b6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
}

.download-btn:hover {
    background-color: #5504a0;
    transform: translateY(-2px);
}

.apply-btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
}

.apply-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* ============ Hoạt ảnh ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Áp dụng độ trễ cho từng phần để tạo hiệu ứng đẹp mắt */
.jd-hero { animation-delay: 0s; }
.jd-grid > div:nth-child(1) .jd-section:nth-child(1) { animation-delay: 0.2s; }
.jd-grid > div:nth-child(1) .jd-section:nth-child(2) { animation-delay: 0.4s; }
.jd-grid > div:nth-child(1) .jd-section:nth-child(3) { animation-delay: 0.6s; }
.jd-grid > div:nth-child(1) .jd-section:nth-child(4) { animation-delay: 0.8s; }
.jd-grid > div:nth-child(1) .jd-section:nth-child(5) { animation-delay: 1s; }
.jd-aside { animation-delay: 1.2s; }

/* ============ Media Queries (Đảm bảo responsive) ============ */
@media (max-width: 992px) {
    .jd-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .jd-container {
        padding: 1rem;
    }

    .jd-hero {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .jd-title {
        font-size: 2rem;
    }
}
