/* Studio Zdraví — masaz.eu redesign (flex, adaptive, original green palette) */
:root {
  --green: #8fd400;
  --green-deep: #148d04;
  --green-dark: #3d6b12;
  --leaf: #5a8f2a;
  --moss: #d2e0c6;
  --moss-deep: #b7c9a3;
  --cream: #f4f8ee;
  --ink: #3a4336;
  --muted: #5c6758;
  --orange: #e87717;
  --white: #ffffff;
  --header-band: #2f4a1c;
  --radius: 2px;
  --max: 1100px;
  --font-display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 50% at 10% -10%, rgba(143, 212, 0, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(232, 119, 23, 0.08), transparent 45%),
    linear-gradient(180deg, #c5d6b0 0%, var(--moss) 18%, #e8f0df 48%, var(--cream) 100%);
}

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

a {
  color: var(--green-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--orange);
  text-decoration: underline;
}

/* Content column limit works even if broken HTML pulls footer out of .site-wrap */
.site-wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 0.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 100vh;
  box-sizing: border-box;
}

.site-header,
.site-main,
.site-footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Якщо з ламаного markup футер/main опинились прямими дітьми body */
body > .site-header,
body > .site-main,
body > .site-footer,
body > header.site-header,
body > main.site-main,
body > footer.site-footer {
  width: min(100% - 1.5rem, var(--max));
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Header / brand */
.site-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.25rem;
  border-bottom: 3px solid var(--green);
  background:
    linear-gradient(135deg, rgba(47, 74, 28, 0.97), rgba(61, 107, 18, 0.92)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 8px,
      rgba(143, 212, 0, 0.04) 8px,
      rgba(143, 212, 0, 0.04) 16px
    );
  color: var(--white);
  box-shadow: 0 8px 24px rgba(40, 60, 20, 0.18);
  animation: header-in 0.7s ease both;
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.site-brand {
  padding: 1.4rem 1.5rem 1rem;
}

.brand-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: inherit;
}

.brand-link:hover {
  text-decoration: none;
  color: var(--white);
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
}

.brand-place {
  font-size: 0.95rem;
  color: #d7d7d7;
  letter-spacing: 0.02em;
}

.brand-tagline {
  margin: 0.65rem 0 0;
  color: var(--green);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Primary nav */
.site-nav {
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-primary {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.2rem;
}

.nav-primary a {
  display: block;
  padding: 0.55rem 0.85rem;
  color: #f2f7ea;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-primary a:hover,
.nav-primary a.is-active {
  background: rgba(143, 212, 0, 0.22);
  color: var(--green);
  text-decoration: none;
}

.nav-push {
  margin-left: auto;
}

/* Services subnav + dropdown */
.site-subnav {
  background: #eef5e4;
  border-top: 1px solid var(--moss-deep);
}

.nav-services {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.nav-services > li {
  position: relative;
}

.nav-services > li > a {
  display: block;
  padding: 0.45rem 0.7rem;
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}

.nav-services > li > a:hover {
  background: rgba(143, 212, 0, 0.25);
  color: var(--green-deep);
  text-decoration: none;
}

.submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 20;
  min-width: 220px;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--moss-deep);
  box-shadow: 0 10px 24px rgba(40, 60, 20, 0.12);
}

.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu {
  display: block;
  animation: drop 0.18s ease both;
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.submenu a {
  display: block;
  padding: 0.45rem 0.9rem;
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
}

.submenu a:hover {
  background: var(--cream);
  color: var(--green-deep);
}

/* Main */
.site-main {
  flex: 1;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(90, 143, 42, 0.18);
  box-shadow: 0 4px 20px rgba(50, 70, 30, 0.06);
  animation: main-in 0.65s 0.1s ease both;
}

@keyframes main-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-content {
  padding: 1.5rem 1.6rem 2rem;
}

.page-header {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(143, 212, 0, 0.35);
}

.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.25;
  color: var(--green-dark);
  font-weight: 700;
}

.content-prose h1,
.content-prose h2,
.content-prose h3,
.content-prose h4,
.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4 {
  font-family: var(--font-display);
  color: var(--green);
  line-height: 1.3;
  margin: 1.1rem 0 0.5rem;
}

.content-prose h2,
.page-body h2 {
  font-size: 1.25rem;
  color: var(--green-dark);
}

.content-prose p,
.page-body p {
  margin: 0 0 0.85rem;
}

.content-prose ul,
.content-prose ol,
.page-body ul,
.page-body ol {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.content-prose li,
.page-body li {
  margin-bottom: 0.3rem;
}

.content-prose table,
.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.content-prose th,
.content-prose td,
.page-body th,
.page-body td {
  border-bottom: 1px solid #d8d8d8;
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.content-prose img,
.page-body img {
  border: 3px solid #ecf8ff;
  display: block;
  margin: 0.75rem 0;
}

.oranzova,
.orange {
  color: var(--orange);
}

.green {
  color: var(--green-deep);
}

.red {
  color: #c0392b;
}

.velikosth1 {
  font-size: 1.15em;
}

#nabidka h2 {
  margin: 0.35rem 0;
  font-size: 1.05rem;
}

#nabidka h2 a {
  text-decoration: none;
}

#nabidka h2 a:hover {
  text-decoration: underline;
}

#nabidka h2.oranzova a {
  color: var(--orange);
}

#nabidka h2.green a {
  color: var(--green-deep);
}

.tabulka {
  overflow-x: auto;
}

.info {
  color: var(--green-deep);
  font-size: 0.95em;
}

.date {
  font-weight: 700;
}

.hd,
.skryt,
.hidden {
  display: none !important;
}

/* Blog list */
.blog-container {
  padding: 0.25rem 0 1rem;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(90, 143, 42, 0.2);
}

.blog-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.blog-title a {
  color: var(--green-dark);
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--orange);
}

.blog-preview p {
  margin: 0;
  color: var(--muted);
}

/* romli article */
.romlicontainer {
  max-width: 100%;
}

/* Footer */
.site-footer {
  margin-top: 1.25rem;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(180deg, #3d6b12, #2f4a1c);
  color: #e8f0df;
  animation: footer-in 0.7s 0.15s ease both;
}

@keyframes footer-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.footer-brand {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--green);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: #eef5e4;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--green);
}

.romlifooter {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

.romlifooter img {
  max-width: 160px;
  height: auto;
}

.romlidata {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(143, 212, 0, 0.3);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.footer-inner {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 760px) {
  .site-wrap {
    padding: 0.75rem 0.5rem 1.75rem;
  }

  body > .site-header,
  body > .site-main,
  body > .site-footer,
  body > header.site-header,
  body > main.site-main,
  body > footer.site-footer {
    width: min(100% - 1rem, var(--max));
  }

  .site-brand {
    padding: 1.1rem 1rem 0.75rem;
  }

  .nav-push {
    margin-left: 0;
  }

  .nav-primary a {
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
  }

  .nav-services {
    flex-direction: column;
  }

  .has-submenu > .submenu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.65);
    min-width: 0;
    padding-left: 0.75rem;
  }

  .has-submenu:hover > .submenu,
  .has-submenu:focus-within > .submenu {
    display: block;
  }

  .page-content {
    padding: 1.1rem 1rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
