/*
Theme Name: Shanganagh Barebones
Theme URI: https://shanganaghcastle.com/
Author: Avant Garde Web
Author URI: https://avantgardeweb.ie/
Description: A lightweight standalone WordPress theme for Shanganagh Castle. No Astra dependency. Presentation only; community functionality remains in plugins.
Version: 1.0.9
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: shanganagh-barebones
License: Proprietary
*/

:root {
  --sc-ink: #20211f;
  --sc-muted: #625d55;
  --sc-bg: #f7f3ed;
  --sc-paper: #fffdf8;
  --sc-line: #e3dbcf;
  --sc-green: #2f3b2f;
  --sc-green-2: #52624b;
  --sc-gold: #b3894d;
  --sc-radius: 18px;
  --sc-shadow: 0 12px 36px rgba(35, 31, 27, 0.08);
  --sc-content: 1560px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sc-ink);
  background: var(--sc-bg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--sc-green); }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: fixed !important;
  left: 16px; top: 16px;
  width: auto; height: auto;
  padding: 10px 14px; margin: 0;
  overflow: visible; clip: auto;
  white-space: normal;
  z-index: 100000;
  background: #fff; color: #000;
}

.sc-site-header {
  background: rgba(255,253,248,.97);
  border-bottom: 1px solid var(--sc-line);
}
.sc-header-inner,
.sc-footer-inner,
.sc-content-wrap {
  width: min(var(--sc-content), 92vw);
  margin: 0 auto;
}
.sc-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 0;
}
.sc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sc-green);
  text-decoration: none;
}
.sc-brand-logo { width: 48px; height: 48px; object-fit: cover; border-radius: 14px; flex: 0 0 48px; }
.sc-brand-copy { min-width: 0; }
.sc-brand-name { display:block; font-size: 19px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.sc-brand-tagline { display: block; margin-top: 4px; color: var(--sc-muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.sc-nav ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sc-nav a { display: inline-block; padding: 8px 12px; border: 1px solid var(--sc-line); border-radius: 999px; background: #fff; text-decoration: none; font-size: 13px; font-weight: 700; }
.sc-nav a:hover, .sc-nav a:focus { border-color: rgba(47,59,47,.35); background: #f8f4ec; }
.sc-footer-nav ul { display:flex; justify-content:center; gap:14px; flex-wrap:wrap; list-style:none; padding:0; margin:10px 0 0; }
.sc-footer-nav a { text-decoration:none; }

.sc-main { min-height: 50vh; }
.sc-content-wrap { padding: 42px 0 58px; }
.sc-content-wrap.sc-full-width { width: 100%; max-width: none; padding: 0; }
.sc-article {
  background: var(--sc-paper);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  padding: clamp(22px, 4vw, 42px);
}
.sc-article + .sc-article { margin-top: 22px; }
.sc-entry-title { margin: 0 0 18px; color: var(--sc-green); font-size: clamp(30px, 5vw, 48px); line-height: 1.05; letter-spacing: -.035em; }
.sc-entry-meta { color: var(--sc-muted); font-size: 14px; margin: -7px 0 22px; }
.sc-entry-content > :first-child { margin-top: 0; }
.sc-entry-content > :last-child { margin-bottom: 0; }
.sc-entry-content h2, .sc-entry-content h3, .sc-entry-content h4 { color: var(--sc-green); line-height: 1.2; }
.sc-entry-content table { width: 100%; border-collapse: collapse; }
.sc-entry-content th, .sc-entry-content td { border: 1px solid var(--sc-line); padding: 9px 11px; text-align: left; }
.sc-entry-content input:not([type="checkbox"]):not([type="radio"]),
.sc-entry-content textarea,
.sc-entry-content select { max-width: 100%; padding: 10px 12px; border: 1px solid #cfc5b7; border-radius: 8px; background: #fff; }
.sc-entry-content button,
.sc-entry-content input[type="submit"],
.sc-button { border: 0; border-radius: 999px; background: var(--sc-green); color: #fff; padding: 10px 15px; font-weight: 700; cursor: pointer; text-decoration: none; }

.sc-site-footer { border-top: 1px solid var(--sc-line); background: rgba(255,253,248,.97); color: #777; }
.sc-footer-inner { padding: 22px 0; text-align: center; font-size: 13px; }
.sc-footer-inner a { color: #555; }

.alignwide { width: min(1280px, calc(100vw - 36px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .sc-header-inner { align-items: flex-start; flex-direction: column; }
  .sc-nav { width: 100%; overflow-x: auto; }
  .sc-nav ul { flex-wrap: nowrap; padding-bottom: 3px; }
  .sc-nav a { white-space: nowrap; }
  .sc-content-wrap { width: calc(100% - 24px); padding: 24px 0 38px; }
  .sc-brand-name { font-size: 20px; }
}

/* v1.0.7: accessible, moderated WordPress comments */
.sc-comments{margin-top:28px;padding:clamp(22px,4vw,42px);border:1px solid var(--sc-line);border-radius:var(--sc-radius);background:var(--sc-paper);box-shadow:var(--sc-shadow)}
.sc-comments__title,.comment-reply-title{margin:0 0 20px;color:var(--sc-green);font-size:clamp(24px,3vw,34px);line-height:1.15}
.sc-comment-list{margin:0 0 28px;padding:0;list-style:none}
.sc-comment-list .children{margin:16px 0 0;padding-left:clamp(16px,4vw,34px);list-style:none}
.sc-comment-list .comment-body{margin-bottom:16px;padding:18px;border:1px solid var(--sc-line);border-radius:14px;background:#fff}
.sc-comment-list .comment-meta{margin-bottom:10px;font-size:13px;color:var(--sc-muted)}
.sc-comment-list .comment-author{display:flex;align-items:center;gap:9px;color:var(--sc-green);font-weight:700}
.sc-comment-list .avatar{width:38px;height:38px;border-radius:50%}
.sc-comment-list .reply a{font-size:13px;font-weight:700;text-decoration:none}
.comment-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.comment-form>p{margin:0}
.comment-form-comment,.comment-form-cookies-consent,.form-submit,.comment-notes,.logged-in-as{grid-column:1/-1}
.comment-form label{display:block;margin-bottom:5px;color:var(--sc-green);font-size:14px;font-weight:700}
.comment-form input:not([type="checkbox"]),.comment-form textarea{width:100%;padding:11px 13px;border:1px solid #cfc5b7;border-radius:9px;background:#fff;color:var(--sc-ink)}
.comment-form textarea{min-height:150px;resize:vertical}
.comment-form input:focus,.comment-form textarea:focus{outline:3px solid rgba(179,137,77,.24);border-color:var(--sc-gold)}
.comment-form input[type="submit"]{border:0;border-radius:999px;background:var(--sc-green);color:#fff;padding:11px 18px;font-weight:700;cursor:pointer}
.comment-form input[type="submit"]:hover{background:var(--sc-green-2)}
.comment-awaiting-moderation{display:block;margin:8px 0;padding:8px 10px;border-radius:8px;background:#fff6dc;color:#6b5011}
.no-comments{color:var(--sc-muted)}
@media(max-width:680px){.comment-form{grid-template-columns:1fr}.comment-form>p{grid-column:1}.sc-comments{padding:20px 16px}}


/* v1.0.2 controlled WordPress front page and menu isolation */
.sc-engine-home {
  padding: clamp(34px, 7vw, 84px) 0 64px;
}
.sc-engine-hero {
  background: linear-gradient(135deg, rgba(47,59,47,.98), rgba(82,98,75,.96));
  color: #fff;
  border-radius: 28px;
  padding: clamp(28px, 6vw, 64px);
  box-shadow: var(--sc-shadow);
  overflow: hidden;
  position: relative;
}
.sc-engine-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  top: -110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(179,137,77,.42), rgba(179,137,77,0) 70%);
  pointer-events: none;
}
.sc-engine-kicker {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.sc-engine-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: .98;
  letter-spacing: -.045em;
  color: #fff;
}
.sc-engine-copy {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255,255,255,.86);
}
.sc-engine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.sc-engine-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: #fff;
  color: var(--sc-green);
}
.sc-engine-actions a.sc-secondary {
  background: rgba(255,255,255,.10);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}
.sc-engine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.sc-engine-card {
  background: var(--sc-paper);
  border: 1px solid var(--sc-line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 8px 26px rgba(35,31,27,.05);
}
.sc-engine-card h2 {
  margin: 0 0 8px;
  font-size: 23px;
  color: var(--sc-green);
}
.sc-engine-card p {
  margin: 0 0 14px;
  color: var(--sc-muted);
  font-size: 15px;
}
.sc-engine-card a {
  font-weight: 700;
  text-decoration: none;
}

/* Contain legacy page-builder/Astra-era markup inside our own layout. */
.sc-entry-content .ast-container,
.sc-entry-content .site-content,
.sc-entry-content .site-primary,
.sc-entry-content .content-area,
.sc-entry-content .entry-content,
.sc-entry-content .wp-site-blocks {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.sc-entry-content > * {
  max-width: 100%;
}

@media (max-width: 840px) {
  .sc-engine-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .sc-engine-home { padding-top: 22px; }
  .sc-engine-hero { border-radius: 20px; padding: 24px 20px; }
  .sc-engine-title { font-size: 42px; }
  .sc-engine-actions { display: grid; grid-template-columns: 1fr; }
  .sc-engine-actions a { width: 100%; }
}


/* v1.0.3: dark-surface contrast is owned by Barebones, even when legacy
   presentation plugins remain active during migration. */
.sc-engine-hero .sc-engine-title,
.sc-engine-hero h1,
.sc-engine-hero h2,
.sc-engine-hero h3 {
  color: #fff !important;
}
.sc-engine-hero .sc-engine-copy,
.sc-engine-hero p {
  color: rgba(255,255,255,.88) !important;
}
.sc-engine-hero .sc-engine-kicker {
  color: rgba(255,255,255,.76) !important;
}


/* v1.0.5: Community News on the Barebones front page */
.sc-news-section {
  margin-top: 34px;
  padding-top: 8px;
}

.sc-news-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.sc-news-heading h2 {
  margin: 0;
  color: var(--sc-ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.sc-news-heading p {
  margin: 0;
  max-width: 560px;
  color: var(--sc-muted);
}

.sc-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.sc-news-card {
  background: rgba(255,255,255,.86);
  border: 1px solid var(--sc-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(35,31,27,.04);
}

.sc-news-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: #eee9df;
  overflow: hidden;
}

.sc-news-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sc-news-body {
  padding: 20px;
}

.sc-news-date {
  display: block;
  margin-bottom: 8px;
  color: var(--sc-muted);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sc-news-card h2,
.sc-news-card h3 {
  margin: 0 0 10px;
  color: var(--sc-ink);
  font-size: 22px;
  line-height: 1.2;
}

.sc-news-card h2 a,
.sc-news-card h3 a {
  color: inherit;
  text-decoration: none;
}

.sc-news-card h2 a:hover,
.sc-news-card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sc-news-excerpt {
  margin: 0 0 14px;
  color: var(--sc-muted);
  line-height: 1.55;
}

.sc-news-readmore {
  color: #173b23;
  font-weight: 700;
  text-decoration: none;
}

.sc-news-empty {
  padding: 18px 20px;
  border: 1px solid var(--sc-line);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  color: var(--sc-muted);
}

@media (max-width: 1050px) {
  .sc-news-heading {
    display: block;
  }

  .sc-news-heading p {
    margin-top: 8px;
  }

  .sc-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .sc-news-grid { grid-template-columns: 1fr; }
}

/* v1.0.8: concise tag and category archives */
.sc-archive-header {
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--sc-green), var(--sc-green-2));
  color: #fff;
  box-shadow: var(--sc-shadow);
}
.sc-archive-kicker {
  margin: 0 0 8px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sc-archive-title {
  margin: 0;
  color: #fff;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.sc-archive-description { max-width: 780px; margin: 12px 0 0; color: rgba(255,255,255,.86); }
.sc-archive-description p { margin: 0; }
.sc-news-card { display: flex; min-width: 0; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.sc-news-card:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(35,31,27,.11); }
.sc-news-body { display: flex; flex: 1; flex-direction: column; }
.sc-news-excerpt { flex: 1; }
.sc-news-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: auto; }
.sc-news-readmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--sc-green);
  color: #fff;
}
.sc-news-readmore:hover { background: var(--sc-green-2); color: #fff; }
.sc-archive-pagination { margin-top: 28px; }
.sc-archive-pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.sc-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  background: #fff;
  color: var(--sc-green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.sc-archive-pagination .page-numbers.current,
.sc-archive-pagination a.page-numbers:hover { background: var(--sc-green); color: #fff; }
@media (max-width: 680px) {
  .sc-archive-header { border-radius: 18px; padding: 24px 20px; }
  .sc-news-card:hover { transform: none; }
}


/* v1.0.6: fluid, screen-filling layout without media distortion */
.sc-engine-home {
  width: 100%;
}

.sc-engine-title {
  max-width: 980px;
}

.sc-engine-copy {
  max-width: 900px;
}

.sc-news-heading p {
  max-width: 680px;
}

/* Keep imagery proportional. Cards may crop to their frame but never stretch. */
.sc-news-thumb img,
.sc-brand-logo,
.sc-entry-content img {
  height: auto;
  max-width: 100%;
}

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

/* Use the extra desktop width rather than leaving large dead margins. */
@media (min-width: 1200px) {
  .sc-engine-hero {
    padding: clamp(44px, 4.5vw, 72px);
  }

  .sc-engine-grid,
  .sc-news-grid {
    gap: clamp(18px, 1.6vw, 28px);
  }

  .sc-engine-card {
    padding: clamp(22px, 2vw, 30px);
  }

  .sc-news-body {
    padding: clamp(20px, 1.8vw, 28px);
  }
}

@media (min-width: 1700px) {
  .sc-header-inner,
  .sc-footer-inner,
  .sc-content-wrap {
    width: min(var(--sc-content), calc(100vw - 120px));
  }
}

/* Tablet: retain generous width but avoid edge crowding. */
@media (min-width: 761px) and (max-width: 1199px) {
  .sc-header-inner,
  .sc-footer-inner,
  .sc-content-wrap {
    width: calc(100% - 40px);
  }

  .sc-engine-hero {
    padding: clamp(30px, 5vw, 52px);
  }
}

/* Phones: full use of the viewport with safe gutters. */
@media (max-width: 760px) {
  .sc-header-inner,
  .sc-footer-inner,
  .sc-content-wrap {
    width: calc(100% - 24px);
  }

  .sc-engine-title {
    max-width: none;
  }

  .sc-engine-copy {
    max-width: none;
  }
}
