/* ============================================================
   Rechtsanwaltskanzlei Huber – Inner Pages
   Shares design tokens with huber2025.css
   ============================================================ */

/* --- Tokens --- */
:root {
  --navy:       #1C2B4A;
  --navy-dark:  #111d33;
  --cyan:       #2EB5A0;
  --cyan-dark:  #1E9C89;
  --cyan-light: rgba(46,181,160,.10);
  --white:      #ffffff;
  --off-white:  #F8F9FB;
  --dark:       #111827;
  --gray:       #6B7280;
  --gray-light: #9CA3AF;
  --border:     #E5E7EB;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,.09);
  --radius:     6px;
  --radius-lg:  12px;
  --max-w:      1200px;
  --font-head:  'Playfair Display', Georgia, serif;
  --font-body:  'Inter', system-ui, -apple-system, sans-serif;
  --transition: .2s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }
svg { display: inline-block; }

/* ============================================================
   LAYOUT SHELL
   ============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   HEADER / NAV  — full-width breakout from .container
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  /* Break out of the max-width container */
  width: 100vw;
  margin-left: calc(-1 * (100vw - 100%) / 2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 76px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo img {
  height: 52px;
  width: auto;
  display: block;
  opacity: .9;
}

/* Nav list */
.navbar { display: flex; align-items: center; }
.navbar__menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}
.navbar__menu a {
  display: block;
  padding: .4rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--navy);
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.navbar__menu a:hover { background: var(--cyan-light); color: var(--dark); }
.navbar__menu li:last-child a {
  background: var(--cyan-light);
  color: var(--navy);
  border: 1px solid var(--cyan);
  padding: .5rem 1rem;
  margin-left: .75rem;
  border-radius: var(--radius);
}
.navbar__menu li:last-child a:hover { background: var(--cyan); color: var(--navy); }

/* Mobile toggle */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  padding: .5rem;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.navbar__toggle-box { display: flex; flex-direction: column; gap: 5px; }
.navbar__toggle-inner,
.navbar__toggle-box::before,
.navbar__toggle-box::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
main { flex: 1; }
.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  width: 100%;
}

/* ============================================================
   PAGE / ARTICLE HERO (title area)
   ============================================================ */
.post header.hero,
header.hero.wrapper {
  background: var(--off-white);
  border-bottom: 3px solid var(--border);
  padding: 4rem clamp(1.25rem, 4vw, 2.5rem) 3.5rem;
  text-align: center;
  max-width: 100%;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.post header.hero::before,
header.hero.wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--navy), var(--cyan));
}

.post__meta {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-light);
  font-family: var(--font-body);
  margin-bottom: 1rem;
  display: block;
}
.post__meta a { color: var(--cyan-dark); }
.post__meta a:hover { color: var(--navy); }

.post__title,
h1.post__title {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
  max-width: 760px;
  margin: 0 auto;
}
.post__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--cyan);
  margin: 1.25rem auto 0;
  border-radius: 2px;
}

/* ============================================================
   FEATURED IMAGE
   ============================================================ */
.post__featured-image {
  margin: 0 auto;
  max-width: 860px;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.post__featured-image img {
  width: 100%;
  height: clamp(240px, 38vw, 480px);
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 3rem auto 0;
  box-shadow: var(--shadow-md);
}

/* ============================================================
   POST BODY
   ============================================================ */
.post__entry {
  padding: 3rem clamp(1.25rem, 4vw, 2.5rem) 4rem;
  max-width: 860px;
  margin: 0 auto;
}

.post__entry h1,
.post__entry h2,
.post__entry h3,
.post__entry h4 {
  font-family: var(--font-head);
  color: var(--dark);
  line-height: 1.25;
  margin-top: 2.25rem;
  margin-bottom: .85rem;
}
.post__entry h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
.post__entry h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; }
.post__entry h3 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 600; }
.post__entry h4 { font-size: 1rem; font-weight: 600; }

.post__entry p {
  color: var(--gray);
  line-height: 1.85;
  margin-bottom: 1.25rem;
  font-size: .975rem;
}
.post__entry p + p { margin-top: 0; }

.post__entry a {
  color: var(--cyan-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.post__entry a:hover { color: var(--navy); }

.post__entry ul,
.post__entry ol {
  margin: 1rem 0 1.5rem;
  padding-left: 1.5rem;
}
.post__entry li {
  color: var(--gray);
  line-height: 1.75;
  margin-bottom: .5rem;
  font-size: .975rem;
}
.post__entry ul li { list-style: disc; }
.post__entry ol li { list-style: decimal; }

.post__entry blockquote {
  border-left: 3px solid var(--cyan);
  background: var(--off-white);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.post__entry blockquote p {
  color: var(--dark);
  font-style: italic;
  margin-bottom: 0;
  font-size: 1rem;
}

.post__entry strong { color: var(--dark); font-weight: 600; }

.post__entry figure { margin: 2rem 0; }
.post__entry figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.post__image--left { float: left; margin: 0 1.5rem 1rem 0; max-width: 40%; }
.post__image--right { float: right; margin: 0 0 1rem 1.5rem; max-width: 40%; }
.post__image--center { text-align: center; clear: both; }
.post__image--center img { margin: 0 auto; }
.post__image--wide { max-width: 100%; clear: both; }

.align-center { text-align: center; }
.align-left { text-align: left; }
.align-right { text-align: right; }

/* ============================================================
   POST FOOTER (share + author bio)
   ============================================================ */
.post__footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Share buttons */
.post__share {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.post__share .js-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--gray);
  transition: all var(--transition);
}
.post__share .js-share:hover {
  border-color: var(--cyan);
  color: var(--cyan-dark);
  background: var(--cyan-light);
}
.post__share .icon { width: 16px; height: 16px; }

/* Author bio */
.post__bio {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.post__bio img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--cyan);
}
.post__bio h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: .25rem;
}
.post__bio a.inverse { color: var(--dark); }
.post__bio a.inverse:hover { color: var(--cyan-dark); }
.post__bio > div { font-size: .875rem; color: var(--gray); }

/* ============================================================
   SCROLL TO TOP / BANNER
   ============================================================ */
.banner--after-post {
  display: flex;
  justify-content: flex-end;
  padding: 1rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: 860px;
  margin: 0 auto;
}
#btnScrollToTop {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  box-shadow: var(--shadow-md);
  transition: background var(--transition), transform var(--transition);
}
#btnScrollToTop:hover { background: var(--cyan-dark); transform: translateY(-2px); }
#btnScrollToTop .material-icons { font-size: 20px; }

/* ============================================================
   BLOG / TAG LISTING PAGE
   ============================================================ */
.page--tag main { padding: 0; }

.hero.wrapper {
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 4rem clamp(1.25rem, 4vw, 2.5rem) 3rem;
  max-width: 100%;
  text-align: center;
  position: relative;
}
.hero.wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--navy), var(--cyan));
}
.hero.wrapper h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--dark);
}

/* Card grid */
.l-col--4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 4rem clamp(1.25rem, 5vw, 3rem);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.c-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.c-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.c-card__link { display: block; overflow: hidden; }
.c-card__header img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.c-card:hover .c-card__header img { transform: scale(1.04); }

.c-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.c-card__body h2,
.c-card__body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: .6rem;
}
.c-card__body h2 a,
.c-card__body h3 a { color: var(--dark); }
.c-card__body h2 a:hover,
.c-card__body h3 a:hover { color: var(--cyan-dark); }

.c-card__text {
  font-size: .875rem;
  color: var(--gray);
  line-height: 1.7;
  flex: 1;
}
.c-card__text p { margin-bottom: 0; }

/* ============================================================
   PHOTO GALLERY (Publii gallery widget)
   ============================================================ */
.gallery-wrapper { margin: 2rem 0; }
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.gallery__item {
  flex: 1 0 30%;
  min-width: 180px;
  overflow: hidden;
  border-radius: var(--radius);
}
.gallery__item a { display: block; }
.gallery__item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery__item:hover img { transform: scale(1.04); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  font-family: var(--font-body);
  font-size: .82rem;
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
  line-height: 1.9;
}
.footer a { color: var(--cyan); transition: color var(--transition); }
.footer a:hover { color: #fff; }

.footer__copyright p { margin-bottom: .4rem; }
.footer__copyright p:first-child { font-weight: 600; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); }

.footer__social {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  transition: all var(--transition);
}
.footer__social a:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--white);
}
.footer__social .icon { width: 16px; height: 16px; fill: currentColor; }

/* ============================================================
   COOKIE BANNER (Publii)
   ============================================================ */
.pcb__banner {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 2rem));
  background: var(--navy);
  color: rgba(255,255,255,.85);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  z-index: 1000;
  font-family: var(--font-body);
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.pcb__title { font-weight: 700; color: var(--white); font-size: .9rem; margin-bottom: .25rem; }
.pcb__txt { color: rgba(255,255,255,.7); font-size: .82rem; line-height: 1.6; }
.pcb__txt a { color: var(--cyan); text-decoration: underline; }
.pcb__buttons { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; flex-shrink: 0; }
.pcb__btn {
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.pcb__btn--solid { background: var(--cyan); color: var(--dark); border-color: var(--cyan); }
.pcb__btn--solid:hover { background: var(--cyan-dark); border-color: var(--cyan-dark); }
.pcb__btn--reject { background: transparent; color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.2); }
.pcb__btn--reject:hover { border-color: rgba(255,255,255,.5); color: var(--white); }
.pcb__btn--link { background: transparent; color: rgba(255,255,255,.5); border: none; font-size: .75rem; }
.pcb__btn--link:hover { color: var(--white); }

.pcb__popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  background: rgba(0,0,0,.5);
}
.pcb__popup__wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.2));
  overflow: hidden;
  font-family: var(--font-body);
}
.pcb__popup__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--off-white);
}
.pcb__popup__heading .pcb__title { color: var(--dark); font-size: 1rem; }
.pcb__popup__close {
  background: none; border: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%;
  color: var(--gray);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.pcb__popup__close:hover { background: var(--border); }
.pcb__popup__content { padding: 1.25rem 1.5rem; }
.pcb__popup__txt { color: var(--gray); font-size: .875rem; line-height: 1.7; margin-bottom: 1rem; }
.pcb__popup__buttons { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; flex-wrap: wrap; }
.pcb__popup__buttons .pcb__btn--solid { background: var(--cyan); color: var(--dark); border-color: var(--cyan); }
.pcb__popup__buttons .pcb__btn--reject { color: var(--gray); border-color: var(--border); }
.pcb__popup__buttons .pcb__btn--save { color: var(--navy); border-color: var(--border); }
.pcb__overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1050; }

/* Hide elements that Publii JS has marked as hidden */
.pcb__banner[aria-hidden="true"],
.pcb__popup[aria-hidden="true"],
.pcb__overlay[aria-hidden="true"] { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .navbar__menu { display: none; }
  .navbar__toggle { display: flex; }

  .post__bio { flex-direction: column; text-align: center; }
  .post__bio img { margin: 0 auto; }

  .post__image--left,
  .post__image--right {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }

  .l-col--4 {
    grid-template-columns: 1fr;
    padding: 2rem 1.25rem;
  }

  .footer { padding: 2.5rem 1.25rem; }

  .pcb__banner {
    flex-direction: column;
    align-items: flex-start;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

@media (max-width: 480px) {
  .post__footer { padding-left: 1rem; padding-right: 1rem; }
  .post__entry { padding-left: 1rem; padding-right: 1rem; }
  .post__featured-image { padding-left: 1rem; padding-right: 1rem; }
  .post header.hero { padding-left: 1rem; padding-right: 1rem; }
}
