/* ============================================
   Button Color Consistency
   All buttons should use brand color #005BAA
   ============================================ */

/* Override Bootstrap button colors to match brand colors */
.btn-primary {
    background-color: #005BAA;
    border-color: #005BAA;
}

/* Focus ring for all buttons - consistent outline */
.btn-primary:focus,
.btn-secondary:focus,
.btn:focus {
  outline: 2px solid #005BAA;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.25);
}

/* Focus ring for form inputs - consistent with buttons */
.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #005BAA;
  outline-offset: 0;
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.25);
}

/* Visible focus for all remaining interactive controls (WCAG 2.4.7).
   Bootstrap and glide reset outlines on these elements, so brand ring needs !important. */
button:focus,
button:focus-visible,
.form-select:focus,
.form-select:focus-visible,
[role="button"]:focus,
[role="button"]:focus-visible,
.glide__arrow:focus,
.glide__arrow:focus-visible,
.glide__bullet:focus,
.glide__bullet:focus-visible,
.carousel-control-prev:focus,
.carousel-control-prev:focus-visible,
.carousel-control-next:focus,
.carousel-control-next:focus-visible {
  outline: 2px solid #005BAA !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.25) !important;
}

.btn-primary:hover {
    background-color: #004488;
    border-color: #004488;
}

.btn-primary:active,
.btn-primary:focus-visible {
    background-color: #002244;
    border-color: #002244;
}

/* Style secondary buttons to also use brand colors for consistency */
.btn-secondary {
    background-color: #005BAA;
    border-color: #005BAA;
}

.btn-secondary:hover {
    background-color: #004488;
    border-color: #004488;
}

.btn-secondary:active,
.btn-secondary:focus-visible {
    background-color: #002244;
    border-color: #002244;
}

/* Buttons with primary background (white text on #005BAA = 7.5:1 AAA) */
.tw-bg-gs-primary,
.btn-primary,
.bg-gs-primary {
    background-color: #005BAA;
}

/* gs-button styling - uses brand colors from Tailwind config */
.gs-button,
a.gs-button {
  /* Base styling handled by Tailwind @apply in input.css */
  /* Additional custom styling */
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.gs-button::before,
a.gs-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.2), transparent);
  transition: left 0.4s;
  pointer-events: none;
  z-index: 1;
}

.gs-button:hover::before,
a.gs-button:hover::before {
  left: 100%;
}

/* Active state - darker than hover */
.gs-button:active,
a.gs-button:active,
.btn.gs-button:active,
.btn-secondary.gs-button:active,
.btn-primary.gs-button:active {
  background-color: #002244 !important;
  transform: translateY(0) !important;
}

/* gs-button hover - use brand colors */
.gs-button:hover,
a.gs-button:hover,
.btn.gs-button:hover,
.btn-secondary.gs-button:hover,
.btn-primary.gs-button:hover {
  background-color: #004488 !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Focus ring styling for buttons and links - consistent with form inputs */
.gs-button:focus,
a.gs-button:focus,
.btn.gs-button:focus,
.btn-secondary.gs-button:focus,
.btn-primary.gs-button:focus,
.gs-button:focus-visible,
a.gs-button:focus-visible,
a:focus,
a:focus-visible {
  outline: 2px solid #005BAA;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.25);
}

/* Summary headers (accordion) - same focus style */
summary:focus,
summary:focus-visible,
.panel-header:focus,
.panel-header:focus-visible,
.panel-header-small:focus,
.panel-header-small:focus-visible {
  outline: 2px solid #005BAA;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 91, 170, 0.25);
}

/* Skip link - hidden by default, visible on focus */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #005BAA;
  color: white;
  padding: 8px 16px;
  z-index: 9999;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* Large text for WCAG A compliance on brand color backgrounds */
/* White text on #005BAA needs to be at least 18.66px (1.125rem) */
.contact-bar,
.contact-item,
.footer,
.tw-bg-gs-primary .tw-text-white {
  font-size: 1.125rem; /* 18.66px - passes WCAG A for large text */
}

/* Card links need special handling due to overflow:hidden on cards */
.card-link {
  display: block;
  position: relative;
  height: 100%;
}

.card-link:focus,
.card-link:focus-visible {
  outline: 2px solid #005BAA !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 4px rgba(0, 91, 170, 0.4) !important;
  z-index: 10 !important;
}

/* Ensure card doesn't interfere with focus outline */
.card-link .card {
  outline: none;
}

/* Also apply strong focus ring to the card itself */
.card-link:focus .card,
.card-link:focus-visible .card {
  box-shadow: 0 0 0 4px rgba(0, 91, 170, 0.4) !important;
}

a {
    text-decoration: none;
    color: #005BAA;
}

a:hover {
    text-decoration: none;
}

/* Links inside body copy must be distinguishable without relying on
   color alone (WCAG 1.4.1). Buttons (.btn, .gs-button) and elements
   with an explicit tw-no-underline keep their own styling. */
main p a,
main li a,
main label a,
main td a {
    text-decoration: underline;
}

/* Cookie banner link: white on #005BAA with underline (WCAG contrast/link purpose) */
.cc-link {
    color: #fff;
    text-decoration: underline;
}

/* Card hover effects for all card-like content */
.card-hover-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    pointer-events: none;
    z-index: 1;
}

.card-hover-effect:hover::before {
    left: 100%;
}

.card-hover-effect:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Enhanced version with more dramatic effect */
.card-hover-effect-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-effect-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

.card-hover-effect-enhanced:hover::before {
    left: 100%;
}

.card-hover-effect-enhanced:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Button hover effects */
.button-hover-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.button-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.4s;
    pointer-events: none;
    z-index: 1;
}

.button-hover-effect:hover::before {
    left: 100%;
}

.button-hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.3);
}
