/* =====================================
   Projects Page
   Physics Toolsmith
===================================== */

.projects-page {
  background: #11161d;
  color: #ffffff;
}

/* ================= HERO ================= */

.projects-hero {
  min-height: 65vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(
      rgba(17, 22, 29, 0.4),
      rgba(17, 22, 29, 0.95)
    ),
    url('../images/projects/projects-hero.png') center / cover no-repeat;
}

.projects-hero-content {
  max-width: 800px;
}

.projects-label {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ff9d2e;
  margin-bottom: 20px;
  font-weight: 600;
}

.projects-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 25px;
  color: #ffffff;
}

.projects-hero p {
  max-width: 650px;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #c7cbd1;
}

/* ================= SECTION COMMON ================= */

.collection-section,
.projects-collection {
  padding: 90px 0;
}

.collection-section {
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
  max-width: 700px;
  margin-bottom: 50px;
}

.section-label {
  color: #ff9d2e;
  letter-spacing: 2px;
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
}

.section-header h2 {
  margin-top: 10px;
  margin-bottom: 15px;
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
}

.section-header p {
  color: #aeb4bc;
  line-height: 1.8;
}

/* ================= CATEGORY CARD ================= */

.category-card {
  height: 100%;
  padding: 35px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1b232d, #151b23);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.35s ease;
}

.category-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 157, 46, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.category-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 157, 46, 0.12);
  color: #ff9d2e;
  font-size: 1.6rem;
  margin-bottom: 25px;
  border: 1px solid rgba(255, 157, 46, 0.25);
  transition: all 0.35s ease;
}

.category-card:hover .category-icon {
  background: #ff9d2e;
  color: #111;
  border-color: #ff9d2e;
}

.category-content h3 {
  font-size: 1.3rem;
  color: #ffffff;
  margin-bottom: 12px;
}

.category-content p {
  color: #aeb4bc;
  line-height: 1.7;
  font-size: 0.95rem;
  margin: 0;
}

/* ================= PROJECT CARD (FLEX LAYOUT) ================= */

.instrument-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #161c24;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.35s ease;
}

.instrument-card:hover {
  transform: translateY(-8px);
  border-color: #ff9d2e;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.project-image {
  height: 240px;
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.instrument-card:hover .project-image img {
  transform: scale(1.06);
}

.card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-year {
  display: block;
  color: #ff9d2e;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 500;
}

.instrument-card h3 {
  font-size: 1.45rem;
  color: #ffffff;
  margin-bottom: 12px;
}

.instrument-card p {
  color: #b7bdc6;
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 25px;
  flex-grow: 1; /* ช่วยดันปุ่มแอ็กชันด้านล่างให้อยู่ระดับเดียวกันเสมอ */
}

/* Statuses & Action Links */
.card-footer-action {
  margin-top: auto;
}

.btn-link {
  color: #ff9d2e;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.btn-link:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.badge-status {
  display: inline-block;
  font-size: 0.8rem;
  color: #8b949e;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stying สำหรับ Upcoming Projects เพื่อลดความเด่นลงเล็กน้อย */
.instrument-card.is-upcoming {
  opacity: 0.9;
}

.instrument-card.is-upcoming .project-image img {
  filter: grayscale(25%);
}

.instrument-card.is-upcoming:hover .project-image img {
  filter: grayscale(0%);
}

/* ================= PHILOSOPHY ================= */

.projects-philosophy {
  padding: 100px 0;
  background: linear-gradient(180deg, #11161d, #080c12);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.philosophy-content {
  max-width: 800px;
  margin: auto;
  text-align: center;
}

.philosophy-content span {
  color: #ff9d2e;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 600;
}

.philosophy-content h2 {
  margin: 20px 0;
  font-size: 2.5rem;
  color: #ffffff;
  font-weight: 700;
}

.philosophy-content p {
  color: #c4c9d0;
  font-size: 1.1rem;
  line-height: 1.9;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  .projects-hero {
    min-height: 50vh;
  }

  .projects-hero h1 {
    font-size: 2.2rem;
  }

  .collection-section,
  .projects-collection {
    padding: 60px 0;
  }

  .philosophy-content h2 {
    font-size: 2rem;
  }
}