/* styles.css */
:root {
  --brand-color: #004d40;
  --text-color: #333;
  --muted-color: #666;
  --border-color: #ccc;
  --radius: 8px;
  --shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(15px, 2vw, 17px); /* fluid typography */
  line-height: 1.6;
  color: var(--text-color);
  padding: 16px;
  text-align: center;
  margin: 0;
}

.branding-block {
  background: var(--brand-color);
  color: #fff;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.ad {
  border: 1px inset #999;
  padding: 16px;
  margin: 12px auto;
  background-color: #fdfdfd;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  max-width: 500px;
  flex: 1 1 300px; /* responsive sizing */
}

.ad h2 {
  color: var(--brand-color);
  font-weight: bold;
  margin-bottom: 12px;
  font-size: 1.4em;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 6px;
}

.ad-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 12px;
}

button {
  background-color: var(--brand-color);
  color: #fff;
  border: none;
  padding: 12px 18px;
  font-size: 16px;
  cursor: pointer;
  border-radius: var(--radius);
  margin: 6px;
  width: 100%;
  max-width: 280px;
  min-height: 44px; /* touch-friendly */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
  background-color: #00695c;
  transform: scale(1.03);
}

.container {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  body {
    font-size: 16px;
    padding: 8px;
  }
  .ad {
    margin: 8px auto;
    padding: 12px;
  }
  button {
    font-size: 15px;
    padding: 10px;
  }
}

/* Desktop grid layout */
@media (min-width: 768px) {
  .container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
  .ad {
    max-width: 400px;
  }
}

/* Optional dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #eee;
  }
  .ad {
    background-color: #1e1e1e;
    border-color: #444;
  }
}
