/* ============================================
   Hub Grid Post - Frontend Styles
   Theme: Black & Gold Luxury
   ============================================ */

/* กฎรวม: ลิงก์ทุกจุดในปลั๊กอินนี้ไม่มีขีดเส้นใต้ตายตัว
   จะขึ้นเฉพาะตอน hover/focus เท่านั้น ใช้ !important เพราะธีม WordPress
   หลายธีมเขียน CSS underline ลิงก์แบบ specificity สูงหรือ !important เอง
   ทำให้กฎปกติของปลั๊กอินสู้ไม่ได้ ต้องบังคับด้วย !important เพื่อชนะแน่นอน */
.hgp-hub-wrapper a,
.hgp-hub-wrapper a:link,
.hgp-hub-wrapper a:visited {
    text-decoration: none !important;
}

.hgp-hub-wrapper {
    /* ============================================
       จุดควบคุมสีทั้งหมด — เปลี่ยนแค่ 2 ค่านี้พอ (--hgp-bg, --hgp-gold)
       ตัวอื่นคำนวณ/derive จากสองค่านี้เพื่อให้ยังคุมโทนเดียวกันเสมอ
       สลับไปใช้เว็บอื่นแค่แก้ 2 บรรทัดนี้ ทุกจุดในปลั๊กอินจะเปลี่ยนตาม
       (เข้าชุดกับ Hub Nav Bar ที่ใช้หลักการเดียวกัน)
       ============================================ */
    --hgp-bg: #0a0a0a;              /* พื้นหลังหลัก (ดำ) */
    --hgp-gold: #c9a961;            /* สีเน้นหลัก (ทอง) */
    --hgp-gold-rgb: 201, 169, 97;   /* ค่า RGB ของสีทองด้านบน (แก้คู่กันเสมอ) ใช้กับ rgba() */

    /* เฉดที่ derive มาจาก 2 ค่าบน - ไม่ต้องแก้ตรงนี้ตามปกติ */
    --hgp-gold-light: color-mix(in srgb, var(--hgp-gold) 55%, white);
    --hgp-gold-dark: color-mix(in srgb, var(--hgp-gold) 65%, black);
    --hgp-white: #f5f5f5;
    --hgp-gray: #999;
    --hgp-border: rgba(var(--hgp-gold-rgb), 0.25);
    --hgp-bg-card: color-mix(in srgb, var(--hgp-bg) 85%, white);
    --hgp-bg-card-darker: color-mix(in srgb, var(--hgp-bg) 90%, black);
    --hgp-bg-image-placeholder: color-mix(in srgb, var(--hgp-bg) 88%, white);

    background: var(--hgp-bg);
    padding: 40px 20px;
    color: var(--hgp-white);
    font-family: 'Segoe UI', 'Sarabun', -apple-system, sans-serif;
    border: 2px solid var(--hgp-gold);
    border-radius: 14px;
    box-shadow: 0 0 24px rgba(var(--hgp-gold-rgb), 0.35), 0 0 60px rgba(var(--hgp-gold-rgb), 0.12), inset 0 0 40px rgba(var(--hgp-gold-rgb), 0.03);
}

/* ============================================
   Breaking News - แถบข่าววิ่งด้านบนสุด
   ============================================ */

.hgp-breaking-news {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, var(--hgp-bg-card), var(--hgp-bg));
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.4);
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.hgp-breaking-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, var(--hgp-gold-dark), var(--hgp-gold));
    color: var(--hgp-bg);
    font-size: 12px;
    font-weight: 700;
    padding: 10px 16px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.hgp-breaking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff0000;
    box-shadow: 0 0 0 rgba(255, 0, 0, 0.6);
    animation: hgp-breaking-pulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes hgp-breaking-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
        opacity: 1;
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 0, 0, 0);
        opacity: 0.7;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
        opacity: 1;
    }
}

.hgp-breaking-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.hgp-breaking-track-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: hgp-breaking-scroll 30s linear infinite;
    width: max-content;
}

.hgp-breaking-track:hover .hgp-breaking-track-inner {
    animation-play-state: paused;
}

@keyframes hgp-breaking-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.hgp-breaking-item {
    display: inline-block;
    padding: 10px 8px;
    color: var(--hgp-white);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.hgp-breaking-item:hover {
    color: var(--hgp-gold-light);
}

.hgp-breaking-sep {
    color: var(--hgp-gold);
    font-size: 8px;
    padding: 0 6px;
    opacity: 0.6;
}

/* ============================================
   Quick Nav - ปุ่มลัดเชื่อมโยง Section
   ============================================ */

.hgp-quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1280px;
    margin: 0 auto 32px;
}

.hgp-quick-nav-btn {
    background: rgba(var(--hgp-gold-rgb), 0.08);
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.4);
    color: var(--hgp-gold-light);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hgp-quick-nav-btn:hover {
    background: var(--hgp-gold);
    border-color: var(--hgp-gold);
    color: var(--hgp-bg);
    transform: translateY(-2px);
}

.hgp-section {
    max-width: 1280px;
    margin: 0 auto 56px;
    scroll-margin-top: 20px;
}

.hgp-section:last-child {
    margin-bottom: 0;
}

.hgp-section-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1px;
    margin: 40px 0 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(var(--hgp-gold-rgb), 0.15) 15%,
        rgba(var(--hgp-gold-rgb), 0.7) 50%,
        rgba(var(--hgp-gold-rgb), 0.15) 85%,
        transparent 100%
    );
}

.hgp-section-divider-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hgp-gold);
    box-shadow: 0 0 8px rgba(var(--hgp-gold-rgb), 0.9), 0 0 16px rgba(var(--hgp-gold-rgb), 0.5);
}

.hgp-section:last-child .hgp-section-divider {
    display: none;
}

.hgp-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
}

.hgp-section-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hgp-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--hgp-white);
    margin: 0;
    padding-left: 16px;
    border-left: 4px solid var(--hgp-gold);
    letter-spacing: 0.3px;
}

.hgp-section-subtitle {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--hgp-gold-dark);
    padding-left: 16px;
    text-transform: uppercase;
}

.hgp-section-title::after {
    content: '';
}

.hgp-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--hgp-border), transparent);
    margin-left: 20px;
}

/* ============================================
   Card - ใช้ร่วมกันทุก layout
   ============================================ */

.hgp-card {
    display: block;
    position: relative;
    background: var(--hgp-bg-card);
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.45);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hgp-card-link-image,
.hgp-card-link-title,
.hgp-card-link-meta {
    display: block;
    text-decoration: none;
    color: inherit;
}

.hgp-card:hover {
    border-color: var(--hgp-gold);
    box-shadow: 0 8px 24px rgba(var(--hgp-gold-rgb), 0.12);
}

.hgp-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--hgp-bg-card-darker);
}

.hgp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.hgp-card:hover .hgp-card-image img {
    transform: scale(1.05);
}

.hgp-card-noimage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hgp-gray);
    font-size: 13px;
    background: repeating-linear-gradient(45deg, var(--hgp-bg-image-placeholder), var(--hgp-bg-image-placeholder) 10px, var(--hgp-bg-card-darker) 10px, var(--hgp-bg-card-darker) 20px);
}

.hgp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    background: linear-gradient(135deg, var(--hgp-gold-dark), var(--hgp-gold));
    color: var(--hgp-bg);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hgp-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(var(--hgp-gold-rgb), 0.5);
    color: var(--hgp-bg);
}

.hgp-new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: var(--hgp-bg);
    color: var(--hgp-gold-light);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    border: 1px solid var(--hgp-gold);
    animation: hgp-new-pulse 1.8s ease-in-out infinite;
}

@keyframes hgp-new-pulse {
    0%, 100% {
        box-shadow: 0 0 4px rgba(var(--hgp-gold-rgb), 0.4), 0 0 0 rgba(var(--hgp-gold-rgb), 0);
    }
    50% {
        box-shadow: 0 0 12px rgba(var(--hgp-gold-rgb), 0.9), 0 0 20px rgba(var(--hgp-gold-rgb), 0.4);
    }
}

.hgp-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.hgp-tag {
    font-size: 11px;
    color: var(--hgp-gold-light);
    background: rgba(var(--hgp-gold-rgb), 0.1);
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hgp-tag:hover {
    background: rgba(var(--hgp-gold-rgb), 0.25);
    border-color: var(--hgp-gold);
    color: var(--hgp-gold-light);
    text-decoration: underline !important;
}

.hgp-card-body {
    padding: 14px 16px 16px;
}

.hgp-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
    color: var(--hgp-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hgp-card-title-small {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
    color: var(--hgp-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hgp-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.hgp-card-date {
    color: var(--hgp-gray);
}

.hgp-card-readmore {
    color: var(--hgp-gold);
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   Layout: Grid Simple / Grid Effect
   ============================================ */

.hgp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hgp-grid-effect .hgp-card {
    transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease;
}

.hgp-grid-effect .hgp-card:hover {
    transform: translateY(-8px);
    border-color: var(--hgp-gold);
    box-shadow: 0 16px 32px rgba(var(--hgp-gold-rgb), 0.2), 0 0 0 1px var(--hgp-gold);
}

.hgp-grid-effect .hgp-badge {
    animation: hgp-badge-glow 2.4s ease-in-out infinite;
}

@keyframes hgp-badge-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(var(--hgp-gold-rgb), 0); }
    50% { box-shadow: 0 0 12px rgba(var(--hgp-gold-rgb), 0.6); }
}

/* ============================================
   Layout: Magazine
   ============================================ */

.hgp-magazine-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    grid-template-rows: repeat(2, auto);
    gap: 20px;
}

.hgp-mag-card {
    display: block;
    position: relative;
    background: var(--hgp-bg-card);
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.45);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s ease;
}

.hgp-mag-card:hover {
    border-color: var(--hgp-gold);
}

.hgp-mag-featured {
    grid-row: 1 / 3;
    position: relative;
}

.hgp-mag-featured .hgp-card-image {
    aspect-ratio: auto;
    height: 100%;
    min-height: 420px;
}

.hgp-mag-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 24px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
}

.hgp-mag-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.35;
}

.hgp-mag-small .hgp-card-image {
    aspect-ratio: 16 / 10;
}

.hgp-mag-small .hgp-card-body {
    padding: 12px 14px;
}

/* ============================================
   Layout: Carousel
   ============================================ */

.hgp-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hgp-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px;
}

.hgp-carousel-track::-webkit-scrollbar {
    display: none;
}

.hgp-carousel-item {
    flex: 0 0 280px;
}

.hgp-carousel-arrow {
    background: var(--hgp-bg-card);
    border: 1px solid var(--hgp-gold);
    color: var(--hgp-gold);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.hgp-carousel-arrow:hover {
    background: var(--hgp-gold);
    color: var(--hgp-bg);
}

.hgp-carousel-prev { margin-right: 12px; }
.hgp-carousel-next { margin-left: 12px; }

/* ============================================
   Layout: Load More
   ============================================ */

.hgp-grid-loadmore {
    grid-template-columns: repeat(4, 1fr);
}

.hgp-loadmore-wrap {
    text-align: center;
    margin-top: 28px;
}

.hgp-loadmore-btn {
    background: transparent;
    border: 1px solid var(--hgp-gold);
    color: var(--hgp-gold);
    padding: 11px 32px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.25s ease, color 0.25s ease;
}

.hgp-loadmore-btn:hover {
    background: var(--hgp-gold);
    color: var(--hgp-bg);
}

.hgp-loadmore-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Admin notice (แสดงเมื่อยังไม่มี section)
   ============================================ */

.hgp-admin-notice {
    background: var(--hgp-bg-card-darker);
    border: 1px dashed var(--hgp-gold);
    color: var(--hgp-gold-light);
    padding: 16px 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================
   Responsive
   ============================================ */

/* ============================================
   HUD Header - เฉพาะ Layout Featured Grid
   ============================================ */

.hgp-hud-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
    padding-left: 4px;
}

.hgp-hud-left {
    position: relative;
    padding: 6px 0 6px 16px;
    border-left: 3px solid var(--hgp-gold);
}

.hgp-hud-left::before,
.hgp-hud-left::after {
    content: '';
    position: absolute;
    left: -3px;
    width: 10px;
    height: 3px;
    background: var(--hgp-gold);
}

.hgp-hud-left::before { top: -1px; }
.hgp-hud-left::after { bottom: -1px; }

.hgp-hud-title {
    border-left: none;
    padding-left: 0;
    margin: 0;
    font-size: 22px;
}

.hgp-hud-subtitle {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--hgp-gold-dark);
    margin-top: 4px;
    text-transform: uppercase;
}

.hgp-hud-line {
    flex: 1;
    display: flex;
    align-items: center;
    height: 1px;
    background: linear-gradient(90deg, var(--hgp-gold) 0%, rgba(var(--hgp-gold-rgb), 0.15) 60%, transparent 100%);
    position: relative;
}

.hgp-hud-dots {
    position: absolute;
    left: 30%;
    width: 40px;
    height: 4px;
    background-image: radial-gradient(circle, var(--hgp-gold) 1px, transparent 1.5px);
    background-size: 6px 4px;
    background-repeat: repeat-x;
    opacity: 0.7;
}

.hgp-hud-viewall {
    flex-shrink: 0;
    background: rgba(var(--hgp-gold-rgb), 0.08);
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.5);
    color: var(--hgp-gold-light);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hgp-hud-viewall:hover {
    background: var(--hgp-gold);
    border-color: var(--hgp-gold);
    color: var(--hgp-bg);
}

/* ============================================
   Layout: Featured Grid (การ์ดใหญ่ 1 + เล็ก 5)
   ============================================ */

.hgp-fgrid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: repeat(2, auto);
    gap: 18px;
}

.hgp-fcard {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--hgp-bg-card);
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.45);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hgp-fcard-featured {
    grid-row: 1 / 3;
    border: 1px solid var(--hgp-gold);
    box-shadow: 0 0 20px rgba(var(--hgp-gold-rgb), 0.15);
}

.hgp-fcard:hover {
    border-color: var(--hgp-gold);
}

.hgp-fcard .hgp-card-link-image {
    display: flex;
    flex: 1;
}

.hgp-fcard-image {
    position: relative;
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
    background: var(--hgp-bg-card-darker);
}

/* การ์ดใหญ่: เต็มความสูงของ grid row ที่ครอบคลุม (ไม่มีช่องว่างด้านล่าง) */
.hgp-fcard-featured .hgp-fcard-image {
    aspect-ratio: auto;
}

/* การ์ดเล็กแถวบน (post 2-3): เตี้ยกว่า แนวนอน */
.hgp-fcard-row-top .hgp-fcard-image {
    aspect-ratio: 16 / 11;
}

/* การ์ดเล็กแถวล่าง (post 4-6): เกือบจตุรัส */
.hgp-fcard-row-bottom .hgp-fcard-image {
    aspect-ratio: 4 / 3.4;
}

.hgp-fcard-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.hgp-fcard:hover .hgp-fcard-image img {
    transform: scale(1.04);
}

.hgp-fbadge-star {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: linear-gradient(135deg, var(--hgp-gold-dark), var(--hgp-gold));
    color: var(--hgp-bg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 4px;
}

.hgp-fbadge-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(3px);
    color: var(--hgp-gold-light);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(var(--hgp-gold-rgb), 0.55);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.hgp-fcard-small .hgp-fbadge-dot {
    top: 10px;
    right: 10px;
    font-size: 10px;
    padding: 4px 8px;
}

.hgp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hgp-gold);
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(var(--hgp-gold-rgb), 0.8);
}

/* Overlay โปร่งใส วางบนรูปทุกการ์ด (ใหญ่และเล็ก) */
.hgp-fcard-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 22px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.75) 40%, rgba(0,0,0,0.3) 75%, transparent 100%);
}

.hgp-fcard-small .hgp-fcard-overlay {
    padding: 20px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.94) 0%, rgba(0,0,0,0.7) 45%, rgba(0,0,0,0.25) 78%, transparent 100%);
}

.hgp-fcard-date {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--hgp-gold);
    margin-bottom: 8px;
}

.hgp-fcard-small .hgp-fcard-date {
    font-size: 10px;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hgp-fcard-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

.hgp-fcard-meta-row .hgp-card-readmore {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hgp-fcard-title {
    font-size: 21px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.4;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hgp-fcard-title-small {
    font-size: 14px;
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hgp-fcard-excerpt {
    font-size: 13px;
    color: #ccc;
    line-height: 1.5;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hgp-fcard-featured .hgp-card-readmore {
    color: var(--hgp-gold);
    font-weight: 600;
    font-size: 13px;
}

.hgp-fcard-small .hgp-card-readmore {
    color: var(--hgp-gold);
    font-weight: 600;
    font-size: 11px;
}

/* ============================================
   Dot pagination (สำหรับ carousel ในอนาคต / แสดงเฉยๆ)
   ============================================ */

.hgp-dots-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.hgp-dots-pagination span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(var(--hgp-gold-rgb), 0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hgp-dots-pagination span.active {
    background: var(--hgp-gold);
    transform: scale(1.2);
}

@media (max-width: 1024px) {
    .hgp-fgrid {
        grid-template-columns: 1fr 1fr;
    }
    .hgp-fcard-featured {
        grid-column: 1 / 3;
        grid-row: auto;
    }
    .hgp-fcard-featured .hgp-fcard-image {
        min-height: 320px;
        flex: none;
    }
    .hgp-grid,
    .hgp-grid-loadmore {
        grid-template-columns: repeat(3, 1fr);
    }
    .hgp-magazine-grid {
        grid-template-columns: 1.4fr 1fr;
    }
}

@media (max-width: 768px) {
    .hgp-hud-header {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .hgp-hud-line {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }
    .hgp-fgrid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hgp-fgrid {
        grid-template-columns: 1fr;
    }
    .hgp-fcard-featured {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .hgp-hub-wrapper { padding: 24px 14px; }
    .hgp-grid,
    .hgp-grid-loadmore {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .hgp-magazine-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hgp-mag-featured {
        grid-row: auto;
    }
    .hgp-mag-featured .hgp-card-image {
        min-height: 260px;
    }
    .hgp-carousel-item {
        flex-basis: 220px;
    }
    .hgp-section-title {
        font-size: 19px;
    }
}

@media (max-width: 480px) {
    .hgp-grid,
    .hgp-grid-loadmore {
        grid-template-columns: 1fr;
    }
    /* จอมือถือ: การ์ด Featured Grid แคบลง ต้องเพิ่มความเข้ม overlay ให้ชื่อเรื่องอ่านง่ายขึ้น */
    .hgp-fcard-overlay {
        padding-top: 45px;
        background: linear-gradient(to top, rgba(0,0,0,0.97) 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.4) 78%, transparent 100%);
    }
    .hgp-fcard-small .hgp-fcard-overlay {
        padding-top: 30px;
        background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.35) 80%, transparent 100%);
    }
}
