/* Base Styles - Reset & Typography */
*{
  outline: none!important;
}
/* CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (max-width: 639px) {
  html {
    font-size: 17px;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--color-gray-900);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--color-gray-900);
  margin-bottom: var(--space-6);
}

h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: var(--ls-tight);
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 600;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 600;
}

p {
  margin-bottom: var(--space-5);
  color: var(--color-gray-600);
  line-height: var(--lh-loose);
}

a {
  color: var(--color-red);
  text-decoration: none;
  position: relative;
  transition: color var(--transition-normal) var(--ease-out);
}

a:hover {
  color: var(--color-red-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Animated underline for text links */
p a,
.card-body a {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--transition-normal) var(--ease-out),
              color var(--transition-normal) var(--ease-out);
}

p a:hover,
.card-body a:hover {
  text-decoration-color: var(--color-red);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
  color: var(--color-gray-600);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

@media (min-width: 640px) {
  .container {
    padding: 0 var(--space-8);
  }
}

section {
  padding: var(--section-padding-mobile) 0;
}

@media (min-width: 1024px) {
  section {
    padding: var(--section-padding-desktop) 0;
  }
}

/* Utility Classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  transition: outline-offset var(--transition-fast) var(--ease-out);
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a, a:visited {
    text-decoration: underline;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
  img {
    page-break-inside: avoid;
  }
  
  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }
  
  h2, h3 {
    page-break-after: avoid;
  }
}
