/* -----------------------------
  ARX INDUSTRIES DESIGN SYSTEM
  Version 3.0 - Professional Rewrite
----------------------------- */

/* this was the styles.css file from the v2__WIP folder - the original webpage and its WIP version */

/* 
 * Color Palette
 * Primary: #4F46E5 (Indigo)
 * Secondary: #10B981 (Emerald)
 * Neutral: #111827 (Dark Blue Gray)
 * Background Light: #F8EBE3 (Linen)
 * Background Dark: #161619 (Night)
 * Text Light: #111827 (Dark)
 * Text Dark: #f1f5f9 (Light Gray)
 * Accents: #6366F1, #818CF8
 */

/* BASE RESET & VARIABLES */
:root {
  /* Colors */
  --color-primary: #4f46e5; /* Indigo - Primary brand color */
  --color-primary-light: #6366f1; /* Lighter indigo for accents */
  --color-primary-dark: #4338ca; /* Darker indigo for depth */
  --color-secondary: #10b981; /* Emerald - Secondary brand color */
  --color-secondary-light: #34d399; /* Lighter emerald */
  --color-secondary-dark: #059669; /* Darker emerald */
  --color-neutral: #111827; /* Dark blue-gray for text/headers */
  --color-neutral-light: #64748b; /* Muted blue-gray for secondary text */
  --color-neutral-dark: #0f172a; /* Deep blue for backgrounds */
  --color-background: #F8EBE3; /* Linen - Warm light background */
  --color-card-bg: #f0d9ce; /* Slightly darker linen for cards */
  --color-text: #111827; /* Dark text for contrast on linen */
  --color-text-muted: #78716c; /* Warm muted text for secondary content */
  --color-border: #e5d5ca; /* Subtle border color matching linen */
  --color-error: #ef4444; /* Error red */
  --color-success: #10b981; /* Success green */

  /* Typography */
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.03);
  --shadow-highlight: 0 0 15px rgba(99, 102, 241, 0.15);

  /* Animations */
  --anim-fast: 150ms;
  --anim-normal: 250ms;
  --anim-slow: 400ms;

  /* Sizing */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.375rem;
  --border-radius-lg: 0.5rem;
  --navbar-height: 4rem;
  --content-max-width: 1200px;
  --section-spacing: 3rem;
  --element-spacing: 1.5rem;
}

/* DARK MODE VARIABLES */
[data-theme="dark"] {
  --color-primary: #818cf8; /* Lighter indigo for better contrast on dark */
  --color-primary-light: #a5b4fc; /* Even lighter indigo for accents */
  --color-primary-dark: #6366f1; /* Standard indigo for depth */
  --color-secondary: #10b981; /* Emerald - Keeping consistent with light mode */
  --color-secondary-light: #34d399; /* Lighter emerald */
  --color-secondary-dark: #059669; /* Darker emerald */
  --color-neutral: #f1f5f9; /* Light gray for text */
  --color-neutral-light: #cbd5e1; /* Lighter gray for secondary text */
  --color-neutral-dark: #0f172a; /* Deep blue for contrast */
  --color-background: #161619; /* Night - Deep dark background */
  --color-card-bg: #1e1e22; /* Slightly lighter night for cards */
  --color-text: #f1f5f9; /* Light text for contrast on dark */
  --color-text-muted: #94a3b8; /* Muted light gray for secondary content */
  --color-border: #2d2d32; /* Subtle border color for dark mode */
  --color-error: #f87171; /* Lighter error red for dark mode */
  --color-success: #34d399; /* Lighter success green for dark mode */

  /* Dark mode shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3), 0 5px 10px rgba(0, 0, 0, 0.2);
  --shadow-highlight: 0 0 15px rgba(129, 140, 248, 0.3); /* Adjusted for lighter indigo */
}

/* RESET AND BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--element-spacing);
  line-height: 1.3;
  font-weight: 600;
  color: var(--color-text);
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--element-spacing);
  line-height: 1.7;
}

a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color var(--anim-normal) ease, opacity var(--anim-normal) ease;
}

a:hover {
  color: var(--color-primary-light);
}

/* HEADER & BRANDING */
.header {
  background-color: var(--color-neutral-dark);
  color: white;
  padding: 0.75rem 1rem;
  position: relative;
  z-index: 100;
  border-bottom: none;
}

/* HERO SECTION */
.hero-section {
  background: linear-gradient(135deg, var(--color-background) 0%, var(--color-card-bg) 100%);
  padding: 4rem 1rem 3rem;
  margin-bottom: 2rem;
}

.hero-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-neutral);
  margin: 0;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
  max-width: 90%;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.hero-highlight {
  display: flex;
  justify-content: center;
  align-items: center;
}

.announcement-banner {
  background: var(--color-primary);
  color: white;
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  max-width: 300px;
}

.announcement-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.announcement-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.announcement-text {
  font-size: 0.9rem;
  opacity: 0.9;
}

.announcement-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  transition: border-color var(--anim-normal) ease;
}

.announcement-link:hover {
  border-color: white;
  color: white;
}

/* ENHANCED ABOUT SECTION */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 2rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-card-bg);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* RESPONSIVE HERO SECTION */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    max-width: 100%;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

.header-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-title {
  font-size: 1.75rem;
  margin: 0;
  font-weight: 600;
  color: var(--color-primary-light);
  letter-spacing: -0.01em;
}

.site-title-link {
  text-decoration: none;
  color: inherit;
}

.site-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  margin-left: 1.5rem;
  font-weight: 400;
}

/* NAVIGATION */
.nav-container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0;
}

.nav-menu {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  gap: 2rem;
  margin: 0;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  position: relative;
  transition: color var(--anim-normal) ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: white;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: white;
  transition: all var(--anim-normal) ease;
}

/* MAIN CONTENT */
.main-content {
  max-width: var(--content-max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.section {
  margin-bottom: 2rem;
  padding: 2rem;
  background-color: var(--color-card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  border-top: 3px solid var(--color-primary);
}

.section-title {
  font-size: 1.75rem;
  color: var(--color-neutral);
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
  font-weight: 600;
}

/* GRID LAYOUTS */
.projects-grid,
.services-grid,
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

@media (min-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .service-card.featured {
    grid-column: 2;
    grid-row: 1;
  }
}

/* SECTION HEADERS */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

/* CARD STYLES */
.project-card,
.service-card,
.writing-card {
  padding: 1.5rem;
  background-color: var(--color-card-bg);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all var(--anim-normal) ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

/* ENHANCED SERVICE CARDS */
.service-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.service-card.featured {
  border: 2px solid var(--color-primary);
  transform: scale(1.02);
  box-shadow: var(--shadow-highlight);
}

.service-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  background: var(--color-primary);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  color: white;
}

.service-card.featured .service-icon {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.featured-badge {
  position: absolute;
  top: -8px;
  right: 1rem;
  background: var(--color-secondary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--color-neutral);
}

.service-card p {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.service-cta {
  margin-top: auto;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--anim-normal) ease;
  display: inline-block;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-1px);
}

/* ENHANCED CONTACT SECTION */
.contact-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  border-top: none;
}

.contact-section .section-title,
.contact-section .section-subtitle {
  color: white;
}

.contact-section .section-subtitle {
  opacity: 0.9;
}

.contact-content {
  margin-top: 2rem;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.contact-method {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  text-align: center;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--anim-normal) ease;
}

.contact-method:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
}

.contact-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  color: white;
}

.contact-method h3 {
  color: white;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.contact-method p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.contact-method .btn {
  margin-top: auto;
}

.contact-method .btn-primary {
  background: white;
  color: var(--color-primary);
  border: none;
}

.contact-method .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-primary-dark);
}

.contact-method .btn-outline {
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.contact-method .btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: white;
  color: white;
}

.project-card:hover,
.service-card:hover,
.writing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary-light);
}

.project-card h3,
.service-card h3,
.writing-card h3 {
  color: var(--color-neutral);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.project-card p,
.service-card p,
.writing-card p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* WRITINGS SPECIFIC STYLES */
.writings-filter {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-button {
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--color-primary);
  border-radius: 9999px;
  background-color: transparent;
  color: var(--color-primary-light);
  cursor: pointer;
  transition: all var(--anim-normal) ease;
  font-weight: 500;
  font-size: 0.9rem;
}

.filter-button.active,
.filter-button:hover {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.writing-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(79, 70, 229, 0.15);
  border-radius: 9999px;
  font-size: 0.75rem;
  color: var(--color-primary-light);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.writing-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.writing-excerpt {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.writing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

/* ENHANCED CALCULATOR STYLES */
.calculator-showcase {
  background: linear-gradient(135deg, var(--color-card-bg) 0%, var(--color-background) 100%);
  border-left: 4px solid var(--color-secondary);
}

.calculator-intro {
  margin: 2rem 0;
}

.calculator-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--color-background);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
  transition: all var(--anim-normal) ease;
}

.benefit-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  background: var(--color-secondary);
  border-radius: 50%;
  color: white;
  margin-bottom: 1rem;
}

.benefit-item h4 {
  color: var(--color-neutral);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.benefit-item p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.calculator-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.calculator-note {
  background: rgba(16, 185, 129, 0.1);
  padding: 1rem;
  border-radius: var(--border-radius-md);
  border-left: 3px solid var(--color-secondary);
}

.calculator-note p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.calculator-note strong {
  color: var(--color-secondary);
}

#calculator-section.section {
  background-color: var(--color-card-bg);
  padding: 0;
  border: none;
  border-top: none;
  box-shadow: var(--shadow-sm);
}

.calculator-title {
  background-color: var(--color-neutral-dark);
  color: white;
  padding: 1.5rem 2rem;
  margin: 0;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 3px solid var(--color-primary);
}

.calculator-description {
  background-color: var(--color-neutral-dark);
  color: rgba(255, 255, 255, 0.9);
  padding: 0 2rem 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.calculator-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  background-color: var(--color-card-bg);
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  margin-bottom: 0.75rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-neutral);
  font-weight: 500;
  font-size: 0.9rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  color: var(--color-text);
  font-size: 0.95rem;
  transition: border-color var(--anim-normal) ease;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.error-message {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* RESULTS DISPLAY */
.results-container {
  background-color: var(--color-neutral-dark);
  border: none;
  border-radius: 0;
  padding: 1.5rem 2rem 2rem;
  margin: 0;
}

.results-title {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.result-item {
  padding: 1.25rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  text-align: center;
  border: none;
}

.result-item h3 {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.result-item p {
  color: var(--color-primary-light);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0;
  font-variant-numeric: tabular-nums;
}

/* CHART CONTAINER */
.chart-container {
  background-color: rgba(255, 255, 255, 0.03);
  border: none;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  padding: 1.5rem 2rem 2rem;
  height: 350px;
  margin: 0;
}

/* SCENARIO MANAGEMENT */
.scenario-container {
  padding: 0 2rem 1.5rem;
  background-color: var(--color-neutral-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.scenarios-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.scenario-placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  margin: 0;
  font-size: 0.9rem;
}

.scenario-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: rgba(79, 70, 229, 0.2);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--anim-normal) ease;
  font-weight: 500;
  color: var(--color-primary-light);
  border: none;
  font-size: 0.85rem;
}

.scenario-chip:hover {
  background-color: rgba(79, 70, 229, 0.3);
}

.remove-scenario {
  margin-left: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.9rem;
}

/* BUTTON STYLES */
.button-container {
  padding: 1.5rem 2rem;
  background-color: var(--color-neutral-dark);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: all var(--anim-fast) ease;
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-card-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

[data-theme="dark"] .btn-secondary {
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .btn-secondary:hover {
  background-color: var(--color-card-bg);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn:active,
.btn-primary:active,
.btn-secondary:active {
  transform: translateY(1px);
}

.button-group {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
  justify-content: flex-end;
}

/* Helper classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.cta-container {
  text-align: center;
  margin-top: 2rem;
}

/* IMPROVED FOOTER */
.footer {
  background-color: var(--color-neutral-dark);
  color: white;
  padding: 2.5rem 1.5rem 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-company h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 90%;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.8);
  transition: background-color var(--anim-fast) ease; /* Added transition */
}

.footer-social a:hover {
  background-color: var(--color-primary);
  color: white; /* Ensure icon color contrasts on hover if it's not white by default */
}

.footer-social a img {
  width: 18px; /* Adjust size to fit nicely in the 32x32 anchor */
  height: 18px;
  object-fit: contain; /* Ensures the image scales nicely */
}

.footer-links-column h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  transition: color var(--anim-normal) ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  max-width: var(--content-max-width);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .footer-company {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 0;
  }

  .site-subtitle {
    margin-left: 0;
    font-size: 0.9rem;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-neutral-dark);
    padding: 1rem;
    border-radius: 0 0 0 8px;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-md);
    transform: translateX(100%);
    transition: transform var(--anim-normal) ease;
    z-index: 50;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
  }

  .calculator-form {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .button-container {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 1.5rem;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .calculator-title,
  .calculator-description {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .button-container,
  .scenario-container,
  .results-container,
  .chart-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .projects-grid,
  .services-grid,
  .writings-grid {
    grid-template-columns: 1fr;
  }
}
/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* THEME TOGGLE STYLES */
.theme-toggle-container {
  margin-left: auto;
  margin-right: 1rem;
}

.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: all var(--anim-normal) ease;
  color: var(--color-text);
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

.theme-icon {
  transition: transform var(--anim-normal) ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon-sun,
.theme-icon-moon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: opacity var(--anim-normal) ease;
  position: absolute;
}

.theme-icon-sun {
  opacity: 1;
}

[data-theme="dark"] .theme-icon-sun {
  opacity: 0;
}

.theme-icon-moon {
  opacity: 0;
}

[data-theme="dark"] .theme-icon-moon {
  opacity: 1;
}

/* Footer theme toggle specific styles */
.footer-theme-toggle {
  margin-left: 1rem;
}

.footer-theme-toggle .theme-toggle-btn {
  color: rgba(255, 255, 255, 0.7);
}

.footer-theme-toggle .theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Dark mode theme toggle adjustments */
[data-theme="dark"] .theme-toggle-btn {
  color: var(--color-text);
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

a:focus,
button:focus,
input:focus,
select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
  cursor: not-allowed;
}

/* PRINT STYLES */
@media print {
  body {
    background-color: #fff;
    color: #000;
  }

  .header,
  .nav-container,
  .footer,
  .button-group {
    display: none;
  }

  .main-content {
    margin: 0;
    padding: 0;
  }

  .section {
    background-color: transparent;
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}
