@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&display=swap');

:root {
  /* Font families */
  --font-barlow: "Barlow", Helvetica, sans-serif;

  /* Primary brand colors (injected from business settings) */
  --color-primary: #7091c7;
  --color-secondary: #00313d;

  /* RGB values for rgba() usage */
  --color-primary-rgb: ;
  --color-secondary-rgb: ;

  /* Computed contrast text colors (WCAG compliant) */
  --color-primary-text: ;
  --color-secondary-text: ;

  /* Color variations */
  --color-primary-light: ;
  --color-primary-dark: ;
  --color-secondary-light: ;
  --color-secondary-dark: ;

  /* Static neutrals */
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-text-muted: #6b7280;
  --color-bg-light: #f9fafb;
  --color-bg-dark: #111827;
}

/* ========================================
   BASE TYPOGRAPHY (from old theme globals)
   ======================================== */

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: #ffffff;
  color: var(--color-text-primary);
  font-family: var(--font-barlow) !important;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-barlow {
  font-family: var(--font-barlow) !important;
}

/* ========================================
   OLD THEME BUTTON STYLES
   ======================================== */

.button-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
.button-primary:hover {
  background-color: var(--color-secondary);
}

.button-secondary {
  background-color: var(--color-secondary);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
.button-secondary:hover {
  background-color: var(--color-primary);
}

/* ========================================
   NEW THEME BUTTON STYLES (CSS var based)
   ======================================== */

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-text);
  transition: all 0.2s ease;
}
.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: var(--color-primary-text) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
button.btn-primary:hover,
.btn-primary:hover[type="submit"] {
  color: var(--color-primary-text) !important;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-text);
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
  color: var(--color-secondary-text);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
  transition: all 0.2s ease;
}
.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-primary-text);
}

/* ========================================
   NAV LINK STYLES (from old theme)
   ======================================== */

.nav-link {
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ========================================
   UTILITY CLASSES (from old theme)
   ======================================== */

.scale-up {
  transition: all 0.3s ease-in-out;
}
.scale-up:hover {
  transform: scale(1.15);
}

.shadowi {
  box-shadow: 10px 10px 0px 0px rgba(0, 0, 0, 0.75);
  -webkit-box-shadow: 10px 10px 0px 0px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: 10px 10px 0px 0px rgba(0, 0, 0, 0.75);
}

.link:hover {
  text-decoration: underline;
}

/* ========================================
   HOVER UTILITIES (CSS var based)
   ======================================== */

.hover\:primary-border:hover {
  border-color: var(--color-primary) !important;
}
.hover\:primary-bg:hover {
  background-color: var(--color-primary) !important;
}
.hover\:primary-text:hover {
  color: var(--color-primary) !important;
}
.hover\:secondary-bg:hover {
  background-color: var(--color-secondary) !important;
}
.hover\:white-text:hover {
  color: #ffffff !important;
}

/* ========================================
   CARD HOVER EFFECTS
   ======================================== */

.card-hover {
  border-color: rgba(var(--color-primary-rgb), 0.3);
  transition: all 0.25s ease;
}
.card-hover:hover {
  border-color: var(--color-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.card-gradient-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: radial-gradient(
      120% 120% at 0% 0%,
      rgba(var(--color-primary-rgb), 0.15) 0%,
      rgba(var(--color-primary-rgb), 0.05) 45%,
      #ffffff 78%
    ),
    radial-gradient(
      120% 120% at 100% 100%,
      rgba(var(--color-primary-rgb), 0.1) 0%,
      transparent 55%
    );
  pointer-events: none;
}
.card-gradient-hover:hover::before {
  opacity: 1;
}

/* ========================================
   ICON CONTAINER EFFECTS
   ======================================== */

.icon-container {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  transition: all 0.3s ease;
}
.icon-container svg {
  color: var(--color-primary);
  transition: color 0.3s ease;
}
.group:hover .icon-container {
  background-color: var(--color-primary);
  box-shadow: 0 8px 18px rgba(var(--color-primary-rgb), 0.35);
}
.group:hover .icon-container svg {
  color: var(--color-primary-text);
}

/* ========================================
   FEATURES GRID
   ======================================== */

.features-grid .feature-card:nth-child(n+5) {
  display: none;
}
@media (min-width: 640px) {
  .features-grid .feature-card:nth-child(n+5) {
    display: block;
  }
}

/* ========================================
   FORM FOCUS STATES
   ======================================== */

.input-focus:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
  outline: none;
}
.input-focus:focus-visible {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
  outline: none;
}

/* ========================================
   LINK HOVER EFFECTS
   ======================================== */

.link-hover {
  transition: color 0.2s ease;
}
.link-hover:hover {
  color: var(--color-primary) !important;
}

.footer-link {
  color: rgb(209, 213, 229);
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--color-primary);
}

.social-link {
  color: rgb(156, 163, 175);
  transition: color 0.2s ease;
}
.social-link:hover {
  color: var(--color-primary);
}

/* ========================================
   TOUCH TARGET IMPROVEMENTS
   ======================================== */

@media (pointer: coarse) {
  button,
  .btn,
  [role="button"],
  a.btn {
    min-height: 48px;
    min-width: 48px;
  }

  nav a,
  .nav-link {
    min-height: 48px;
    padding: 12px 16px;
  }

  input,
  select,
  textarea {
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px;
  }

  details summary {
    min-height: 56px;
    padding: 16px;
  }
}

/* ========================================
   SAFE AREA PADDING (iPhone X+)
   ======================================== */

.safe-area-pb {
  padding-bottom: env(safe-area-inset-bottom);
}
.safe-area-pt {
  padding-top: env(safe-area-inset-top);
}

/* ========================================
   ACCESSIBILITY FOCUS STATES
   ======================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-primary-text);
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
}

/* ========================================
   ANIMATIONS (from old theme globals)
   ======================================== */

@keyframes slide-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slide-up 0.6s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fadeIn {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-slideUp {
  animation: slideUp 0.4s ease-out forwards;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   SCROLLING BACKGROUND (from old theme)
   ======================================== */

@keyframes scrollRight {
  0% {
    background-position-x: 0;
  }
  100% {
    background-position-x: 1000px;
  }
}

.bg-scroll-right {
  background-image: url("/background-pattern.png");
  background-repeat: repeat;
  background-size: auto;
  animation: scrollRight 30s linear infinite;
}

/* ========================================
   INFINITE SCROLL CAROUSEL (from old theme)
   ======================================== */

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100% / 2));
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(calc(-100% / 2));
  }
  100% {
    transform: translateX(0);
  }
}

.animate-scroll-left {
  animation: scroll-left 30s linear infinite;
}
.animate-scroll-left:hover {
  animation-play-state: paused;
}

.animate-scroll-right {
  animation: scroll-right 30s linear infinite;
}
.animate-scroll-right:hover {
  animation-play-state: paused;
}

/* ========================================
   MARQUEE (from old theme)
   ======================================== */

.marquee {
  width: 450px;
  line-height: 50px;
  background-color: red;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}
.marquee p {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 15s linear infinite;
}
@keyframes marquee {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-100%, 0);
  }
}

/* ========================================
   GRADIENT BACKGROUNDS
   ======================================== */

.gradient-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}
.gradient-primary-light {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
}

.gradient-hero {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.97) 0%,
    rgba(0, 0, 0, 0.92) 35%,
    rgba(0, 0, 0, 0.85) 65%,
    rgba(0, 0, 0, 0.75) 100%
  );
  backdrop-filter: blur(2px);
}

.gradient-overlay {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

.gradient-card {
  background: linear-gradient(
    135deg,
    rgba(var(--color-primary-rgb), 0.03) 0%,
    rgba(var(--color-secondary-rgb), 0.03) 100%
  );
}

/* ========================================
   STICKY MOBILE PHONE BAR
   ======================================== */

.sticky-phone-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--color-primary);
  color: var(--color-primary-text);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .sticky-phone-bar {
    display: none;
  }
}

/* ========================================
   TRUST BADGES
   ======================================== */

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: rgba(var(--color-primary-rgb), 0.1);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary-dark);
}
.trust-badge-dark {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: white;
}

.star-rating {
  display: inline-flex;
  gap: 2px;
}
.star-rating svg {
  width: 16px;
  height: 16px;
  fill: #fbbf24;
}

/* ========================================
   SERVICE ICON STYLES
   ======================================== */

.service-icon path {
  fill: var(--color-primary);
  transition: fill 0.3s ease;
}
.group:hover .service-icon path {
  fill: var(--color-primary-text);
}

/* ========================================
   SCROLL BEHAVIOR
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

.hide-mobile {
  display: none;
}
@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
}

.show-mobile {
  display: block;
}
@media (min-width: 768px) {
  .show-mobile {
    display: none;
  }
}