/**
 * Default template — CMS palette bridge (Template G / A pattern)
 * Panel :root sets --primary, --secondary, --dark, --light, --text in app.blade.php
 */

body.cms-active-template-default {
  --accent-color: var(--primary);
  --background-color: var(--light);
  --default-color: var(--text);
  --heading-color: var(--dark);
  --surface-color: color-mix(in srgb, var(--light), var(--dark) 14%);
  --contrast-color: var(--secondary);

  --nav-color: color-mix(in srgb, var(--text), var(--dark) 20%);
  --nav-hover-color: var(--primary);
  --nav-mobile-background-color: var(--dark);
  --nav-dropdown-background-color: color-mix(in srgb, var(--dark), var(--primary) 18%);
  --nav-dropdown-color: color-mix(in srgb, var(--secondary), var(--text) 35%);
  --nav-dropdown-hover-color: var(--primary);
}

body.cms-active-template-default .light-background {
  --background-color: color-mix(in srgb, var(--light), var(--dark) 6%);
  --default-color: var(--text);
  --heading-color: var(--dark);
  --surface-color: color-mix(in srgb, var(--light), var(--dark) 12%);
  --contrast-color: var(--secondary);
}

body.cms-active-template-default .dark-background {
  --background-color: var(--dark);
  --default-color: color-mix(in srgb, var(--secondary) 75%, var(--text));
  --heading-color: var(--secondary);
  --surface-color: color-mix(in srgb, var(--dark), var(--primary) 16%);
  --contrast-color: var(--secondary);
}

/* ── Page shell ── */
body.cms-active-template-default .cms-template-default {
  color: var(--text);
  background-color: var(--secondary);
}

body.cms-active-template-default .cms-template-default h1,
body.cms-active-template-default .cms-template-default h2,
body.cms-active-template-default .cms-template-default h3,
body.cms-active-template-default .cms-template-default h4,
body.cms-active-template-default .cms-template-default h5,
body.cms-active-template-default .cms-template-default h6,
body.cms-active-template-default .cms-template-default .display-1,
body.cms-active-template-default .cms-template-default .display-2,
body.cms-active-template-default .cms-template-default .display-3,
body.cms-active-template-default .cms-template-default .display-4 {
  color: var(--dark);
}

body.cms-active-template-default .cms-template-default p,
body.cms-active-template-default .cms-template-default li {
  color: var(--text);
}

/* ── Bootstrap utilities ── */
body.cms-active-template-default .text-primary { color: var(--primary) !important; }
body.cms-active-template-default .text-secondary { color: var(--text) !important; }
body.cms-active-template-default .text-dark { color: var(--dark) !important; }
body.cms-active-template-default .text-light { color: var(--secondary) !important; }
body.cms-active-template-default .text-white { color: var(--secondary) !important; }
body.cms-active-template-default .text-body { color: var(--text) !important; }
body.cms-active-template-default .text-muted {
  color: color-mix(in srgb, var(--text) 65%, transparent) !important;
}
body.cms-active-template-default .bg-primary { background-color: var(--primary) !important; }
body.cms-active-template-default .bg-secondary { background-color: var(--light) !important; }
body.cms-active-template-default .bg-dark { background-color: var(--dark) !important; }
body.cms-active-template-default .bg-light { background-color: var(--light) !important; }
body.cms-active-template-default .border-primary { border-color: var(--primary) !important; }

/* Remove decorative inner white border from border-inner elements */
body.cms-active-template-default .border-inner::before {
  display: none !important;
}

/* ── Buttons (Template G) ── */
body.cms-active-template-default .btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--secondary) !important;
}

body.cms-active-template-default .btn-primary:hover,
body.cms-active-template-default .btn-primary:focus {
  background-color: color-mix(in srgb, var(--primary), var(--dark) 15%) !important;
  border-color: color-mix(in srgb, var(--primary), var(--dark) 15%) !important;
  color: var(--secondary) !important;
}

body.cms-active-template-default .btn-dark {
  background-color: var(--dark) !important;
  border-color: var(--dark) !important;
  color: var(--secondary) !important;
}

body.cms-active-template-default .btn-dark:hover,
body.cms-active-template-default .btn-dark:focus {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--secondary) !important;
}

body.cms-active-template-default .btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

body.cms-active-template-default .btn-outline-primary:hover {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--secondary) !important;
}

body.cms-active-template-default .back-to-top {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: var(--secondary) !important;
}

/* ── Topbar (email / phone bands) ── */
body.cms-active-template-default .container-fluid .bg-secondary {
  background-color: var(--light) !important;
  color: var(--text) !important;
}

body.cms-active-template-default .container-fluid .bg-secondary h6,
body.cms-active-template-default .container-fluid .bg-secondary span {
  color: var(--text) !important;
}

body.cms-active-template-default .container-fluid .bg-primary.border-inner {
  background-color: var(--primary) !important;
}

body.cms-active-template-default .container-fluid .bg-primary .text-white,
body.cms-active-template-default .container-fluid .bg-primary .navbar-brand h1 {
  color: var(--secondary) !important;
}

body.cms-active-template-default .container-fluid .bg-primary .text-dark {
  color: var(--dark) !important;
}

/* ── Navbar ── */
body.cms-active-template-default .navbar.bg-dark {
  background-color: var(--dark) !important;
}

body.cms-active-template-default .navbar-dark .navbar-nav .nav-link {
  color: var(--secondary) !important;
}

body.cms-active-template-default .navbar-dark .navbar-nav .nav-link:hover,
body.cms-active-template-default .navbar-dark .navbar-nav .nav-link.active,
body.cms-active-template-default .navbar-dark .navbar-nav .show > .nav-link {
  color: var(--nav-hover-color) !important;
}

body.cms-active-template-default .navbar-dark .dropdown-menu {
  background-color: var(--nav-dropdown-background-color) !important;
}

body.cms-active-template-default .navbar-dark .dropdown-item {
  color: var(--nav-dropdown-color) !important;
}

body.cms-active-template-default .navbar-dark .dropdown-item:hover,
body.cms-active-template-default .navbar-dark .dropdown-item:focus {
  color: var(--nav-dropdown-hover-color) !important;
  background-color: color-mix(in srgb, var(--primary), transparent 90%) !important;
}

/* ── Inner page header (dark band) ── */
body.cms-active-template-default .cms-template-default .page-header-band,
body.cms-active-template-default .cms-template-default .container-fluid.bg-dark.bg-img {
  background-color: var(--dark) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-default .cms-template-default .container-fluid.bg-dark.bg-img .display-4,
body.cms-active-template-default .cms-template-default .container-fluid.bg-dark.bg-img .text-white,
body.cms-active-template-default .cms-template-default .container-fluid.bg-dark.bg-img a.text-white {
  color: var(--secondary) !important;
}

body.cms-active-template-default .cms-template-default .container-fluid.bg-dark.bg-img .text-primary,
body.cms-active-template-default .cms-template-default .container-fluid.bg-dark.bg-img .fa-square {
  color: var(--primary) !important;
}

body.cms-active-template-default .cms-template-default .container-fluid.bg-dark.bg-img a.text-white:hover {
  color: var(--primary) !important;
}

/* ── Hero ── */
body.cms-active-template-default .hero-overlay {
  background: var(--cms-image-overlay) !important;
  pointer-events: none !important;
}

body.cms-active-template-default .hero-carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: auto;
  touch-action: manipulation;
}

body.cms-active-template-default .hero-carousel-nav-btn--prev {
  left: 1rem;
}

body.cms-active-template-default .hero-carousel-nav-btn--next {
  right: 1rem;
}

body.cms-active-template-default .hero-overlay.hero-overlay--home {
  background: var(--cms-image-overlay-home) !important;
}

body.cms-active-template-default .hero-header .text-uppercase,
body.cms-active-template-default .hero-header h1,
body.cms-active-template-default .hero-header h2,
body.cms-active-template-default .hero-header h3,
body.cms-active-template-default .hero-header .display-1,
body.cms-active-template-default .hero-header .display-2,
body.cms-active-template-default .hero-header .display-3,
body.cms-active-template-default .hero-header .display-4 {
  color: var(--secondary) !important;
}

body.cms-active-template-default .hero-header p {
  color: color-mix(in srgb, var(--secondary) 90%, var(--text)) !important;
}

body.cms-active-template-default .hero-header.hero-header--cms-synced {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.cms-active-template-default .hero-header.hero-header--cms-synced .position-relative {
  flex: 0 0 auto;
  width: 100%;
}

body.cms-active-template-default .hero-header.hero-header--has-bg.hero-header--cms-synced {
  background-size: contain !important;
  background-position: center center !important;
  background-color: var(--dark) !important;
}

@media (max-width: 767.98px) {
  body.cms-active-template-default .hero-header.hero-header--cms-synced {
    min-height: 0;
    justify-content: flex-start !important;
  }

  body.cms-active-template-default .hero-header .col-lg-8.hero-content-stage,
  body.cms-active-template-default .hero-header .hero-content-stage {
    text-align: center !important;
  }

  body.cms-active-template-default .hero-header .hero-cta-row {
    justify-content: center !important;
  }

  body.cms-active-template-default .hero-carousel-nav-btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
  }
}

/* ── Menu tabs / pills ── */
body.cms-active-template-default .nav-pills {
  background-color: var(--primary) !important;
}

body.cms-active-template-default .nav-pills .nav-link {
  color: var(--secondary) !important;
}

body.cms-active-template-default .nav-pills .nav-link.active {
  background-color: var(--dark) !important;
  color: var(--secondary) !important;
}

/* ── Service / offer / contact bands ── */
body.cms-active-template-default .cms-template-default .def-service-section.service {
  margin-bottom: 0;
  padding-bottom: 0;
  overflow: hidden;
}

body.cms-active-template-default .cms-template-default .def-service-section.service::after {
  top: 110px;
  height: calc(100% - 110px);
  background: linear-gradient(
      color-mix(in srgb, var(--dark) 90%, transparent),
      color-mix(in srgb, var(--dark) 90%, transparent)
    ),
    url(../img/service.jpg) center center no-repeat;
  background-size: cover;
}

@media (max-width: 991.98px) {
  body.cms-active-template-default .cms-template-default .def-service-section.service::after {
    top: 200px;
    height: calc(100% - 200px);
  }
}

@media (max-width: 767.98px) {
  body.cms-active-template-default .cms-template-default .def-service-section.service {
    padding-bottom: 0 !important;
    margin-bottom: 0;
  }

  body.cms-active-template-default .cms-template-default .def-service-section.service::after {
    top: 200px;
    height: calc(100% - 200px);
  }
}

@media (max-width: 575.98px) {
  body.cms-active-template-default .cms-template-default .def-service-section.service::after {
    top: 220px;
    height: calc(100% - 220px);
  }
}

body.cms-active-template-default .contact::after {
  background: linear-gradient(
      color-mix(in srgb, var(--dark) 50%, transparent),
      color-mix(in srgb, var(--dark) 50%, transparent)
    ),
    url(../img/bg.jpg) center center no-repeat;
  background-size: cover;
}

body.cms-active-template-default .bg-offer {
  background: linear-gradient(
      color-mix(in srgb, var(--dark) 90%, transparent),
      color-mix(in srgb, var(--dark) 90%, transparent)
    ),
    url(../img/offer.jpg) center center no-repeat;
  background-size: cover;
}

body.cms-active-template-default .bg-img {
  background: linear-gradient(
      color-mix(in srgb, var(--dark) 50%, transparent),
      color-mix(in srgb, var(--dark) 50%, transparent)
    ),
    url(../img/bg.jpg) center center no-repeat;
  background-size: cover;
}

/* ── Team / testimonial cards ── */
body.cms-active-template-default .team-item .team-text.bg-white,
body.cms-active-template-default .team-item .team-text.bg-light {
  background-color: var(--secondary) !important;
}

body.cms-active-template-default .team-item .team-text h5 {
  color: var(--dark) !important;
}

body.cms-active-template-default .team-item .team-text span {
  color: var(--primary) !important;
}

body.cms-active-template-default .testimonial-item h5 {
  color: var(--dark) !important;
}

body.cms-active-template-default .testimonial-item span,
body.cms-active-template-default .testimonial-item p {
  color: var(--text) !important;
}

body.cms-active-template-default .service-item.bg-light {
  background-color: var(--light) !important;
}

body.cms-active-template-default .service-item .service-text h5 {
  color: var(--dark) !important;
}

/* ── Footer ── */
body.cms-active-template-default .footer-wrapper.footer-wrapper--has-bg {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

body.cms-active-template-default .footer-wrapper .footer-contact-detail {
  color: var(--secondary) !important;
}

body.cms-active-template-default .footer-wrapper h4.text-primary {
  color: var(--primary) !important;
}

body.cms-active-template-default .footer-brand-card.bg-primary {
  background-color: var(--primary) !important;
}

body.cms-active-template-default .footer-brand-card .text-white {
  color: var(--secondary) !important;
}

body.cms-active-template-default .quick-links a {
  color: var(--secondary) !important;
}

body.cms-active-template-default .quick-links a:hover {
  color: var(--primary) !important;
}

body.cms-active-template-default .cms-copyright-bar {
  background: var(--dark) !important;
}

body.cms-active-template-default .cms-copyright-bar,
body.cms-active-template-default .cms-copyright-bar p {
  color: var(--text) !important;
}

body.cms-active-template-default .cms-copyright-bar a {
  color: var(--secondary) !important;
}

body.cms-active-template-default .cms-copyright-bar a:hover {
  color: var(--primary) !important;
}

/* Icons on primary circles */
body.cms-active-template-default .bg-primary .text-white,
body.cms-active-template-default .bg-primary .fa-play,
body.cms-active-template-default .btn-lg-square {
  color: var(--secondary) !important;
}

body.cms-active-template-default .btn-lg-square {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

body.cms-active-template-default .btn-lg-square:hover {
  background-color: color-mix(in srgb, var(--primary), var(--dark) 15%) !important;
}

/* Offer — compact bg frame + layer (no theme .bg-offer when CMS image set) */
body.cms-active-template-default .offer-section {
  background: transparent !important;
  background-image: none !important;
}

body.cms-active-template-default .def-offer-cms-frame--has-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--dark);
}

body.cms-active-template-default .def-offer-cms-frame--has-bg > .offer-section__content {
  position: relative;
  z-index: 2;
  width: 100%;
}

body.cms-active-template-default .def-offer-cms-frame--has-bg .offer-overlay {
  pointer-events: none !important;
}

@media (max-width: 767.98px) {
  body.cms-active-template-default .def-offer-cms-frame--has-bg,
  body.cms-active-template-default .def-offer-cms-frame--has-bg.offer-section--cms-synced {
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Facts — background on section (contain; mobile height synced to content) */
body.cms-active-template-default .facts-section--has-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: var(--dark);
}

body.cms-active-template-default .facts-section--has-bg > .facts-section__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

body.cms-active-template-default .facts-section--has-bg .row {
  justify-content: center;
  align-items: center;
}

@media (max-width: 767.98px) {
  body.cms-active-template-default .facts-section--has-bg.facts-section--cms-synced[data-cms-field="facts.background"][data-cms-bg="1"] {
    aspect-ratio: auto !important;
    min-height: 0 !important;
    background-size: cover !important;
    background-position: center center !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
  }

  body.cms-active-template-default .facts-section--has-bg.facts-section--cms-synced > .facts-section__content {
    align-items: stretch !important;
    justify-content: flex-start !important;
    text-align: inherit !important;
  }

  body.cms-active-template-default .facts-section--has-bg .row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
