/*
  default.css
  Mobile-first responsive rebuild of the original ShareRecipeFavorites
  template ("Culinary" theme, freecsstemplates.org). Same color palette,
  fonts, and overall page structure -- rebuilt with flexible widths and
  media queries instead of the original fixed 900px layout.

  Note: the original theme used decorative background JPGs
  (img01-img05) for the header/menu/footer bands. Those files weren't
  included in the site export, so this version recreates the same
  red/white banded look with plain CSS (gradients + solid colors)
  instead of depending on external images that might go missing.
*/

:root {
  --color-red-dark: #AA2808;
  --color-red: #BF0B0B;
  --color-red-bright: #C11212;
  --color-red-hover: #C11414;
  --color-text: #7D807A;
  --color-bg: #C0C0C0;
  --color-white: #ffffff;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --max-width: 900px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--color-bg);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
}

h1, h2, h3 { color: var(--color-red-dark); font-weight: normal; }

p, blockquote, ul, ol { margin: 0 0 1.25em 0; line-height: 1.7; }

ul, ol { padding-left: 1.25em; }

a { color: #E14949; text-decoration: underline; }
a:hover, a:focus { color: var(--color-red-hover); text-decoration: none; }

img { max-width: 100%; height: auto; }

.detail_pic { float: none; margin: 0 0 1em 0; }
@media (min-width: 600px) {
  .detail_pic { float: right; margin: 0 0 1em 1.5em; max-width: 45%; }
}

.redtext { color: #C11212; font-weight: bold; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- Layout shell --- */

#wrapper { width: 100%; }

#header {
  background: linear-gradient(135deg, var(--color-red-dark), var(--color-red));
  padding: 1.25em 1em;
}

#logo { max-width: var(--max-width); margin: 0 auto; text-align: left; }

#logo h1 {
  margin: 0;
  text-transform: lowercase;
  font-size: 2.2em;
  font-style: italic;
}
#logo h1 a { color: var(--color-white); text-decoration: none; }

#logo h2 {
  margin: 0.1em 0 0 0;
  font-size: 0.8em;
  font-weight: normal;
  font-style: italic;
  letter-spacing: 1px;
  text-transform: lowercase;
  color: #FCE3E3;
}

/* --- Mobile nav toggle --- */

#menu-toggle {
  display: block;
  width: 100%;
  padding: 0.75em 1em;
  background: var(--color-red-bright);
  border: none;
  cursor: pointer;
  text-align: right;
}
#menu-toggle .menu-toggle-bar {
  display: block;
  width: 24px;
  height: 3px;
  margin: 5px 0 5px auto;
  background: var(--color-white);
}

#menu {
  background: var(--color-red-bright);
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.2s ease-out;
}
#menu.open { max-height: 500px; }

#menu ul { margin: 0; padding: 0; list-style: none; }
#menu li { display: block; border-top: 1px solid rgba(255,255,255,0.2); }
#menu li:first-child { border-top: none; }

#menu a {
  display: block;
  padding: 0.85em 1em;
  text-decoration: none;
  text-transform: lowercase;
  font-style: italic;
  color: var(--color-white);
}
#menu a:hover, #menu li.active a { background: var(--color-red-hover); }

@media (min-width: 700px) {
  #menu-toggle { display: none; }
  #menu { max-height: none; overflow: visible; }
  #menu ul { display: flex; flex-wrap: wrap; }
  #menu li { border-top: none; }
  #menu a { padding: 0.9em 1.2em; }
}

/* --- Page / content / sidebar --- */

#page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1em;
  background: var(--color-white);
}

#page-bgtop { display: flex; flex-direction: column; padding: 1.5em 0; gap: 1.5em; }

@media (min-width: 700px) {
  #page-bgtop { flex-direction: row; align-items: flex-start; }
}

#content { flex: 1 1 auto; min-width: 0; }

.post { border-bottom: 1px solid #eee; margin: 0 0 1.75em 0; padding-bottom: 1.5em; }

.post .title { margin: 0; }
.post .title a {
  text-decoration: none;
  font-size: 1.6em;
  font-style: italic;
  color: var(--color-red);
}

.post .byline {
  font-size: 0.8em;
  font-style: italic;
  text-transform: lowercase;
  color: var(--color-text);
  margin: 0.25em 0 1em 0;
}

.post .entry { padding: 0.5em 0 0 0; }
.post .entry img { display: block; }

.post .entry h3 {
  margin: 1.25em 0 0.4em 0;
  font-size: 1.05em;
  font-style: italic;
  color: var(--color-red);
}
.post .entry h3:first-of-type { margin-top: 0.75em; }

.recipe-text { margin-bottom: 1em; }
.recipe-text p, .recipe-text div { margin: 0 0 0.75em 0; }
.recipe-text ul, .recipe-text ol { margin: 0 0 0.75em 0; padding-left: 1.4em; }
.recipe-text li { margin-bottom: 0.35em; line-height: 1.6; }
.recipe-text blockquote {
  margin: 0 0 0.75em 0;
  padding-left: 0.9em;
  border-left: 3px solid #eee;
  color: var(--color-text);
}

/* --- Sidebar --- */

#sidebar {
  flex: 0 0 auto;
  width: 100%;
}
@media (min-width: 700px) {
  #sidebar { width: 230px; }
}

#sidebar ul { margin: 0; padding: 0; list-style: none; }
#sidebar > ul > li { margin-bottom: 1.5em; }
#sidebar li ul { padding-left: 0.5em; }
#sidebar li li { padding: 0.35em 0; border-bottom: 1px dotted #ddd; }

#sidebar h2 {
  margin: 0 0 0.5em 0;
  font-size: 1.1em;
  font-style: italic;
  color: var(--color-red);
}

#sidebar a { text-decoration: none; color: var(--color-text); }
#sidebar a:hover { text-decoration: underline; }

/* --- Forms --- */

form { width: 100%; }
input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
textarea,
select {
  width: 100%;
  max-width: 420px;
  padding: 0.5em;
  margin-bottom: 0.5em;
  font-family: inherit;
  font-size: 1em;
  border: 1px solid #999;
  border-radius: 3px;
}
textarea { max-width: 100%; }

/* --- Structured form fields (add/edit recipe) --- */

.recipe-form { max-width: 480px; }

.form-field { margin-bottom: 1.1em; }

.form-field label {
  display: block;
  margin-bottom: 0.3em;
  font-style: italic;
  font-weight: bold;
  color: var(--color-red-dark);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  width: 100%;
  max-width: 100%;
  margin-bottom: 0;
}

.input-small {
  width: 4.5em !important;
  max-width: 4.5em !important;
  flex: 0 0 auto;
  text-align: center;
}

.time-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4em;
}
.time-group span {
  margin-right: 0.6em;
  font-size: 0.9em;
  color: var(--color-text);
}

.form-field-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-style: normal;
  font-weight: normal;
  color: var(--color-text);
}
.form-field-checkbox input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.draft-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.2em;
  padding: 0.7em 1em;
  background: #FFF7D9;
  border: 1px solid #EBDFA6;
  border-radius: 4px;
  font-size: 0.9em;
  color: #5C4A16;
}
.draft-banner button {
  border: 1px solid #C9B45C;
  background: var(--color-white);
  color: #5C4A16;
  padding: 0.3em 0.8em;
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.9em;
  cursor: pointer;
}
.draft-banner button:hover { background: #FFF0BE; }

.field-hint {
  margin: 0.3em 0 0 0;
  font-size: 0.8em;
  font-style: italic;
  color: #999;
}

.current-image {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin: 0.4em 0 0.6em 0;
  font-size: 0.85em;
  color: var(--color-text);
}
.current-image img {
  max-width: 90px;
  max-height: 90px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

/* --- Rich text editor (add/edit recipe) --- */

.rte { max-width: 100%; margin-bottom: 0.5em; }

.rte-toolbar {
  display: flex;
  gap: 0.25em;
  padding: 0.35em;
  background: #f3f3f3;
  border: 1px solid #999;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}

.rte-btn {
  background: var(--color-white);
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 0.3em 0.6em;
  font-family: inherit;
  font-size: 0.9em;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
}
.rte-btn:hover { background: #f0f0f0; }
.rte-btn:active, .rte-btn.is-active { background: var(--color-red-bright); color: var(--color-white); border-color: var(--color-red-bright); }

.rte-editor {
  min-height: 180px;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.6em 0.7em;
  border: 1px solid #999;
  border-radius: 0 0 3px 3px;
  background: var(--color-white);
  font-family: inherit;
  font-size: 1em;
  line-height: 1.5;
}
.rte-editor:focus { outline: 2px solid var(--color-red-bright); outline-offset: -1px; }
.rte-editor p, .rte-editor div { margin: 0 0 0.75em 0; }
.rte-editor ul, .rte-editor ol { margin: 0 0 0.75em 0; padding-left: 1.4em; }
.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: #999;
}

input[type="submit"], input[type="button"] {
  background: var(--color-red-bright);
  color: var(--color-white);
  border: none;
  padding: 0.6em 1.4em;
  border-radius: 3px;
  font-family: inherit;
  font-size: 1em;
  cursor: pointer;
}
input[type="submit"]:hover { background: var(--color-red-hover); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5em; border-bottom: 1px solid #eee; }

/* --- Search box (sidebar) --- */

#search form { display: flex; gap: 0.5em; }
#search-text { flex: 1 1 auto; margin-bottom: 0; }
#search-submit {
  flex: 0 0 auto;
  margin-bottom: 0;
  background: var(--color-red-bright);
  color: var(--color-white);
  border: none;
  padding: 0.5em 1em;
  border-radius: 3px;
  cursor: pointer;
}

/* --- Footer --- */

#footer {
  background: var(--color-red-dark);
  color: #F3D9D9;
  padding: 1em;
  margin-top: 2em;
}
#footer p { margin: 0; text-align: center; font-size: 0.8em; }
#footer a { color: #FCE3E3; }

/* =======================================================================
   Recipe card (detail page only)
   Everything below is scoped under .recipe-card and only ever appears
   on php/detail.php -- it has no effect on any other page.
   ======================================================================= */

.recipe-card {
  position: relative;
  max-width: 700px;
  margin: 1.5em auto 2em auto;
  padding: 2em 1.75em 1.75em 1.75em;
  background:
    linear-gradient(#FFFCF5, #FFFCF5);
  border: 1px solid #E4D9BE;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(60, 40, 10, 0.14), 0 2px 6px rgba(60, 40, 10, 0.08);
}

@media (min-width: 700px) {
  .recipe-card { transform: rotate(-0.4deg); }
}

/* A little "washi tape" strip pinning the card down, purely decorative. */
.recipe-card-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 90px;
  height: 26px;
  margin-left: -45px;
  background: rgba(191, 11, 11, 0.18);
  border: 1px solid rgba(191, 11, 11, 0.22);
  transform: rotate(-3deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.recipe-card-title {
  margin: 0.25em 0 0.5em 0;
  padding-bottom: 0.4em;
  border-bottom: 3px double var(--color-red);
  text-align: center;
  font-size: 1.9em;
  font-style: italic;
  color: var(--color-red-dark);
}

.recipe-card-photo {
  text-align: center;
  margin: 0 0 1.25em 0;
}
.recipe-card .recipe-card-photo img {
  display: inline-block;
  max-width: 260px;
  padding: 8px;
  background: var(--color-white);
  border: 1px solid #ddd;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  transform: rotate(-2deg);
}

.recipe-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em;
  margin-bottom: 0.6em;
}
.meta-pill {
  padding: 0.3em 0.9em;
  background: rgba(191, 11, 11, 0.07);
  border: 1px solid rgba(191, 11, 11, 0.25);
  border-radius: 999px;
  font-size: 0.82em;
  font-style: italic;
  color: var(--color-red-dark);
  white-space: nowrap;
}

.recipe-card-tags {
  margin: 0 0 1.5em 0;
  text-align: center;
  font-size: 0.85em;
  font-style: italic;
  text-transform: lowercase;
  color: var(--color-text);
}
.recipe-card-tags a {
  color: var(--color-red-dark);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-red-dark);
}
.recipe-card-tags a:hover {
  color: var(--color-red-hover);
  border-bottom-style: solid;
}

.recipe-card-columns {
  display: block;
}
.recipe-card-section { margin-bottom: 1.5em; }

.recipe-card .recipe-card-section h3 {
  margin: 0 0 0.5em 0;
  font-size: 1.05em;
  font-style: italic;
  color: var(--color-red);
}

/* Faint ruled-paper lines behind the text, like a real recipe card. */
.recipe-card-section .recipe-text {
  padding: 0.6em 0.8em;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 1.55em,
    rgba(191, 11, 11, 0.08) 1.55em,
    rgba(191, 11, 11, 0.08) calc(1.55em + 1px)
  );
  background-position: 0 0.4em;
}

@media (min-width: 700px) {
  .recipe-card-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 0 2em;
  }
  .recipe-card-ingredients {
    padding-right: 1.5em;
    border-right: 1px dashed #ddd;
  }
}

.recipe-card-note {
  max-width: 340px;
  margin: 0.5em auto 1.5em auto;
  padding: 1em 1.25em;
  background: #FFF7D9;
  border: 1px solid #EBDFA6;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transform: rotate(1deg);
}
.recipe-card .recipe-card-note h3 {
  margin: 0 0 0.3em 0;
  font-size: 0.85em;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8A6D1E;
}
.recipe-card-note .recipe-text {
  font-family: 'Caveat', var(--font-serif);
  font-size: 1.4em;
  line-height: 1.3;
  color: #5C4A16;
}

.recipe-card-footer {
  margin-top: 1.5em;
  padding-top: 1em;
  border-top: 1px solid #eee;
  text-align: center;
  font-size: 0.85em;
  font-style: italic;
  color: var(--color-text);
}
.recipe-card-footer p { margin: 0 0 0.4em 0; }

