:root {
  --md-primary: #6ec1e4;
  --md-brand: #022acc;
  --md-text: #54595f;
  --md-dark: #111;
  --md-white: #fff;
  --md-surface: #f7f9fb;
  --md-border: rgba(0, 0, 0, 0.12);
  --md-content: 1024px;
  --md-wide: 1200px;
  --md-shadow: 0 12px 34px rgba(2, 42, 204, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--md-white);
  color: var(--md-text);
  font-family: Ubuntu, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
iframe { display: block; max-width: 100%; width: 100%; border: 0; }
a { color: var(--md-brand); text-underline-offset: 0.16em; }
a:hover, a:focus-visible { color: #001b92; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--md-primary); outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { color: var(--md-dark); line-height: 1.2; margin: 0 0 0.65em; }
h1 { font-size: clamp(2.15rem, 5vw, 3.125rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
p, ul, ol, blockquote { margin-top: 0; margin-bottom: 1.25em; }
address { font-style: normal; }

.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 {
  clip: auto !important;
  width: auto;
  height: auto;
  left: 1rem;
  top: 1rem;
  z-index: 100000;
  padding: 0.8rem 1rem;
  background: var(--md-white);
  color: var(--md-dark);
  box-shadow: var(--md-shadow);
}

.md-content-width { width: min(calc(100% - 2rem), var(--md-content)); margin-inline: auto; }
.md-site-main { min-height: 52vh; }
.md-entry-header { padding-top: clamp(2.5rem, 7vw, 5rem); }
.md-entry-content:not(.md-entry-content--builder):not(.md-entry-content--native) { padding-block: 2rem clamp(4rem, 8vw, 7rem); }
.md-entry-content:not(.md-entry-content--builder):not(.md-entry-content--native) > * { max-width: 100%; }
.md-entry-content:not(.md-entry-content--builder):not(.md-entry-content--native) > h1:first-child { margin-top: 0; }
.md-entry-content:not(.md-entry-content--builder):not(.md-entry-content--native) figure { margin: 2rem 0; }
.md-entry-content:not(.md-entry-content--builder):not(.md-entry-content--native) blockquote {
  padding: 1.2rem 1.5rem;
  border-left: 5px solid var(--md-primary);
  background: var(--md-surface);
}
.md-entry-content:not(.md-entry-content--builder):not(.md-entry-content--native) iframe[src*="ges-pet"] { min-height: 1000px; background: var(--md-surface); }
.md-entry-content:not(.md-entry-content--builder):not(.md-entry-content--native) iframe[src*="google.com/maps"] { min-height: 420px; }

.md-site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--md-border);
  backdrop-filter: blur(12px);
}
.admin-bar .md-site-header { top: 32px; }
.md-site-header__inner {
  width: min(calc(100% - 2rem), var(--md-wide));
  min-height: 82px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.md-site-branding .custom-logo-link { display: block; }
.md-site-branding .custom-logo { width: auto; max-height: 62px; }
.md-site-title { color: var(--md-dark); font-size: 1.35rem; font-weight: 700; text-decoration: none; }
.md-primary-menu, .md-primary-menu ul, .md-footer-menu { margin: 0; padding: 0; list-style: none; }
.md-primary-menu { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.md-primary-menu a { color: var(--md-dark); font-size: 1rem; font-weight: 500; text-decoration: none; text-transform: uppercase; }
.md-primary-menu .current-menu-item > a, .md-primary-menu a:hover { color: var(--md-primary); }
.md-primary-menu .sub-menu {
  position: absolute;
  min-width: 220px;
  padding: 0.65rem;
  background: var(--md-white);
  border: 1px solid var(--md-border);
  box-shadow: var(--md-shadow);
  visibility: hidden;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: 150ms ease;
}
.md-primary-menu li { position: relative; }
.md-primary-menu li:hover > .sub-menu, .md-primary-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; transform: none; }
.md-primary-menu .sub-menu a { display: block; padding: 0.55rem 0.75rem; }
.md-menu-toggle { display: none; width: 46px; height: 42px; padding: 9px; border: 0; background: transparent; }
.md-menu-toggle span[aria-hidden] { display: block; height: 2px; margin: 5px 0; background: var(--md-dark); }

.md-button, .wp-element-button, .wp-block-button__link, input[type="submit"], button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.72rem 1.25rem;
  border: 0;
  border-radius: 8px;
  background: var(--md-brand);
  color: var(--md-white);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}
.md-button:hover, .wp-element-button:hover, .wp-block-button__link:hover { background: var(--md-primary); color: var(--md-white); transform: translateY(-1px); }

.md-site-footer { padding-top: clamp(3rem, 7vw, 6rem); background: var(--md-surface); border-top: 1px solid var(--md-border); }
.md-site-footer__grid {
  width: min(calc(100% - 2rem), var(--md-wide));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.md-site-footer h2 { margin-bottom: 0.8rem; padding-bottom: 0.55rem; border-bottom: 2px solid rgba(84, 89, 95, 0.22); font-size: 1rem; text-transform: uppercase; }
.md-site-footer p, .md-site-footer li, .md-site-footer address { font-size: 0.9rem; }
.md-site-footer a { color: var(--md-text); }
.md-footer-menu li { margin-bottom: 0.35rem; }
.md-site-footer__legal { margin-top: 3rem; padding: 1rem; border-top: 1px solid var(--md-border); text-align: center; }
.md-site-footer__legal p { margin: 0; }

.md-blog { padding-block: clamp(3rem, 7vw, 6rem); }
.md-post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.md-post-card { overflow: hidden; padding: 1.25rem; border: 1px solid var(--md-border); border-radius: 12px; background: var(--md-white); box-shadow: 0 8px 28px rgba(0,0,0,0.06); }
.md-post-card h2 { margin-top: 1rem; font-size: 1.5rem; }
.md-single { padding-block: clamp(3rem, 7vw, 6rem); }
.md-entry-meta { font-size: 0.9rem; }
.md-not-found { padding-block: clamp(4rem, 10vw, 9rem); text-align: center; }

/* Builder mode deliberately leaves Elementor's layout untouched. */
.md-entry-content--builder { width: 100%; }
.md-builder-mode .md-site-main { overflow: clip; }

@media (max-width: 900px) {
  .admin-bar .md-site-header { top: 46px; }
  .md-menu-toggle { display: block; }
  .md-primary-navigation {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 1rem;
    background: var(--md-white);
    border-bottom: 1px solid var(--md-border);
    box-shadow: var(--md-shadow);
  }
  .md-primary-navigation.is-open { display: block; }
  .md-primary-menu { display: block; }
  .md-primary-menu a { display: block; padding: 0.75rem; }
  .md-primary-menu .sub-menu { position: static; padding-left: 1rem; border: 0; box-shadow: none; visibility: visible; opacity: 1; transform: none; }
  .md-site-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 782px) {
  .admin-bar .md-site-header { top: 46px; }
}

@media (max-width: 620px) {
  body { font-size: 17px; }
  .md-site-header__inner { min-height: 70px; }
  .md-site-branding .custom-logo { max-height: 50px; max-width: 190px; }
  .md-post-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
