/* Site-level integration. Page-specific layout is kept in styles/pages/. */
.ags-page-content { display: contents; }
@media (max-width: 767px) {
  body[data-page] .elementor-location-footer .elementor-element.elementor-element-e01b4c7 { --padding-top: 24px; }
  body[data-page] .elementor-location-footer .elementor-element.elementor-element-9376367 > .elementor-widget-container { margin: 0; }
}
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
.elementor-menu-anchor, [id="info"] { scroll-margin-top: 110px; }
.e-parent[id] { scroll-margin-top: 110px; }

/* Keep the imported boxed layouts clear of the edges between breakpoints. */
@media (min-width: 1025px) and (max-width: 1263px) {
  body .ags-page-content .e-con,
  body .elementor-location-footer .e-con {
    max-width: 100%;
    min-width: 0;
  }
  .ags-page-content > .elementor > .e-con-boxed > .e-con-inner,
  .elementor-location-footer > .e-con-boxed > .e-con-inner {
    max-width: calc(100% - 64px);
    margin-inline: auto;
  }
}

/* Five services fit a wide desktop; intermediate screens get a real second row. */
@media (min-width: 768px) {
  body[data-page="technische-sicherheit"] .elementor-element[data-id="2c34417"] {
    display: grid;
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
  body[data-page="technische-sicherheit"] .elementor-element[data-id="2c34417"] > .e-con {
    width: 100%;
    min-width: 0;
  }
}
@media (min-width: 1200px) {
  body[data-page="technische-sicherheit"] .elementor-element[data-id="2c34417"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Keep the two option cards inside the narrower configurator column. */
@media (min-width: 1025px) and (max-width: 1199px) {
  .securitas-alarm-module > label,
  .securitas-install-module > label { min-width: 0; }
  .securitas-alarm-module .option-label,
  .securitas-install-module .option-label {
    min-width: 0;
    padding-inline: 12px !important;
  }
}
/* The preserved legacy route needs the same header clearance as its successor. */
@media (max-width: 1024px) {
  body[data-page="dienstleistungen-alt"] .elementor-element[data-id="64bfe5f"] { --padding-top: 120px; }
}
@media (max-width: 767px) {
  body[data-page="dienstleistungen-alt"] .elementor-element[data-id="64bfe5f"] { --padding-top: 96px; }
}

/* The form determines both column heights, including validation/success copy. */
body[data-page="home"] .elementor-element[data-id="44b4254"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  align-items: stretch;
  width: 100%;
}
body[data-page="home"] .elementor-element[data-id="44b4254"] > .e-con {
  width: 100%;
  min-width: 0;
}
body[data-page="home"] .elementor-element[data-id="9e72878"] {
  position: relative;
  min-height: 260px;
}
body[data-page="home"] .elementor-element[data-id="b5094a0"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
body[data-page="home"] .elementor-element[data-id="b5094a0"] :is(.elementor-widget-container, .elementor-custom-embed, .ags-map-placeholder, iframe) {
  height: 100%;
  aspect-ratio: auto;
}
@media (max-width: 1024px) {
  body[data-page="home"] .elementor-element[data-id="44b4254"] { grid-template-columns: minmax(0, 1fr); }
  body[data-page="home"] .elementor-element[data-id="9e72878"] { height: 260px; }
}

/* Native inputs stay legible and easy to touch on every form. */
body .elementor-form .elementor-field-group > :is(input.elementor-field-textual, select.elementor-field-textual, textarea.elementor-field-textual),
#ags-popup .ags-field > input:not([type="checkbox"]),
#ags-popup .ags-field textarea,
#ags-popup .ags-times input {
  min-height: 48px;
  font-size: 16px;
  scroll-margin-block: 110px 24px;
}
body .elementor-form .elementor-field-group > textarea.elementor-field-textual { min-height: 120px; }

/* The visible dots stay small; their hit areas no longer are. */
body .ags-carousel-ready .tns-nav,
body .ags-carousel-ready ~ .swiper-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  position: static;
  width: 100%;
}
body[data-page] .elementor .elementor-element .ags-carousel-ready.jkit-testimonials.jeg-elementor-kit .tns-nav button[aria-current],
body .ags-carousel-ready ~ .swiper-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 1;
}
body[data-page] .elementor .elementor-element .ags-carousel-ready.jkit-testimonials.jeg-elementor-kit .tns-nav button[aria-current]::before,
body .ags-carousel-ready ~ .swiper-pagination button::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c60d0d;
  opacity: .3;
}
body[data-page] .elementor .elementor-element .ags-carousel-ready.jkit-testimonials.jeg-elementor-kit .tns-nav button[aria-current="true"]::before,
body .ags-carousel-ready ~ .swiper-pagination .swiper-pagination-bullet-active::before { opacity: 1; }
body[data-page] .elementor .elementor-element .ags-carousel-ready.jkit-testimonials.jeg-elementor-kit .tns-nav button[aria-current]:focus-visible,
body .ags-carousel-ready ~ .swiper-pagination button:focus-visible { outline: 2px solid #c60d0d; outline-offset: -4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
/* Transport validation; hidden bot field remains outside keyboard navigation. */
.ags-honeypot{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
.ags-server-error{display:block;color:#a00;font-size:14px;line-height:1.4;width:100%;margin-top:4px}
.ags-contact-consent{font-size:14px;line-height:1.5}
.ags-contact-consent label{display:block;min-height:44px;cursor:pointer}
.ags-contact-consent input{width:auto!important;min-height:0!important;margin-right:6px}
[aria-invalid="true"]{border-color:#a00!important}
#ags-rental-receipt{box-sizing:border-box;width:calc(100% - 32px);max-width:880px;margin:0 auto 64px;padding:24px;background:#fff;color:#222;border-top:3px solid #c60d0d;overflow-wrap:anywhere;scroll-margin-top:100px}
#ags-rental-receipt h3{color:#140d09;font-size:26px;line-height:1.3;margin:0 0 24px}
#ags-rental-receipt p{color:#444;line-height:1.6}
#ags-rental-receipt button{background:#c60d0d;color:#fff;border:0;padding:14px 20px;font:inherit;cursor:pointer}
#ags-rental-receipt .ags-sum-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #7776;font-size:14px}
#ags-rental-receipt .ags-sum-row span{min-width:0;flex:1}
#ags-rental-receipt .ags-sum-row span:last-child{text-align:right}
.ags-pb-terms{font-size:14px;line-height:1.5;margin:10px 0;color:inherit}
#ags-rental-receipt .ags-sum-price{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;margin:20px 0;font-weight:700}
#ags-rental-receipt .ags-sum-price .lbl{flex:1 1 220px}
#ags-rental-receipt .ags-sum-price .val{flex:0 0 auto;white-space:nowrap;font-size:24px;text-align:right}
#ags-rental-receipt .ags-sum-price small{display:block;font-size:14px;font-weight:400}
@media print{
 body[data-page="success"] > :not(main),body[data-page="success"] .elementor-1613 > :not(#ags-rental-receipt){display:none!important}
 body[data-page="success"] #ags-rental-receipt{width:100%;max-width:none;margin:0;padding:0;border:0;color:#000;background:#fff;font-size:11pt;line-height:1.35}
 #ags-rental-receipt .ags-sum-row{padding:6pt 0;break-inside:avoid}
 #ags-rental-receipt .ags-sum-price{color:#000!important;break-inside:avoid}
 #ags-rental-receipt button{display:none!important}
}
.ags-legal{max-width:1080px;margin:0 auto;padding:160px 32px 64px;color:#222;background:#fff;line-height:1.65;overflow-wrap:anywhere;font-size:17px}
.ags-legal h1{font-size:clamp(30px,5vw,48px);line-height:1.15;margin:0 0 36px;color:#111}
.ags-legal h2{font-size:26px;line-height:1.3;margin:36px 0 14px;color:#111}
.ags-legal h3{font-size:22px;line-height:1.35;margin:28px 0 12px;color:#111}
.ags-legal h4{font-size:19px;margin:24px 0 10px;color:#111}
.ags-legal a{color:#a40909;text-decoration:underline;text-underline-offset:3px}
.ags-legal p{margin:0 0 18px}.ags-legal ul,.ags-legal ol{padding-left:24px}
.ags-legal :target{scroll-margin-top:120px}
@media(max-width:767px){.ags-legal{padding:120px 20px 40px;font-size:16px}.ags-legal h2{font-size:24px}}

/* Accessible hit areas for kit galleries; keep the visible dots small. */
body[data-page] .elementor .elementor-element .swiper-pagination button.swiper-pagination-bullet {
 min-width: 28px !important; width: 28px !important; height: 32px !important;
 flex: 0 0 28px; padding: 0 !important; margin: 0 !important; background: transparent !important;
}
body[data-page="success"] #ags-rental-receipt > a { color: #a40909; text-decoration: underline; }
@media print { body[data-page="success"] #ags-rental-receipt > a { color: #000; } }

/* Keep the complete kit-overview hero visible below the fixed mobile header. */
@media (max-width: 767px) {
  body[data-page="kits-uebersicht"] .elementor-element-e9be66a > .e-con-inner { padding-top: 90px; }
  #ags-price-hero .ags-price-badge { flex-wrap: wrap; row-gap: 8px; }
  #ags-price-hero .ags-pb-num { white-space: nowrap; flex-shrink: 0; }
  #ags-price-hero .ags-pb-per { flex: 1 1 84px; letter-spacing: normal; }
  #ags-price-hero .ags-pb-terms { flex-basis: 100%; margin: 0; }
}
