/* =========================================================
   Sarasas Teacher Portfolio / Showcase UI
   ใช้คู่กับ output.css และ navbar.php เดิม
   โทนเขียว-เหลือง สำหรับคลังผลงานครูและการโชว์ผลงาน
========================================================= */

:root {
  --tp-green-950: #052e16;
  --tp-green-900: #14532d;
  --tp-green-800: #166534;
  --tp-green-700: #15803d;
  --tp-green-600: #16a34a;
  --tp-green-100: #dcfce7;
  --tp-green-50: #f0fdf4;
  --tp-yellow-600: #ca8a04;
  --tp-yellow-500: #eab308;
  --tp-yellow-400: #facc15;
  --tp-yellow-100: #fef9c3;
  --tp-yellow-50: #fefce8;
  --tp-text: #0f172a;
  --tp-muted: #64748b;
  --tp-border: rgba(22, 101, 52, 0.16);
  --tp-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --tp-shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
}

body.service-page {
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.20), transparent 32%),
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.18), transparent 32%),
    #f8fff6;
  color: var(--tp-text);
}

.service-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.service-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 6vw, 78px) 0;
  background:
    linear-gradient(135deg, rgba(20, 83, 45, 0.96), rgba(22, 101, 52, 0.92)),
    linear-gradient(90deg, var(--tp-green-900), var(--tp-green-700));
}

.service-hero::before,
.service-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.service-hero::before {
  width: 360px;
  height: 360px;
  right: -110px;
  top: -130px;
  background: rgba(250, 204, 21, 0.28);
}

.service-hero::after {
  width: 230px;
  height: 230px;
  left: -80px;
  bottom: -100px;
  background: rgba(255, 255, 255, 0.12);
}

.service-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 30px;
  align-items: center;
}

.service-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(254, 249, 195, 0.18);
  color: #fef9c3;
  border: 1px solid rgba(254, 249, 195, 0.32);
  font-weight: 900;
}

.service-title {
  margin-top: 18px;
  color: #ffffff;
  font-size: clamp(2.25rem, 4.7vw, 4.1rem);
  font-weight: 900;
  line-height: 1.05;
}

.service-description {
  margin-top: 16px;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.04rem, 1.7vw, 1.28rem);
  line-height: 1.75;
}

.service-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.service-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.service-btn-primary {
  background: linear-gradient(135deg, var(--tp-yellow-400), var(--tp-yellow-500));
  color: var(--tp-green-950);
  box-shadow: 0 12px 28px rgba(202, 138, 4, 0.20);
}

.service-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.service-btn-secondary {
  background: #ffffff;
  color: var(--tp-green-800);
  border-color: rgba(22, 101, 52, 0.16);
}

.service-btn-secondary:hover {
  background: var(--tp-green-50);
}

.service-btn-outline {
  background: transparent;
  color: var(--tp-green-800);
  border-color: rgba(22, 101, 52, 0.28);
}

.service-btn-outline:hover {
  background: var(--tp-green-50);
}

.service-hero-badge,
.portfolio-submit-panel {
  justify-self: end;
  width: min(360px, 100%);
  padding: 26px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
  color: #ffffff;
}

.service-hero-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: #ffffff;
  font-size: 2.1rem;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.service-hero-badge h2,
.portfolio-submit-panel h2 {
  margin-top: 16px;
  font-size: 1.55rem;
  font-weight: 900;
}

.service-hero-badge p,
.portfolio-submit-panel p {
  margin-top: 8px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.84);
}

.portfolio-form-mini {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.portfolio-form-mini input,
.portfolio-form-mini select {
  width: 100%;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tp-green-950);
  outline: none;
}

.service-section {
  padding: 54px 0;
}

.service-section.compact {
  padding-top: 34px;
}

.service-section-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.service-section-title {
  color: var(--tp-green-900);
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  line-height: 1.15;
  font-weight: 900;
}

.service-section-subtitle {
  margin-top: 8px;
  max-width: 760px;
  color: var(--tp-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.portfolio-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portfolio-stat-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow-soft);
}

.portfolio-stat-card strong {
  display: block;
  color: var(--tp-green-800);
  font-size: 2rem;
  font-weight: 900;
}

.portfolio-stat-card span {
  color: var(--tp-muted);
  font-weight: 800;
}

.portfolio-toolbar {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 0.75fr);
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow-soft);
}

.portfolio-toolbar input,
.portfolio-toolbar select {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(22, 101, 52, 0.18);
  color: var(--tp-text);
  outline: none;
}

.portfolio-toolbar input:focus,
.portfolio-toolbar select:focus,
.portfolio-form-mini input:focus,
.portfolio-form-mini select:focus {
  border-color: var(--tp-yellow-500);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.18);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.portfolio-card {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow);
  transition: 0.22s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.13);
}

.portfolio-cover {
  position: relative;
  min-height: 190px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(22, 101, 52, 0.88), rgba(22, 163, 74, 0.76)),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.46), transparent 40%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portfolio-cover.yellow {
  background:
    linear-gradient(135deg, rgba(202, 138, 4, 0.94), rgba(250, 204, 21, 0.78)),
    radial-gradient(circle at top right, rgba(22, 101, 52, 0.32), transparent 40%);
  color: var(--tp-green-950);
}

.portfolio-cover.dark {
  background:
    linear-gradient(135deg, #052e16, #166534),
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.34), transparent 40%);
}

.portfolio-type {
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.28);
  font-weight: 900;
  font-size: 0.88rem;
}

.portfolio-cover.yellow .portfolio-type {
  background: rgba(255,255,255,0.52);
  border-color: rgba(255,255,255,0.42);
}

.portfolio-icon {
  align-self: flex-end;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: rgba(255,255,255,0.20);
  font-size: 2.25rem;
}

.portfolio-body {
  padding: 20px;
}

.portfolio-title {
  color: var(--tp-green-900);
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 900;
}

.portfolio-meta {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  color: var(--tp-muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.portfolio-meta strong {
  color: #334155;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.portfolio-tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tp-green-50);
  color: var(--tp-green-800);
  border: 1px solid rgba(22, 101, 52, 0.12);
  font-size: 0.88rem;
  font-weight: 800;
}

.portfolio-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.showcase-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  padding: 24px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow);
}

.showcase-image {
  min-height: 310px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(22, 101, 52, 0.86), rgba(250, 204, 21, 0.72)),
    url('img/logo.png') center/130px no-repeat;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 4rem;
}

.showcase-content h2 {
  color: var(--tp-green-900);
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  font-weight: 900;
  line-height: 1.12;
}

.showcase-content p {
  margin-top: 12px;
  color: var(--tp-muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

.showcase-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.showcase-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 18px;
  background: var(--tp-green-50);
  border: 1px solid rgba(22, 101, 52, 0.12);
}

.showcase-item-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--tp-yellow-100);
}

.timeline-panel {
  display: grid;
  gap: 14px;
}

.timeline-item {
  position: relative;
  padding: 16px 18px 16px 52px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow-soft);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 18px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--tp-yellow-400);
  box-shadow: 0 0 0 6px var(--tp-yellow-100);
}

.timeline-item h3 {
  color: var(--tp-green-900);
  font-weight: 900;
  font-size: 1.16rem;
}

.timeline-item p {
  margin-top: 5px;
  color: var(--tp-muted);
  line-height: 1.6;
}

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

.page-hub-card {
  display: flex;
  min-height: 290px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255,255,255,0.94);
  border: 1px solid var(--tp-border);
  box-shadow: var(--tp-shadow);
  transition: 0.22s ease;
}

.page-hub-card:hover {
  transform: translateY(-4px);
}

.service-card-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--tp-yellow-100), var(--tp-green-100));
  font-size: 2rem;
}

.page-hub-card h2 {
  margin-top: 16px;
  color: var(--tp-green-900);
  font-size: 1.35rem;
  font-weight: 900;
}

.page-hub-card p {
  margin-top: 8px;
  color: var(--tp-muted);
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .service-hero-inner,
  .showcase-feature {
    grid-template-columns: 1fr;
  }

  .service-hero-badge,
  .portfolio-submit-panel {
    justify-self: stretch;
    width: 100%;
  }

  .portfolio-stat-grid,
  .page-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .service-container {
    width: min(100% - 24px, 1180px);
  }

  .service-section-header {
    align-items: start;
    flex-direction: column;
  }

  .portfolio-stat-grid,
  .portfolio-grid,
  .page-hub-grid,
  .portfolio-toolbar {
    grid-template-columns: 1fr;
  }

  .showcase-image {
    min-height: 220px;
  }
}
