/* ==========================================================================
   Glass Decorative Idea Article — Airy Glass Theme + 3D Scroller
   MAXXMA Knowledge Hub | Phase 3 — Content Hub & Knowledge SEO
   ========================================================================== */

/* === CSS Custom Properties (Glass Light Theme) === */
:root {
  --gd-bg-primary: #FFFFFF;
  --gd-bg-soft: #F8FAFC;
  --gd-bg-glass: #F0F8FF;
  --gd-accent-gold: #947E33;
  --gd-accent-blue: #48819F;
  --gd-accent-blue-light: #E0F0F8;
  --gd-accent-teal: #3AAFA9;
  --gd-text-primary: #1E293B;
  --gd-text-secondary: #475569;
  --gd-text-muted: #64748B;
  --gd-border: #E2E8F0;
  --gd-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --gd-shadow-md: 0 4px 20px rgba(0,0,0,0.07);
  --gd-shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
  --gd-shadow-glass: 0 8px 32px rgba(72, 129, 159, 0.12);
  --gd-radius: 16px;
  --gd-transition: 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* === Base Reset === */
.gd-article {
  font-family: 'Sarabun', 'GraphikThai', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gd-text-primary);
  background: var(--gd-bg-primary);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

/* === 3D Parallax Container === */
.gd-scene {
  perspective: 1200px;
  transform-style: preserve-3d;
  will-change: transform;
}

.gd-layer {
  transition: transform var(--gd-transition);
}

/* ==========================================================================
   HERO SECTION — Glass-inspired airy hero
   ========================================================================== */
.gd-hero {
  position: relative;
  width: 100%;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #EDF7FA 0%, #F8FAFC 100%);
}

.gd-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.gd-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.15) 0%,
    rgba(255,255,255,0.65) 55%,
    rgba(255,255,255,0.92) 100%
  );
  z-index: 1;
}

.gd-hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gd-hero:hover .gd-hero__bg-img {
  transform: scale(1.02);
}

.gd-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 2rem;
  animation: gdFadeUp 1s ease-out;
}

.gd-hero__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gd-text-muted);
  margin-bottom: 1rem;
}

.gd-hero__breadcrumb a {
  color: var(--gd-accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

.gd-hero__breadcrumb a:hover {
  color: var(--gd-accent-gold);
}

.gd-hero__category {
  display: inline-block;
  background: var(--gd-accent-blue-light);
  color: var(--gd-accent-blue);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.gd-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--gd-text-primary);
  line-height: 1.2;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.gd-hero__title span {
  color: var(--gd-accent-teal);
}

.gd-hero__subtitle {
  font-size: 1.125rem;
  color: var(--gd-text-secondary);
  max-width: 600px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.gd-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--gd-text-muted);
}

.gd-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   ARTICLE BODY CONTAINER
   ========================================================================== */
.gd-article__container {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

/* ==========================================================================
   SECTION — 3D Layered Sections with glass-inspired float
   ========================================================================== */
.gd-section {
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gd-section.gd-visible {
  opacity: 1;
  transform: translateY(0);
}

.gd-section__header {
  margin-bottom: 1.5rem;
}

.gd-section__num {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gd-accent-teal);
  margin-bottom: 0.5rem;
}

.gd-section__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gd-text-primary);
  line-height: 1.35;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.gd-section__body {
  font-size: 1.05rem;
  color: var(--gd-text-secondary);
  line-height: 1.9;
}

.gd-section__body p {
  margin-bottom: 1.25rem;
}

.gd-section__body strong {
  color: var(--gd-text-primary);
  font-weight: 600;
}

/* ==========================================================================
   FIGURE / IMAGE — Glass card effect
   ========================================================================== */
.gd-figure {
  margin: 2.5rem 0;
  border-radius: var(--gd-radius);
  overflow: hidden;
  box-shadow: var(--gd-shadow-glass);
  background: var(--gd-bg-primary);
  border: 1px solid rgba(58, 175, 169, 0.15);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.5s ease;
}

.gd-figure:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--gd-shadow-lg);
}

.gd-figure img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.gd-figure:hover img {
  transform: scale(1.03);
}

.gd-figure__caption {
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  color: var(--gd-text-muted);
  text-align: center;
  background: var(--gd-bg-soft);
  border-top: 1px solid var(--gd-border);
}

/* ==========================================================================
   TWO-COLUMN LAYOUT
   ========================================================================== */
.gd-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .gd-two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.gd-two-col__text {
  font-size: 1.05rem;
  color: var(--gd-text-secondary);
  line-height: 1.9;
}

.gd-two-col__visual {
  border-radius: var(--gd-radius);
  overflow: hidden;
  box-shadow: var(--gd-shadow-glass);
  border: 1px solid rgba(58, 175, 169, 0.12);
}

.gd-two-col__visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   HIGHLIGHT BOX — Teal accent callout for problem/solution
   ========================================================================== */
.gd-highlight-box {
  background: linear-gradient(135deg, #EBF9F8 0%, #D6F3F0 100%);
  border-left: 4px solid var(--gd-accent-teal);
  border-radius: 0 var(--gd-radius) var(--gd-radius) 0;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
}

.gd-highlight-box__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2B8C89;
  margin-bottom: 0.75rem;
}

.gd-highlight-box p {
  color: var(--gd-text-secondary);
  margin: 0;
  font-size: 1.02rem;
}

/* Warm problem callout */
.gd-highlight-box--warm {
  background: linear-gradient(135deg, #FEF9E7 0%, #FDF3D0 100%);
  border-left: 4px solid var(--gd-accent-gold);
}

.gd-highlight-box--warm .gd-highlight-box__title {
  color: var(--gd-accent-gold);
}

/* ==========================================================================
   IDEA CARDS GRID — 5 decoration ideas
   ========================================================================== */
.gd-ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}

@media (max-width: 480px) {
  .gd-ideas-grid {
    grid-template-columns: 1fr;
  }
}

.gd-idea-card {
  background: var(--gd-bg-primary);
  border-radius: var(--gd-radius);
  overflow: hidden;
  box-shadow: var(--gd-shadow-glass);
  border: 1px solid rgba(58, 175, 169, 0.10);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.5s ease;
}

.gd-idea-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--gd-shadow-lg);
}

.gd-idea-card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.gd-idea-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.gd-idea-card__num {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gd-accent-teal);
  display: block;
  margin-bottom: 0.35rem;
}

.gd-idea-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gd-text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

.gd-idea-card__desc {
  font-size: 0.92rem;
  color: var(--gd-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   SPEC TABLE — Technical specs
   ========================================================================== */
.gd-spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: var(--gd-bg-primary);
  border-radius: var(--gd-radius);
  overflow: hidden;
  box-shadow: var(--gd-shadow-sm);
}

.gd-spec-table thead {
  background: var(--gd-accent-teal);
  color: #fff;
}

.gd-spec-table th {
  padding: 0.85rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.gd-spec-table td {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--gd-border);
  font-size: 0.95rem;
  color: var(--gd-text-secondary);
}

.gd-spec-table tr:last-child td {
  border-bottom: none;
}

.gd-spec-table tr:nth-child(even) {
  background: var(--gd-bg-soft);
}

/* ==========================================================================
   FAQ SECTION — Accordion
   ========================================================================== */
.gd-faq {
  background: var(--gd-bg-soft);
  border-radius: var(--gd-radius);
  padding: 2rem;
  margin: 3rem 0;
}

.gd-faq__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gd-text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

.gd-faq__item {
  background: var(--gd-bg-primary);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  box-shadow: var(--gd-shadow-sm);
  transition: box-shadow 0.3s ease;
}

.gd-faq__item:hover {
  box-shadow: var(--gd-shadow-md);
}

.gd-faq__question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gd-text-primary);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.gd-faq__question:hover {
  color: var(--gd-accent-teal);
}

.gd-faq__icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
  color: var(--gd-accent-teal);
}

.gd-faq__item.gd-faq--open .gd-faq__icon {
  transform: rotate(45deg);
}

.gd-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.gd-faq__item.gd-faq--open .gd-faq__answer {
  max-height: 500px;
}

.gd-faq__answer-inner {
  padding: 0 1.5rem 1.25rem;
  color: var(--gd-text-secondary);
  font-size: 0.98rem;
  line-height: 1.8;
}

/* ==========================================================================
   CTA SECTION — Contact
   ========================================================================== */
.gd-cta {
  background: linear-gradient(135deg, var(--gd-accent-teal) 0%, #2B8C89 100%);
  border-radius: var(--gd-radius);
  padding: 3rem 2rem;
  margin: 4rem 0 2rem;
  text-align: center;
  color: #fff;
  box-shadow: var(--gd-shadow-lg);
}

.gd-cta__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.gd-cta__desc {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.gd-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gd-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.gd-cta__btn--primary {
  background: #fff;
  color: var(--gd-accent-teal);
}

.gd-cta__btn--primary:hover {
  background: var(--gd-accent-gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.gd-cta__btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}

.gd-cta__btn--secondary:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* ==========================================================================
   LIST WITH DECORATIVE ICONS
   ========================================================================== */
.gd-list--decorated {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.gd-list--decorated li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  color: var(--gd-text-secondary);
  font-size: 1.02rem;
  line-height: 1.7;
}

.gd-list--decorated li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gd-accent-teal);
  transform: translateY(-50%);
}

/* ==========================================================================
   BACK TO HUB LINK
   ========================================================================== */
.gd-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gd-accent-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  transition: color 0.2s, gap 0.2s;
  margin-bottom: 2rem;
}

.gd-back-link:hover {
  color: var(--gd-accent-teal);
  gap: 0.75rem;
}

.gd-back-link svg {
  transition: transform 0.2s;
}

.gd-back-link:hover svg {
  transform: translateX(-3px);
}

/* ==========================================================================
   SOLUTION CARDS — Film benefits
   ========================================================================== */
.gd-solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2.5rem 0;
}

@media (max-width: 600px) {
  .gd-solution-grid {
    grid-template-columns: 1fr;
  }
}

.gd-solution-card {
  background: var(--gd-bg-primary);
  border-radius: var(--gd-radius);
  padding: 1.5rem;
  box-shadow: var(--gd-shadow-sm);
  border: 1px solid var(--gd-border);
  transition: all 0.3s ease;
}

.gd-solution-card:hover {
  box-shadow: var(--gd-shadow-md);
  border-color: var(--gd-accent-teal);
}

.gd-solution-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.gd-solution-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gd-text-primary);
  margin: 0 0 0.5rem;
}

.gd-solution-card__desc {
  font-size: 0.92rem;
  color: var(--gd-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   TABLE OF CONTENTS (TOC)
   ========================================================================== */
.gd-toc {
  background: var(--gd-bg-soft);
  border: 1px solid var(--gd-border);
  border-radius: var(--gd-radius);
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  position: relative;
  box-shadow: var(--gd-shadow-sm);
}

.gd-toc__heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gd-text-primary);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gd-toc__heading::before {
  content: '📑';
  font-size: 1.25rem;
}

.gd-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: gd-toc-counter;
}

.gd-toc__item {
  counter-increment: gd-toc-counter;
  margin-bottom: 0.25rem;
}

.gd-toc__item:last-child {
  margin-bottom: 0;
}

.gd-toc__link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--gd-text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  transition: all 0.25s ease;
  position: relative;
}

.gd-toc__link::before {
  content: counter(gd-toc-counter) '.';
  font-weight: 700;
  color: var(--gd-accent-teal);
  font-size: 0.8rem;
  min-width: 1.25rem;
  flex-shrink: 0;
}

.gd-toc__link:hover {
  background: var(--gd-accent-blue-light);
  color: var(--gd-accent-blue);
}

.gd-toc__link.gd-toc--active {
  background: var(--gd-accent-blue-light);
  color: var(--gd-accent-blue);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--gd-accent-teal);
}

/* TOC as sticky sidebar on wide screens */
@media (min-width: 1200px) {
  .gd-toc {
    position: fixed;
    left: max(calc((100vw - 820px) / 2 - 260px), 1rem);
    top: 8rem;
    width: 230px;
    max-height: calc(100vh - 10rem);
    overflow-y: auto;
    padding: 1.25rem 1.25rem;
    margin-bottom: 0;
    z-index: 10;
  }

  .gd-toc__heading {
    font-size: 1rem;
  }

  .gd-toc__link {
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
  }
}

@media (max-width: 1199px) {
  .gd-toc {
    display: block;
  }
}

/* ==========================================================================
   KEYFRAMES
   ========================================================================== */
@keyframes gdFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .gd-hero {
    min-height: 55vh;
  }

  .gd-hero__title {
    font-size: 1.75rem;
  }

  .gd-hero__subtitle {
    font-size: 1rem;
  }

  .gd-hero__meta {
    font-size: 0.8rem;
    gap: 0.75rem;
  }

  .gd-section__title {
    font-size: 1.35rem;
  }

  .gd-section__body {
    font-size: 1rem;
  }

  .gd-article__container {
    padding: 2rem 1rem 3rem;
  }

  .gd-faq {
    padding: 1.5rem 1rem;
  }

  .gd-spec-table {
    font-size: 0.85rem;
  }

  .gd-spec-table th,
  .gd-spec-table td {
    padding: 0.6rem 0.75rem;
  }

  .gd-cta {
    padding: 2rem 1.25rem;
  }

  .gd-cta__title {
    font-size: 1.35rem;
  }

  .gd-ideas-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
  .gd-hero__bg,
  .gd-cta,
  .gd-faq,
  .gd-toc {
    display: none;
  }

  .gd-article {
    color: #000;
    background: #fff;
  }

  .gd-section {
    opacity: 1 !important;
    transform: none !important;
    break-inside: avoid;
  }
}