/**
 * AHANSA extras — accessibility, WP core, dark-mode ready, honeypot.
 */

/* Skip link focus (WCAG 2.2) */
.screen-reader-text:focus {
	background-color: #111;
	border-radius: 4px;
	box-shadow: 0 0 0 3px #C9A227;
	clip: auto !important;
	clip-path: none;
	color: #fff;
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 1rem;
	line-height: normal;
	padding: 0.75rem 1.25rem;
	text-decoration: none;
	top: 1rem;
	width: auto;
	z-index: 100000;
}

/* Visible keyboard focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav__link:focus-visible,
.btn:focus-visible,
.tab-btn:focus-visible,
.faq__question:focus-visible {
	outline: 3px solid #C9A227;
	outline-offset: 2px;
}

/* Honeypot field — off-screen, not display:none (some bots skip display:none) */
.ahansa-hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Google reCAPTCHA + form status */
.form__recaptcha {
	margin-bottom: 1.25rem;
}

.form__recaptcha .g-recaptcha {
	margin-top: 0.35rem;
	transform-origin: left top;
}

.form__recaptcha-notice {
	font-size: 0.8125rem;
}

.form__status {
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	line-height: 1.45;
}

.form__status--error {
	color: #7a1f1f;
	background: #fdecea;
	border: 1px solid #f5c2c0;
}

.form__status--ok {
	color: #1a4d2e;
	background: #e8f5e9;
	border: 1px solid #a5d6a7;
}

/* Ensure external-link buttons keep safe target styling */
a[target="_blank"][rel~="noopener"] {
	/* no visual change — attribute safety only */
}

/* Breadcrumbs */
.breadcrumbs {
	font-size: 0.875rem;
	color: var(--text-muted, #555);
	margin-bottom: 1rem;
}

.breadcrumbs a {
	color: inherit;
}

/* Pagination */
.navigation.pagination,
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 2.5rem;
}

.navigation.pagination .page-numbers,
.nav-links a,
.nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	border: 1px solid #E8E8E8;
	border-radius: 8px;
	color: #111;
	text-decoration: none;
	font-weight: 500;
}

.navigation.pagination .page-numbers.current,
.nav-links .current {
	background: #C9A227;
	border-color: #C9A227;
}

/* Entry content spacing for legal / blog */
.entry-content > * + * {
	margin-top: 1rem;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 1.75rem;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.25rem;
	list-style: disc;
}

.entry-content ol {
	list-style: decimal;
}

/* Widget areas */
.widget {
	margin-bottom: 1.5rem;
}

.widget-title {
	font-size: 1.125rem;
	margin-bottom: 0.75rem;
}

/* CF7 / WPForms / Gravity Forms polish inside theme form */
.form .wpcf7-form-control-wrap,
.form .wpforms-field,
.form .gfield {
	margin-bottom: 1rem;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form input[type="url"],
.form textarea,
.form select,
.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select,
.wpforms-field input,
.wpforms-field textarea,
.wpforms-field select {
	width: 100%;
	max-width: 100%;
}

/* Dark mode ready — opt-in via prefers-color-scheme when body has class */
@media (prefers-color-scheme: dark) {
	body.ahansa-dark-auto {
		--navy: #f5f5f5;
		--text: #f0f0f0;
		--text-muted: #b0b0b0;
		--white: #141414;
		--gray-100: #1c1c1c;
		--cream: #141414;
		background: #141414;
		color: #f0f0f0;
	}
}

/* Fixed bottom actions: WhatsApp above Schedule Free Consultation */
.sticky-actions {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.sticky-actions--visible,
.sticky-actions.sticky-cta--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Nested sticky-cta no longer positions itself when inside stack */
.sticky-actions .sticky-cta {
  position: static;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  bottom: auto;
  right: auto;
  left: auto;
}

.sticky-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  background: #25D366;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  line-height: 1.2;
  max-width: min(100vw - 3rem, 320px);
}

.sticky-whatsapp:hover,
.sticky-whatsapp:focus-visible {
  background: #1ebe57;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45);
}

.sticky-whatsapp__icon {
  display: inline-flex;
  flex-shrink: 0;
}

.sticky-whatsapp__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-actions .sticky-cta .btn {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .sticky-actions {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    align-items: stretch;
  }

  .sticky-whatsapp {
    justify-content: center;
    width: 100%;
    max-width: none;
  }

  .sticky-actions .sticky-cta .btn {
    width: 100%;
  }
}

/* Reduce motion */
@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;
	}
}
