/* ===================================================================
   BaseFrame -> MVP.css Adapter
   Maps bf-* semantic classes to MVP.css's clean, centered aesthetic.
   Requires: lib/mvp.css loaded before this file.
   =================================================================== */

:root {
  --bf-accent: #009578;
  --bf-bg: #fff;
  --bf-text: #1a1a2e;
  --bf-text-soft: #929292;
  --bf-border: #efefef;
  --bf-hover-bg: #e0f2ed;
  --bf-topbar-hover: #009578;
  --bf-mark-bg: #e0f2ed;
  --bf-mark-text: #009578;
  --bf-topbar-bg: #f0f8f6;
  --bf-topbar-border: #ddeee9;
}

/* ---- Override MVP.css element-level styles that conflict with BaseFrame ---- */
/* MVP.css styles header, nav, article, section, footer directly.
   We override only the conflicting properties, not `all: revert`. */
.bf header { margin-bottom: 0; padding: 0; }
.bf nav { margin-bottom: 0; justify-content: flex-end; }
#kunena nav, nav.mod-breadcrumbs__wrapper { justify-content: flex-start !important; }
.bf article { margin: 0; padding: 0; }
.bf section { margin: 0; padding: 0; }
.bf footer { margin: 0; }

/* MVP button/input resets for input-groups and forms */
.input-group .btn, .input-group button { margin: 0 !important; padding: .5rem 1rem !important; }
.input-group input, .bf-sidebar input { margin-bottom: 0 !important; }
.bf-sidebar form, #kunena form, .bf-content form { border: none !important; box-shadow: none !important; padding: 0 !important; min-width: 0 !important; max-width: none !important; }
.bf-content table, #kunena table { display: table !important; white-space: normal !important; }

/* MVP thead has blue background — kill it for Kunena */
#kunena table thead { background: transparent !important; color: var(--bf-text, #333) !important; }
#kunena table thead td, #kunena table thead th { color: var(--bf-text, #333) !important; }
#kunena table tr:nth-child(2n) { background-color: transparent !important; }
#kunena table tr:nth-child(2n) td { background-color: transparent !important; }

/* Kunena dropdown — reset MVP's aggressive font styling */
#kunena .dropdown-menu { font-weight: 400 !important; font-size: .85rem !important; }
#kunena .dropdown-menu p { font-weight: 400 !important; }
#kunena .dropdown-menu a { font-weight: 400 !important; font-size: .85rem !important; color: var(--bf-accent, #009578) !important; }
#kunena .dropdown-menu label { font-weight: 400 !important; font-size: .85rem !important; }

/* MVP a { display: inline-block } breaks bf-fw-btn flex layout */
.bf-fw-btn { display: flex !important; }
.bf-fw-page-link { display: inline !important; }
.bf main { margin: 0; padding: 0; max-width: none; }
.bf header { max-width: none !important; width: 100% !important; }
.bf a { display: inline; font-weight: inherit; text-decoration: none; }
/* Restore pagenavigation hide */
.pagenavigation { display: none !important; }
/* Nav font size — MVP sets nav links bold and large */
.bf-nav a { font-weight: 500; }

/* ---- Header -------------------------------------------------------- */
.bf-header {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  border-bottom: 1px solid #efefef;
}
.bf-logo-label { color: #009578; font-weight: 700; }
.bf-logo-site { color: #1a1a2e; }

.bf-nav .nav-item > a,
.bf-nav .mod-menu__toggle-sub {
  color: #1a1a2e; text-decoration: none; font-size: .9rem;
  transition: color .2s;
}
.bf-nav .nav-item > a:hover,
.bf-nav .mod-menu__toggle-sub:hover {
  color: #009578;
}
.bf-nav .mod-menu__sub { border-color: #efefef; border-radius: .35rem; }
.bf-nav .mod-menu__sub .nav-item > a { color: #1a1a2e; }
.bf-nav .mod-menu__sub .nav-item > a:hover { background: #e0f2ed; color: #009578; }
.bf-nav .nav-item.current > a,
.bf-nav .nav-item.active > a {
  color: #009578; font-weight: 600;
}
.bf-hamburger span { background: #1a1a2e; }

@media (max-width: 768px) {
  .bf-nav { background: #fff; }
}

/* ---- Hero ---------------------------------------------------------- */
.bf-home-hero { padding-top: 2rem; }

.bf-hero {
  background: #1a1a2e;
  color: #fff;
  text-align: center;
}
.bf-hero .title { color: #fff; font-size: 2.5rem; font-weight: 700; }
.bf-hero .subtitle { color: rgba(255,255,255,.75); }

/* ---- Cards --------------------------------------------------------- */
.bf-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.bf-card {
  background: #fff;
  border-radius: .35rem;
  box-shadow: 2px 2px 10px rgba(0,0,0,.1);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.bf-card:hover {
  box-shadow: 4px 4px 15px rgba(0,0,0,.12);
  transform: translateY(-2px);
}
.bf-card-image img {
  width: 100%; height: 200px; object-fit: cover; display: block;
}
.bf-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.bf-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.bf-tag {
  display: inline-block; padding: .2rem .6rem; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
  background: #e0f2ed; color: #009578;
  border-radius: .35rem;
}
.bf-card-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 .4rem; }
.bf-card-title a { color: #1a1a2e; text-decoration: none; }
.bf-card-title a:hover { color: #009578; }
.bf-card-date { font-size: .8rem; color: #929292; margin-bottom: .5rem; display: block; }
.bf-card-text { font-size: .9rem; color: #333; flex: 1; line-height: 1.7; }
.bf-card-readmore {
  display: inline-block; margin-top: auto; padding-top: .75rem;
  font-size: .85rem; font-weight: 600; color: #009578;
  text-decoration: none; border-top: 1px solid #efefef;
}
.bf-card-readmore:hover { text-decoration: underline; }

/* Leading card */
.bf-blog-leading { margin-bottom: 2rem; }
.bf-blog-leading .bf-card { flex-direction: row; }
.bf-blog-leading .bf-card-image { flex: 0 0 50%; }
.bf-blog-leading .bf-card-image img { height: 100%; min-height: 280px; }
.bf-blog-leading .bf-card-title { font-size: 1.5rem; }
@media (max-width: 768px) {
  .bf-blog-leading .bf-card { flex-direction: column; }
  .bf-blog-leading .bf-card-image { flex: none; }
  .bf-blog-leading .bf-card-image img { height: 200px; min-height: auto; }
}

/* ---- Sidebar ------------------------------------------------------- */
.bf-module {
  background: #fff;
  border-radius: .35rem;
  box-shadow: 2px 2px 10px rgba(0,0,0,.1);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.bf-module-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: #929292; border-bottom: 2px solid #efefef;
  padding-bottom: .5rem; margin-bottom: .75rem;
}

.bf-sidebar .mod-articles-items { list-style: none; padding: 0; margin: 0; }
.bf-sidebar .mod-articles-item {
  margin: 0 !important; padding: 0 !important;
  background: none !important; box-shadow: none !important; border-radius: 0 !important;
}
.bf-sidebar .mod-articles-item-content { display: contents; }
.bf-sidebar .mod-articles-title { font-size: .88rem !important; font-weight: 400 !important; margin: 0 !important; }
.bf-sidebar .mod-articles-link {
  display: block; padding: .45rem .5rem; text-decoration: none;
  color: #333; border-radius: .35rem; transition: all .15s;
}
.bf-sidebar .mod-articles-link:hover { background: #e0f2ed; color: #009578; }

.bf-sidebar .tagspopular ul { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; padding: 0; }

/* ---- Content ------------------------------------------------------- */
body.bf { color: #333; }
.bf-content { color: #333; }

/* MVP fan-favorite: centered "just works" layout — polished README feel */
.page-header h1 {
  font-size: 2.5rem; font-weight: 700; line-height: 1.2;
  color: #1a1a2e; margin-bottom: 1rem;
  text-align: center;
}
.bf-card-body { text-align: center; }
.bf-card-tags { justify-content: center; }
.bf-card-readmore { display: block; text-align: center; }
.com-content-article__body h2 { font-size: 2rem; font-weight: 700; margin-bottom: .5rem; color: #1a1a2e; }
.com-content-article__body h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: .4rem; color: #1a1a2e; }
/* Force all section children to full width (MVP.css section is flex-wrap) */
.com-content-article__body section > * { width: 100%; }
.com-content-article__body hgroup p { color: #929292; }
.com-content-article__body section + section {
  margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid #efefef;
}
.com-content-article__body .grid > article,
.com-content-article__body .home-grid > article {
  background: #fff; color: #333; border-radius: .35rem;
  box-shadow: 2px 2px 10px rgba(0,0,0,.1);
  padding: 1.5rem; transition: box-shadow .2s, transform .2s;
}
.com-content-article__body .grid > article:hover,
.com-content-article__body .home-grid > article:hover {
  box-shadow: 4px 4px 15px rgba(0,0,0,.12); transform: translateY(-2px);
}
.com-content-article__body .grid > article ul,
.com-content-article__body .home-grid > article ul {
  list-style: disc; padding-left: 1.25rem; margin: .75rem 0 1rem;
}
.com-content-article__body .grid > article li,
.com-content-article__body .home-grid > article li {
  margin-bottom: .25rem;
}
.com-content-article__body .grid > article > header,
.com-content-article__body .home-grid > article > header {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: #009578; margin-bottom: .75rem; padding-bottom: .5rem;
  border-bottom: 2px solid #e0f2ed;
}
.com-content-article__body .grid > article > h3,
.com-content-article__body .home-grid > article > h3 {
  margin-top: 0; color: #009578; font-size: 1.5rem;
}
.com-content-article__body .grid > article > hgroup > h3,
.com-content-article__body .home-grid > article > hgroup > h3 {
  margin-top: 0; color: #009578; font-size: 2rem; font-weight: 700;
}
.com-content-article__body .grid > div > h3 {
  font-size: 2rem; font-weight: 700; color: #009578; margin-bottom: .25rem;
}

/* Button-like links */
.com-content-article__body a[role="button"] {
  display: inline-flex; padding: .65rem 1.5rem; font-weight: 600; font-size: .9rem;
  text-decoration: none; border-radius: .35rem; transition: all .2s;
  background: #009578; color: #fff; border: 2px solid #009578;
}
.com-content-article__body a[role="button"]:hover {
  background: #007a63; border-color: #007a63;
}
.com-content-article__body a[role="button"].secondary {
  background: transparent; color: #009578;
}

/* Blockquote */
blockquote {
  background: #f9f9f9; border-left: 4px solid #009578;
  border-radius: 0 .35rem .35rem 0;
  padding: 1.5rem 2rem; margin: 1.5rem 0; font-style: italic;
  font-size: inherit !important; line-height: inherit !important; max-width: none !important;
}
blockquote footer { font-style: normal; margin-top: .75rem; background: none; padding: 0; }
blockquote cite { font-weight: 600; color: #1a1a2e; }

/* FAQ accordion */
details {
  border: 1px solid #efefef; border-radius: .35rem;
  margin-bottom: .75rem; overflow: hidden; background: #fff; color: #333;
}
details summary { padding: 1rem 1.25rem; font-weight: 600; cursor: pointer; color: #1a1a2e; }
details summary:hover { background: #f9f9f9; }
details[open] summary { border-bottom: 1px solid #efefef; background: #009578; color: #fff; }
details > *:not(summary) { padding: 0 1.25rem; }
details > p:last-child { padding-bottom: 1rem; }

/* Mark */
mark { background: #e0f2ed; color: #009578; padding: .1em .3em; border-radius: .25rem; }

/* Code */
code {
  background: #f5f5f5; color: #e44d26; padding: .15em .4em;
  border-radius: .25rem; font-size: .88em;
}

/* Table */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #efefef; }
th { background: #f9f9f9; color: #1a1a2e; font-weight: 600; }
.com-content-category__table tbody th { background: transparent !important; }

/* Tags (Joomla output) */
.tags .btn-info {
  display: inline-block; padding: .25rem .65rem; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em; text-decoration: none;
  background: #e0f2ed; color: #009578;
  border-radius: .35rem; border: none;
}
.tags .btn-info:hover { background: #009578; color: #fff; }

/* Read more */
.readmore .btn-secondary {
  display: inline-block; padding: .4rem .8rem; font-size: .8rem; font-weight: 600;
  text-decoration: none; color: #009578; border: 2px solid #009578;
  border-radius: .35rem;
}
.readmore .btn-secondary:hover { background: #009578; color: #fff; }
.readmore .icon-chevron-right { display: none; }

/* Pagination */
.bf-pagination .pagination { display: flex; gap: .25rem; list-style: none; padding: 0; justify-content: center; }
.bf-pagination .page-link {
  display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px;
  padding: 0 .75rem; border: 1px solid #efefef; border-radius: .35rem;
  text-decoration: none; font-size: .85rem; color: #333; transition: all .15s;
}
.bf-pagination .page-link:hover { border-color: #009578; color: #009578; }
.bf-pagination .active .page-link { background: #009578; color: #fff; border-color: #009578; }
.bf-pagination .disabled .page-link { opacity: .3; pointer-events: none; }
.pagination__wrapper { display: contents; }

/* Contact form */
.com-contact input[type="text"], .com-contact input[type="email"],
.com-contact textarea, .com-contact select {
  width: 100%; padding: .625rem .75rem; font-size: 1rem;
  border: 1px solid #efefef; border-radius: .35rem;
  background: #fff; color: #333; transition: border-color .15s;
}
.com-contact input:focus, .com-contact textarea:focus, .com-contact select:focus {
  border-color: #009578; outline: none;
  box-shadow: 0 0 0 .125em rgba(0,149,120,.2);
}
.control-group { margin-bottom: 1rem; }
.control-label label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .9rem; }
.com-contact .btn-primary, .com-contact button[type="submit"] {
  display: inline-flex; padding: .65rem 1.5rem; font-weight: 600; font-size: .9rem;
  background: #009578; color: #fff; border: 2px solid #009578;
  border-radius: .35rem; cursor: pointer; transition: all .2s;
}
.com-contact .btn-primary:hover, .com-contact button[type="submit"]:hover {
  background: #007a63; border-color: #007a63;
}

/* Footer */
.bf-footer { background: #f9f9f9; border-top: 1px solid #efefef; }
.bf-footer { max-width: none; width: 100%; }
.bf-footer-bottom { color: #929292; }
.bf-footer-bottom p { width: auto; margin: 0; }
.bf-footer a { color: #333; text-decoration: none; }
.bf-footer a:hover { color: #009578; }
.bf-footer .bf-module-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: #929292; margin-bottom: .75rem;
}
.bf-footer ul { list-style: none; padding: 0; }
.bf-footer ul li { padding: .15rem 0; }
.bf-footer ul a { font-size: .9rem; }

/* Alerts */
.alert { padding: 1.25rem 1.5rem; border-radius: .35rem; margin: 1rem 0; }
.alert-info { background: #e0f2ed; color: #007a63; }
.alert-success { background: #eafbe7; color: #257953; }
.alert-warning { background: #fff8e1; color: #946c00; }
.alert-danger { background: #feeced; color: #cc0f35; }

/* Article image */
.com-content-article figure.item-image { margin: 0 0 1.5rem; }
.com-content-article figure.item-image img { width: 100%; max-height: 480px; object-fit: cover; border-radius: .35rem; }

/* Tag results */
.com-tags-tag__category.list-group { list-style: none; padding: 0; }
.com-tags-tag__category .list-group-item { padding: 0; border: none; background: none; }
.com-tags-tag__category .list-group-item h3 a {
  display: block; padding: .65rem .75rem; text-decoration: none;
  border-radius: .35rem; transition: all .15s;
}
.com-tags-tag__category .list-group-item h3 a:hover {
  background: #e0f2ed; color: #009578;
}
