/* ============================================
   Smart Grocery Savings — Main Stylesheet
   ============================================ */

/* ── GOOGLE FONTS ── */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Source+Sans+3:wght@400;600&display=swap");

/* ── CSS VARIABLES ── */
:root {
  --green: #2e7d32;
  --green-dark: #1b5e20;
  --green-mid: #2e8b57;
  --green-light: #e8f5e9;
  --orange: #e65100;
  --orange-mid: #ff7f50;
  --cream: #fafaf7;
  --ink: #1a1a1a;
  --muted: #666;
  --border: #e0e0e0;
  --white: #ffffff;
}

/* ── RESET ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── BASE ── */
body {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  background-color: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

/* ── HEADER ── */
header {
  background-color: var(--green-dark);
  color: white;
  padding: 1rem 1.5rem;
  text-align: center;
}

header h1 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

/* ── NAVIGATION ── */
nav {
  margin-top: 0.5rem;
}

nav a {
  color: #c8e6c9;
  margin: 0 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

nav a:hover,
nav a.active {
  color: white;
  text-decoration: none;
}

/* ── MAIN CONTENT ── */
main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

main h2 {
  font-family: "Playfair Display", serif;
  color: var(--green-mid);
  margin-bottom: 1rem;
}

main h3 {
  color: #003366;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

main p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: #444;
}

main a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

main a:hover {
  text-decoration: underline;
  color: var(--orange-mid);
}

/* ── BUTTONS ── */
.button {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  margin: 0.75rem 0.25rem 0.75rem 0;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    transform 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.button-green,
.button {
  background-color: var(--green);
  color: white;
}

.button-green:hover,
.button:hover {
  background-color: var(--green-dark);
  color: white;
}

.button-orange {
  background-color: var(--orange-mid);
  color: white;
}

.button-orange:hover {
  background-color: #ff6347;
  color: white;
}

/* ── IMAGES ── */
.shared-banner,
.blog-banner {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.banner-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.image-right {
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
}

.service-image {
  width: 120px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.post-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.contact-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 2rem;
  border-radius: 8px;
}

/* ── BLOG GRID (blog.html legacy) ── */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  text-align: center;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.blog-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.blog-card h3 {
  margin: 1rem 0 0.5rem;
  color: var(--green-mid);
}

.blog-card p {
  margin-bottom: 1rem;
  line-height: 1.55;
}

.post-date {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* ── ARTICLE (post pages) ── */
article {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

article h2 {
  font-family: "Playfair Display", serif;
  color: var(--green-mid);
  margin-bottom: 0.5rem;
}

article h3 {
  color: #003366;
  margin-top: 2rem;
}

blockquote {
  font-style: italic;
  color: #555;
  border-left: 4px solid var(--green);
  padding-left: 1rem;
  margin: 1.5rem 0;
}

/* ── CONTACT FORM ── */
label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #cfd8dc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

button[type="submit"],
form button {
  margin-top: 18px;
  background: var(--green);
  color: white;
  border: none;
  padding: 12px 0;
  width: 100%;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.25s ease;
}

button[type="submit"]:hover,
form button:hover {
  background: var(--green-dark);
}

.note {
  font-size: 0.82rem;
  color: #888;
  margin-top: 10px;
  text-align: center;
}

.subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.alt-contact {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.95rem;
  color: #444;
}

.success-message {
  background-color: #e6ffe6;
  color: var(--green);
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  margin-top: 1rem;
  display: none;
}

/* ── AD SECTION ── */
.ad-section {
  margin-top: 30px;
  text-align: center;
}

/* ── FOOTER ── */
footer {
  background-color: var(--ink);
  color: #aaa;
  text-align: center;
  padding: 1.25rem;
  margin-top: 2rem;
  font-size: 0.85rem;
}

footer a {
  color: #a5d6a7;
  text-decoration: none;
  margin: 0 6px;
}

footer a:hover {
  text-decoration: underline;
  color: white;
}

/* ── UTILITIES ── */
.text-center {
  text-align: center;
}
.mt-1 {
  margin-top: 1rem;
}
.mt-2 {
  margin-top: 2rem;
}
.mb-1 {
  margin-bottom: 1rem;
}
