/* =========================================================
   Toad University Press — styles.css
   Academic / restrained aesthetic
   ========================================================= */

/* ---------- Base Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- Page Background + Watermark Layer ---------- */
html, body { height: 100%; }

body {
    font-family: Georgia, "Times New Roman", serif;
    background: #f6f6f6;   /* base paper tone */
    color: #222;
    line-height: 1.7;
    position: relative;
}

/* Watermark behind all content (works even with white sections) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("../images/watermark.png") center center no-repeat;
    background-size: 900px;   /* adjust if desired */
    opacity: 0.08;            /* adjust visibility: 0.05–0.12 */
    pointer-events: none;
    z-index: 0;
}

.catalog-redirect {
  text-align: center;
  padding: 60px 20px;
}

.catalog-redirect h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.catalog-redirect p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-button {
  display: inline-block;
  padding: 14px 32px;
  background-color: #1c3d2b; /* deep academic green */
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.catalog-button:hover {
  background-color: #27593f;
}

/* Logo image */
.site-logo {
  height: 42px;   /* not too large */
  width: auto;
  display: block;
}

.logo a {
  display: inline-block;
}

/* Keep all site content above watermark */
.site-header,
.hero,
.content,
footer {
    position: relative;
    z-index: 1;
}

/* ---------- Layout ---------- */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---------- Header / Nav ---------- */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 18px 0; /* slightly tighter; keep if you want */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

/* FIX: logo row layout (image + text) */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* FIX: logo text control (prevents weird inheritance) */
.logo-text {
    display: inline-block;
    line-height: 1;
}

/* FIX: nav layout stability */
nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0;
}

nav a {
    margin-left: 28px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    letter-spacing: 0.5px;
}

nav a:hover { opacity: 0.6; }

/* ---------- Hero ---------- */
.hero {
    padding: 140px 0 120px 0;
    text-align: center;
    background: rgba(255,255,255,0.88);
    border-bottom: 1px solid #eeeeee;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 18px;
    font-weight: 500;
}

.hero p {
    font-size: 18px;
    color: #555;
}

/* ---------- Content ---------- */
.content {
    padding: 80px 0;
    background: rgba(255,255,255,0.96);
}

.content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 500;
}

.content p {
    font-size: 16px;
    margin-bottom: 18px;
}

/* Nice section rhythm for pages with many headings */
.content h2 {
    margin-top: 60px;
}
.content h2:first-of-type {
    margin-top: 0;
}

/* ---------- Footer ---------- */
footer {
    padding: 50px 0;
    text-align: center;
    font-size: 13px;
    color: #777;
    background: #f2f2f2;
    border-top: 1px solid #e5e5e5;
}

/* =========================================================
   Books / Catalog
   ========================================================= */

.series-block {
    margin-top: 90px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
}

.series-block:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.series-head h2 {
    margin-bottom: 10px;
}

.series-sub {
    color: #666;
    font-size: 14px;
    margin-bottom: 22px;
    max-width: 900px;
}

/* 4-across cover grid that wraps naturally */
.cover-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

/* Cover cards */
.cover-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,0.98);
    border: 1px solid #e7e7e7;
    transition: opacity 0.15s ease;
}

.cover-card:hover { opacity: 0.85; }

.cover-card img {
    width: 100%;
    aspect-ratio: 2 / 3;      /* forces consistent cover shape */
    object-fit: cover;
    display: block;
    background: #f2f2f2;
}

/* Title + note below image */
.cover-meta {
    padding: 14px 14px 16px 14px;
}

.cover-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.cover-note {
    font-size: 12px;
    color: #666;
}

/* Small helper text */
.small {
    font-size: 13px;
    color: #555;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .cover-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    nav a { margin-left: 16px; }
    .hero { padding: 110px 0 90px 0; }
    .hero h1 { font-size: 36px; }
}

/* FIX: when it gets tight, allow nav to drop cleanly */
@media (max-width: 720px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    nav {
        justify-content: flex-start;
    }
    nav a {
        margin-left: 0;
        margin-right: 16px;
        margin-top: 6px;
    }
}

@media (max-width: 800px) {
    .cover-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
    .cover-grid { grid-template-columns: 1fr; }
    .logo { font-size: 16px; }
    nav a { font-size: 13px; }
}

/* CONTACT PAGE FORM WIDTH OVERRIDE */

.contact-wrap {
  max-width: 900px;      /* increase overall form width */
  margin: 0 auto;        /* keep centered */
}

.contact-wrap form {
  width: 100%;
}

/* Make inputs feel proportional to wider layout */
.contact-wrap input,
.contact-wrap textarea {
  width: 100%;
  font-size: 1rem;
  padding: 14px 16px;
  box-sizing: border-box;
}

/* If you are using a two-column fieldrow */
.fieldrow {
  display: flex;
  gap: 16px;
}

.fieldrow input {
  flex: 1;
}

/* ===============================
   SERVICES GRID – HOME PAGE
================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 60px;
}

.service-card {
  background: #ffffff;
  padding: 32px 28px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card h3 {
  margin-top: 0;
  margin-bottom: 16px;
}

.service-card p {
  margin: 0;
  line-height: 1.6;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

/* NEW: If you reuse .series-block for the 3 service boxes row,
   remove the catalog-style top border and spacing in that context. */
.services-row .series-block {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* Responsive */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}