/* ============================================
   CSS CONSOLIDATION & FIXES
   ============================================

   This file consolidates and fixes all CSS issues:
   1. Removes "blue HTML lettering" problems
   2. Ensures proper text color hierarchy
   3. Fixes heading color inconsistencies
   4. Consolidates conflicting styles
   5. Improves readability and accessibility

   ============================================ */

/* ============================================
   GLOBAL TEXT COLOR FIXES
   ============================================ */

/* Ensure all text elements use proper theme colors */
body {
  color: var(--text-primary);
}

/* Reset any blue default browser styles */
a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* ============================================
   HEADING COLOR OVERRIDES
   ============================================ */

/* Remove any blue tints from headings */
h1,
h2,
h3,
h4,
h5,
h6,
.heading-1,
.heading-2,
.heading-3,
.heading-4,
.heading-5,
.heading-6 {
  color: var(--text-primary-emphasis) !important;
}

/* Gradient text should use theme gradients, not blue */
.text-gradient-primary {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-secondary {
  background: var(--gradient-accent);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   PARAGRAPH & BODY TEXT FIXES
   ============================================ */

p {
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.body-large {
  color: var(--text-primary) !important;
}

.body-small {
  color: var(--text-secondary) !important;
}

.text-neutral-200 {
  color: var(--text-primary) !important;
}

.text-neutral-300 {
  color: var(--text-secondary) !important;
}

.text-neutral-400 {
  color: var(--text-tertiary) !important;
}

/* ============================================
   BUTTON & INTERACTIVE ELEMENT FIXES
   ============================================ */

button,
.btn {
  color: var(--button-text);
  background: var(--button-bg);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover,
.btn:hover {
  background: var(--button-bg-hover);
  transform: translateY(-1px);
}

/* Remove blue from focus states */
button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ============================================
   CARD & PANEL FIXES
   ============================================ */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-card-hover);
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link:hover h3,
.card-link:hover .heading-4 {
  color: var(--accent-primary) !important;
}

/* ============================================
   BADGE FIXES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-state {
  background: var(--badge-bg);
  color: var(--badge-text);
  border: 1px solid var(--badge-border);
}

.badge-sites {
  background: var(--badge-info-bg);
  color: var(--badge-info-text);
  border: 1px solid var(--badge-info-border);
}

.badge-pending {
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
  border: 1px solid var(--badge-neutral-border);
}

.badge-verified {
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
  border: 1px solid var(--badge-success-border);
}

/* ============================================
   SEARCH INPUT FIXES
   ============================================ */

.search-input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--input-bg);
  border: 2px solid var(--input-border);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--input-border-focus);
  box-shadow: var(--shadow-input-focus);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-placeholder);
}

/* ============================================
   DATA STRIP FIXES
   ============================================ */

.data-strip {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-primary);
  border-bottom: 1px solid var(--border-primary);
  padding: 1rem 0;
}

.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.chip:hover {
  background: var(--chip-bg-hover);
  border-color: var(--chip-border-hover);
  transform: translateY(-2px);
}

.chip-value {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary-emphasis);
}

.chip-label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   ORG LOGO FIXES
   ============================================ */

.org-logo-wrap {
  width: 80px;
  height: 80px;
  border-radius: 0.75rem;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--border-secondary);
  transition: all 0.3s ease;
}

.card:hover .org-logo-wrap {
  border-color: var(--brand-primary, var(--accent-secondary));
  box-shadow: var(--shadow-accent-glow);
}

.org-logo-wrap.has-logo {
  background: white;
}

.org-logo-circle {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
}

.org-initials {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  color: white;
  text-shadow: 0 2px 4px rgb(0 0 0 / 20%);
}

/* ============================================
   SECTION FIXES
   ============================================ */

.section {
  padding: 3rem 0;
}

.section-sm {
  padding: 2rem 0;
}

.section-glass {
  background: var(--gradient-glass);
  backdrop-filter: blur(10px);
}

/* ============================================
   GRID FIXES
   ============================================ */

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (width <=768px) {

  .grid,
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOOTER FIXES
   ============================================ */

.site-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
}

.footer-wrap {
  text-align: center;
}

/* ============================================
   REMOVE ALL BLUE DEFAULTS
   ============================================ */

/* Override any browser defaults that might use blue */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
  color: var(--text-primary);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
}

/* Remove blue from HTML5 validation */
input:invalid,
textarea:invalid {
  box-shadow: none;
  border-color: var(--status-error);
}

input:valid,
textarea:valid {
  box-shadow: none;
}

/* Remove blue from selection */
::selection {
  background: var(--selection-bg);
  color: var(--text-primary-emphasis);
}

::-moz-selection {
  background: var(--selection-bg);
  color: var(--text-primary-emphasis);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.flex {
  display: flex;
}

.text-center {
  text-align: center;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
}
