/* Connect Auto Care - Professional UI enhancements */

.cac-faq-shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  border-radius: 14px;
}

.cac-faq-item {
  background: #ffffff;
  border: 1px solid rgba(7, 35, 78, 0.12);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 34, 58, 0.08);
}

body.cac-motion-enabled .cac-faq-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cac-faq-item:hover {
  transform: translateY(-2px);
  border-color: rgba(9, 116, 216, 0.3);
  box-shadow: 0 14px 32px rgba(15, 34, 58, 0.14);
}

.cac-faq-item.is-open {
  border-color: rgba(9, 116, 216, 0.38);
  box-shadow: 0 12px 28px rgba(9, 116, 216, 0.12);
}

.cac-faq-title {
  margin: 0;
}

.cac-faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 0;
  color: #16365f;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  padding: 18px 22px;
  cursor: pointer;
}

body.cac-motion-enabled .cac-faq-toggle {
  transition: background-color 0.25s ease;
}

.cac-faq-toggle:focus-visible {
  outline: 2px solid rgba(9, 116, 216, 0.65);
  outline-offset: -2px;
}

.cac-faq-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 999px;
  border: 1px solid rgba(9, 116, 216, 0.38);
  position: relative;
}

body.cac-motion-enabled .cac-faq-icon {
  transition: transform 0.28s ease, border-color 0.28s ease, background-color 0.28s ease;
}

.cac-faq-icon::before,
.cac-faq-icon::after {
  content: "";
  position: absolute;
  background-color: #0974d8;
  border-radius: 2px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

body.cac-motion-enabled .cac-faq-icon::before,
body.cac-motion-enabled .cac-faq-icon::after {
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.cac-faq-icon::before {
  width: 10px;
  height: 2px;
}

.cac-faq-icon::after {
  width: 2px;
  height: 10px;
}

.cac-faq-item.is-open .cac-faq-icon {
  background-color: rgba(9, 116, 216, 0.08);
  border-color: rgba(9, 116, 216, 0.5);
}

.cac-faq-item.is-open .cac-faq-icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

.cac-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
}

body.cac-motion-enabled .cac-faq-answer {
  transition: grid-template-rows 0.35s ease;
}

.cac-faq-item.is-open .cac-faq-answer {
  grid-template-rows: 1fr;
}

.cac-faq-answer-inner {
  overflow: hidden;
  padding: 0 22px;
  color: #2a3d58;
  font-size: 0.95rem;
  line-height: 1.75;
  border-top: 1px solid rgba(7, 35, 78, 0.08);
  max-height: 0;
}

body.cac-motion-enabled .cac-faq-answer-inner {
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.cac-faq-item.is-open .cac-faq-answer-inner {
  max-height: 260px;
  padding: 16px 22px 20px;
}

/* Global subtle animation system */
body.cac-motion-enabled .cac-motion-target {
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.985);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.65, 0.2, 1);
  will-change: opacity, transform;
}

body.cac-motion-enabled .cac-motion-target.cac-in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

body.cac-motion-enabled .navbar-nav .nav-link,
body.cac-motion-enabled .btn,
body.cac-motion-enabled .work,
body.cac-motion-enabled .services,
body.cac-motion-enabled .testimony-wrap,
body.cac-motion-enabled .ftco-footer-widget,
body.cac-motion-enabled .block-7,
body.cac-motion-enabled .blog-entry {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.cac-motion-enabled .btn:hover {
  transform: translateY(-1px);
}

body.cac-motion-enabled .services:hover,
body.cac-motion-enabled .work:hover,
body.cac-motion-enabled .testimony-wrap:hover,
body.cac-motion-enabled .ftco-footer-widget:hover,
body.cac-motion-enabled .block-7:hover,
body.cac-motion-enabled .blog-entry:hover {
  transform: translateY(-4px);
}

body.cac-motion-disabled .cac-motion-target {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Water animation for existing ftco appointment sections */
.ftco-appointment {
  isolation: isolate;
  overflow: hidden;
}

.ftco-appointment .overlay {
  overflow: hidden;
}

.ftco-appointment .overlay::before,
.ftco-appointment .overlay::after {
  display: none;
}

.ftco-appointment .overlay::before {
  background:
    radial-gradient(120% 58% at 8% 100%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(120% 52% at 62% 108%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 66%),
    radial-gradient(130% 58% at 88% 102%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 70%);
  opacity: 0.95;
}

.ftco-appointment .overlay::after {
  inset: -10% -16% 0 -16%;
  background: repeating-linear-gradient(
    106deg,
    rgba(255, 255, 255, 0.16) 0px,
    rgba(255, 255, 255, 0.16) 28px,
    rgba(255, 255, 255, 0) 32px,
    rgba(255, 255, 255, 0) 66px
  );
  mix-blend-mode: screen;
  opacity: 0.54;
}

body.cac-motion-enabled .ftco-appointment .overlay::before,
body.cac-motion-enabled .ftco-appointment .overlay::after {
  animation: none;
}

body.cac-motion-disabled .ftco-appointment .overlay::before,
body.cac-motion-disabled .ftco-appointment .overlay::after {
  animation: none !important;
  transform: none !important;
}

@keyframes cacFtcoWaveFront {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateX(-3%) translateY(-1.4%);
    opacity: 1;
  }
  100% {
    transform: translateX(2.7%) translateY(0.9%);
    opacity: 0.92;
  }
}

@keyframes cacFtcoWaveBack {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(4%) translateY(-1%);
  }
  100% {
    transform: translateX(8%) translateY(0);
  }
}

/* Reusable flowing water surface effect */
.cac-water-surface {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 14px;
  background-image: linear-gradient(125deg, #0159ba, #84aad3);
}

.cac-water-surface > * {
  position: relative;
  z-index: 3;
}

.cac-water-surface::before,
.cac-water-surface::after {
  display: none;
}

.cac-water-surface::before {
  background:
    radial-gradient(120% 55% at 10% 95%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(110% 48% at 42% 108%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 66%),
    radial-gradient(130% 58% at 76% 100%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0) 68%);
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.cac-water-surface::after {
  inset: -10% -20% 0 -20%;
  background: repeating-linear-gradient(
    105deg,
    rgba(255, 255, 255, 0.2) 0px,
    rgba(255, 255, 255, 0.2) 30px,
    rgba(255, 255, 255, 0) 34px,
    rgba(255, 255, 255, 0) 68px
  );
  mix-blend-mode: screen;
  opacity: 0.62;
  transform: translateX(0) translateY(0);
}

body.cac-motion-enabled .cac-water-surface::before,
body.cac-motion-enabled .cac-water-surface::after {
  animation: none;
}

body.cac-motion-disabled .cac-water-surface::before,
body.cac-motion-disabled .cac-water-surface::after {
  animation: none !important;
  transform: none !important;
}

.cac-water-glass {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
}

@keyframes cacWaterWaveFront {
  0% {
    transform: translateX(0) translateY(0);
    opacity: 0.86;
  }
  50% {
    transform: translateX(-3.3%) translateY(-1.8%);
    opacity: 1;
  }
  100% {
    transform: translateX(3.1%) translateY(1.1%);
    opacity: 0.92;
  }
}

@keyframes cacWaterWaveBack {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(4%) translateY(-1%);
  }
  100% {
    transform: translateX(8%) translateY(0);
  }
}

@media (max-width: 767px) {
  .cac-faq-toggle {
    font-size: 0.95rem;
    padding: 16px 18px;
  }

  .cac-faq-answer-inner {
    padding: 0 18px;
    font-size: 0.92rem;
  }

  .cac-faq-item.is-open .cac-faq-answer-inner {
    padding: 14px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ftco-appointment .overlay::before,
  .ftco-appointment .overlay::after {
    animation: none !important;
    transform: none !important;
  }

  .cac-water-surface::before,
  .cac-water-surface::after {
    animation: none !important;
    transform: none !important;
  }

  body.cac-motion-enabled .cac-faq-item,
  body.cac-motion-enabled .cac-faq-toggle,
  body.cac-motion-enabled .cac-faq-answer,
  body.cac-motion-enabled .cac-faq-answer-inner,
  body.cac-motion-enabled .cac-faq-icon,
  body.cac-motion-enabled .cac-motion-target,
  body.cac-motion-enabled .navbar-nav .nav-link,
  body.cac-motion-enabled .btn,
  body.cac-motion-enabled .work,
  body.cac-motion-enabled .services,
  body.cac-motion-enabled .testimony-wrap,
  body.cac-motion-enabled .ftco-footer-widget,
  body.cac-motion-enabled .block-7,
  body.cac-motion-enabled .blog-entry {
    transition: none !important;
    animation: none !important;
  }

  body.cac-motion-enabled .cac-motion-target {
    opacity: 1;
    transform: none;
  }
}
