/* ============================================================
   1. CORE STYLING & STICKY FOOTER LAYOUT
   ============================================================ */
:root {
  --primary-color: #2563eb;
  --text-main: #374151;
  --bg-tips: #eff6ff;     /* Kitchen tips blue */
  --bg-vibe: #fdf2f8;    /* Pharmacy vibe pink */
  --accent-vibe: #db2777;
  --bg-pro-tip: #f0fdf4; /* Skincare green */
  --accent-pro-tip: #22c55e;
  --border-color: #e5e7eb;
  --max-width: 720px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text-main);
  line-height: 1.7;
  background-color: #f9fafb;
  margin: 0;
  /* 40px top, 20px sides, 0 bottom to let footer touch the edge */
  padding: 40px 20px 0; 
  
  /* Sticky Footer Logic */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.blog-container {
  max-width: var(--max-width);
  margin: 0 auto;
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  
  /* Pushes footer to bottom on short pages */
  flex: 1; 
  width: 100%;
  box-sizing: border-box;
}

/* Vertical Rhythm: Spacing between elements inside the container */
.blog-container > * + * {
  margin-top: 1.8rem;
}

/* ============================================================
   2. TYPOGRAPHY & NAVIGATION
   ============================================================ */
h1 { font-size: 2.5rem; line-height: 1.2; color: #111; margin-bottom: 0.5rem; }
h2 { font-size: 1.75rem; color: #111; margin-top: 2.5rem; }
.meta { color: #6b7280; font-size: 0.9rem; margin-top: 0; }

.disclaimer {
  font-style: italic;
  color: #9ca3af;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: block;
}

.post-nav { margin-bottom: 20px; }

.back-link {
  text-decoration: none;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-link:hover { color: var(--primary-color); }

/* ============================================================
   3. SPECIAL CONTENT BLOCKS
   ============================================================ */

/* Product Blocks */
.product-block {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
}

/* "The Vibe" (Pink Box) */
.vibe-quote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--bg-vibe);
  border-left: 4px solid var(--accent-vibe);
  font-style: italic;
  color: #9d174d;
}

/* "Pro-Tip" (Green Box) */
.pro-tip-inline {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--bg-pro-tip);
  border-radius: 8px;
  border: 1px dashed var(--accent-pro-tip);
  font-size: 0.95rem;
}

.pro-tip-inline small {
  display: block;
  margin-top: 5px;
  color: #166534;
  font-size: 0.8rem;
}

/* Kitchen Tips Box */
.tips-box {
  background-color: var(--bg-tips);
  border-left: 4px solid var(--primary-color);
  padding: 24px;
  border-radius: 0 8px 8px 0;
}
.tips-box h3 { margin-top: 0; color: var(--primary-color); }

/* ============================================================
   4. IMAGES & MEDIA
   ============================================================ */
.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.image-grid figure { margin: 0; }

figcaption {
  text-align: center;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
  display: block;
}

.image-grid figcaption { grid-column: 1 / span 2; }

.single-image img, .featured-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* ============================================================
   5. TABLES & LISTS
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin: 2rem 0;
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.content-table th, .content-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.content-table th { background: #f8fafc; font-weight: 600; }
.content-table ol, .content-table ul { padding-left: 18px; margin: 0; }

.standard-list { padding-left: 20px; }

/* ============================================================
   6. FOOTER & UI ELEMENTS
   ============================================================ */
footer {
  text-align: center;
  padding: 40px 0;
  width: 100%;
  background-color: #f4cccc26;
  margin-top: 60px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0; /* Prevents footer from squishing */
}

footer p {
  margin: 0;
  color: #4b5563; 
  font-size: 0.85rem;
  letter-spacing: 1px;
  font-weight: 500;
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  display: none; /* Controlled by JS */
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); 
  transition: all 0.3s ease;
  z-index: 1000;
}

#backToTop:hover {
  background-color: #1d4ed8;
  transform: translateY(-5px);
}

#backToTop span { font-size: 1.2rem; font-weight: bold; }
#backToTop small { font-weight: 700; text-transform: uppercase; }

/* ============================================================
   7. MOBILE RESPONSIVENESS
   ============================================================ */
@media (max-width: 600px) {
  .blog-container { padding: 20px; }
  .image-grid { grid-template-columns: 1fr; }
  .image-grid figcaption { grid-column: 1; }
  h1 { font-size: 1.8rem; }
  
  #backToTop {
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
  }
}