﻿:root {
  /* Colors */
  --border: #E7E5E4;
  --input: #E7E5E4;
  --ring: #047857;
  --background: #FAFAF9;
  --foreground: #1C1917;
  
  --primary: #047857;
  --primary-foreground: #FFFFFF;
  
  --secondary: #D97706;
  --secondary-foreground: #FFFFFF;
  
  --destructive: #EF4444;
  --destructive-foreground: #FFFFFF;
  
  --muted: #F5F5F4;
  --muted-foreground: #78716C;
  
  --accent: #FEF3C7;
  --accent-foreground: #B45309;
  
  --success: #10B981;
  --success-foreground: #FFFFFF;
  
  --popover: #FFFFFF;
  --popover-foreground: #1C1917;
  
  --card: #FFFFFF;
  --card-foreground: #1C1917;

  /* Fonts */
  --font-sans: 'Poppins', 'Inter', sans-serif;
  --font-heading: 'Manrope', sans-serif;
}

/* Dark mode variables (if applied to html.dark) */
.dark {
  --border: #334155;
  --input: #334155;
  --background: #0c0a09;
  --foreground: #f8fafc;
  --muted: #1e293b;
  --muted-foreground: #94a3b8;
  --card: #1e293b;
  --card-foreground: #f8fafc;
  --popover: #1e293b;
  --popover-foreground: #f8fafc;
}

/* ============================================================
   COMPREHENSIVE DARK MODE OVERRIDES
   These ensure all pages render perfectly in dark mode
   ============================================================ */

/* --- Core text color fixes --- */
.dark body {
  background-color: #0c0a09 !important;
  color: #f8fafc !important;
}

.dark .text-foreground {
  color: #f8fafc !important;
}

.dark .text-muted-foreground {
  color: #94a3b8 !important;
}

.dark .bg-background {
  background-color: #0c0a09 !important;
}

.dark .bg-card {
  background-color: #1e293b !important;
}

.dark .border-border {
  border-color: #334155 !important;
}
.dark .text-black,
.dark .text-slate-900 {
  color: #f1f5f9 !important;
}

.dark .text-slate-800 {
  color: #e2e8f0 !important;
}

.dark .text-slate-700 {
  color: #cbd5e1 !important;
}

.dark .text-slate-600 {
  color: #94a3b8 !important;
}

.dark .text-slate-500 {
  color: #64748b !important;
}

/* --- Additional Theme Colors --- */
.dark .bg-muted { background-color: #1e293b !important; }
.dark .hover\:bg-muted:hover { background-color: #1e293b !important; }

.dark .bg-popover { background-color: #1e293b !important; }
.dark .text-popover-foreground { color: #f8fafc !important; }

.dark .bg-secondary { background-color: #f59e0b !important; } /* slightly lighter amber for dark mode if needed, but primary/secondary usually stay same */

.dark .border-input { border-color: #334155 !important; }
.dark .ring-ring { --tw-ring-color: #047857 !important; }

/* --- Background fixes for common patterns --- */
.dark .bg-white {
  background-color: #1e293b !important;
}

.dark .bg-slate-50 {
  background-color: #0f172a !important;
}

.dark .bg-slate-100 {
  background-color: #1e293b !important;
}

.dark .bg-slate-200 {
  background-color: #334155 !important;
}

/* --- Border fixes for better visibility --- */
.dark .border-slate-200 {
  border-color: #334155 !important;
}

.dark .border-slate-300 {
  border-color: #475569 !important;
}

/* --- Product item pages: image background fix --- */
.dark .bg-white.dark\:bg-slate-900,
.dark [class*="bg-white"] {
  background-color: #1e293b;
}

/* --- About section image card on index.html --- */
.dark .relative.rounded-xl.overflow-hidden.shadow-sm.border.border-slate-200 {
  border-color: #334155 !important;
  background-color: #1e293b !important;
}

.dark .border-t.border-slate-200 {
  border-color: #334155 !important;
}

/* --- Product item pages: Sidebar fixes --- */
.dark .text-slate-500.mb-6,
.dark p.text-slate-500 {
  color: #94a3b8 !important;
}

/* --- Breadcrumb fixes for product item pages --- */
.dark nav.flex.items-center.flex-wrap a,
.dark nav.flex.items-center.flex-wrap span {
  color: #94a3b8;
}

.dark nav.flex.items-center.flex-wrap span.text-foreground {
  color: #f1f5f9;
}

/* --- Back link on product pages --- */
.dark a.text-slate-600 {
  color: #94a3b8 !important;
}

.dark a.text-slate-600:hover {
  color: #047857 !important;
}

/* --- Services available grid inner cards on product pages --- */
.dark .bg-white.dark\:bg-slate-900 p.text-xs.text-slate-500 {
  color: #94a3b8 !important;
}

/* --- Contact page specific fixes --- */
.dark .border-slate-200.dark\:border-slate-800 {
  border-color: #334155 !important;
}

/* --- index.html: About section image container --- */
.dark .flex-grow.relative.bg-white {
  background-color: #1e293b !important;
}

.dark .p-3.text-center.border-t.border-slate-200 {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

/* --- Product page category links fix --- */
.dark .break-inside-avoid a:not(:hover) {
  color: #e2e8f0;
}

/* --- Smooth transition on all elements --- */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Fix: dark mode image containers that remain bg-white --- */
.dark .bg-white.flex-grow {
  background-color: #1e293b !important;
}

/* --- Fix process steps in about page --- */
.dark .absolute.left-8.md\:left-1\/2.w-8.h-8.rounded-full.bg-slate-200 {
  background-color: #334155 !important;
  color: #f1f5f9 !important;
}

/* --- Fix "why choose us" badge pills on index.html in dark mode --- */
.dark .inline-flex.items-center.gap-2.bg-slate-50 {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

/* --- Fix CTA section card in dark mode --- */
.dark .bg-white\/80 {
  background-color: rgba(30, 41, 59, 0.8) !important;
}

/* --- Placeholder text in dark mode --- */
.dark input::placeholder,
.dark textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

/* --- Input/select in dark mode --- */
.dark input[type="text"],
.dark input[type="email"],
.dark textarea,
.dark select {
  background-color: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}

/* --- Focus ring in dark mode --- */
.dark input:focus,
.dark textarea:focus {
  border-color: #047857;
  outline-color: #047857;
}

/* --- Fix product item page main body bg --- */
.dark section.py-16.bg-white {
  background-color: #0f172a !important;
}

/* --- Fix service available cards in product pages --- */
.dark .bg-white.dark\:bg-slate-900.rounded-xl {
  background-color: #1e293b !important;
}

/* --- Ensure all nav breadcrumbs have contrast --- */
.dark .text-slate-500.mb-6 {
  color: #94a3b8 !important;
}

/* --- Make sure dark mode applied to all text in dark mode properly --- */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
  color: inherit;
}


/* Basic Reset (Tailwind Preflight replacement) */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border);
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: var(--font-sans);
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  margin: 0;
  line-height: inherit;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr:where([title]) {
  text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  font-family: var(--font-heading);
}

a {
  color: inherit;
  text-decoration: inherit;
}

b, strong {
  font-weight: bolder;
}

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select {
  text-transform: none;
}

button, [type='button'], [type='reset'], [type='submit'] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol, ul, menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog {
  padding: 0;
}

textarea {
  resize: vertical;
}

input::placeholder, textarea::placeholder {
  opacity: 1;
  color: var(--muted-foreground);
}

button, [role="button"] {
  cursor: pointer;
}

:disabled {
  cursor: default;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img, video {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none;
}

/* Animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin 3s linear infinite;
}

/* Layout Components */
.site-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  transition: all 300ms;
  border-bottom: 1px solid transparent;
  background-color: transparent;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar-container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .navbar-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.navbar-content {
  display: flex;
  height: 4rem;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 50;
}

.navbar-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  letter-spacing: -0.025em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 150ms, background-color 150ms;
  position: relative;
  color: var(--muted-foreground);
}

.nav-link:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.nav-link.active {
  color: var(--primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.5rem;
  color: var(--foreground);
}

.theme-toggle:hover {
  background-color: var(--muted);
}

.icon-sun {
  height: 1.25rem;
  width: 1.25rem;
  transition: all 150ms;
}

.dark .icon-sun {
  display: none;
}

.icon-moon {
  height: 1.25rem;
  width: 1.25rem;
  transition: all 150ms;
  display: none;
}

.dark .icon-moon {
  display: block;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  background-color: var(--foreground);
  color: var(--background);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 150ms;
  box-shadow: 0 10px 15px -3px rgb(4 120 87 / 0.25);
}

.btn-primary:hover {
  background-color: rgba(28, 25, 23, 0.9);
}

.dark .btn-primary:hover {
  background-color: rgba(250, 250, 249, 0.9);
}

.quote-btn {
  display: none;
}

@media (min-width: 768px) {
  .quote-btn {
    display: flex;
  }
}

.icon-phone {
  margin-right: 0.5rem;
  height: 1rem;
  width: 1rem;
}

.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 0.5rem;
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-btn:hover {
  background-color: var(--muted);
}

.mobile-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 50;
  width: 300px;
  background-color: var(--background);
  border-left: 1px solid var(--border);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  transform: translateX(100%);
  transition: transform 300ms;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.mobile-menu-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

.mobile-menu-close {
  padding: 0.5rem;
  border-radius: 9999px;
}

.mobile-menu-close:hover {
  background-color: var(--muted);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-nav-link {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 150ms;
}

.mobile-nav-link:hover {
  color: var(--foreground);
}

.mobile-nav-link.active {
  color: var(--primary);
}

.mobile-quote-btn {
  width: 100%;
  margin-top: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}


/* Theme Toggle Animations */
.theme-icon-sun {
  position: absolute;
  transition: all 0.3s ease;
  transform: scale(0) rotate(-90deg);
  opacity: 0;
}
.theme-icon-moon {
  position: absolute;
  transition: all 0.3s ease;
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.dark .theme-icon-sun {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}
.dark .theme-icon-moon {
  transform: scale(0) rotate(90deg);
  opacity: 0;
}