/* Base Styles - FinanceKZ */
:root {
    --bg-light: #f8f6f3;
    --text-dark: #1a4530;
    --sage: #7d9471;
    --forest: #2d5a40;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

a {
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

a:hover, a:focus {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.btn:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(26, 69, 48, 0.25);
}

/* Form Controls */
.form-control:focus {
    border-color: #2d5a40;
    box-shadow: 0 0 0 0.25rem rgba(45, 90, 64, 0.15);
}

/* Accordion Customization */
.accordion-button:not(.collapsed) {
    background-color: #f8f6f3;
    color: #1a4530;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(26, 69, 48, 0.25);
    z-index: 2;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a4530'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231a4530'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Utility overrides for contrast safety */
.text-muted, .text-secondary {
    color: #1a4530 !important;
    opacity: 0.8;
}

/* Navbar specific overrides to ensure visibility on light bg */
.navbar-light .navbar-nav .nav-link {
    color: #1a4530;
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
    color: #2d5a40;
}
.navbar-light .navbar-brand {
    color: #1a4530;
}

/* Breadcrumb overrides */
.breadcrumb-item a {
    color: #2d5a40;
}
.breadcrumb-item a:hover {
    color: #1a4530;
}

/* Ensure list group items on colored backgrounds have correct text */
.list-group-item {
    color: #1a4530;
}

/* Accessibility improvements */
*:focus-visible {
    outline: 3px solid #2d5a40;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.visible {
    animation: fadeIn 0.6s ease-out forwards;
}
.card img,
.bg-light img,
.container img {
  display: block;
  width: 100%;
  height: auto;
}
/* Font safety overrides */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
.navbar,
.btn,
input,
textarea,
select {
  font-family: var(--font-sans);
}
/* WP Generator feature helpers */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  z-index: 9999;
  transition: width 120ms ease-out;
}
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 9998;
}
.scroll-top.is-visible {
  opacity: 0.95;
  transform: translateY(0);
}
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

