/* Shared styles for internal content pages.
   This file extends the existing css/styles.css. */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--body);
  margin-bottom: 32px;
  transition: color .18s ease;
}

.back-link:hover { color: var(--accent); }

.content-hero {
  padding: 32px 0 64px;
}

.content-hero-simple {
  padding-bottom: 48px;
}

.content-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
}

/* Without a hero image the text spans the full width. */
.content-hero-grid > :only-child {
  grid-column: 1 / -1;
}

.content-hero-grid h1 {
  margin-bottom: 14px;
}

.content-hero-grid p {
  max-width: 520px;
  margin-bottom: 12px;
}

.content-hero-grid .hero-actions {
  margin-top: 24px;
}

.content-hero-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.content-page-title {
  margin-bottom: 0;
}

.principles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.principle {
  padding: 24px;
  min-height: 180px;
}

.principle:nth-child(2n) {
  border-left: 1px solid var(--border);
}

.principle:nth-child(n+3) {
  border-top: 1px solid var(--border);
}

.principle span {
  display: block;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 32px;
}

.principle h3 {
  margin-bottom: 6px;
}

.principle p {
  margin-bottom: 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-grid img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.photo-grid img:first-child {
  grid-column: 1 / -1;
  height: 380px;
}

.facilities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.facility-card,
.facility-placeholder {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}

.facility-card-wide {
  grid-column: 1 / -1;
}

.facility-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.facility-card-wide img {
  height: 420px;
}

.facility-card figcaption {
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid var(--border);
  flex-direction: column;
}

.facility-card figcaption i {
  color: var(--accent);
  font-size: 18px;
}

.facility-card figcaption span {
  display: flex;
  flex-direction: column;
}

.facility-card strong,
.facility-placeholder strong {
  color: var(--title);
  font-weight: 600;
}

.facility-card small,
.facility-placeholder span {
  color: var(--body);
  font-size: 14px;
}

.facility-placeholder {
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.facility-placeholder i {
  color: var(--accent);
  font-size: 24px;
  margin-bottom: 12px;
}

.transport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.transport-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}

.transport-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #f3f7fc;
  color: var(--accent);
  border-radius: 6px;
}

.transport-card h3 {
  margin: 5px 0 14px;
}

.phone-list {
  border-top: 1px solid var(--border);
}

.phone-list a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: color .18s ease;
}

.phone-list a:hover {
  color: var(--accent);
}

.phone-list small {
  color: var(--muted);
  font-size: 14px;
}

.phone-list i {
  color: var(--accent);
}

.info-note {
  margin-top: 16px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.info-note i {
  color: var(--accent);
  margin-top: 3px;
}

.info-note p {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .content-hero {
    padding: 52px 0 44px;
  }

  .content-hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .content-hero-image {
    max-height: 320px;
  }

  .principles-grid,
  .transport-grid,
  .facilities-grid {
    grid-template-columns: 1fr;
  }

  .principle:nth-child(2n) {
    border-left: 0;
  }

  .principle + .principle {
    border-top: 1px solid var(--border);
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid img,
  .photo-grid img:first-child {
    grid-column: auto;
    height: 240px;
  }

  .facility-card-wide {
    grid-column: auto;
  }

  .facility-card img,
  .facility-card-wide img {
    height: 260px;
  }

  .facility-placeholder {
    min-height: 260px;
  }
}

/* Quem somos */

/* Horizontal timeline: scrolls past the container edges, first item aligned with the content. */
.timeline-scroll {
  --gutter: max(16px, calc((100% - var(--max)) / 2));
  overflow-x: auto;
  padding: 8px var(--gutter) 16px;
  scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
}

.timeline-scroll::-webkit-scrollbar { display: none; }
.timeline-scroll.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  width: max-content;
}

.timeline-item {
  position: relative;
  flex: 0 0 340px;
  padding-right: 40px;
  scroll-snap-align: start;
  user-select: none;
}

/* Line and dot between the year and the text. */
.timeline-item::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-strong);
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 39px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--white);
}

.timeline-year {
  display: block;
  line-height: 24px;
  margin-bottom: 40px;
  color: var(--accent);
  font-weight: 600;
}

.timeline-item h3 {
  margin-bottom: 6px;
}

.timeline-item p {
  margin-bottom: 0;
}

/* Same card size in every team section: photo on top, text below. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.team-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.team-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background: var(--icon-box-bg);
  color: var(--accent);
  font-size: 40px;
  font-weight: 600;
}

img.team-photo {
  display: block;
  height: auto;
  object-fit: cover;
}

.team-card > div {
  padding: 16px 20px 20px;
}

.team-card h3 {
  margin-bottom: 4px;
}

.team-card p {
  margin-bottom: 0;
}

.about-cta {
  margin-top: 24px;
}

.about-cta a {
  color: var(--accent);
}

@media (max-width: 960px) {
  .team-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timeline-item {
    flex-basis: 280px;
    padding-right: 32px;
  }

  .team-photo {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .timeline-scroll {
    --gutter: 12px;
  }
}
