/* =========================================================
   Varsha Manpower — Corporate Stylesheet
   Theme: Trust · Professionalism · Global Presence
   WCAG AA contrast · Dynamic theme variables
   ========================================================= */

/* ---------- Theme Presets ---------- */
:root,
[data-color="blue"] {
  --primary: #0B3D91;
  --primary-dark: #082E6E;
  --secondary: #1E88E5;
  --accent: #0D9488;
  --accent-dark: #0F766E;
  --primary-rgb: 11, 61, 145;
  --secondary-rgb: 30, 136, 229;
  --accent-rgb: 13, 148, 136;
  --footer-bg: #071F4A;
}

[data-color="emerald"] {
  --primary: #047857;
  --primary-dark: #065F46;
  --secondary: #10B981;
  --accent: #059669;
  --accent-dark: #047857;
  --primary-rgb: 4, 120, 87;
  --secondary-rgb: 16, 185, 129;
  --accent-rgb: 5, 150, 105;
  --footer-bg: #022C22;
}

[data-color="purple"] {
  --primary: #5B21B6;
  --primary-dark: #4C1D95;
  --secondary: #7C3AED;
  --accent: #6D28D9;
  --accent-dark: #5B21B6;
  --primary-rgb: 91, 33, 182;
  --secondary-rgb: 124, 58, 237;
  --accent-rgb: 109, 40, 217;
  --footer-bg: #2E1065;
}

[data-color="crimson"] {
  --primary: #B91C1C;
  --primary-dark: #991B1B;
  --secondary: #DC2626;
  --accent: #E11D48;
  --accent-dark: #BE123C;
  --primary-rgb: 185, 28, 28;
  --secondary-rgb: 220, 38, 38;
  --accent-rgb: 225, 29, 72;
  --footer-bg: #450A0A;
}

[data-color="orange"] {
  --primary: #C2410C;
  --primary-dark: #9A3412;
  --secondary: #EA580C;
  --accent: #B45309;
  --accent-dark: #92400E;
  --primary-rgb: 194, 65, 12;
  --secondary-rgb: 234, 88, 12;
  --accent-rgb: 180, 83, 9;
  --footer-bg: #431407;
}

[data-color="teal"] {
  --primary: #0F766E;
  --primary-dark: #115E59;
  --secondary: #14B8A6;
  --accent: #0D9488;
  --accent-dark: #0F766E;
  --primary-rgb: 15, 118, 110;
  --secondary-rgb: 20, 184, 166;
  --accent-rgb: 13, 148, 136;
  --footer-bg: #042F2E;
}

[data-color="navy"] {
  --primary: #0A1628;
  --primary-dark: #020617;
  --secondary: #1E40AF;
  --accent: #2563EB;
  --accent-dark: #1D4ED8;
  --primary-rgb: 10, 22, 40;
  --secondary-rgb: 30, 64, 175;
  --accent-rgb: 37, 99, 235;
  --footer-bg: #020617;
}

/* ---------- Light / Dark Surfaces (WCAG AA) ---------- */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --text: #212529;
  --text-secondary: #343A40;
  --text-muted: #495057;
  --text-on-dark: #FFFFFF;
  --text-on-primary: #FFFFFF;
  --border: rgba(33, 37, 41, 0.12);
  --border-strong: rgba(33, 37, 41, 0.2);
  --overlay-start: rgba(var(--primary-rgb), 0.92);
  --overlay-mid: rgba(var(--primary-rgb), 0.78);
  --overlay-end: rgba(var(--accent-rgb), 0.55);
  --shadow: 0 10px 30px rgba(var(--primary-rgb), 0.1);
  --shadow-lg: 0 20px 50px rgba(var(--primary-rgb), 0.14);
  --radius: 14px;
  --transition: 0.35s ease;
  --nav-height: 76px;
  --font: 'Poppins', system-ui, sans-serif;
  --footer-text: rgba(255, 255, 255, 0.95);
  --footer-muted: rgba(255, 255, 255, 0.82);
  --input-bg: #FFFFFF;
}

[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #162033;
  --surface-alt: #111827;
  --text: #F8FAFC;
  --text-secondary: #E2E8F0;
  --text-muted: #CBD5E1;
  --border: rgba(248, 250, 252, 0.12);
  --border-strong: rgba(248, 250, 252, 0.22);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --input-bg: #0F172A;
  --footer-text: rgba(255, 255, 255, 0.95);
  --footer-muted: rgba(255, 255, 255, 0.85);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

/* Override Bootstrap muted for AA contrast */
.text-muted,
.clients-label,
.modal-lead {
  color: var(--text-muted) !important;
}

/* ---------- Utilities ---------- */
.section-padding {
  padding: 100px 0;
}

.section-padding-sm {
  padding: 60px 0;
}

.bg-light-section {
  background: var(--surface);
}

.section-badge {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--primary);
  margin-bottom: 0.75rem;
}

[data-theme="dark"] .section-title {
  color: var(--secondary);
}

.section-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
}

.section-header {
  margin-bottom: 1rem;
}

.text-accent {
  color: var(--accent) !important;
}

.btn-accent {
  background: var(--accent);
  color: var(--text-on-primary);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-accent:hover,
.btn-accent:focus-visible {
  background: var(--accent-dark);
  color: var(--text-on-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35);
}

.btn-primary-brand {
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary-brand:hover,
.btn-primary-brand:focus-visible {
  background: var(--primary-dark);
  color: var(--text-on-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.35);
}

.btn-outline-light {
  border-width: 2px;
  font-weight: 600;
}

/* ---------- Loader ---------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  /* CSS failsafe if JS never runs */
  animation: loaderFailsafeHide 0.4s ease 2s forwards;
}

.loader-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

@keyframes loaderFailsafeHide {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.loader-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-text {
  color: var(--text-on-primary);
  margin-top: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Scroll Progress ---------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  z-index: 10001;
  transition: width 0.1s linear;
}

/* ---------- Navbar ---------- */
.navbar {
  padding: 1rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 0.65rem 0;
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(15, 23, 42, 0.97);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  margin-right: 0.65rem;
}

.brand-text {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-on-dark);
  line-height: 1.2;
}

.brand-text span {
  font-weight: 500;
  opacity: 0.95;
}

.navbar.scrolled .brand-text {
  color: var(--primary);
}

[data-theme="dark"] .navbar.scrolled .brand-text {
  color: var(--text);
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  position: relative;
}

.navbar.scrolled .nav-link {
  color: var(--text) !important;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.2rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  transform: scaleX(1);
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
  color: #fff !important;
}

.navbar.scrolled .nav-link.active,
.navbar.scrolled .nav-link:hover {
  color: var(--primary) !important;
}

.navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

.navbar.scrolled .navbar-toggler {
  border-color: rgba(var(--primary-rgb), 0.35);
}

.navbar.scrolled .navbar-toggler-icon {
  filter: invert(1) grayscale(1);
}

[data-theme="dark"] .navbar.scrolled .navbar-toggler-icon {
  filter: none;
}

/* ---------- Hero ---------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-height);
  color: var(--text-on-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=1920&q=80')
    center/cover no-repeat;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  to { transform: scale(1.12); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--overlay-start) 0%, var(--overlay-mid) 50%, var(--overlay-end) 100%);
}

.hero-shapes .shape {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1;
  animation: float 8s ease-in-out infinite;
}

.shape-1 { width: 220px; height: 220px; top: 15%; left: 8%; }
.shape-2 { width: 140px; height: 140px; bottom: 20%; right: 12%; animation-delay: 2s; }
.shape-3 { width: 80px; height: 80px; top: 30%; right: 28%; animation-delay: 4s; background: rgba(255, 255, 255, 0.06); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 0 6rem;
}

.hero-content .text-white,
.hero-section .text-white {
  color: #fff !important;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: #fff;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 720px;
  margin: 0 auto 2rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

/* Visible by default; animate only when JS enables it */
.fade-up {
  opacity: 1;
  transform: none;
}

html.anim-enabled .fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.9s ease forwards;
}

html.anim-enabled .fade-up.delay-1 { animation-delay: 0.15s; }
html.anim-enabled .fade-up.delay-2 { animation-delay: 0.3s; }
html.anim-enabled .fade-up.delay-3 { animation-delay: 0.45s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-indicator span {
  width: 4px;
  height: 10px;
  background: #fff;
  border-radius: 4px;
  animation: scrollDot 1.5s infinite;
}

@keyframes scrollDot {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Stats ---------- */
.stats-bar {
  background: var(--surface);
  margin-top: -40px;
  position: relative;
  z-index: 3;
  padding: 2.5rem 0;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.stat-number {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-number::after {
  content: attr(data-suffix);
}

[data-theme="dark"] .stat-number {
  color: var(--secondary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  font-weight: 500;
}

/* ---------- Services ---------- */
.service-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  height: 100%;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--primary-rgb), 0.35);
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  transition: background var(--transition), color var(--transition);
}

[data-theme="dark"] .service-icon {
  color: var(--secondary);
  background: rgba(var(--secondary-rgb), 0.18);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-on-primary);
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- About ---------- */
.about-image-wrap {
  position: relative;
}

.about-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  width: 100%;
  min-height: 420px;
}

.about-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(8px);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.about-badge span {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

[data-theme="dark"] .about-badge span {
  color: var(--secondary);
}

.about-block h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.about-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.progress-group {
  margin-top: 1.5rem;
}

.progress-item {
  margin-bottom: 1rem;
}

.progress-item span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.progress {
  height: 8px;
  background: rgba(var(--primary-rgb), 0.12);
  border-radius: 999px;
  margin-top: 0.4rem;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 1.4s ease;
}

/* ---------- Features ---------- */
.feature-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  height: 100%;
  transition: transform var(--transition);
  border: 1px solid var(--border);
}

.feature-card:hover {
  transform: translateY(-6px);
}

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Portfolio ---------- */
.portfolio-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 280px;
  box-shadow: var(--shadow);
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-card:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(var(--primary-rgb), 0.95) 15%, rgba(var(--primary-rgb), 0.55) 55%, rgba(0, 0, 0, 0.25) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
  transition: background var(--transition);
}

.portfolio-card:hover .portfolio-overlay {
  background: linear-gradient(to top, rgba(var(--primary-rgb), 0.97) 25%, rgba(var(--accent-rgb), 0.65) 100%);
}

.portfolio-overlay h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #fff;
}

.portfolio-overlay p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0.75rem;
}

.portfolio-overlay .btn-light {
  font-weight: 600;
  color: var(--primary);
}

/* ---------- Clients Logo Slider ---------- */
.logo-slider {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.logo-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  animation: logoScroll 30s linear infinite;
}

.logo-item {
  flex: 0 0 auto;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

@keyframes logoScroll {
  to { transform: translateX(-50%); }
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}

.testimonial-card p {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.testimonial-card footer {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonial-card strong {
  color: var(--primary);
}

[data-theme="dark"] .testimonial-card strong {
  color: var(--secondary);
}

.testimonial-card span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
  width: 44px;
  height: 44px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  border-radius: 50%;
  opacity: 1;
}

#testimonialCarousel .carousel-control-prev { left: 0; }
#testimonialCarousel .carousel-control-next { right: 0; }

#testimonialCarousel .carousel-indicators {
  bottom: -2.5rem;
}

#testimonialCarousel .carousel-indicators [data-bs-target] {
  background-color: var(--primary);
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ---------- FAQ ---------- */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: 12px !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--surface);
}

.accordion-button {
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
  color: var(--secondary);
}

.accordion-body {
  color: var(--text-muted);
  background: var(--surface);
}

.accordion-button::after {
  filter: none;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, var(--accent) 100%);
  color: var(--text-on-primary);
  padding: 80px 0;
}

.cta-banner h2 {
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
  color: #fff;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1.5rem;
}

.cta-banner .btn-light {
  font-weight: 600;
  color: var(--primary);
}

/* ---------- Contact ---------- */
.contact-form {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.form-control {
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  padding: 0.7rem 1rem;
  background: var(--input-bg);
  color: var(--text);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.form-control:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.2rem rgba(var(--secondary-rgb), 0.2);
  background: var(--input-bg);
  color: var(--text);
}

.contact-info-card {
  background: var(--primary);
  color: var(--text-on-primary);
  padding: 2rem;
  border-radius: var(--radius);
  height: 100%;
}

.contact-info-card h3 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.contact-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.contact-list i {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.contact-list strong {
  display: block;
  font-size: 0.9rem;
  color: #fff;
}

.contact-list p {
  margin: 0.15rem 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.92rem;
}

.contact-list a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-list a:hover {
  color: #fff;
  opacity: 0.9;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background var(--transition), transform var(--transition);
}

.social-links a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.map-placeholder {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.45);
  border-radius: 12px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.95);
}

.map-placeholder i {
  font-size: 2rem;
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 70px 0 0;
}

.footer-brand .brand-text {
  color: #fff;
}

.footer-about {
  font-size: 0.92rem;
  color: var(--footer-muted);
  margin-bottom: 1.25rem;
}

.footer-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.55rem;
}

.footer-links a {
  color: var(--footer-muted);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #fff;
}

.newsletter-form .form-control {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.newsletter-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.footer-contact p {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--footer-muted);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--footer-muted);
}

/* ---------- Floating Controls ---------- */
.back-to-top,
.whatsapp-float,
.sticky-cta,
.theme-fab {
  position: fixed;
  z-index: 1040;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
}

.back-to-top {
  bottom: 6.5rem;
  right: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--secondary);
  color: #fff;
}

.whatsapp-float {
  bottom: 1.5rem;
  left: 1.5rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover {
  color: #fff;
  transform: scale(1.08);
}

.sticky-cta {
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(100%);
  background: var(--accent);
  color: var(--text-on-primary);
  padding: 0.75rem 1rem;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  align-items: center;
}

.sticky-cta.visible {
  transform: translateY(-50%) translateX(0);
}

.sticky-cta:hover {
  color: #fff;
  background: var(--accent-dark);
}

/* ---------- Theme Settings Panel ---------- */
.theme-fab {
  bottom: 1.5rem;
  right: 1.5rem;
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text-on-primary);
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1050;
}

.theme-fab:hover,
.theme-fab:focus-visible {
  background: var(--primary-dark);
  color: #fff;
  transform: rotate(45deg);
}

.theme-fab[aria-expanded="true"] i {
  transform: rotate(90deg);
}

.theme-fab i {
  transition: transform var(--transition);
}

.theme-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1055;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.theme-panel-overlay.open {
  opacity: 1;
  visibility: visible;
}

.theme-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: min(320px, calc(100vw - 2rem));
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 1060;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.theme-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.theme-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.theme-panel-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.theme-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-panel-close:hover {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--primary);
}

.theme-panel-section {
  margin-bottom: 1.15rem;
}

.theme-panel-section:last-child {
  margin-bottom: 0;
}

.theme-panel-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
}

.theme-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.theme-mode-btn {
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.theme-mode-btn i {
  margin-right: 0.35rem;
}

.theme-mode-btn:hover {
  border-color: var(--primary);
}

.theme-mode-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-on-primary);
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.theme-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition), border-color var(--transition);
}

.theme-swatch:hover {
  transform: scale(1.08);
}

.theme-swatch.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
}

.theme-swatch .sr-only-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.theme-swatch-name {
  display: block;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  line-height: 1.2;
}

.theme-swatch-wrap {
  text-align: center;
}

.theme-reset-btn {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.theme-reset-btn:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Reveal Animations ---------- */
/* Content stays visible if JS fails; hide only after anim-enabled */
.reveal {
  opacity: 1;
  transform: none;
}

html.anim-enabled .reveal:not(.visible) {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.anim-enabled .reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ---------- Modal ---------- */
.modal-content {
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.modal-header {
  border-bottom-color: var(--border);
}

.modal-title {
  color: var(--text);
}

.btn-close {
  filter: none;
}

[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(1);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: var(--primary);
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 12px;
  }

  .navbar.scrolled .navbar-collapse {
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
  }

  .navbar .nav-link {
    color: #fff !important;
  }

  .navbar.scrolled .nav-link {
    color: var(--text) !important;
  }

  .navbar.scrolled .nav-link.active,
  .navbar.scrolled .nav-link:hover {
    color: var(--primary) !important;
  }

  [data-theme="dark"] .navbar.scrolled .nav-link.active,
  [data-theme="dark"] .navbar.scrolled .nav-link:hover {
    color: var(--secondary) !important;
  }

  #testimonialCarousel .carousel-control-prev,
  #testimonialCarousel .carousel-control-next {
    display: none;
  }

  .section-padding {
    padding: 70px 0;
  }
}

@media (max-width: 575.98px) {
  .hero-actions .btn {
    width: 100%;
  }

  .contact-form,
  .contact-info-card {
    padding: 1.5rem;
  }

  .stats-bar {
    margin-top: 0;
    border-radius: 0;
  }

  .whatsapp-float {
    bottom: 5.5rem;
  }

  .theme-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 5.25rem;
  }

  .theme-fab {
    right: 0.75rem;
    bottom: 1.25rem;
  }

  .back-to-top {
    right: 0.75rem;
    bottom: 5.75rem;
  }

  .theme-swatches {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
