/*
 * TPMA 通用樣式（純 CSS，不依賴 Tailwind）
 * 來源：WP-General.css（重整）+ about/alliance 兩頁所需佈局/字型/間距
 */

:root{
  --tpma-primary:#075985;   /* 深藍 */
  --tpma-secondary:#0284c7; /* 天藍 */
  --tpma-accent:#0ea5e9;    /* 亮藍 */
  --tpma-gray-800:#1f2937;
  --tpma-gray-700:#374151;
  --tpma-gray-500:#6b7280;

  --tpma-bg:#f9fafb;        /* gray-50 */
  --tpma-tint: rgba(2,132,199,.08); /* sky-50 近似 */
  --tpma-border:#e5e7eb;    /* gray-200 */
  --tpma-border-sky:#bae6fd;/* sky-200 */
}

/* 基礎字體（若 WP 主題已設定可略過） */
body{font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;}

/* 反鋸齒（原 antialiased） */
.tpma-antialiased{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Layout ===== */
.tpma-wrapper{
  background: var(--tpma-bg);
  padding: 1rem;
}
@media (min-width: 640px){
  .tpma-wrapper{ padding: 2rem; }
}

.tpma-max-w{
  max-width: 80rem; /* 7xl */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem; /* space-y-16 */
}

/* 通用區塊 padding（原 p-6 md:p-10 / p-8 md:p-12 等） */
.tpma-section-pad{
  padding: 1.5rem;
}
@media (min-width: 768px){
  .tpma-section-pad{ padding: 2.5rem; }
}
.tpma-section--tint{ background: rgba(2,132,199,.06); } /* sky-50 類 */

.tpma-section-y{ padding: 2.5rem 0; } /* py-10 */

/* ===== Card ===== */
.tpma-feature-card{
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px -3px rgba(0,0,0,.10), 0 4px 6px -2px rgba(0,0,0,.05);
  transition: transform .3s ease;
}
.tpma-feature-card:hover{ transform: translateY(-5px); }

/* ===== Grid / Flex ===== */
.tpma-grid-2col{
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem; /* md:gap-12 */
  align-items: center;
}
@media (min-width: 768px){
  .tpma-grid-2col{ grid-template-columns: 1fr 1fr; }
  .tpma-order-md-1{ order: 1; }
  .tpma-order-md-2{ order: 2; }
}

/* about：左圖區塊（mb-8 md:mb-0） */
.tpma-mb-8-md-0{ margin-bottom: 2rem; }
@media (min-width: 768px){
  .tpma-mb-8-md-0{ margin-bottom: 0; }
}

.tpma-flex-md{ display:block; }
@media (min-width: 768px){
  .tpma-flex-md{ display:flex; align-items:flex-start; }
}
.tpma-gap-md-8{ gap: 0; }
@media (min-width: 768px){
  .tpma-gap-md-8{ gap: 2rem; }
}

.tpma-flex-1{ flex: 1 1 auto; }

/* ===== Typography ===== */
.tpma-text{ color: var(--tpma-gray-800); }

.tpma-text-center{ text-align:center; }
.tpma-text-justify{ text-align: justify; }

.tpma-h2{
  color: var(--tpma-primary);
  font-size: 2.25rem; /* ~text-4xl */
  font-weight: 800;
  line-height: 1.2;
}
@media (max-width: 420px){
  .tpma-h2{ font-size: 2rem; }
}
.tpma-h2--bordered{
  padding-bottom: .75rem;
  border-bottom: 2px solid #7dd3fc; /* sky-300 */
}

.tpma-h3{
  color: var(--tpma-primary);
  font-size: 1.75rem; /* text-2xl */
  font-weight: 700;
  line-height: 1.25;
}
@media (min-width: 640px){
  .tpma-h3{ font-size: 1.875rem; } /* sm:text-3xl */
}

.tpma-h4{
  color: var(--tpma-secondary);
  font-size: 1.125rem; /* text-lg */
  font-weight: 500;
}

.tpma-h5{
  color: var(--tpma-secondary);
  font-size: 1.5rem;  /* text-2xl */
  font-weight: 700;
  margin: 0 0 1rem 0;
}

/* 文案段落 */
.tpma-p{
  color: var(--tpma-gray-700);
  font-size: 1.125rem; /* text-lg */
  line-height: 1.75;
  margin: 0;
}
.tpma-p--sm{
  font-size: .875rem; /* text-sm */
  line-height: 1.6;
}

/* 間距輔助 */
.tpma-mb-2{ margin-bottom: .5rem; }
.tpma-mb-3{ margin-bottom: .75rem; }
.tpma-mb-6{ margin-bottom: 1.5rem; }
.tpma-mb-8{ margin-bottom: 2rem; }

/* about：內文排版 */
.tpma-prose{ color: var(--tpma-gray-800); }
.tpma-prose--spaced{ display:flex; flex-direction:column; gap: 1.5rem; }

/* 引言（TPMA 宗旨那段） */
.tpma-quote{
  font-size: 1.125rem;
  font-weight: 600;
  color: #0369a1; /* sky-700 */
  line-height: 1.75;
  border-left: 4px solid #38bdf8; /* sky-400 */
  padding: .5rem 1rem;
  background: rgba(2,132,199,.06);
  border-radius: 8px;
  margin: 0;
}

/* ===== Rules / HR ===== */
.tpma-hr{
  border: 0;
  border-top: 1px solid var(--tpma-border-sky);
  margin: 1rem 0;
}

.tpma-hr-accent{
  border: 0;
  border-top: 2px solid var(--tpma-secondary);
  margin: 0 0 1rem 0;
  width: 3rem;
}
.tpma-hr-accent--md{ width: 3rem; }
.tpma-hr-accent--lg{ width: 4rem; }

/* ===== Lists (原 space-y-3 list-none p-0 + li flex + bullet) ===== */
.tpma-ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem; /* space-y-3 */
}
.tpma-ul--grid-2{ display:flex; flex-direction:column; }
@media (min-width: 768px){
  .tpma-ul--grid-2{
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem; /* md:gap-x-10 */
  }
}

.tpma-li{
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  color: var(--tpma-gray-800);
  line-height: 1.7;
}
.tpma-bullet{
  color: var(--tpma-accent);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-top: .1rem;
}

/* ===== Images ===== */
.tpma-img{ display:block; max-width:100%; height:auto; }
.tpma-img--card{
  border-radius: .5rem;
  object-fit: cover;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.10);
}
.tpma-img--full{ width:100%; height:auto; object-fit:cover; }
.tpma-img--max-sm{ max-width: 24rem; }

/* logo 區 */
.tpma-logo-wrap{
  width: 100%;
  display:flex;
  justify-content:center;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px){
  .tpma-logo-wrap{
    width: 12rem; /* md:w-48 */
    flex: 0 0 12rem;
    margin-bottom: 0;
  }
}
.tpma-logo-img{
  width: 12rem;
  height: auto;
  object-fit: contain;
  border-radius: .5rem;
  padding: .5rem;
  border: 1px solid var(--tpma-border-sky);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.10);
}

/* ===== Alliance Visual Blocks ===== */
.tpma-visual-container{
  margin-bottom: 3rem; /* mb-12 */
  display:flex;
  flex-direction:column;
  gap: 2rem; /* space-y-8 */
}

.tpma-visual-block{
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px){
  .tpma-visual-block{
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.visual-image-container{
  width: 100%;
  overflow: hidden;
}
.visual-image-container img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.tpma-visual-text{
  padding: 1.5rem;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.tpma-strong-accent{
  font-weight: 800;
  color: var(--tpma-secondary);
}

/* 避免 WP 內建段落過大 margin 破壞間距 */
.tpma-wrapper p{ margin-top: 0; }
