/* Reset & body */
html, body {
  margin: 0;
  padding: 0;
  font-family: Helvetica, sans-serif;
  background-image: url('waternish.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: #000;
}

/* Base font size for rem units */
html {
  font-size: 16px; /* 1rem = 16px on desktop */
}

@media (max-width: 600px) {
  html { 
      font-size: 14px; } /* smaller root font on phones */
}

.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 1.125rem; /* 18px */
  margin-bottom: 1.125rem;
}

.site-title {
  font-family: Bradley Hand;
  font-size: clamp(4rem, 6vw, 5rem); /* fluid scaling */
  color:#fff;
}

.menu-box {
  grid-column: 3/4;
  justify-self: end;
  background: #fff;
  border: 0.125rem solid #000;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
}

.box {
  background: #fff;
  border: 0.125rem solid #000;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem 0.75rem; /* tighter top padding */
  margin-bottom: 1rem;
  overflow: auto; /* prevents margin collapse inside boxes */
}

.columns {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1.125rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.125rem;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

a {
  color: #00D100;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

.tags a.tag {
  color: #00D100;
  text-decoration: none;
  margin-right: 0.4em;
}

/* --- Tag Cloud Styling for Spoons Page --- */

.box-right.scrollable a.tag {
  /* Base style: ensure text is visible and not underlined */
  text-decoration: none;
  font-weight: normal;
  transition: font-size 0.2s; /* Nice visual touch */
}

.box-right.scrollable a.tag.tag-size-small { 
  font-size: 0.85rem; 
}

.box-right.scrollable a.tag.tag-size-medium { 
  font-size: 1rem; 
  font-weight: 600; 
}

.box-right.scrollable a.tag.tag-size-large { 
  font-size: 1.25rem; 
  font-weight: bold; 
}

/* Top boxes (spoons page) */
.boxes-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.125rem;
  margin-bottom: 1rem;
}

.box-left, .box-right {
  background: #fff;
  border: 0.125rem solid #000;
  border-radius: 0.75rem;
  padding: 1rem;
}

.box-right.scrollable {
  max-height: 12.5rem; /* 200px */
  overflow-y: auto;
}

/* Responsive for boxes-top */
@media (max-width: 960px) {
  .boxes-top {
    grid-template-columns: 1fr; /* stacked on smaller screens */
  }
}
@media (max-width: 560px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* Headings */
/* Fluid rem-based clamp sizes and reduced spacing */
h1 { font-family: Bradley Hand; font-size: clamp(3rem, 4vw,4rem); line-height: 1.2; margin-block-start: 0.25em; margin-block-end: 0.25em; }
h2 { font-family: Bradley Hand; font-size: clamp(2.5rem, 3.5vw, 3.5rem); line-height: 1.2; margin-block-start: 0.25em; margin-block-end: 0.25em; }
h3 { font-family: Bradley Hand; font-size: clamp(2rem, 2.8vw, 3rem); line-height: 1.2; margin-block-start: 0.25em; margin-block-end: 0.25em; }
h4 { font-size: clamp(1.1rem, 2.2vw, 1.6rem); line-height: 1.2; margin-block-start: 0.25em; margin-block-end: 0.25em; }
h5 { font-size: clamp(1rem, 2vw, 1.25rem); line-height: 1.2; margin-block-start: 0.25em; margin-block-end: 0.25em; }
h6 { line-height: 1.2; margin-block-start: 0.25em; margin-block-end: 0.25em; }

/* Paragraph adjustments inside boxes and TinyMCE */
.box p,
body.mce-content-body p {
  margin-top: 0;
  margin-bottom: 0.75em; /* tight but readable spacing */
}

/* TinyMCE editing area */
body.mce-content-body {
  background: #fff !important;
  color: #000 !important; 
  padding: 0.5rem;
}

/* Admin scrollable areas */
.scrollable {
  overflow-y: auto;
}
.status-draft {
  color: #c00; /* Red text */
  font-weight: bold;
}
.status-published {
  color: #080; /* Green text */
}

/* Forms and buttons */
form textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: Helvetica, sans-serif;
}

.btn {
  background: #FF0000;
  color: #fff;
  border: none;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  border-radius: 0.375rem;
  margin-right: 0.5rem;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
}

.btn:hover {
  background: #333;
}

/* Image alternator */
.alt-image {
  position: relative;
  width: 100%;
  padding-top: 100%; /* my 450/1024 aspect ratio */
  overflow: hidden;
}

.alt-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: blur(2px);
  transition: opacity 1.5s ease-in-out, filter 1s ease-in-out;
}

.alt-image img.active {
  opacity: 1;
  filter: blur(0);
  z-index: 2;
}

.preview-img {
    max-width: 25px;
    height: auto;
}
.post-img {
    max-width: 25%;
    margin:0.5rem;
    height: auto;
    display: block; /* ensures images behave consistently in layout */
}

/* Add this media query to fix the main layout */
@media (max-width: 768px) { /* Use a standard break point */
  .columns {
    grid-template-columns: 1fr; /* Stacks the 3fr and 1fr columns */
  }
}

/* Mobile adjustments for alt-image */
@media (max-width: 480px){
  .alt-image { padding-top: 75%; } /* taller on phones */
}