/* ==========================================================================
   Garden Organic – Home Composting | Sitewide redesign stylesheet
   Link LAST in <head>, after the template CSS, on every page:
   <link rel="stylesheet" href="/templates/copy261015/css/redesign.css" type="text/css">
   Also add once:  <meta name="viewport" content="width=device-width, initial-scale=1">
   No HTML restructuring required. Overrides legacy markup and inline styles.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap");

:root {
  --green-900: #14361f;
  --green-700: #1f5c34;
  --green-500: #2f8f4e;
  --green-100: #e6f3ea;
  --sand: #f7f5ef;
  --earth: #8a5a2b;
  --ink: #1d2a22;
  --muted: #5b6b61;
  --line: #e1e6e2;
  --white: #fff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(20, 54, 31, .08);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
  color: var(--ink) !important;
  background: var(--sand) !important;
  line-height: 1.65;
}
body a { color: var(--green-700); }
body a:hover { color: var(--green-900); }
img { max-width: 100%; height: auto; }
a:focus-visible, input:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 2px;
}

/* ---------- Accessibility helpers ---------- */
ul.skiplinks { list-style: none; margin: 0; padding: 0; }
ul.skiplinks a {
  position: absolute; left: -9999px; top: 8px;
  background: var(--green-900); color: #fff; padding: 10px 16px;
  border-radius: 8px; z-index: 100; text-decoration: none;
}
ul.skiplinks a:focus { left: 8px; }
.unseen {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Header ---------- */
#line {
  position: static !important;
  width: auto !important; height: auto !important;
  background: var(--white) !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 18px 24px !important;
  margin: 0 !important;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
#line .custom { float: none !important; width: auto !important; margin: 0 auto !important; }
#line .custom p { margin: 0; }
#line .custom img { max-width: 260px; height: auto; display: block; }

/* Font-size controls */
#fontsize { float: none !important; position: static !important; width: auto !important; font-size: 13px; color: var(--muted); order: 2; }
#fontsize h3 { display: inline; margin: 0 8px 0 0; font: 600 13px 'Inter', sans-serif; color: var(--muted); }
#fontsize p { display: inline; margin: 0; }
#fontsize a {
  display: inline-block; padding: 4px 10px; margin-right: 4px;
  border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; font-size: 13px; color: var(--green-700); background: var(--white);
}
#fontsize a:hover { background: var(--green-100); }

/* ---------- Page layout ---------- */
#contentarea2 {
  position: static !important;
  width: auto !important; height: auto !important;
  max-width: 1280px; margin: 0 auto !important; padding: 32px 24px 56px !important;
  background: transparent !important;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 320px;
  grid-template-areas: "nav wrapper right";
  gap: 28px; align-items: start;
}
#breadcrumbs { grid-column: 1 / -1; float: none !important; width: auto !important; }
#breadcrumbs:empty { display: none; }
#nav   { grid-area: nav; position: sticky !important; top: 20px; float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: none !important; }
#wrapper { grid-area: wrapper; float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; min-width: 0; background: none !important; }
#right { grid-area: right; float: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: none !important; }
#close { display: none !important; }
.wrap { display: none; }

/* ---------- Navigation ---------- */
.moduletable_menu {
  background: var(--white) !important; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 12px !important; border: 0 !important;
}
ul.menu, ul.menu ul { list-style: none !important; margin: 0; padding: 0; }
ul.menu li { margin: 2px 0 !important; padding: 0 !important; background: none !important; border: 0 !important; }
ul.menu li a {
  display: block !important; padding: 10px 14px !important; border-radius: 10px;
  text-decoration: none !important; color: var(--ink) !important;
  font: 500 15px/1.4 'Inter', sans-serif !important;
  background: none !important; border: 0 !important;
  transition: background .2s, color .2s, transform .2s;
}
ul.menu li a:hover { background: var(--green-100) !important; color: var(--green-900) !important; transform: translateX(3px); }
ul.menu li.current > a, ul.menu li.active > a { background: var(--green-700) !important; color: #fff !important; }
/* Sub-menus */
ul.menu li ul { margin: 4px 0 6px 14px; padding-left: 10px; border-left: 2px solid var(--green-100); }
ul.menu li ul li a { font-size: 14px !important; padding: 8px 12px !important; }
ul.menu li ul li.current > a, ul.menu li ul li.active > a { background: var(--green-500) !important; }
/* Hide menu items with no label */
ul.menu li a:empty, ul.menu li:has(> a:empty) { display: none !important; }

/* ---------- Login module ---------- */
.left1 .moduletable {
  background: var(--white) !important; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px !important; margin: 20px 0 0 !important; border: 0 !important;
}
.left1 .moduletable h3 {
  font: 700 20px/1.2 'Fraunces', Georgia, serif !important;
  margin: 0 0 14px !important; padding: 0 !important; color: var(--green-900) !important; background: none !important;
}
.left1 .moduletable h3 span { display: inline !important; background: none !important; padding: 0 !important; margin: 0 !important; }
#login-form fieldset { border: 0; padding: 0; margin: 0 0 12px; }
#login-form p { margin: 0 0 10px; }
#login-form label { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
#login-form input[type="text"], #login-form input[type="password"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--white);
}
#login-form input[type="checkbox"] { accent-color: var(--green-700); margin-right: 6px; }
#login-form ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
#login-form li { margin: 4px 0; }

/* ---------- Main content card ---------- */
#main {
  float: none !important; width: auto !important; margin: 0 !important;
  background: var(--white) !important; border-radius: 24px;
  box-shadow: var(--shadow); overflow: hidden;
  padding: 0 !important;
}
.item-page, .blog, .category-list, .contact, .search, .registration, .profile, .login, .newsfeed-category, .weblink-category, .archive {
  padding: 40px 48px 48px;
}
.item-page { font-size: 16px; }

/* Neutralise inline fonts/colours/sizes from the old editor content */
#main span, #main p, #main li, #main td, #main div {
  font-family: 'Inter', system-ui, sans-serif !important;
}
#main [style*="font-size"] { font-size: 16px !important; }
#main [style*="color"] { color: var(--ink) !important; }
#main p { margin: 0 0 1em; text-align: left; }

/* Page title: the first bold paragraph of an article (and real headings) */
.item-page > p:first-child:has(> strong:only-child),
.item-page > h1:first-child, .item-page > h2:first-child {
  margin: -40px -48px 32px; padding: 36px 48px;
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  text-align: left !important;
}
.item-page > p:first-child > strong, .item-page > p:first-child > strong span,
.item-page > h1:first-child, .item-page > h2:first-child,
.item-page > h1:first-child a, .item-page > h2:first-child a {
  font-family: 'Fraunces', Georgia, serif !important;
  font-size: clamp(24px, 3vw, 34px) !important;
  line-height: 1.25; font-weight: 700; color: #fff !important;
}

/* Headings */
#main h1, #main h2, #main h3, #main h4 {
  font-family: 'Fraunces', Georgia, serif !important;
  color: var(--green-900) !important; line-height: 1.25; margin: 1.6em 0 .6em;
  background: none !important; border: 0 !important;
}
#main h1 { font-size: 32px; } #main h2 { font-size: 26px; }
#main h3 { font-size: 21px; } #main h4 { font-size: 18px; }
#main h2 a, #main h3 a { color: inherit !important; text-decoration: none; }
#main h2 a:hover, #main h3 a:hover { color: var(--green-500) !important; }

/* Links in content */
#main a { color: var(--green-700) !important; text-decoration: underline; text-decoration-color: rgba(47,143,78,.4); text-underline-offset: 3px; }
#main a:hover { color: var(--green-900) !important; text-decoration-color: currentColor; }

/* Lists */
#main ul, #main ol { padding-left: 1.3em; margin: 0 0 1em; }
#main li { margin: .35em 0; }
#main ul li::marker { color: var(--green-500); }

/* Images */
#main img { border-radius: 10px; height: auto; max-width: 100%; }
#main img.caption, #main .img-caption { display: block; }

/* Quotes / rules */
#main blockquote {
  margin: 1.5em 0; padding: 16px 22px; background: var(--sand);
  border-left: 5px solid var(--green-500); border-radius: 12px; color: var(--ink);
}
#main hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* ---------- Tables (legacy layout tables and data tables) ---------- */
#main table { max-width: 100%; border-collapse: separate; border-spacing: 0; }
#main table[style*="width"] { width: 100% !important; height: auto !important; }
#main table td, #main table th { padding: 12px 14px; vertical-align: top; }

/* Data tables (have header cells or borders) */
#main table:has(th), #main table[border]:not([border="0"]) {
  width: 100% !important; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px;
}
#main table th { background: var(--green-900); color: #fff !important; text-align: left; font-weight: 600; }
#main table:has(th) td, #main table[border]:not([border="0"]) td { border-top: 1px solid var(--line); }
#main table:has(th) tr:nth-child(even) td { background: var(--sand); }

/* Image-link tables (e.g. homepage banners) become cards */
table.fullTable { width: 100% !important; height: auto !important; border-spacing: 20px; margin: 12px auto 0; }
table.fullTable td {
  background: var(--green-100); border-radius: var(--radius);
  padding: 18px !important; width: 50%; text-align: center;
  transition: transform .25s, box-shadow .25s;
}
table.fullTable td:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(20,54,31,.15); }
table.fullTable img { display: block; margin: 0 auto; }

/* Homepage: no title bar -> hero banner; padding handled by the table */
.item-page:has(table.fullTable) { padding: 0 0 32px; }
.item-page:has(table.fullTable) > p:first-child {
  margin: 0; padding: 56px 48px 40px; text-align: center !important;
  background: radial-gradient(circle at 90% 10%, rgba(47,143,78,.45), transparent 45%), linear-gradient(135deg, var(--green-900), var(--green-700));
}
.item-page:has(table.fullTable) > p:first-child strong,
.item-page:has(table.fullTable) > p:first-child span { font-size: clamp(24px, 3.2vw, 38px) !important; }
.item-page:has(table.fullTable) > div { padding: 0 32px; }
.item-page:has(table.fullTable) > p:empty,
.item-page:has(table.fullTable) > div:empty { display: none; }
.item-page:has(table.fullTable) > div:last-child {
  margin: 20px 32px 0; padding: 24px 28px !important; background: var(--sand);
  border-left: 5px solid var(--green-500); border-radius: 12px;
}
.item-page:has(table.fullTable) > div:last-child p { text-align: left !important; }

/* ---------- Joomla article blog / list components ---------- */
.items-leading > div, .items-row > div, .blog .item, .category-list .cat-list-row0, .category-list .cat-list-row1 {
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.article-info, .createdby, .create, .modified, .published { color: var(--muted); font-size: 14px; }
dl.article-info { margin: 0 0 1em; }
dl.article-info dt { display: none; }
dl.article-info dd { display: inline-block; margin: 0 14px 0 0; }
.pagination, ul.pagenav { list-style: none; padding: 0; margin: 2em 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination a, .pagination span, ul.pagenav a {
  display: inline-block; padding: 8px 14px; border-radius: 10px;
  background: var(--green-100); text-decoration: none !important; font-weight: 600; font-size: 14px;
}
.pagination a:hover, ul.pagenav a:hover { background: var(--green-700); color: #fff !important; }
.pagenav-prev, .pagenav-next { float: none !important; }

/* ---------- Forms (contact, search, login pages) ---------- */
#main fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 1.5em; }
#main legend { font: 700 18px 'Fraunces', serif; color: var(--green-900); padding: 0 8px; }
#main label { font-weight: 500; font-size: 14px; color: var(--muted); }
#main input[type="text"], #main input[type="email"], #main input[type="password"],
#main input[type="search"], #main input[type="tel"], #main input[type="url"],
#main select, #main textarea {
  width: 100%; max-width: 560px; padding: 11px 14px; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink);
}
#main input:focus, #main select:focus, #main textarea:focus { border-color: var(--green-500); }
#main button, #main input[type="submit"], #main input[type="button"], #main .button, #main .btn {
  background: var(--green-700); color: #fff !important; border: 0; border-radius: 10px;
  padding: 11px 22px; font: 600 15px 'Inter', sans-serif; cursor: pointer; text-decoration: none;
  transition: background .2s, transform .2s;
}
#main button:hover, #main input[type="submit"]:hover, #main .button:hover { background: var(--green-900); transform: translateY(-1px); }

/* System messages */
#system-message-container dl, #system-message-container ul { list-style: none; margin: 0; padding: 14px 20px; background: var(--green-100); border-left: 5px solid var(--green-500); }
#system-message-container .error, #system-message-container dd.error { background: #fdecea; border-left-color: #c0392b; }

/* ---------- News panel (right column) ---------- */
#right .moduletable {
  background: var(--white) !important; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px !important; border: 0 !important; margin: 0 0 20px !important;
}
#right .moduletable:first-of-type::before {
  content: "Latest news";
  display: block; font: 700 22px 'Fraunces', Georgia, serif;
  color: var(--green-900); margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--green-100);
}
#right h3 { font: 700 20px 'Fraunces', serif !important; color: var(--green-900) !important; margin: 0 0 12px; background: none !important; }
.newsflash div[align="center"] { text-align: left !important; }
.newsflash span, .newsflash strong {
  font-family: 'Inter', sans-serif !important; font-size: 16px !important;
  color: var(--green-900) !important; font-weight: 600; line-height: 1.4;
}
.newsflash a.readmore, a.readmore {
  display: inline-block; margin: 6px 0 20px; padding: 6px 14px;
  background: var(--green-100); border-radius: 999px;
  font: 600 14px 'Inter', sans-serif; text-decoration: none; color: var(--green-700) !important;
  transition: background .2s, color .2s;
}
.newsflash a.readmore:hover, a.readmore:hover { background: var(--green-700); color: #fff !important; }
.newsflash a.readmore:last-of-type { margin-bottom: 0; }

/* ---------- Footer ---------- */
#footer-outer { background: var(--green-900) !important; clear: both; border: 0 !important; }
#footer-sub { max-width: 1280px; margin: 0 auto; background: none !important; }
#footer { min-height: 56px; background: none !important; color: #cfe3d6; padding: 16px 24px; }
#footer a { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  #contentarea2 { grid-template-columns: 250px minmax(0, 1fr); grid-template-areas: "nav wrapper" "right right"; }
}
@media (max-width: 780px) {
  #contentarea2 { grid-template-columns: 1fr; grid-template-areas: "nav" "wrapper" "right"; padding: 20px 16px 40px !important; }
  #nav { position: static !important; }
  .item-page, .blog, .category-list, .contact, .search, .registration, .profile, .login { padding: 28px 20px 32px; }
  .item-page > p:first-child:has(> strong:only-child), .item-page > h1:first-child, .item-page > h2:first-child { margin: -28px -20px 24px; padding: 28px 20px; }
  .item-page:has(table.fullTable) { padding: 0 0 24px; }
  .item-page:has(table.fullTable) > p:first-child { padding: 36px 22px; margin: 0; }
  .item-page:has(table.fullTable) > div { padding: 0 12px; }
  .item-page:has(table.fullTable) > div:last-child { margin: 16px 12px 0; }
  table.fullTable, table.fullTable tbody, table.fullTable tr, table.fullTable td { display: block; width: 100% !important; }
  table.fullTable { border-spacing: 0; }
  table.fullTable td { margin-bottom: 16px; }
  #main table:has(th) { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  #nav, #right, #line, #footer-outer { display: none !important; }
  #contentarea2 { display: block; }
  #main { box-shadow: none; }
}
