/* ==========================================================================
   TPM-VP-CTE5 Web Application — Visual Infographic & Light Pastel Design
   Varopakorn Public Company Limited | Caster No.5 (CTE5)
   ========================================================================== */

:root {
  --bg-main: #F4F7FB;
  --bg-card: #FFFFFF;
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --border-pastel: #DDE5F0;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #EAF2FF 0%, #F8F9FE 50%, #FFFDF9 100%);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

/* Top Navigation Tab Pills */
.top-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
}

.top-page-btn:hover {
  border-color: #93C5FD;
  background: #F0F9FF;
  transform: translateY(-1px);
}

.top-page-btn.active {
  background: linear-gradient(135deg, #1E40AF 0%, #2563EB 100%);
  color: #FFFFFF;
  border-color: #1D4ED8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}

/* Sub-module navigation pills inside the 10-Module Hub */
.module-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.18s ease;
}

.module-pill:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.module-pill.active {
  background: linear-gradient(135deg, #E0F2FE 0%, #EDE9FE 100%);
  color: #0369A1;
  border-color: #38BDF8;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}

/* ==========================================================================
   INFOGRAPHIC POSTER BOARD CONTAINER (MATCHING IMAGE 2 STYLE)
   ========================================================================== */

.infographic-board {
  background: linear-gradient(180deg, #EBF3FF 0%, #F7FAFF 60%, #FFFDF8 100%);
  border: 3px solid #BFDBFE;
  border-radius: 1.75rem;
  padding: 1.25rem;
  box-shadow: 0 14px 36px -6px rgba(30, 64, 175, 0.12);
  position: relative;
}

/* Top Navy & Gold Banner Header */
.infographic-top-banner {
  background: linear-gradient(90deg, #0F2952 0%, #1E4278 65%, #2B579A 100%);
  border-radius: 1.35rem;
  padding: 0.85rem 1.5rem;
  color: #FFFFFF;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 3px solid #3B82F6;
  box-shadow: 0 8px 20px rgba(15, 41, 82, 0.22);
  position: relative;
}

.infographic-yellow-pill {
  background: linear-gradient(180deg, #FEF08A 0%, #FDE047 100%);
  color: #1E293B;
  border: 3px solid #1E293B;
  border-radius: 9999px;
  padding: 0.35rem 1.35rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.speech-bubble-top {
  background: #FFFFFF;
  color: #0F172A;
  border: 2.5px solid #1E3A8A;
  border-radius: 1.25rem;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  position: relative;
}

/* 4-Column Problem Cards */
.infographic-col-card {
  background: #FFFFFF;
  border-radius: 1.35rem;
  border: 2.5px solid #CBD5E1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.infographic-col-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.15);
}

.col-theme-blue { border-color: #60A5FA; background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 35%); }
.col-theme-red { border-color: #F87171; background: linear-gradient(180deg, #FEF2F2 0%, #FFFFFF 35%); }
.col-theme-green { border-color: #4ADE80; background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 35%); }
.col-theme-amber { border-color: #FBBF24; background: linear-gradient(180deg, #FFFBEB 0%, #FFFFFF 35%); }

.col-header-banner {
  padding: 0.7rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.col-number-circle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 900;
  color: #FFFFFF;
  flex-shrink: 0;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Scene Image Frame with Speech Bubble Overlay */
.scene-frame {
  position: relative;
  margin: 0.6rem 0.75rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid #CBD5E1;
  background: #F8FAFC;
  height: 175px;
}

.scene-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-speech-bubble {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  max-width: 56%;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #334155;
  border-radius: 1rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.scene-speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 20px;
  border-width: 8px 6px 0;
  border-style: solid;
  border-color: #334155 transparent;
  display: block;
  width: 0;
}

/* Waste Letter Square Badge */
.waste-letter-box {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Bottom DOWNTIME + 3MU + TPM Goal Strip */
.infographic-bottom-strip {
  margin-top: 1.1rem;
  background: #FFFFFF;
  border: 2.5px solid #CBD5E1;
  border-radius: 1.35rem;
  padding: 0.9rem 1.1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

/* Pastel Card Generic */
.pastel-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-pastel);
  border-radius: 1.15rem;
  box-shadow: 0 4px 16px -2px rgba(148, 163, 184, 0.12);
}

/* Traffic Light Badges */
.traffic-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.traffic-green { background-color: #DCFCE7; color: #047857; border: 1px solid #A7F3D0; }
.traffic-yellow { background-color: #FEF3C7; color: #B45309; border: 1px solid #FDE68A; }
.traffic-red { background-color: #FFE4E6; color: #BE123C; border: 1px solid #FECDD3; }

.traffic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.traffic-green .traffic-dot { background-color: #10B981; }
.traffic-yellow .traffic-dot { background-color: #F59E0B; }
.traffic-red .traffic-dot { background-color: #F43F5E; }

/* ==========================================================================
   PAGE 3: TPM HOUSE STYLE VAROPAKORN (PASTEL INFOGRAPHIC POSTER)
   ========================================================================== */

.tpm-house-container {
  background: linear-gradient(180deg, #EBF4FF 0%, #FFFFFF 55%, #FFFBEB 100%);
  border-radius: 1.75rem;
  border: 3px solid #93C5FD;
  padding: 1.25rem;
  box-shadow: 0 14px 36px -6px rgba(30, 64, 175, 0.14);
}

.tpm-roof-pediment {
  position: relative;
  background: linear-gradient(135deg, #DBEAFE 0%, #EDE9FE 50%, #FCE7F3 100%);
  border-radius: 1.5rem 1.5rem 0.5rem 0.5rem;
  padding: 1.35rem 1.25rem 1.1rem;
  text-align: center;
  border: 3px solid #60A5FA;
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.22);
}

.tpm-roof-beam {
  background: linear-gradient(90deg, #1E3A8A 0%, #2563EB 50%, #1E3A8A 100%);
  border: 2.5px solid #1E40AF;
  border-top: none;
  border-radius: 0 0 0.85rem 0.85rem;
  padding: 0.6rem 1rem;
  text-align: center;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.9rem;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.tpm-pillars-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.65rem 0;
}

@media (max-width: 1200px) {
  .tpm-pillars-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tpm-pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tpm-pillar-column {
  display: flex;
  flex-direction: column;
  border-radius: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tpm-pillar-column:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px -4px rgba(30, 64, 175, 0.22);
}

.tpm-pillar-capital {
  padding: 0.5rem 0.35rem;
  border-radius: 0.85rem 0.85rem 0.25rem 0.25rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  border: 2.5px solid rgba(0, 0, 0, 0.12);
  border-bottom: none;
}

.tpm-pillar-shaft {
  flex: 1;
  min-height: 270px;
  padding: 0.7rem 0.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-left: 2.5px solid rgba(0, 0, 0, 0.12);
  border-right: 2.5px solid rgba(0, 0, 0, 0.12);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.45) 0px,
    rgba(255, 255, 255, 0.45) 6px,
    transparent 6px,
    transparent 14px
  );
}

.tpm-pillar-base {
  padding: 0.6rem 0.35rem;
  border-radius: 0.25rem 0.25rem 0.85rem 0.85rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 900;
  border: 2.5px solid rgba(0, 0, 0, 0.14);
}

.tpm-foundation-tier1 {
  background: linear-gradient(90deg, #DCFCE7 0%, #A7F3D0 50%, #DCFCE7 100%);
  border: 2.5px solid #10B981;
  border-radius: 1rem;
  padding: 1rem 1.15rem;
  margin-top: 0.75rem;
}

.tpm-foundation-tier2 {
  background: linear-gradient(90deg, #FEF3C7 0%, #FDE68A 50%, #FEF3C7 100%);
  border: 2.5px solid #F59E0B;
  border-radius: 1rem;
  padding: 0.75rem 1.15rem;
  margin-top: 0.5rem;
}

.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

@media print {
  .no-print { display: none !important; }
  body { background: #FFFFFF !important; }
}
