/* ---------- Base / desktop ---------- */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li,
button,
input,
textarea,
select {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

object, iframe, embed {
    font-family: inherit; /* don’t force a text font onto viewer UIs */
}

:root {
  --blue: #004aad;
  --blue-d: #003480;
  --bg: #fafafa;
  --ink: #222;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
  background-color: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  position: sticky; /* stays visible on scroll */
  top: 0;
  z-index: 10;
  background: var(--blue);
  color: #fff;
  text-align: center;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.75rem); /* fluid size */
}

nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tab-button {
  background: #fff;
  color: var(--blue);
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tab-button.active,
.tab-button:hover {
  background: var(--blue-d);
  color: #fff;
}

main {
  flex: 1;
  padding: 1.5rem;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

h2 {
  margin: 0 0 1rem 0;
  color: var(--blue-d);
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  place-items: center;
}

.gallery img {
  width: 100%;
  max-width: 800px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.pdf-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pdf-container iframe {
  display: block;
  width: min(1200px, 95vw);
  height: 85vh; /* use viewport height for better use of space */
  margin: 0 auto;
  border: 1px solid #bbb;
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: #fff;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #eee;
  font-size: 0.95rem;
}

/* Tabs */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
  main {
    padding: 1.25rem;
  }
  .pdf-container iframe {
    width: 96vw;
    height: 80vh;
  }
}

/* ---------- Large phones / small tablets (≤ 768px) ---------- */
@media (max-width: 768px) {
  nav {
    gap: 0.5rem;
  }
  .tab-button {
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
  }
  .gallery {
    grid-template-columns: 1fr;
  } /* images stack */
  .gallery img {
    max-width: 95vw;
  }
  .pdf-container iframe {
    width: 98vw;
    height: 78vh;
  }
}

/* ---------- Small phones (≤ 480px) ---------- */
@media (max-width: 480px) {
  header {
    padding: 0.65rem 0.75rem;
  }
  .tab-button {
    width: 100%;
    max-width: 480px;
  } /* full-width tap targets */
  main {
    padding: 1rem 0.75rem;
  }
  h2 {
    margin-bottom: 0.75rem;
  }
  .pdf-container {
    gap: 1.25rem;
  }
  .pdf-container iframe {
    width: 100vw; /* truly edge-to-edge */
    margin-left: calc(50% - 50vw); /* bleed to screen edges */
    margin-right: calc(50% - 50vw);
    height: 72vh; /* a bit shorter for tiny screens */
    border-radius: 8px;
  }
}

.pdf-object {
  display: block;
  width: min(1200px, 95vw);
  height: 85vh;
  margin: 0 auto;
  border: 1px solid #bbb;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #fff;
}

/* style fallback content */
.pdf-fallback {
  padding: 1rem;
  text-align: center;
}
.pdf-fallback a {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: #004aad;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

/* small phones: a bit shorter viewer */
@media (max-width: 480px) {
  .pdf-object {
    height: 72vh;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
}
