/* Gallery "Load more" clip + overlay */
.gallery-clip {
  position: relative;
  max-height: 2050px;
  overflow: hidden;
}

.gallery-clip.expanded {
  max-height: none;
}

.gallery-more-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 44px;
  z-index: 5;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.65) 55%,
    rgba(255, 255, 255, 0.92) 100%
  );
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  mask-image: linear-gradient(to bottom, transparent 0%, black 45%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 45%);
}

.gallery-more-overlay .btn {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.gallery-clip.expanded .gallery-more-overlay {
  display: none;
}

/* Stable gallery grid: items keep their size before images load (lazy loading) */
.portfolio-items .hover-bg,
.portfolio-items .portfolio-item {
  width: 100%;
  display: block;
}

.portfolio-items .hover-bg img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Login screen */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f6f3;
  padding: 20px;
  font-family: 'DM Sans', sans-serif;
}

.login-card {
  background: #fff;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.login-title {
  margin: 0 0 4px;
  font-weight: 600;
}

.login-subtitle {
  color: #8a9488;
  margin-bottom: 28px;
  font-size: 14px;
}

.login-card .form-group {
  margin-bottom: 18px;
}

.login-card label {
  font-weight: 500;
  font-size: 14px;
}

.login-card .form-control {
  height: 44px;
  border-radius: 8px;
}

.login-error {
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 18px;
}

.login-btn {
  width: 100%;
}

/* Admin layout fixes */
.sidebar {
  width: 260px;
  background: #fafbf8;
}

.admin-main {
  width: calc(100% - 260px) !important;
  margin-left: 260px !important;
  padding: 30px 40px !important;
  position: relative;
}

.admin-main .table th,
.admin-main .table td {
  vertical-align: middle !important;
}

@media (max-width: 767px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }
  .sidebar-sticky {
    height: auto;
  }
  .admin-main {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 20px !important;
  }
}

/* ===== Modern admin (v5) ===== */
.adm {
  display: flex;
  min-height: 100vh;
  background: #f4f6f2;
  font-family: 'DM Sans', sans-serif;
}

.adm-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e8ece4;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.adm-brand {
  display: block;
  text-align: center;
  margin-bottom: 28px;
}

.adm-brand img {
  max-width: 150px;
  margin: 0 auto;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: #4b5546;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.adm-link .fa {
  width: 18px;
  text-align: center;
  color: #9aa694;
}

.adm-link:hover {
  background: #f1f5ec;
  color: #35402f;
  text-decoration: none;
}

.adm-link.active {
  background: #afca54;
  color: #fff;
}

.adm-link.active .fa {
  color: #fff;
}

.adm-nav-sep {
  height: 1px;
  background: #e8ece4;
  margin: 14px 6px;
}

.adm-link-danger {
  color: #b3564d;
}

.adm-link-danger .fa {
  color: #b3564d;
}

.adm-link-danger:hover {
  background: #fdf0ee;
  color: #a03c32;
}

.adm-main {
  flex: 1;
  padding: 36px 44px;
  min-width: 0;
}

.adm-title {
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 22px;
  color: #2c332a;
}

.adm-card {
  background: #fff;
  border: 1px solid #e8ece4;
  border-radius: 14px;
  padding: 26px 28px;
  margin-bottom: 26px;
  box-shadow: 0 2px 10px rgba(40, 50, 35, 0.04);
}

.adm-card h4 {
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 18px;
  color: #2c332a;
}

.adm-form {
  max-width: 560px;
}

.adm-form .form-group {
  margin-bottom: 16px;
}

.adm-form label {
  font-weight: 500;
  font-size: 13.5px;
  color: #4b5546;
}

.adm-form .form-control,
.adm-form select {
  padding: 10px 14px;
  font-size: 14.5px;
  border: 1px solid #dbe2d4;
  border-radius: 9px;
  box-shadow: none;
  height: auto !important;
}

.adm-form input[type='file'] {
  font-size: 13.5px;
  padding: 8px 0;
}

.adm-btn {
  background: #afca54;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 11px 26px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  transition: background 0.15s;
}

.adm-btn:hover {
  background: #9db949;
  color: #fff;
}

.adm-table {
  width: 100%;
  margin: 0;
}

.adm-table th {
  background: #f7f9f4 !important;
  border: 0 !important;
  padding: 13px 16px !important;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #7c866f;
}

.adm-table td {
  padding: 12px 16px !important;
  vertical-align: middle !important;
  border-top: 1px solid #eef1ea !important;
  font-size: 14px;
  color: #3d463a;
}

.adm-thumb {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.adm-del {
  background: #fdf0ee;
  color: #b3564d;
  border: 1px solid #f3d9d5;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s;
}

.adm-del:hover {
  background: #f8dcd8;
  color: #a03c32;
}

@media (max-width: 767px) {
  .adm {
    flex-direction: column;
  }
  .adm-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 16px;
  }
  .adm-brand {
    margin: 0;
  }
  .adm-brand img {
    max-width: 90px;
  }
  .adm-nav {
    flex-direction: row;
  }
  .adm-nav-sep {
    display: none;
  }
  .adm-main {
    padding: 20px;
  }
}

/* ========================================================================
   Modernization: Greenly-inspired sections (public site)
   Brand: primary #bbd760 / hover #a3bd4f / accent #afca54, dark #2c332a
   Type: DM Sans (body/UI) + DM Serif Display (heading accents)
   ======================================================================== */

/* Body font: DM Sans replaces Poppins (legacy style.css sets it on body,html + label) */
body,
html,
label,
input,
textarea,
select,
button {
  font-family: 'DM Sans', sans-serif;
}

/* Hero headline with DM Serif accent (Greenly-style) */
.intro h1.hero-title {
  font-size: 66px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1px;
}
.hero-accent {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: #cbe272;
  letter-spacing: 0;
}
@media (max-width: 767px) {
  .intro h1.hero-title {
    font-size: 40px;
  }
}

/* Secondary / ghost button — same size/type as solid via unified system */
.btn-ghost {
  color: #3d463a;
  background: transparent;
  border: 2px solid #bbd760;
  margin-top: 20px;
}
.btn-ghost:hover,
.btn-ghost:focus {
  background: #bbd760;
  color: #111;
}
.intro .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}
.intro .btn-ghost:hover {
  background: #fff;
  color: #3d463a;
}

/* ===== ONE unified button system =====
   Legacy style.css fights us with higher-specificity rules
   (#footer a, #menu.navbar-default .navbar-nav > li > a), so the
   typography props are locked with !important. Every button — hero,
   nav, forms, footer — renders identically. */
.btn-custom,
.btn-ghost,
#menu .nav-cta > a,
#footer .footer-actions .btn-custom {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  text-transform: none !important;
  letter-spacing: 0.3px !important;
  border-radius: 6px !important;
  padding: 13px 26px !important;
  display: inline-block;
  transition: all 0.25s;
}
.btn-custom,
.btn-custom:hover,
.btn-custom:focus,
.btn-custom.focus,
.btn-custom:active,
.btn-custom.active,
#menu .nav-cta > a,
#menu .nav-cta > a:hover,
#menu .nav-cta > a:focus,
#footer .footer-actions .btn-custom,
#footer .footer-actions .btn-custom:hover {
  color: #111 !important;
}
.btn-custom,
#menu .nav-cta > a,
#footer .footer-actions .btn-custom {
  background: #bbd760;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.btn-custom:hover,
.btn-custom:focus,
#menu .nav-cta > a:hover,
#footer .footer-actions .btn-custom:hover {
  background: #a3bd4f;
}
.btn-custom:focus-visible,
.btn-ghost:focus-visible {
  outline: 3px solid #2c332a;
  outline-offset: 2px;
}

/* Remove dated decorative underlines below headings */
.section-title hr,
#about .about-text hr,
#services hr {
  display: none;
}

/* About section: more breathing room + rounded media matching page radius */
#about {
  padding: 150px 0 130px;
}
#about .about-media img {
  border-radius: 14px;
}

/* Serif accent for key words in headings (Greenly-style).
   DM Serif Display only ships weight 400 — lock it everywhere so no
   context (h1 700, h2 600, …) triggers uneven faux-bold rendering. */
.serif-accent,
.hero-accent {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  text-transform: none;
  letter-spacing: 0;
}
.serif-accent {
  color: #8aa72f;
}
#testimonials .serif-accent {
  color: #cbe272;
}

.intro-actions,
.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Solid navbar on subpages (Impressum/Datenschutz) — the homepage nav is
   transparent over the hero, which is unreadable on light pages */
#menu.nav-solid {
  background: #111 !important;
}
#menu.nav-solid .navbar-brand {
  color: #fff;
}

/* Nav CTA button — spacing only; face comes from the unified system above */
#menu .nav-cta > a {
  margin: 4px 0 4px 12px;
}

/* Trust cards */
#trust {
  padding: 70px 0 30px;
  background: #fff;
}
.trust-card {
  text-align: center;
  padding: 34px 26px;
  height: 100%;
}
.trust-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #f1f5ec;
  color: #8aa72f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.trust-card h3 {
  color: #2c332a;
  font-weight: 600;
  margin-bottom: 12px;
}
.trust-card p {
  color: #6b7563;
  line-height: 1.7;
}

/* Stats band */
#stats {
  padding: 60px 0;
  background: #111;
}
.stat-item {
  text-align: center;
  padding: 14px 6px;
}
.stat-number {
  font-size: 44px;
  font-weight: 700;
  color: #cbe272;
  line-height: 1.1;
}
.stat-region {
  font-size: 30px;
}
.stat-suffix {
  color: #cbe272;
}
.stat-label {
  margin-top: 8px;
  color: #cfd6c8;
  font-size: 15px;
  letter-spacing: 0.5px;
}

/* Service cards — override legacy #services green/circle rules */
#services {
  background: #f7f9f4 !important;
  padding: 80px 0 !important;
}
#services h2,
#services .section-title h2 {
  color: #2c332a !important;
}
#services .service-card {
  background: #fff;
  border: 1px solid #eef1ea;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 4px 18px rgba(40, 50, 35, 0.05);
  transition: transform 0.25s, box-shadow 0.25s;
}
#services .service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(40, 50, 35, 0.12);
}
#services .service-card .service-media {
  overflow: hidden;
  margin: 0;
}
#services .service-card .service-media img {
  position: static;
  width: 100%;
  height: 210px;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
#services .service-card:hover .service-media img {
  transform: scale(1.05);
}
#services .service-card .service-desc {
  margin: 0;
  padding: 22px 22px 26px;
}
#services .service-card .service-desc h3 {
  color: #2c332a !important;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
}
#services .service-card .service-desc p {
  color: #6b7563 !important;
  line-height: 1.7;
}

/* Process section */
#process {
  padding: 80px 0;
  background: #f7f9f4;
}
.process-step {
  padding: 20px 16px;
  text-align: center;
}
.process-num {
  display: inline-block;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 30px;
  font-weight: 400;
  color: #111;
  background: #bbd760;
  width: 60px;
  height: 60px;
  line-height: 60px;
  border-radius: 50%;
  margin-bottom: 18px;
}
.process-step h3 {
  color: #2c332a;
  font-weight: 600;
  margin-bottom: 10px;
}
.process-step p {
  color: #6b7563;
  line-height: 1.7;
}

/* Testimonial cards */
.testimonial-cards {
  margin-top: 10px;
  justify-content: center;
}
.testimonial-card {
  background: #fff;
  border-radius: 12px;
  padding: 30px 28px;
  text-align: left;
  height: 100%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}
.testimonial-stars {
  color: #f0b429;
  margin-bottom: 14px;
  font-size: 15px;
}
.testimonial-text {
  color: #3d463a;
  font-size: 15.5px;
  line-height: 1.7;
  margin-bottom: 16px;
}
.testimonial-author {
  color: #8aa72f;
  font-weight: 600;
  margin: 0;
}
.testimonials-google {
  display: inline-block;
  margin-top: 36px;
  color: #fff;
  font-size: 15.5px;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 3px;
  transition: all 0.25s;
}
.testimonials-google:hover,
.testimonials-google:focus {
  color: #cbe272;
  border-color: #cbe272;
  text-decoration: none;
}
.testimonials-google .fa {
  margin-right: 8px;
}

/* Equal-height cards (services, trust, testimonials).
   clear:both is required: flex containers avoid floated siblings
   (e.g. the floated .col-md-10 section title) instead of flowing under them. */
#services .row,
#trust .row,
.testimonial-cards {
  display: flex;
  flex-wrap: wrap;
  clear: both;
  row-gap: 36px;
}
#services .row > [class*='col-'],
#trust .row > [class*='col-'],
.testimonial-cards > [class*='col-'] {
  display: flex;
  float: none;
}
#services .service-card,
.trust-card,
.testimonial-card {
  width: 100%;
}
#services .service-card {
  display: flex;
  flex-direction: column;
}

/* Gallery — Greenly-style header + masonry tiles */
#portfolio .gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
}
#portfolio .gallery-header h2 {
  margin: 0;
}
#portfolio .gallery-header .categories {
  margin: 0;
}
#portfolio .cat .type li {
  display: inline-block;
  margin: 0;
}
#portfolio .cat .type a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #dbe2d4;
  background: transparent;
  color: #4b5546;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0.5px;
  margin-left: 8px;
  transition: all 0.25s;
}
#portfolio .cat .type a.active,
#portfolio .cat .type a:hover {
  background: #bbd760;
  border-color: #bbd760;
  color: #1f2619;
}
.portfolio-item .hover-bg {
  border-radius: 14px;
  overflow: hidden;
}
/* Varied tile heights: isotope masonry staggers them like Greenly */
.portfolio-items > div:nth-child(4n + 2) .hover-bg img {
  aspect-ratio: 1 / 1;
}
.portfolio-items > div:nth-child(5n + 3) .hover-bg img {
  aspect-ratio: 3 / 4;
}

/* Footer — Greenly-style, black */
#footer {
  background: #111 !important;
  padding: 70px 0 30px;
}
#footer .footer-grid {
  display: flex;
  flex-wrap: wrap;
}
#footer .footer-grid > div {
  flex: 1 1 220px;
  padding: 6px 28px;
}
#footer .footer-grid > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
#footer .footer-brand {
  padding-left: 0;
}
#footer .footer-brand img {
  max-width: 170px;
  margin-bottom: 18px;
}
#footer .footer-brand p {
  color: #c4cdba;
  line-height: 1.7;
}
#footer .footer-col h4 {
  color: #9aa694;
  font-weight: 500;
  font-size: 16px;
  margin: 0 0 20px;
}
#footer .footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#footer .footer-col li {
  color: #e4e9dd;
  margin-bottom: 14px;
  line-height: 1.5;
}
#footer .footer-col a {
  color: #e4e9dd;
  transition: color 0.2s;
}
#footer .footer-col a:hover {
  color: #cbe272;
  text-decoration: none;
}
#footer .footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 40px;
  padding-top: 30px;
}
#footer .footer-actions .btn-custom {
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
#footer .footer-social {
  display: flex;
  gap: 16px;
}
#footer .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #3d3d3d;
  color: #bbd760;
  font-size: 19px;
  transition: all 0.25s;
}
#footer .footer-social a:hover {
  background: #bbd760;
  color: #111;
}
#footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 30px;
  padding-top: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: #c4cdba;
  font-size: 14px;
}
#footer .footer-legal a {
  color: #c4cdba;
  margin-left: 18px;
  text-decoration: underline;
}
#footer .footer-legal a:hover {
  color: #cbe272;
}

@media (max-width: 767px) {
  .stat-number {
    font-size: 34px;
  }
  #portfolio .gallery-header {
    flex-direction: column;
    align-items: flex-start;
  }
  #portfolio .cat .type a {
    margin: 0 8px 8px 0;
  }
  #footer .footer-grid > div {
    flex: 1 1 100%;
    padding: 16px 0;
  }
  #footer .footer-grid > div + div {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  #footer .footer-actions {
    justify-content: center;
  }
  #footer .footer-legal a {
    margin: 0 9px;
  }
}
