﻿/* Article Detail Styles */
    .article-detail-container {
      position: relative;
      width: 100%;
      background: #FFFFFF;
    }

    .article-hero {
      position: relative;
      width: 100vw;
      margin-left: calc(-50vw + 50%);
      overflow: visible;
      padding-bottom: 100px;
    }

    .article-hero-image {
      width: 100%;
      height: auto;          /* ความสูงตามสัดส่วนจริงของรูป */
      display: block;
    }

    .article-title-box {
      position: absolute;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      width: 700px;
      max-width: 85%;
      background: #FFE600;
      border: 1px solid #F7F7F7;
      box-shadow: 0px 1px 40px rgba(0, 0, 0, 0.25);
      border-radius: 12px;
      padding: 30px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      z-index: 5;
    }

    .article-detail-container .article-title {
      font-family: 'DindanMai';
      font-weight: 900;
      font-size: 28px;
      line-height: 1.3;
      color: #333333;
      margin: 0;
      text-align: center;
    }
  
    .breadcrumb-wrapper {
      background: #FFFFFF;
      padding: 20px 60px 30px;
      margin: 0;
    }

    .breadcrumb-nav {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      padding: 0;
    }

    .breadcrumb-nav:hover {
      opacity: 0.7;
    }

    .breadcrumb-text {
      font-family: 'AttenNew';
      font-weight: 700;
      font-size: 36px;
      line-height: 100%;
      letter-spacing: 0.5px;
      color: #9EA3A6;
      margin: 0;
    }

    .breadcrumb-icon {
      width: 20px;
      height: 20px;
      opacity: 1;
      filter: brightness(0) saturate(100%) invert(64%) sepia(8%) saturate(389%) hue-rotate(175deg) brightness(96%) contrast(89%);
    }

    .article-content {
      max-width: 700px;
      margin: 0 auto;
      padding: 40px 20px 80px;
    }
    .article-content p {
        text-indent: 2em;
    }

    .article-date {
      font-family: 'DindanMai';
      font-weight: 400;
      font-size: 20px;
      line-height: 22px;
      color: #000000;
      margin-bottom: 25px;
    }

    .article-text {
      font-family: 'DindanMai';
      font-weight: 400;
      font-size: 20px;
      line-height: 29px;
      color: #2D2E2E;
      margin-bottom: 10px;
    }

    .article-images-wrapper {
      position: relative;
      width: 100vw;
      margin: 50px 0 50px calc(-50vw + 50%);
    }

    /* viewport */
    .article-images {
      overflow-x: auto;              /* ⭐ เลื่อนแนวนอน */
      overflow-y: hidden;
      scroll-behavior: smooth;
       -ms-overflow-style: none;   /* IE, Edge */
       scrollbar-width: none;      /* Firefox */
       touch-action: pan-x;
    }
    .article-images::-webkit-scrollbar {
        display: none;              /* Chrome, Safari */
    }

    /* ตัวเลื่อน */
    .article-track {
      display: flex;
    }

    /* 1 รูป = 1/3 */
    .article-image {
      height: 400px;                 /* fix ความสูง */
      flex: 0 0 auto;                /* ⭐ ไม่บังคับความกว้าง */
    }

    .article-image img {
      height: 100%;
      width: auto;                   /* ⭐ กว้างตามสัดส่วน */
      object-fit: contain;           /* แนวตั้ง/แนวนอน ไม่โดนครอป */
      display: block;
    }

    .nav-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 5;
      background: rgba(0,0,0,0.5);
      color: #fff;
      border: none;
      width: 42px;
      height: 42px;
      cursor: pointer;
    }

    .nav-btn.prev { left: 10px; }
    .nav-btn.next { right: 10px; }

    .nav-btn:hover {
      background: rgba(0,0,0,0.75);
    }

    .share-section {
      margin-top: 40px;
      margin-bottom: 0px;
    }

    .share-text {
      font-family: 'DindanMai';
      font-weight: 400;
      font-size: 20px;
      line-height: 22px;
      color: #000000;
      margin-bottom: 32px;
    }

    .social-share-buttons {
      display: flex;
      gap: 30px;
    }

    .social-btn {
      width: 56px;
      height: 56px;
      background: #F7F7F7;
      border-radius: 400px;
      display: flex;
      justify-content: center;
      align-items: center;
      text-decoration: none;
      transition: all 0.3s ease;
    }

    .social-btn:hover {
      background: #333333;
    }

    .social-btn img {
      width: 20px;
      height: 20px;
    }

    .social-btn svg {
      width: 20px;
      height: 20px;
      fill: #262424;
    }

    .social-btn:hover svg {
      fill: #ffffff;
    }

    /* Responsive Design */

    @media (max-width: 1024px) {

      .article-title-box {
        bottom: -60px;
        padding: 26px;
      }

      .article-title {
        font-size: 24px;
      }
    }

    @media (max-width: 768px) {

      .article-title-box {
        bottom: -45px;
        padding: 22px;
        width: 90%;
      }

      .article-title {
        font-size: 20px;
      }
    }

    @media (max-width: 480px) {

      .article-title {
        font-size: 18px;
      }
    }


    /* Desktop Large (1400px+) */
    @media (min-width: 1400px) {
      .article-content {
        max-width: 800px;
        padding: 40px 20px 100px;
      }
      
      .article-title-box {
        width: 800px;
        padding: 35px;
      }
      
      .article-detail-container .article-title {
        font-size: 32px;
      }
      
      .article-text {
        font-size: 22px;
        line-height: 32px;
      }
    }

    /* Tablet Landscape (992px - 1199px) */
    @media (max-width: 1199px) {
      .article-content {
        max-width: 650px;
        padding: 20px 20px 80px;
      }
      
      .article-title-box {
        width: 650px;
        max-width: 85%;
        padding: 28px;
        bottom: 40px;
      }
      
      .article-detail-container .article-title {
        font-size: 26px;
        line-height: 1.3;
      }
      
      .breadcrumb-wrapper {
        padding: 20px 40px 25px;
      }
      
      .breadcrumb-nav {
        gap: 10px;
      }
      
      .article-text {
        font-size: 19px;
        line-height: 28px;
      }
      
      .article-date {
        font-size: 19px;
        line-height: 21px;
      }
    }

    /* Tablet Portrait (768px - 991px) */
    @media (max-width: 991px) {
      .article-hero {
        height: 60vh;
        min-height: 450px;
      }
      
      .article-content {
        max-width: 600px;
        padding: 110px 24px 70px;
      }
      
      .article-title-box {
        width: 600px;
        max-width: 88%;
        padding: 24px;
        bottom: -55px;
      }
      
      .article-detail-container .article-title {
        font-size: 24px;
        line-height: 1.3;
      }
      
      .breadcrumb-wrapper {
        padding: 20px 30px 20px;
      }
      
      .breadcrumb-nav {
        gap: 10px;
      }
      
      .breadcrumb-text {
        font-size: 15px;
      }
      
      .breadcrumb-icon {
        width: 18px;
        height: 18px;
      }
      
      .article-text {
        font-size: 18px;
        line-height: 27px;
      }
      
      .article-date {
        font-size: 18px;
        line-height: 20px;
      }
      
      .article-images {
        height: 350px;
      }
      
      .article-image {
        height: 350px;
      }
    }

    /* Mobile Large (576px - 767px) */
    @media (max-width: 767px) {
      .article-hero {
        height: 55vh;
        min-height: 400px;
      }
      
      .article-content {
        max-width: 100%;
        padding: 20px 24px 60px;
      }
      
      .article-title-box {
        width: 90%;
        max-width: 500px;
        padding: 22px;
        bottom: 25px;
      }
      
      .article-detail-container .article-title {
        font-size: 22px;
        line-height: 1.3;
      }
      
      .breadcrumb-wrapper {
        padding: 20px 24px 18px;
      }
      
      .breadcrumb-nav {
        gap: 8px;
      }
      
      .breadcrumb-text {
        font-size: 14px;
      }
      
      .breadcrumb-icon {
        width: 16px;
        height: 16px;
      }
      
      .article-text {
        font-size: 17px;
        line-height: 26px;
      }
      
      .article-date {
        font-size: 17px;
        line-height: 19px;
      }
      
      .article-images {
        height: 300px;
        margin: 40px 0 40px calc(-50vw + 50%);
      }
      
      .article-image {
        height: 300px;
      }
      
      .share-section {
        margin-top: 30px;
      }
      
      .social-share-buttons {
        gap: 24px;
      }
      
      .social-btn {
        width: 52px;
        height: 52px;
      }
    }

    /* Mobile Medium (480px - 575px) */
    @media (max-width: 575px) {
      .article-hero {
        height: 50vh;
        min-height: 350px;
      }
      
      .article-content {
        padding: 40px 20px 50px;
      }
      
      .article-title-box {
        width: 92%;
        padding: 20px;
        bottom: -10px;
      }
      
      .article-detail-container .article-title {
        font-size: 20px;
        line-height: 1.3;
      }
      
      .article-text {
        font-size: 16px;
        line-height: 25px;
      }
      
      .article-date {
        font-size: 16px;
        line-height: 18px;
        margin-bottom: 20px;
      }
      
      .article-images {
        height: 250px;
        margin: 35px 0 35px calc(-50vw + 50%);
      }
      
      .article-image {
        height: 250px;
      }
      
      .share-text {
        font-size: 18px;
        margin-bottom: 24px;
      }
      
      .social-share-buttons {
        gap: 20px;
        flex-wrap: wrap;
      }
      
      .social-btn {
        width: 48px;
        height: 48px;
      }
      
      .social-btn svg {
        width: 18px;
        height: 18px;
      }
    }

    /* Mobile Small (375px - 479px) */
    @media (max-width: 479px) {
      .article-hero {
        height: 45vh;
        min-height: 320px;
      }
      
      .article-content {
        padding: 70px 16px 40px;
      }
      
      .article-title-box {
        width: 94%;
        padding: 18px;
        bottom: -40px;
      }
      
      .article-detail-container .article-title {
        font-size: 18px;
        line-height: 1.3;
      }
      
      .breadcrumb-wrapper {
        padding: 20px 20px 16px;
      }
      
      .breadcrumb-text {
        font-size: 13px;
      }
      
      .breadcrumb-icon {
        width: 14px;
        height: 14px;
      }
      
      .article-text {
        font-size: 15px;
        line-height: 24px;
      }
      
      .article-date {
        font-size: 15px;
        line-height: 17px;
      }
      
      .article-images {
        height: 220px;
        margin: 30px 0 30px calc(-50vw + 50%);
      }
      
      .article-image {
        height: 220px;
      }
      
      .share-section {
        margin-top: 25px;
      }
      
      .share-text {
        font-size: 16px;
        margin-bottom: 20px;
      }
      
      .social-share-buttons {
        gap: 16px;
      }
      
      .social-btn {
        width: 44px;
        height: 44px;
      }
      
      .social-btn svg {
        width: 16px;
        height: 16px;
      }
    }

    /* Mobile Extra Small (below 375px) */
    @media (max-width: 374px) {
      .article-hero {
        min-height: 300px;
      }
      
      .article-content {
        padding: 65px 14px 35px;
      }
      
      .article-title-box {
        padding: 16px;
      }
      
      .article-detail-container .article-title {
        font-size: 17px;
      }
      
      .article-images {
        height: 200px;
      }
      
      .article-image {
        height: 200px;
      }
      
      .social-btn {
        width: 42px;
        height: 42px;
      }
    }



   * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      background: #FFFFFF;
      font-family: 'AttenNew', sans-serif;
      position: relative;
      width: 100%;
      min-height: 100vh;
    }

    /* Main Container */
    .article-container {
      width: 100%;
      max-width: 1920px;
      margin: 80px auto 0;
      padding: 60px 60px 40px 60px;
      background: #FFFFFF;
    }

    /* Article Header Section */
    .article-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 60px;
      margin-bottom: 20px;
      padding-top: 60px;
    }

    .article-header-left {

    }

    .article-title {
      font-family: 'AttenNew';
      font-weight: 800;
      font-size: 90px;
      line-height: 0.9;
      color: #000000;
      margin-bottom: 24px;
      letter-spacing: 0px;
    }

    .article-description {
      font-family: 'AttenNew';
      font-weight: 400;
      font-size: 18px;
      line-height: 1.4;
      color: #333333;
    }

    .hero-image {
      height: 500px;
      min-height: 500px;
      position: relative;
    }

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

    .article-header-right {
        position: relative;
        width: 50%;
    }

    /* Featured Card */
    .featured-card {
      padding: 28px 36px;
      background: #FFE600;
      box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12);
      border-radius: 20px;
      max-width: 540px;
      position: absolute;
      z-index: 10;
      left: 90px;
      bottom: -70px;
    }

    .featured-card .date {
      font-family: 'DindanMai';
      font-weight: 400;
      font-size: 14px;
      line-height: 1.4;
      color: #000000;
      margin-bottom: 4px;
    }

    .featured-card .title {
      font-family: 'DindanMai';
      font-weight: 700;
      font-size: 15px;
      line-height: 1.4;
      color: #000000;
      margin-bottom: 4px;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;   /* จำนวนบรรทัด */
      overflow: hidden;
    }

    .featured-card .title a {
      text-decoration: none;
      color: #000000;
      cursor: pointer;
      transition: opacity 0.3s;
    }

    .featured-card .title a:hover {
      opacity: 0.7;
      text-decoration: underline;
    }

    /* ── Articles Section – Gallery Grid (MadMonsterSocial style) ── */
    .articles-section {
      margin-top: 50px;
      width: 100%;
    }

    /* 3-column mixed portrait/landscape grid (no cropping) */
    .article-gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-auto-flow: row dense;   /* fill gaps automatically */
      gap: 16px;
      align-items: start;          /* ไม่ยืด cell ให้สูงเท่ากัน */
    }

    .article-gallery-thumb {
      display: block;
      position: relative;
      border-radius: 14px;
      overflow: hidden;
      background: #eee;
      text-decoration: none;
      transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    /* portrait = 1/3 กว้าง, landscape = 2/3 กว้าง */
    .article-gallery-thumb.portrait  { grid-column: span 1; }
    .article-gallery-thumb.landscape { grid-column: span 2; }

    .article-gallery-thumb:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    }

    /* แสดงรูปตามสัดส่วนจริง ไม่ crop */
    .article-gallery-thumb img {
      width: 100%;
      height: auto;
      display: block;
    }

    /* title overlay */
    .article-gallery-caption {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
      padding: 48px 16px 16px;
    }

    .article-gallery-caption span {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      overflow: hidden;
      font-family: 'DindanMai';
      font-weight: 700;
      font-size: 28px;
      line-height: 1.45;
      color: #fff;
      text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }

    /* Responsive - Large Desktop */
    @media (min-width: 1920px) {
      .article-container {
        padding: 60px 120px 40px 120px;
      }

      .article-header {
        gap: 80px;
      }

      .article-title {
        font-size: 100px;
      }

      .article-gallery-grid {
        gap: 20px;
      }

      .article-gallery-caption span {
        font-size: 17px;
      }
    }

    /* Desktop */
    @media (max-width: 1600px) {
      .article-container {
        padding: 50px 50px 40px 50px;
      }

      .article-title {
        font-size: 85px;
      }
    }

    /* Tablet Landscape */
    @media (max-width: 1366px) {
      .article-container {
        padding: 40px 40px 40px 40px;
      }

      .article-header {
        gap: 50px;
      }

      .article-title {
        font-size: 75px;
      }

      .article-gallery-grid {
        gap: 14px;
      }
    }

    /* Tablet Portrait */
    @media (max-width: 1024px) {
      .article-container {
        padding: 40px 40px 40px 40px;
      }

      .article-header {
        flex-direction: column;
        gap: 30px;
        padding-top: 40px;
      }

      .article-title {
        font-size: 70px;
      }

      .articles-section {
        margin-top: 40px;
      }

      /* ลดเหลือ 2 คอลัมน์, landscape ยังคง span 2 (เต็มแถว) */
      .article-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
      }

      .article-gallery-thumb.landscape {
        grid-column: span 2;
      }
    }

    /* Mobile */
    @media (max-width: 768px) {
      .article-container {
        padding: 30px 24px 40px 24px;
        margin: 70px auto 0;
      }

      .article-header {
        padding-top: 30px;
        gap: 24px;
      }

      .article-title {
        font-size: 56px;
        margin-bottom: 20px;
      }

      .articles-section {
        margin-top: 30px;
      }

      .article-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }

      .article-gallery-thumb.landscape {
        grid-column: span 2;
      }

      .article-gallery-caption span {
        font-size: 13px;
      }
    }