/* ===========================================================
   patch-notes.css — สไตล์เฉพาะหน้า Patch Notes
   (โหลดต่อจาก base.css เท่านั้น)
   =========================================================== */

/* ─── Main Content ───────────────────────────────── */
.content-wrapper {
    /* ความกว้างและขอบในชุดเดียวกับแถบเมนูและสารบัญ ขอบซ้ายจะได้ตรงกันทั้งหน้า */
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: var(--space-500) var(--space-300) var(--space-900);
}

/* ─── Section Headers ────────────────────────────── */
.section {
    margin-bottom: 4rem;
    scroll-margin-top: 70px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--bg-dark);
    flex-shrink: 0;
}

.section-title-group {
    flex: 1;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 0.2rem;
}

/* ─── Subsection ─────────────────────────────────── */
.subsection {
    margin-bottom: 2rem;
}

.subsection-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subsection-title .icon {
    font-size: 1.2rem;
}

/* ─── Cards ──────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    border: 2px solid var(--border-accent);
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

.card-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #1a1a2e, #2a2a4e);
}

.card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-type {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body ul {
    list-style: none;
    padding: 0;
}

.card-body li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.93rem;
}

.card-body li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-weight: bold;
}

/* ─── Unit Row (compact display) ─────────────────── */
.unit-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    transition: background 0.2s;
}

.unit-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.unit-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1.5px solid var(--border-accent);
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a2e;
}

.unit-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.unit-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    min-width: 140px;
}

.unit-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ─── Change Tags ────────────────────────────────── */
.tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-buff { background: rgba(34, 197, 94, 0.15); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); }
.tag-nerf { background: rgba(239, 68, 68, 0.15); color: var(--red); border: 1px solid rgba(239, 68, 68, 0.3); }
.tag-rework { background: rgba(168, 85, 247, 0.15); color: var(--purple); border: 1px solid rgba(168, 85, 247, 0.3); }
.tag-removed { background: rgba(107, 114, 128, 0.15); color: var(--text-muted); border: 1px solid rgba(107, 114, 128, 0.3); }
.tag-new { background: rgba(59, 130, 246, 0.15); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-fix { background: rgba(249, 115, 22, 0.15); color: var(--orange); border: 1px solid rgba(249, 115, 22, 0.3); }
.tag-adjust { background: rgba(6, 182, 212, 0.15); color: var(--cyan); border: 1px solid rgba(6, 182, 212, 0.3); }

/* ─── Value Change Display ───────────────────────── */
.value-change {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 500;
}

.old-val {
    color: var(--text-muted);
    text-decoration: line-through;
}

.arrow {
    color: var(--gold);
    font-weight: 700;
}

.new-val-up { color: var(--green); font-weight: 700; }
.new-val-down { color: var(--red); font-weight: 700; }

/* ─── Tables ─────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.88rem;
}

.data-table th {
    background: rgba(240, 180, 41, 0.08);
    color: var(--gold);
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-accent);
}

.data-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table .hero-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--text-primary);
}

.data-table .hero-cell img {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--border-accent);
}

/* ─── Removed Unit Grid ──────────────────────────── */
.removed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.removed-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    opacity: 0.7;
    position: relative;
    overflow: hidden;
}

.removed-card::after {
    content: 'REMOVED';
    position: absolute;
    top: 10px;
    right: -30px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 2rem;
    transform: rotate(45deg);
    letter-spacing: 1px;
}

.removed-card .unit-row {
    background: none;
    padding: 0.3rem 0;
}

.removed-card-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* ─── Hero Grid ──────────────────────────────────── */
.hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.hero-card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(240, 180, 41, 0.1);
}

.hero-portrait {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--border-accent);
    overflow: hidden;
    margin: 0 auto 0.8rem;
    background: #1a1a2e;
}

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

.hero-card-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.hero-card-type {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Info Callout ────────────────────────────────── */
.callout {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.callout-info {
    background: rgba(59, 130, 246, 0.08);
    border-left: 3px solid var(--blue);
    color: var(--blue-light);
}

.callout-warning {
    background: rgba(249, 115, 22, 0.08);
    border-left: 3px solid var(--orange);
    color: #fdba74;
}

.callout-success {
    background: rgba(34, 197, 94, 0.08);
    border-left: 3px solid var(--green);
    color: var(--green-light);
}

/* ─── Skill Detail Block ─────────────────────────── */
.skill-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 0.6rem 0;
}

.skill-name {
    font-weight: 700;
    color: var(--gold-light);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.skill-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .content-wrapper { padding: var(--space-300) var(--space-200) var(--space-700); }
    .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .hero-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .removed-grid { grid-template-columns: 1fr; }
    .data-table { font-size: 0.78rem; }
    .data-table th, .data-table td { padding: 0.5rem 0.6rem; }
}

/* ─── หัวเรื่องเหนือหัวข้อแรก ─────────────────────── */
.patch-intro {
    margin-bottom: var(--space-600);
    padding-bottom: var(--space-300);
    border-bottom: 1px solid var(--border-color);
}

.patch-intro-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    line-height: 1.24;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.patch-intro-meta {
    margin-top: var(--space-75);
    font-size: 0.875rem;
    line-height: 20px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .patch-intro-title { font-size: 1.875rem; }
    .patch-intro { margin-bottom: var(--space-500); }
}
