/* ==========================================================================
   1. CSS Variables & Global Styles - Updated
   ========================================================================== */

:root {
  --primary-color: #4A8A8A;
  --primary-dark: #3a6b6b;
  --secondary-color: #1A2942;
  --text-primary: #1A2942;
  --text-secondary: #4a5568;
  --text-muted: #6b7280;
  --background-light: #f8fafc;
  --background-white: #ffffff;
  --background-gray: #f1f5f9;
  --border-color: #e5e7eb;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --font-primary: 'Inter', sans-serif;
  --section-padding: 3rem 0;
  --section-padding-sm: 2rem 0;
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.2s ease;
  --border-radius: 0.75rem;
  --border-radius-sm: 0.5rem;
  --border-radius-lg: 1rem;
}

body {
  font-family: var(--font-primary);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--background-white);
  padding-top: 0 !important;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Optimized padding to prevent content cutoff behind navbar */
}

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

#title-block-header,
.quarto-title-block {
  display: none !important;
}

/* ==========================================================================
   2. Typography & Global Elements
   ========================================================================== */

/* Typography Improvements */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   3. Navigation & Header
   ========================================================================== */

.navbar {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.navbar-brand img {
  height: 42px !important;
  width: auto !important;
  transition: var(--transition-fast);
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  margin: 0 0.25rem;
  padding: 0.75rem 1rem !important;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  font-size: 0.95rem;
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background-color: rgba(74, 138, 138, 0.08);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

.navbar-nav a[href="contact.qmd"],
.navbar-nav a[href="./contact.html"] {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white !important;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
}

.navbar-nav a[href="contact.qmd"]:hover,
.navbar-nav a[href="./contact.html"]:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.navbar-nav a[href="contact.qmd"]::after,
.navbar-nav a[href="./contact.html"]::after {
  display: none;
}

.page-hero, .final-cta {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  color: white;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.page-hero {
  padding: 3rem 0 2rem;
  margin-top: 0;
}

/* Ensure hero sections and main content areas are not hidden behind navbar */
.services-hero, .about-hero, .page-hero, main {
  margin-top: 0 !important;
  padding-top: 1rem !important;
}

/* Force all page content below navbar */
body > * {
  margin-top: 0 !important;
}

body > *:first-child {
  margin-top: 0 !important;
}

/* Specific fix for Quarto generated content */
#quarto-content, .quarto-container, main.content {
  padding-top: 2.2rem !important;
  margin-top: 0 !important;
}

.page-hero h1 {
  color: white;
  margin-bottom: 1.5rem;
}

.page-hero .lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto;
}

.final-cta {
  padding: var(--section-padding);
}

.final-cta h2 {
  color: white;
}

.final-cta p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.final-cta .btn-primary {
  background: white;
  color: var(--primary-color);
}

.final-cta .btn-primary:hover {
  background: var(--background-light);
  color: var(--primary-dark);
}

/* ==========================================================================
   4. Buttons & Interactive Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  text-align: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::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: var(--transition-base);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-large {
  padding: 1.125rem 2.25rem;
  font-size: 1.125rem;
  border-radius: var(--border-radius);
}

/* ==========================================================================
   5. Hero & Full-Width Sections
   ========================================================================== */

/* FIX #2: This rule makes all designated sections break out to be full-width */
.hero-section, .services-hero, .about-hero, .cta-section, .consultation-cta, .features-section, .expertise-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: var(--section-padding);
}

.hero-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
  color: white;
  padding: 1rem 0 0.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="90" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.4;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white !important;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-logo {
  width: 200px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
  transition: var(--transition-base);
}

.hero-logo:hover {
  transform: scale(1.05);
}

.hero-section .hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.025em;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: white !important;;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0rem;
}

.hero-cta .btn {
  min-width: 180px;
  box-shadow: var(--shadow-lg);
}

.hero-cta .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
}

.hero-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

/* ==========================================================================
   6. Features Section
   ========================================================================== */

.features-section {
  padding: var(--section-padding);
  background: linear-gradient(135deg, var(--background-light) 0%, var(--background-white) 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 0rem;
}

.feature-card {
  background: white;
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-base);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.feature-card:hover::before {
  left: 0;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 2rem;
  font-size: 2rem;
  color: white !important;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-icon p {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.feature-icon i {
  color: white !important;
  display: block !important;
  line-height: 1 !important;
  text-align: center !important;
  margin: 0 !important;
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
  font-size: 1rem;
}

/* ==========================================================================
   7. Expertise Section with Better Contrast
   ========================================================================== */

.expertise-section {
  padding: var(--section-padding);
  background: white;
}

.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  row-gap: 2.5rem;
}

.expertise-item {
  padding: 1.5rem;
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  transition: var(--transition-base);
  background: var(--background-white);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.expertise-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: translateX(-100%);
  transition: var(--transition-base);
}

.expertise-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.expertise-item:hover::before {
  transform: translateX(0);
}

.expertise-item h4 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* CRITICAL TAG FIXES - FORCE UPDATE - MAXIMUM SPECIFICITY */
.expertise-section .expertise-item .skill-tags,
.skill-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  column-gap: 1rem !important;
  row-gap: 4rem !important;
  margin-top: 0.5rem !important;
  align-items: flex-start !important;
  /* TEST: Extremely large spacing with max specificity */
}

/* FIXED: Target individual tag spans for vertical spacing */
.tag {
  background: var(--background-gray) !important;
  color: var(--text-primary) !important;
  padding: 0.4rem 0.8rem !important;
  border-radius: 1rem !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  border: 1px solid var(--border-color) !important;
  transition: var(--transition-fast) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  min-width: fit-content !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 1.2 !important;
  margin: 0 0.5rem 0.75rem 0 !important;
  /* Optimal bottom margin for vertical spacing */
}

.tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==========================================================================
   8. CTA Section
   ========================================================================== */

.cta-section {
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-align: center;
  margin-bottom: 0;
  position: relative;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.cta-content h2 {
  color: white;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.cta-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-primary {
  background: white;
  color: var(--primary-color);
}

.cta-section .btn-primary:hover {
  background: var(--background-light);
  color: var(--primary-dark);
}

/* ==========================================================================
   9. About Page Styles
   ========================================================================== */

.about-hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 0 2rem;
  text-align: center;
  margin-top: 0 !important;
}

.about-hero h1 {
  color: white;
  margin-bottom: 1rem;
}

.about-hero .lead {
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto;
}

.about-content {
  padding: var(--section-padding);
}

.approach-steps {
  margin: 0.5rem 0;
}

.step {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 1rem;
  background: var(--background-light);
  border-radius: 1rem;
  border-left: 4px solid var(--primary-color);
}

.step-number {
  background: var(--primary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 16px;
}

.step-content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.step-content p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.benefits-list {
  list-style: none;
  padding: 0;
}

.benefits-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.benefits-list li:last-child {
  border-bottom: none;
}

.benefits-list strong {
  color: var(--text-primary);
}

.stats-card, .certifications-card {
  background: white;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-color);
}

.stats-card h3, .certifications-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-align: center;
}

.stat {
  text-align: center;
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: block;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.certifications-card ul {
  list-style: none;
  padding: 0;
}

.certifications-card li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.5rem;
}

.certifications-card li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.certifications-card li:last-child {
  border-bottom: none;
}

/* ==========================================================================
   10. Services & Portfolio Page Styles
   ========================================================================== */

.services-hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 3rem 0 2rem;
  text-align: center;
  margin-top: 0 !important;
}

.services-hero h1 {
  color: white;
  margin-bottom: 1.5rem;
}

.services-hero .lead {
  color: white !important;
  max-width: 700px;
  margin: 0 auto;
}

.services-content {
  padding: var(--section-padding);
}

.service-section {
  margin-bottom: 0.5rem !important;
  padding: 0.5rem 0 !important;
  position: relative;
}

.service-section:not(:last-child) {
  border-bottom: 1px solid var(--border-light);
}

.service-section:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: translateX(-50%);
}

.service-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--border-radius-lg);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 2.25rem;
  color: white !important;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
}

.service-icon p {
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.service-icon i {
  color: white !important;
  display: block !important;
  line-height: 1 !important;
  text-align: center !important;
  margin: 0 !important;
}

.service-icon:hover {
  transform: scale(1.05) rotate(5deg);
}

.service-features {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.service-features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 2.5rem;
  font-size: 1.025rem;
  line-height: 1.4;
}

.service-features li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.1rem;
}

.results-box {
  background: linear-gradient(135deg, var(--background-light), var(--background-gray));
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-top: 0.5rem;
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.results-box h4 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.results-box ul {
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
}

.results-box li {
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.service-visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 60px !important;
  padding: 0.125rem 0.25rem !important;
  padding-top: 0 !important;
  margin: 0.125rem !important;
  margin-top: 0 !important;
}

/* Target the paragraph inside tech-stack that's causing spacing */
.tech-stack p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* Make the service visual area extremely compact */
.service-section .col-md-6 {
  padding: 0.125rem !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.service-section .row {
  align-items: center !important;
}

/* CRITICAL TECH TAG FIXES */
.tech-stack {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  row-gap: 0.75rem !important;
  justify-content: center !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  margin-top: 0.25rem !important;
  padding-top: 0.25rem !important;
  align-items: center !important;
}

.tech-tag {
  background: var(--background-white) !important;
  color: var(--text-primary) !important;
  padding: 0.4rem 0.8rem !important;
  border-radius: 1rem !important;
  font-weight: 600 !important;
  border: 2px solid var(--border-color) !important;
  transition: var(--transition-fast) !important;
  box-shadow: var(--shadow-sm) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 0.8rem !important;
  min-width: fit-content !important;
  display: inline-block !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

.tech-tag:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.consultation-cta {
  background: var(--background-light);
  padding: var(--section-padding);
  text-align: center;
}

.consultation-cta .cta-content h2 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.consultation-cta .cta-content p {
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* ==========================================================================
   11. UPDATED Contact & Thank You Page Styles
   ========================================================================== */

.contact-panel {
  background: var(--background-white);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  margin: 2rem 0;
  border: 1px solid var(--border-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.form-group {
  margin-bottom: 2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-size: 1.025rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  font-family: var(--font-primary);
  transition: var(--transition-fast);
  background: var(--background-white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(74, 138, 138, 0.15);
  background: var(--background-white);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-details-wrapper h3 {
  color: var(--text-primary);
  margin-top: 0;
}

.contact-details-wrapper hr {
  border: 0;
  height: 1px;
  background-color: var(--border-color);
  margin: 2rem 0;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-right: 1rem;
  margin-top: 0.25rem;
}

.contact-item div {
  line-height: 1.4;
}

.contact-item strong {
  display: block;
  color: var(--text-primary);
}

/* Contact page grid - desktop */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr;  /* form wider, contact section also wide */
  gap: 2rem;  /* space between columns */
  align-items: start;
}

/* Responsive - stack vertically on smaller screens */
@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;  /* single column */
    gap: 1.5rem;  /* reduce spacing */
  }
}

/* ==========================================================================
   14. Enhanced Responsive Design
   ========================================================================== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.25rem;
  }
  
  .hero-content {
    padding: 0 1.5rem;
  }
  
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }
  
  .service-visual {
    min-height: 150px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  :root {
    --section-padding: 2.5rem 0;
    --section-padding-sm: 1.5rem 0;
  }
  
/* Mobile footer adjustments */
@media (max-width: 768px) {
  .page-footer {
    padding: 1.25rem 0 1rem !important;
  }
  
  .page-footer p, .page-footer div {
    font-size: 0.85rem !important;
    padding: 0 0.5rem !important;
    line-height: 1.3 !important;
  }
}
  
  .navbar {
    padding: 0.75rem 0;
  }
  
  .navbar-brand img {
    height: 36px !important;
  }
  
  .hero-section {
    padding: 3rem 0 2rem;
  }
  
  .hero-logo {
    width: 220px;
    margin-bottom: 2rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 6vw, 2.75rem);
    margin-bottom: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
  }
  
  .feature-card {
    padding: 2.5rem 2rem;
  }
  
  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .expertise-item {
    padding: 2rem;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .contact-panel {
    padding: 2.5rem;
  }
  
  .service-section {
    margin-bottom: 4rem;
    padding: 3rem 0;
  }
  
  .service-section .row {
    flex-direction: column;
    gap: 2rem;
  }
  
  .service-section .col-md-6.order-md-2 {
    order: -1;
  }
  
  .tech-stack {
    max-width: 100%;
    gap: 1rem;
  }
  
  .tech-tag {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .step {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  
  .step-number {
    margin-right: 0;
    margin-bottom: 1.5rem;
  }
}

/* Mobile phones */
@media (max-width: 480px) {
  :root {
    --section-padding: 2rem 0;
    --section-padding-sm: 1.5rem 0;
  }
  
  body {
    font-size: 14px;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .hero-logo {
    width: 180px;
  }
  
  .hero-title {
    font-size: 1.875rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.375rem;
  }
  
  .feature-card,
  .expertise-item {
    padding: 2rem 1.5rem;
  }
  
  .contact-panel {
    padding: 2rem;
    margin: 2rem 0;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
  }
  
  .stats-card,
  .certifications-card {
    padding: 1.5rem;
  }
  
  .service-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
  
  .feature-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.625rem;
  }
  
  .feature-card,
  .expertise-item {
    padding: 1.5rem 1rem;
  }
  
  .contact-panel {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   13. Enhanced Animations & Interactive Elements
   ========================================================================== */

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Enhanced utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Improved animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(74, 138, 138, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(74, 138, 138, 0.6);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
  animation: slideInFromLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInFromRight 0.8s ease-out;
}

/* Enhanced hover effects for cards */
.feature-card,
.expertise-item,
.service-section {
  transition: var(--transition-base);
}

/* Interactive focus states */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Loading states for buttons */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced scroll indicators */
.section-divider {
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 3rem auto;
  border-radius: 2px;
}

/* ==========================================================================
   15. Footer & Page Footer Styling
   ========================================================================== */

/* Simple footer styling that works with Quarto's native implementation */
.page-footer {
  background: var(--secondary-color);
  color: white;
  padding: 0 !important;
  text-align: center;
  margin-top: 0 !important;
}

.page-footer p, .page-footer div {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.9rem;
  font-weight: 500;
}

.page-footer a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.page-footer a:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

/* Ensure main content doesn't have excessive bottom margin */
main {
  margin-bottom: 0;
}

/* Reduce any excessive spacing above footer */
.quarto-container {
  margin-bottom: 0;
}

/* Enhanced section consistency */
.section-header {
  text-align: center;
  margin-bottom: 0rem;
}

.section-header h2 {
  margin-bottom: 0rem;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Logo consistency improvements */
.logo {
  transition: var(--transition-fast);
}

.logo:hover {
  transform: scale(1.02);
}

/* Enhanced visual hierarchy */
.page-header {
  margin-bottom: 0rem;
}

.page-header h1 {
  margin-bottom: 0rem;
}

.page-header .lead {
  margin-bottom: 0;
}

/* Enhanced visual elements */
.divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 0rem auto;
  border-radius: 2px;
}