/* Purpose-built page layouts (not gallery grids) */

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

.pillar-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.pillar-card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: var(--primary);
}

.pillar-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.pillar-card--vision { border-top: 4px solid #0f766e; }
.pillar-card--mission { border-top: 4px solid #0b153a; }
.pillar-card--values { border-top: 4px solid #f59e0b; }
.pillar-card--ethics { border-top: 4px solid #7c3aed; }

.mgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.mgmt-card {
  text-align: center;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mgmt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.mgmt-card img {
  width: 100%;
  max-width: 200px;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  margin: 0 auto 12px;
  display: block;
  background: #f8fafc;
}

.mgmt-card h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--primary);
}

.mgmt-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.mgmt-card a {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--secondary);
}

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

.feature-card {
  padding: 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.feature-card .feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(11, 21, 58, 0.08), rgba(15, 118, 110, 0.12));
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--primary);
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--muted);
}

.feature-card a {
  display: inline-block;
  margin-top: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--secondary);
}

.steps-list {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.steps-list li {
  counter-increment: step;
  padding: 16px 16px 16px 56px;
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad-1);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.info-table th,
.info-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.info-table th {
  background: #f1f5f9;
  color: var(--primary);
  width: 38%;
}

.cta-band {
  background: var(--grad-1);
  color: #fff;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 10px;
}

.cta-band p {
  margin: 0 0 18px;
  opacity: 0.92;
}

.cta-band .btn { margin: 0 6px; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.stat-box {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  border: 1px solid #e2e8f0;
}

.stat-box strong {
  display: block;
  font-size: 1.35rem;
  color: var(--primary);
}

.stat-box span {
  font-size: 0.82rem;
  color: var(--muted);
}

.message-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.message-portrait {
  text-align: center;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  position: sticky;
  top: 100px;
}

.message-portrait img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 12px;
  background: #f8fafc;
}

.message-body {
  padding: 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.message-body p {
  line-height: 1.8;
  color: var(--muted);
}

/* Gallery page */
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.gallery-filter {
  padding: 10px 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-filter:hover,
.gallery-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-item {
  border: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #f1f5f9;
  aspect-ratio: 4/3;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 6, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-lightbox.open {
  display: flex;
}

.gallery-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
}

.gallery-lightbox-close { top: 20px; right: 20px; }
.gallery-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.gallery-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

.gallery-lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 0.9rem;
}

.class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.class-tab {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.class-tab.active {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

@media (max-width: 980px) {
  .pillar-grid,
  .feature-grid,
  .stats-strip {
    grid-template-columns: 1fr 1fr;
  }
  .message-layout {
    grid-template-columns: 1fr;
  }
  .message-portrait {
    position: static;
  }
}

@media (max-width: 640px) {
  .pillar-grid,
  .feature-grid,
  .stats-strip {
    grid-template-columns: 1fr;
  }
}
