:root {
  --bg: #fafafa;
  --card-radius: 14px;
  --header-height: 106px;
  --footer-height: 148px;
  --text-dark: #1f2937;
  --text-muted: #4b5563;
  --border-soft: #e5e7eb;
  --overlay: rgba(245, 245, 245, 0.86);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text-dark);
  background: var(--bg);
  min-height: 100vh;
}

.site-header,
.site-footer {
  position: fixed;
  left: 0;
  width: 100%;
  z-index: 100;
  background: #ffffff;
}

.site-header {
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
}

.site-footer {
  bottom: 0;
  min-height: var(--footer-height);
  border-top: 1px solid var(--border-soft);
}

.brand-wrap,
.footer-inner {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.brand-wrap {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
}

.brand-logo {
  width: 190px !important;
  max-width: 42vw;
  max-height: 56px;
  height: auto !important;
  object-fit: contain;
  display: block;
}

.brand-copy h1 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  font-weight: 700;
}

.brand-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.page-content {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding-top: calc(var(--header-height) + 22px);
  padding-bottom: calc(var(--footer-height) + 28px);
}

.section-block {
  margin-bottom: 26px;
}

.section-title-wrap h2,
.section-header {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
}

.section-title-wrap p {
  margin: 0;
  color: var(--text-muted);
}

.back-link {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  color: #1d4ed8;
  font-weight: 600;
}

.tile-grid {
  display: grid !important;
  gap: 18px;
}

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

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

.template-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
  min-height: 230px;
  aspect-ratio: 16 / 10;
  background: #e5e7eb;
}

.template-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-media {
  flex: 1;
  min-height: 170px;
}

.tile-media-single {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-collage {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 4px;
  padding: 4px;
}

.tile-collage-item {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.tile-collage-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.tile-collage-2 .tile-collage-item {
  grid-row: 1 / span 2;
}

.tile-collage-3 .tile-collage-item:first-child {
  grid-column: 1 / span 2;
}

.tile-collage-4 .tile-collage-item:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.tile-collage-4 .tile-collage-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.tile-collage-4 .tile-collage-item:nth-child(3) {
  grid-column: 1;
  grid-row: 2;
}

.tile-collage-4 .tile-collage-item:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

.tile-overlay {
  position: relative;
  padding: 12px 14px 6px 14px;
  background: var(--overlay);
  backdrop-filter: blur(1px);
  border-bottom: 1px solid var(--border-soft);
}

.tile-overlay h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}

.tile-overlay p {
  margin: 0;
  color: #374151;
  font-size: 0.86rem;
  line-height: 1.35;
}

.template-tile:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
  align-items: center;
  min-height: var(--footer-height);
  padding: 16px 0;
}

.footer-company p,
.footer-contact p,
.footer-copy p {
  margin: 3px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-contact h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  :root {
    --footer-height: 230px;
  }
}

@media (max-width: 700px) {
  .tile-grid-2,
  .tile-grid-3 {
    grid-template-columns: 1fr;
  }

  .brand-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  :root {
    --header-height: 150px;
  }
}

