.root-palette {
  /* palette variables so colors stay visible even if Tailwind CDN fails */
  --aafs-primary: #3f395f;
  --aafs-brown: #944a2d;
  --aafs-red: #7f2628;
  --aafs-grey: #4b4b4b;
  --primary: #3f395f;
  --secondary: #944a2d;
  --accent: #7f2628;
  --neutral: #5e6067;
  --background-light: #f6f1ec;
  --background-dark: #17141e;
  --text-light: #111015;
  --subtext-light: #5a5466;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* Keep skip-link hidden by default even when Tailwind utilities are unavailable. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus-visible {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 50;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.5rem 1rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: #ffffff;
  color: #3f395f;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(17, 16, 21, 0.2);
}

/* Consistent keyboard focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent, #7f2628);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .aafs-select-label {
    min-height: 2rem;
    line-height: 1rem;
  }
}

/* minimal fallbacks for key utility classes used in templates */
.bg-primary { background-color: #3f395f !important; }
.text-primary { color: #3f395f !important; }
.bg-secondary { background-color: #944a2d !important; }
.text-secondary { color: #944a2d !important; }
.bg-accent { background-color: #7f2628 !important; }
.text-accent { color: #7f2628 !important; }
.bg-aafs_primary { background-color: #3f395f !important; }
.bg-aafs_brown { background-color: #944a2d !important; }
.bg-aafs_red { background-color: #7f2628 !important; }
.bg-background-light { background-color: #f6f1ec !important; }
.bg-background-dark { background-color: #17141e !important; }
.text-text-light { color: #111015 !important; }
.text-subtext-light {
  color: #4b4656 !important;
}
.text-neutral { color: #5e6067 !important; }

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}

.nav-link-active {
  color: #7F2628;
  font-weight: 700;
}

@keyframes premiumFlash {
  0% { background-color: rgba(148, 74, 45, 0.25); box-shadow: 0 0 0 3px rgba(148, 74, 45, 0.15); }
  35% { background-color: rgba(148, 74, 45, 0.25); box-shadow: 0 0 0 3px rgba(148, 74, 45, 0.15); }
  100% { background-color: transparent; box-shadow: none; }
}

.premium-flash {
  animation: premiumFlash 1800ms ease;
  border-radius: 12px;
}

.premium-amount {
  color: var(--secondary, #944a2d) !important;
  font-weight: 800;
}

/* Tagline hover slide */
.tagline-pill {
  background-color: rgba(148, 74, 45, 0.1) !important;
  background-image: linear-gradient(90deg, #facc15 0%, #facc15 100%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: 50% 50%;
  transition: background-size 220ms ease, color 220ms ease;
}

.tagline-pill:hover,
.tagline-pill:focus-visible {
  background-size: 100% 100%;
  color: #000000 !important;
}

/* Toast notifications */
#aafs-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-width: 260px;
  max-width: 360px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: #111015;
  border: 1px solid rgba(0, 0, 0, 0.05);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}

#aafs-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#aafs-toast .aafs-toast-icon {
  height: 32px;
  width: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
}

#aafs-toast .aafs-toast-text {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}

#aafs-toast[data-variant="success"] .aafs-toast-icon { background: #0f9d58; }
#aafs-toast[data-variant="info"] .aafs-toast-icon { background: #3f395f; }
#aafs-toast[data-variant="error"] .aafs-toast-icon { background: #c0392b; }
#aafs-toast[data-variant="warning"] .aafs-toast-icon { background: #d68910; }

/* Card-like hover lift */
[class*="rounded-2xl"][class*="bg-white"]:not(.no-hover),
[class*="rounded-3xl"][class*="bg-white"]:not(.no-hover),
[class*="rounded-2xl"][class*="bg-white/"]:not(.no-hover),
[class*="rounded-3xl"][class*="bg-white/"]:not(.no-hover) {
  transition: transform 200ms ease, box-shadow 200ms ease;
}

[class*="rounded-2xl"][class*="bg-white"]:not(.no-hover):hover,
[class*="rounded-3xl"][class*="bg-white"]:not(.no-hover):hover,
[class*="rounded-2xl"][class*="bg-white/"]:not(.no-hover):hover,
[class*="rounded-3xl"][class*="bg-white/"]:not(.no-hover):hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* CTA hover lift for WhatsApp and callback buttons */
button[data-open-callback],
button[data-event*="whatsapp_open"],
a[data-event*="whatsapp_open"],
form[data-ajax="true"] button[type="submit"] {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

button[data-open-callback]:hover,
button[data-event*="whatsapp_open"]:hover,
a[data-event*="whatsapp_open"]:hover,
form[data-ajax="true"] button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.aafs-modal-open {
  overflow: hidden;
}

.aafs-hidden-tracker-frame {
  display: none;
  visibility: hidden;
}

.aafs-place-autocomplete {
  display: block;
  width: 100%;
  min-height: 38px;
  font-size: 0.875rem;
}

.aafs-place-autocomplete::part(input) {
  width: 100%;
  height: 38px;
  min-height: 0;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background: #ffffff;
  padding: 0.5rem 0.75rem;
  color: #111015;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.aafs-place-autocomplete::part(input):focus {
  outline: none;
}

.aafs-place-autocomplete::part(prediction-list) {
  z-index: 99999;
}

.aafs-place-autocomplete-hidden {
  display: none !important;
}

.hero-image-rotator {
  height: 100%;
  width: 100%;
}

.hero-image-rotator-frame {
  box-shadow: 0 18px 48px rgba(148, 74, 45, 0.28);
}

.hero-image-rotator img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  animation: heroCrossfade 18s infinite;
}

.hero-image-rotator .hero-image-first {
  animation-delay: 0s;
}

.hero-image-rotator .hero-image-second {
  animation-delay: 6s;
}

.hero-image-rotator .hero-image-third {
  animation-delay: 12s;
}

.hero-caption-first {
  animation: heroCrossfade 18s infinite;
}

.hero-caption-third {
  animation: heroCrossfade 18s infinite;
  animation-delay: 12s;
  opacity: 0;
}

.lift-on-load {
  animation: liftIn 0.7s ease-out both;
}

.lift-on-load.delay-1 {
  animation-delay: 0.08s;
}

.lift-on-load.delay-2 {
  animation-delay: 0.16s;
}

.lift-on-load.delay-3 {
  animation-delay: 0.24s;
}

.clouds-bg {
  background-image: url("../img/png/clouds.png");
}

@keyframes heroCrossfade {
  0%,
  28% {
    opacity: 1;
  }

  36%,
  100% {
    opacity: 0;
  }
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image-rotator img,
  .lift-on-load,
  .fade-in {
    animation: none !important;
    transition: none !important;
  }

  .hero-image-rotator .hero-image-first,
  .hero-caption-first,
  .fade-in {
    opacity: 1;
    transform: none;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-delay-1 {
  animation-delay: 0.1s;
}

.fade-delay-3 {
  animation-delay: 0.3s;
}

.fade-delay-4 {
  animation-delay: 0.4s;
}

.fade-delay-5 {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.tagline-badge {
  display: inline-block;
  background: linear-gradient(135deg, #e5e7eb, #f9fafb);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.branch-location-link img {
  transition: transform 0.2s ease;
}

.branch-location-link:hover img {
  transform: scale(1.1);
}

.agent-login-page {
  font-family: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(63, 57, 95, 0.96) 0%, rgba(127, 38, 40, 0.88) 48%, rgba(148, 74, 45, 0.86) 100%),
    linear-gradient(180deg, #fff7f3 0%, #ffffff 100%);
}

.agent-login-shell {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 24px 60px rgba(17, 16, 21, 0.24);
}

.agent-login-mark {
  background: linear-gradient(135deg, #3f395f 0%, #7f2628 100%);
}

.agent-login-input:focus {
  border-color: #7f2628;
  box-shadow: 0 0 0 3px rgba(127, 38, 40, 0.16);
  outline: none;
}

.agent-login-button {
  background: #7f2628;
  box-shadow: 0 10px 22px rgba(127, 38, 40, 0.24);
}

.agent-login-button:hover {
  background: #944a2d;
}

.plan-hero-bg-single {
  background-image: url("../img/png/single1_big.png");
}

.plan-hero-bg-family {
  background-image: url("../img/png/family.png");
}

.plan-hero-bg-pensioner {
  background-image: url("../img/png/pensioner.png");
}

.legal-modal a {
  color: #8b5e34;
}

.legal-modal a:hover {
  color: #6f4520;
}

.legal-contact-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}

.legal-contact-list {
  list-style: none;
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
}

.legal-contact-list li {
  margin: 0.2rem 0;
  line-height: 1.45;
}

@media (min-width: 760px) {
  .legal-contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.terms-content {
  counter-reset: terms-section;
}

.terms-content h2 {
  margin: 0 0 0.5rem;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
}

.terms-content h3 {
  margin: 1rem 0 0.4rem;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.terms-content h3::before {
  counter-increment: terms-section;
  content: counter(terms-section) ". ";
}

.terms-content p {
  margin: 0 0 0.7rem;
  line-height: 1.55;
}

.terms-content ul {
  list-style: disc;
  margin: 0 0 0.8rem 1.25rem;
}

.terms-content li {
  margin: 0.25rem 0;
}

.terms-content .strong {
  font-weight: 700;
}

.terms-content .terms-contact-list {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
}

.terms-content .terms-contact-list li {
  margin: 0.2rem 0;
}

.terms-content .terms-contact-list a {
  text-decoration: underline;
}
