/* ==========================================================================
   cassiopeia_ashley – recreates the look of the former j51_ashley template
   on top of Joomla's Cassiopeia (CSS only, no template PHP).
   Colours/fonts taken from j51_ashley's defaults (templateDetails.xml).
   ========================================================================== */

:root {
  --ashley-accent: #75a8b4;        /* links, buttons, active menu item */
  --ashley-accent-dark: #547d87;   /* hover */
  --ashley-text: #767b77;          /* body text */
  --ashley-heading: #4a4a4a;       /* article titles */
  --ashley-nav: #787878;           /* menu text */
  --ashley-page-bg: #eef0eb;       /* behind the background photo */
  --ashley-box: #ffffff;           /* the white page box */
  --ashley-soft: #f0f0f0;          /* footer / light panels */
  --ashley-line: #dcdcdc;          /* thin borders */
  --ashley-width: 1120px;          /* page width of the old site */

  /* Cassiopeia variables */
  --cassiopeia-color-primary: var(--ashley-accent);
  --cassiopeia-color-hover: var(--ashley-accent-dark);
  --cassiopeia-color-link: var(--ashley-accent);
  --cassiopeia-font-family-body: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --cassiopeia-font-family-headings: "Playfair Display", Georgia, "Times New Roman", serif;
  --cassiopeia-font-weight-headings: 400;
  --link-color: var(--ashley-accent);
  --link-color-rgb: 117, 168, 180;
  --link-hover-color: var(--ashley-accent-dark);
  --link-hover-color-rgb: 84, 125, 135;
  --body-color: var(--ashley-text);
  --body-font-size: 0.9375rem;
}

/* ---- page background: photo behind a centred white box ---------------- */
body.site {
  background: var(--ashley-page-bg) url("../images/background.jpg") center top / cover fixed no-repeat;
  color: var(--ashley-text);
}

.container-header,
.site-grid,
.container-footer {
  max-width: var(--ashley-width);
  margin-inline: auto;
  width: 100%;
}

/* ---- header: white, logo centred -------------------------------------- */
.container-header {
  background: var(--ashley-box);
  background-image: none;
  box-shadow: none;
  color: var(--ashley-text);
}
.container-header .grid-child { max-width: none; padding-inline: 2.5rem; }
.container-header .navbar-brand {
  display: block;
  margin: 0 auto;
  padding: 2rem 0 1.25rem;
  text-align: center;
  color: var(--ashley-text);
}
.container-header .navbar-brand a { color: var(--ashley-text); }
.container-header .brand-logo img { max-height: 110px; width: auto; }
.container-header .site-description { color: var(--ashley-text); font-size: 0.95rem; }

/* ---- main menu: row of bordered boxes, active item filled ------------- */
/* Wide screens: one row of equal boxes. Below 992px (Cassiopeia's collapsible menu layout): a "Menü" button
   that opens the items as a stacked list. */
.container-header .container-nav { padding-bottom: 1.5rem; justify-content: center; }
.container-header .container-nav nav { width: 100%; margin-top: 0; padding: 0; }
.container-header .navbar-collapse { flex-basis: 100%; min-width: 0; }
.container-header .mod-menu,
.container-header .metismenu {
  display: flex;
  flex-direction: row;       /* mod-menu.css stacks it as a column on small screens */
  flex-wrap: nowrap;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ashley-line);
  color: var(--ashley-nav);
}
.container-header .mod-menu > li,
.container-header .metismenu > li {
  display: block;            /* Cassiopeia makes it a flex box, which shrinks the link */
  flex: 1 1 auto;            /* wider boxes for longer words, so none is split */
  min-width: 0;
  margin: 0 !important;
  border-inline-start: 1px solid var(--ashley-line);
}
.container-header .mod-menu > li:first-child,
.container-header .metismenu > li:first-child { border-inline-start: 0; }
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span,
.container-header .metismenu > li > a {
  display: block;
  padding: 0.85rem 0.5rem;
  text-align: center;
  text-decoration: none !important;
  white-space: normal;
  overflow-wrap: break-word;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: "Raleway", Arial, sans-serif;
  font-size: 0.72rem;
  color: var(--ashley-nav);
  background: transparent;
  transition: background-color .2s, color .2s;
}
.container-header .mod-menu > li > a:hover,
.container-header .metismenu > li > a:hover,
.container-header .mod-menu > li > a:focus-visible {
  background: var(--ashley-soft);
  color: var(--ashley-accent-dark);
}
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a,
.container-header .metismenu > li.active > a {
  background: var(--ashley-accent);
  color: #fff;
}
/* Cassiopeia's own metismenu rules are more specific: no ellipsis, let long items wrap, links fill their box */
.container-header .metismenu.mod-menu > .metismenu-item { display: block; padding: 0; }
.container-header .metismenu.mod-menu > .metismenu-item > a,
.container-header .metismenu.mod-menu > .metismenu-item > span {
  display: block;
  white-space: normal;
  text-overflow: clip;
  overflow: visible;
  text-decoration: none;
}
.container-header .metismenu > li > a::after,
.container-header .metismenu > li > button::before { display: none; }

/* the menu button (shown below 992px) */
.container-header .navbar-toggler {
  display: none;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--ashley-line);
  border-radius: 0;
  background: transparent;
  color: var(--ashley-nav);
  font-family: "Raleway", Arial, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.container-header .navbar-toggler::after { content: "Menü"; margin-inline-start: 0.6rem; }
/* open: light grey, so only the current page is filled with the accent colour */
.container-header .navbar-toggler[aria-expanded="true"] { background: var(--ashley-soft); color: var(--ashley-accent-dark); }
.container-header .navbar-toggler[aria-expanded="true"] .icon-menu::before { content: "\f00d"; }   /* ☰ -> ✕ */
.container-header .navbar-toggler:focus { box-shadow: none; }      /* Bootstrap's thick ring also shows after a tap */
.container-header .navbar-toggler:focus-visible { outline: 2px solid var(--ashley-accent-dark); outline-offset: 2px; }

@media (max-width: 991.98px) {
  .container-header .navbar-toggler { display: flex; align-items: center; justify-content: center; }
  .container-header .navbar-collapse .mod-menu,
  .container-header .navbar-collapse .metismenu { flex-direction: column; border-top: 0; }
  .container-header .mod-menu > li,
  .container-header .metismenu > li {
    flex: none;
    border-inline-start: 0;
    border-top: 1px solid var(--ashley-line);
  }
  .container-header .mod-menu > li:first-child,
  .container-header .metismenu > li:first-child { border-top: 0; }
  .container-header .mod-menu > li > a,
  .container-header .metismenu > li > a { padding: 0.8rem 1rem; font-size: 0.8rem; }
}

/* phones: smaller logo and margins */
@media (max-width: 767.98px) {
  .container-header .grid-child { padding-inline: 1rem; }
  .container-header .navbar-brand { padding: 1.25rem 0 1rem; }
  .container-header .brand-logo img { max-height: 70px; max-width: 100%; }
  .container-header .container-nav { padding-bottom: 1rem; }
}

/* ---- content area: white box ------------------------------------------- */
.site-grid {
  background: var(--ashley-box);
  padding: 1.5rem 2.5rem 2.5rem;
  grid-template-columns: [full-start] 0 [main-start] repeat(4, minmax(0, 1fr)) [main-end] 0 [full-end];
}
@media (max-width: 767.98px) { .site-grid { padding: 1rem; } }

h1, h2, h3, .page-header h1, .page-header h2 {
  font-family: var(--cassiopeia-font-family-headings);
  font-weight: 400;
  color: var(--ashley-text);
}
.item-page .page-header h1,
.item-page .page-header h2,
.blog-item .page-header h2,
.com-content-article .page-header h2 { color: var(--ashley-heading); }
h4 { color: var(--ashley-accent); }

a { color: var(--ashley-accent); }
a:hover, a:focus { color: var(--ashley-accent-dark); }

.btn-primary {
  --btn-bg: var(--ashley-accent);
  --btn-border-color: var(--ashley-accent);
  --btn-hover-bg: var(--ashley-accent-dark);
  --btn-hover-border-color: var(--ashley-accent-dark);
  --btn-active-bg: var(--ashley-accent-dark);
}

/* articles imported from the old site use inline floats for photos */
.com-content-article__body img,
.item-content img { max-width: 100%; height: auto; }
@media (max-width: 575.98px) {
  .com-content-article__body img[style*="float"],
  .item-content img[style*="float"] { float: none !important; display: block; margin: 0.5rem auto !important; }
}

/* "Therapien" blog: separate the articles like the old site */
.blog-featured .blog-item,
.blog .blog-item {
  border-bottom: 1px solid var(--ashley-line);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}
.blog-featured .blog-item:last-child,
.blog .blog-item:last-child { border-bottom: 0; }

/* cards (module chrome) without heavy shadows */
.card { border: 1px solid var(--ashley-line); box-shadow: none; }

/* ---- footer: light grey band with the contact box ---------------------- */
.container-footer {
  background: var(--ashley-soft);
  background-image: none;
  color: var(--ashley-text);
  margin-bottom: 2rem;
}
.container-footer .grid-child { max-width: none; padding: 1.75rem 2.5rem; justify-content: center; text-align: center; }
.container-footer a { color: var(--ashley-accent); }
.container-footer a:hover { color: var(--ashley-accent-dark); }

#back-top { background: var(--ashley-accent); }
#back-top:hover { background: var(--ashley-accent-dark); }
