* { box-sizing: border-box; font-family: Arial, Helvetica, sans-serif; }

body { margin: 0; background: #f6f6f6; color: #222; }

/* Header */
.header {
  text-align: center;
  padding: 28px 18px;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.logo { max-width: 220px; height: auto; }

/* Layout */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px;
}

.row {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

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

@media (max-width: 900px) {
  .row-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .row-3 { grid-template-columns: 1fr; }
}

/* Flip card */
.card {
  perspective: 1200px;
  border-radius: 16px;
  min-height: 190px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 190px;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  border-radius: 16px;
}

/* Hover flip (desktop) */
@media (hover: hover) {
  .card:hover .card-inner {
    transform: rotateY(180deg);
  }
}

/* Tap flip (mobile) */
.card.flip .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

/* Front */
.card-front {
  background: #fff;
  display: grid;
  place-items: center;
  padding: 22px;
}

.card-front img {
  max-width: 170px;
  width: 70%;
  height: auto;
  object-fit: contain;
}

/* Back */
.card-back {
  background: rgba(0,0,0,0.85);
  color: #fff;
  transform: rotateY(180deg);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
}

.card-links {
  display: grid;
  gap: 10px;
}

.card-links a {
  display: inline-block;
  background: rgba(255,255,255,0.14);
  color: #fff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.card-links a:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

/* Primary CTA */
.card-links a.primary {
  background: #ffffff;
  color: #111;
}

.card-links a.primary:hover {
  background: #f2f2f2;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px 18px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 14px;
}

.footer .hosting {
  margin-top: 6px;
  color: #666;
}

.footer a {
  color: #0077cc;
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }