/* Import Font: Prompt */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
    /* AMD Color Palette */
    --amd-red: #ED1C24;          /* สีแดงเอกลักษณ์ของ AMD */
    --amd-dark-red: #bf151b;     /* สีแดงเข้ม */
    --amd-black: #111111;        /* สีดำสนิท */
    --amd-gray-dark: #222222;    /* สีเทาเข้มสำหรับพื้นหลัง */
    --amd-gray-light: #d9d9d9;   /* สีเทาอ่อน */
    --amd-white: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ED1C24 0%, #ff5e64 100%);
    --gradient-dark: linear-gradient(135deg, #111111 0%, #333333 100%);
    --gradient-glow: linear-gradient(135deg, rgba(237, 28, 36, 0.2) 0%, rgba(0, 0, 0, 0) 100%);
    
    /* Settings */
    --font-style: "Prompt", sans-serif;
    --radius-sm: 0px;   /* AMD style เน้นเหลี่ยมคม */
    --radius-md: 2px;
    --radius-lg: 4px;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.2);
    --shadow-glow: 0 5px 20px rgba(237, 28, 36, 0.4); /* Glow สีแดง */
}

/* Global Reset */
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-style);
    color: #333;
    background-color: var(--amd-white);
    overflow-x: hidden;
}

a { text-decoration: none; transition: all 0.3s ease; }

/* --- Utilities --- */
.text-amd {
    color: var(--amd-red) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.bg-amd-red { background-color: var(--amd-red); }
.bg-amd-dark { background-color: var(--amd-black); color: white;}
.bg-amd-gray { background-color: var(--amd-gray-dark); color: white; }

/* --- Navbar --- */
.navbar {
    background: rgba(0, 0, 0, 0.95); /* พื้นหลังดำ */
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid var(--amd-red); /* เส้นขอบล่างสีแดง */
}
.nav-link {
    color: #ccc;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}
.nav-link:hover, .nav-link.active {
    color: var(--amd-red);
}
.navbar-brand span {
    color: var(--amd-white);
    letter-spacing: -1px;
}

/* --- Buttons --- */
.btn-amd {
    background: var(--amd-red);
    color: white;
    border-radius: 0; /* ปุ่มเหลี่ยม */
    padding: 10px 30px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
}
.btn-amd:hover {
    background: #000;
    color: var(--amd-red);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-amd-outline {
    background: transparent;
    color: var(--amd-black);
    border: 2px solid var(--amd-black);
    border-radius: 0;
    padding: 8px 28px;
    font-weight: 600;
    text-transform: uppercase;
}
.btn-amd-outline:hover {
    background: var(--amd-black);
    color: white;
    border-color: var(--amd-black);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    padding: 140px 0 100px;
    background: var(--amd-black);
    color: white;
    overflow: hidden;
}
.hero-bg-shape {
    position: absolute;
    width: 70%;
    height: 100%;
    top: 0;
    right: -10%;
    background: radial-gradient(circle, rgba(237,28,36,0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
}
.hero-text-sub {
    color: #aaa;
    font-weight: 300;
}

/* --- Cards & Features --- */
.feature-box {
    padding: 2rem;
    background: white;
    border: 1px solid #ddd;
    transition: 0.3s;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.feature-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 4px;
    background: var(--amd-red);
    transition: 0.3s;
}
.feature-box:hover::before {
    width: 100%;
}
.feature-box:hover {
    border-color: var(--amd-red);
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}
.feature-icon {
    font-size: 3rem;
    color: var(--amd-red);
    margin-bottom: 1rem;
}

/* --- Suffix Table/Cards --- */
.suffix-card {
    background: #fff;
    border: 1px solid #eee;
    border-left: 5px solid var(--amd-red);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}
.suffix-card:hover {
    background: var(--amd-black);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}
.suffix-card:hover h3, .suffix-card:hover h5 { color: white !important; }
.suffix-card:hover p { color: #aaa !important; }

/* --- Product Card --- */
.product-card {
    border: none;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    height: 100%;
    border-bottom: 3px solid transparent;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-bottom: 3px solid var(--amd-red);
}
.product-card img {
    height: 220px;
    object-fit: cover;
}

/* --- Selection Guide Table --- */
.guide-table thead th {
    background-color: var(--amd-black);
    color: white;
    border: none;
}
.guide-table tbody tr:hover {
    background-color: #f9f9f9;
}
/* Custom Styles for New Lists */
.tech-card {
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}
.tech-card:hover {
    border-left: 3px solid var(--amd-red);
    background: #f8f9fa;
    transform: translateX(5px);
}
.check-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: start;
}
.check-list i {
    color: var(--amd-red);
    margin-right: 10px;
    font-size: 1.2rem;
    margin-top: 2px;
}
.software-box {
    background: #111;
    color: white;
    border: 1px solid #333;
}
.software-box:hover {
    border-color: var(--amd-red);
}

/* --- Footer --- */
footer {
    background-color: var(--amd-black);
    color: #ccc;
    border-top: 4px solid var(--amd-red);
}
footer h3, footer h5 {
    color: white;
}
footer a {
    color: #999;
}
footer a:hover {
    color: var(--amd-red);
}

/* Business Card Style for AMD */
.bc-card {
    border: none;
    border-radius: 0; /* คงความเหลี่ยมตามสไตล์ AMD */
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--amd-white);
}

.bc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

.bc-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.bc-top-content {
    flex-grow: 1;
    z-index: 2;
}

/* สร้างเส้นเฉียงสีแดงและพื้นหลังดำ */
.bc-diagonal-divider {
    position: relative;
    height: 60px; /* ความสูงของรอยต่อ */
    background: white;
    margin-top: -30px; /* ขยับขึ้นไปทับส่วนบน */
    z-index: 1;
}

.bc-diagonal-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--amd-black);
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0% 100%); /* สร้างมุมเฉียง */
}

.bc-diagonal-divider::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--amd-red);
    clip-path: polygon(0 40%, 100% 0, 100% 50%, 0% 90%); /* เส้นสีแดงเฉียง */
    transform: scaleY(1.5);
}

.bc-bottom-content {
    background: var(--amd-black);
    z-index: 2;
}

/* จัดการตัวอักษรให้แสดงผลสวยงาม */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}