/* ============================================
   Codedemeter - Minimalist Enterprise Styles
   Clean Modern SaaS Design System
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --accent: #0078d4;
  --accent-hover: #005a9e;
  --accent-light: rgba(0, 120, 212, 0.07);

  --text-main: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border-subtle: #e2e8f0;
  --border-soft: #f1f5f9;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-soft:
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-medium:
    0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg:
    0 20px 40px -4px rgba(0, 0, 0, 0.1), 0 8px 16px -2px rgba(0, 0, 0, 0.06);

  --gradient-primary: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  --gradient-accent: linear-gradient(135deg, #0078d4 0%, #38bdf8 100%);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  --bg-body: #ffffff;
}

/* ---------- Dark Theme Overrides ---------- */
[data-theme="dark"] {
  --bg-body: #0f172a;
  --bg-light: #1e293b;
  --bg-card: #1f2937;
  --text-main: #f9fafb;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --border-subtle: #334155;
  --border-soft: #1e293b;
}

[data-theme="dark"] .text-dark-custom {
  color: var(--text-main) !important;
}
[data-theme="dark"] .bg-white {
  background-color: var(--bg-card) !important;
}
[data-theme="dark"] .bg-light {
  background-color: var(--bg-light) !important;
}

/* ---------- Global Styles ---------- */
html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  color: var(--text-main);
  line-height: 1.65;
  background-color: var(--bg-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 0.95rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  transition: all 0.2s ease;
}

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

/* ---------- Utility ---------- */
.text-accent {
  color: var(--accent) !important;
}
.bg-primary-custom {
  background: var(--primary) !important;
}
.bg-accent-custom {
  background: var(--accent) !important;
}
.text-gradient {
  color: var(--accent);
}
.text-white-60 {
  color: rgba(255, 255, 255, 0.6) !important;
}
.text-dark-custom {
  color: #1a1a1a !important;
}
.border-light-custom {
  border-color: #e5e7eb !important;
}
.text-primary-custom {
  color: var(--primary) !important;
}
.border-subtle-custom {
  border-color: var(--border-subtle) !important;
}

.section-padding {
  padding: 80px 0;
}
.section-padding-sm {
  padding: 56px 0;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  margin-bottom: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
}

/* ---------- Section Eyebrow ---------- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-eyebrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn-accent {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
  padding: 9px 24px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 120, 212, 0.25);
}

.btn-accent:active {
  transform: scale(0.97) translateY(0);
  transition: transform 0.1s ease;
}

.btn-hero {
  background: transparent;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 9px 24px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.btn-hero:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}

.btn-hero:active {
  transform: scale(0.97);
  transition: transform 0.1s ease;
}

/* ---------- Navbar ---------- */
.navbar-custom {
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-custom.scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.6rem 0;
}

.navbar-custom .navbar-brand {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.navbar-custom .nav-link {
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.4rem 0.875rem !important;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.navbar-custom:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

.navbar-custom:not(.scrolled) .nav-link:hover,
.navbar-custom:not(.scrolled) .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.navbar-custom.scrolled .nav-link {
  color: var(--text-muted);
}

.navbar-custom.scrolled .nav-link:hover {
  color: var(--primary);
  background: var(--bg-light);
}

.navbar-custom.scrolled .nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
}

.navbar-custom:not(.scrolled) .navbar-brand {
  color: white;
}
.navbar-custom.scrolled .navbar-brand {
  color: var(--primary);
}

[data-theme="dark"] .navbar-custom.scrolled {
  background: rgba(15, 23, 42, 0.97) !important;
  border-bottom: 1px solid var(--border-subtle);
}

[data-theme="dark"] .navbar-custom.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .navbar-custom.scrolled .nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar-custom.scrolled .navbar-brand {
  color: white;
}

[data-theme="dark"] .navbar-custom.scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.logo-box {
  width: 34px;
  height: 34px;
  background: var(--gradient-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  flex-shrink: 0;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-custom:not(.scrolled) .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-custom.scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 23, 42, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Hero Section ---------- */
.hero-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--gradient-primary);
  padding-top: 80px;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 120, 212, 0.1), transparent 60%);
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -15%;
  left: -8%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.06),
    transparent 60%
  );
  pointer-events: none;
}

.hero-section .row {
  justify-content: center;
}

.hero-section .col-lg-8 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-section .d-flex,
.hero-section .hero-cta-group {
  justify-content: center;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-badge .badge-dot {
  width: 6px;
  height: 6px;
  background: #38bdf8;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 5px rgba(56, 189, 248, 0);
  }
}

.hero-title {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.68);
  max-width: 620px;
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.75;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

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

.hero-stat-value {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
  margin-bottom: 0.15rem;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scroll-bounce 2.5s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.35;
  }
  50% {
    transform: translateX(-50%) translateY(6px);
    opacity: 0.7;
  }
}

/* ---------- Page Hero (inner pages) ---------- */
.page-hero {
  background: var(--gradient-primary);
  padding: 140px 0 72px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 120, 212, 0.1), transparent 60%);
  pointer-events: none;
}

.page-hero .row {
  justify-content: center;
}

.page-hero .col-lg-7,
.page-hero .col-lg-8 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.75rem;
}

.page-hero-title {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.page-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.6);
  max-width: 540px;
  line-height: 1.7;
}

/* ---------- CTA Band ---------- */
.cta-band {
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 500px 250px at 85% 50%,
    rgba(0, 120, 212, 0.12),
    transparent
  );
  pointer-events: none;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  letter-spacing: -0.02em;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
}

/* ---------- Services Section ---------- */
.services-section {
  background: var(--bg-light);
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.service-card > *:last-child {
  margin-top: auto;
}

.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
  border-color: rgba(0, 120, 212, 0.2);
}

.service-card:hover::after {
  transform: scaleX(1);
}

.service-icon {
  width: 46px;
  height: 46px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition:
    background 0.25s ease,
    color 0.25s ease;
  font-size: 1.25rem;
  color: var(--accent);
}

.service-card:hover .service-icon {
  background: var(--accent);
  color: #fff;
}

.service-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

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

.service-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.service-features li i {
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  transition:
    gap 0.15s ease,
    color 0.15s ease;
}

.service-link:hover {
  color: var(--accent-hover);
  gap: 9px;
}

/* ---------- About Section ---------- */
.about-section {
  background: white;
}

.about-image-wrapper {
  position: relative;
  z-index: 1;
}

.about-image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--border-subtle);
  width: 100%;
  object-fit: cover;
}

.about-stats-card {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  display: flex;
  gap: 1.5rem;
  z-index: 2;
}

.about-stat-item {
  text-align: center;
}

.about-stat-value {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.2rem;
  letter-spacing: -0.03em;
}

.about-stat-label {
  font-size: 0.68rem;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 0.875rem;
  color: var(--text-main);
  font-size: 0.9rem;
  line-height: 1.6;
}

.achievement-icon {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ---------- Mission / Vision Cards ---------- */
.mv-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  height: 100%;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.mv-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

/* ---------- Contact Section ---------- */
.contact-section {
  background: var(--bg-light);
}

.contact-info-card,
.contact-form-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  height: 100%;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
}

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

.contact-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--accent);
}

.contact-item-title {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.contact-item-text,
.contact-item-text a {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.65;
}

.contact-item-text a:hover {
  color: var(--accent);
}

.contact-form .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.contact-form .form-control {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  background-color: var(--bg-light);
  box-shadow: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.contact-form .form-control::placeholder {
  color: var(--text-faint);
}

.contact-form .form-control:focus {
  background-color: white;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.12);
}

.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 1.5rem;
  border: 1px solid var(--border-subtle);
}

/* ---------- Office Tabs ---------- */
#officeTabs .nav-link {
  color: var(--text-muted);
  background-color: var(--bg-light);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  padding: 6px 20px;
}

#officeTabs .nav-link:hover {
  background-color: var(--border-subtle);
}

#officeTabs .nav-link.active {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.2);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary);
  color: white;
  border-top: 1px solid var(--primary-light);
}

.footer-content {
  padding: 64px 0 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.footer-logo span {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.footer-description {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  line-height: 1.75;
  max-width: 300px;
}

.footer-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: "Inter", sans-serif;
}

.footer-links {
  list-style-type: none !important;
  padding-left: 0 !important;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.65rem;
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  line-height: 1.65;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
}

.scroll-top-btn {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}

.scroll-top-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Social Links ---------- */
.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Staggered children in grid rows */
.row.g-4 > div:nth-child(1).fade-up.visible,
.row.g-4 > div:nth-child(1) .fade-up.visible {
  transition-delay: 0ms !important;
}

.row.g-4 > div:nth-child(2).fade-up.visible,
.row.g-4 > div:nth-child(2) .fade-up.visible {
  transition-delay: 120ms !important;
}

.row.g-4 > div:nth-child(3).fade-up.visible,
.row.g-4 > div:nth-child(3) .fade-up.visible {
  transition-delay: 240ms !important;
}

.row.g-4 > div:nth-child(4).fade-up.visible,
.row.g-4 > div:nth-child(4) .fade-up.visible {
  transition-delay: 360ms !important;
}

/* ---------- Typography Refinements ---------- */
h1,
h2,
h3,
.hero-title,
.section-title {
  text-wrap: balance;
}

p,
.hero-subtitle,
.section-subtitle {
  text-wrap: pretty;
}

/* ---------- Layout Width ---------- */
.section-padding > .container,
.contact-section > .container,
.footer > .container,
.footer-content > .container,
.hero-section > .container,
.page-hero > .container,
.cta-band > .container,
section.bg-primary-custom > .container {
  max-width: 1100px !important;
  margin: 0 auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .section-padding {
    padding: 64px 0;
  }
  .section-title {
    font-size: 1.85rem;
  }

  .about-stats-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    gap: 2rem;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2rem;
  }
  .section-padding {
    padding: 56px 0;
  }

  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }

  .navbar-custom .navbar-collapse {
    background: white;
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-medium);
  }

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

  .navbar-custom .nav-link:hover,
  .navbar-custom .nav-link.active {
    color: var(--accent) !important;
    background: var(--accent-light) !important;
  }

  .page-hero {
    padding: 120px 0 56px;
  }

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

  .filter-buttons {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .about-stats-card {
    flex-direction: column;
    gap: 1rem;
  }
}
/* ---------- Dynamic Logo Color ---------- */
/* Default: Top of the page (Dark Background) */
.logo-text {
  color: #ffffff;
  transition: color 0.3s ease;
}

/* On Scroll: When navbar turns white */
.navbar.scrolled .logo-text {
  color: #1a1a1a !important; /* Dark text for visibility */
}
/* ---------- DARK MODE TEXT VISIBILITY FIX ---------- */

[data-theme="dark"] {
  /* Defining bright text colors for dark mode */
  --text-main-dark: #f8f9fa; /* Bright white for headings */
  --text-muted-dark: #cbd5e1; /* Light slate for paragraphs/list items */
}

/* 1. Fix Headings and Main Text */
[data-theme="dark"] body,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text-main-dark) !important;
}

/* 2. Fix Paragraphs, Lists, and Muted Text */
[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] span,
[data-theme="dark"] .text-muted {
  color: var(--text-muted-dark) !important;
}

/* 3. Fix Navbar Logo & Brand */
[data-theme="dark"] .navbar-brand .logo-text,
[data-theme="dark"] .navbar.scrolled .logo-text {
  color: #ffffff !important;
}

/* 4. Fix Service Cards Specific Text (If they have custom classes) */
[data-theme="dark"] .service-card h4,
[data-theme="dark"] .service-card p {
  color: var(--text-main-dark) !important;
}
/* ---------- DARK MODE BACKGROUND & FORM FIXES ---------- */

/* 1. Fix White Backgrounds (About Us section, Floating Stats, Contact Cards) */
[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light,
[data-theme="dark"] .card,
[data-theme="dark"] .about-stats-card,
[data-theme="dark"] .contact-info-card,
[data-theme="dark"] .contact-form-card,
[data-theme="dark"] div[style*="background: white"],
[data-theme="dark"] div[style*="background-color: white"],
[data-theme="dark"] section[style*="background: white"],
[data-theme="dark"] section[style*="background-color: white"] {
  background-color: #1f2937 !important; /* Sleek dark grey card background */
  border-color: #334155 !important;
}

/* 2. Fix Contact Form Inputs (Textboxes & Textareas) */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #0f172a !important; /* Deep dark blue for inputs */
  border: 1px solid #334155 !important;
  color: #f8f9fa !important;
}

/* 3. Fix Placeholder Text inside Forms */
[data-theme="dark"] .form-control::placeholder {
  color: #94a3b8 !important;
}

/* 4. Fix Form Input Focus State */
[data-theme="dark"] .form-control:focus {
  background-color: #1e293b !important;
  border-color: var(--accent, #007bff) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25) !important;
}

/* 5. Fix Section & Mobile Menu White Backgrounds */
[data-theme="dark"] .about-section {
  background-color: var(--bg-body) !important; /* Blends with dark body */
}

[data-theme="dark"] .navbar-custom .navbar-collapse {
  background-color: #0f172a !important; /* Deep dark blue for mobile menu */
  border-color: #334155 !important;
}

/* 6. Fix Form Labels Text Color */
[data-theme="dark"] label,
[data-theme="dark"] .form-label {
  color: #cbd5e1 !important;
}

/* ---------- 7. PREMIUM DARK MODE POLISH ---------- */

/* 7.1 Contrast & Legibility Sweep */
[data-theme="dark"] .text-faint {
  color: #94a3b8 !important;
}

[data-theme="dark"] .footer-links a {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .footer-links a:hover {
  color: #f8f9fa !important;
}

[data-theme="dark"] .footer-description,
[data-theme="dark"] .footer-copyright {
  color: #94a3b8 !important;
}

[data-theme="dark"] .scroll-top-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f8f9fa;
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .scroll-top-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* 7.2 Depth, Borders, and Shadows */
[data-theme="dark"] .card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .contact-info-card,
[data-theme="dark"] .contact-form-card,
[data-theme="dark"] .about-stats-card,
[data-theme="dark"] .mv-card {
  border-color: #334155 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

/* 7.3 Hover States & Glowing Transitions */
[data-theme="dark"] .service-card:hover {
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.15), 0 20px 40px -4px rgba(0, 0, 0, 0.6) !important;
  transform: translateY(-5px);
}

[data-theme="dark"] .nav-link:hover {
  color: #ffffff !important;
}

/* 7.4 Icons & SVGs Check */
[data-theme="dark"] .achievement-icon,
[data-theme="dark"] .contact-icon i,
[data-theme="dark"] .bi-check-circle-fill {
  color: #38bdf8 !important; /* Brightened accent blue for dark contrast */
}

/* 7.5 Footer & Global Elements */
[data-theme="dark"] .footer {
  background-color: #0f172a !important; /* Match deep dark body */
  border-top: 1px solid #1e293b !important;
}

[data-theme="dark"] .footer-bottom {
  border-top: 1px solid #1e293b !important;
}