@import url('variables.css');

/* ==========================================================================
   RESET & BASE STYLES (MODERN WHITE THEME)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  line-height: 1.65;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
}

/* Subtle background glow for crisp modern SaaS agency style */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 520px;
  background: var(--hero-mesh-gradient);
  z-index: -1;
  pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-secondary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

::selection {
  background: var(--accent-primary);
  color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
  position: relative;
}

.section-sm {
  padding: 50px 0;
}

.section-bg-alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-bg-subtle {
  background-color: #fafbfc;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Section Header Typography */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px auto;
}

.section-header.text-left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-accent-subtle);
  border: 1px solid #bfdbfe;
  color: var(--accent-primary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 8px 24px 0 rgba(37, 99, 235, 0.42);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: #cbd5e1;
  color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1.5px solid var(--accent-primary);
}

.btn-outline:hover {
  background: var(--bg-accent-subtle);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 34px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-white {
  background: #ffffff;
  color: var(--accent-primary);
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  background: #f8fafc;
  color: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* ==========================================================================
   TOPBAR & HEADER (REFINED LUXURY & MODERN AGENCY STANDARD)
   ========================================================================== */
.topbar {
  background: #090d16;
  color: #94a3b8;
  font-size: 0.815rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1001;
}

.topbar-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap !important;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #93c5fd;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap !important;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #cbd5e1;
  font-weight: 500;
  transition: color var(--transition-fast);
  white-space: nowrap !important;
  text-decoration: none;
}

.topbar-item strong {
  color: #f8fafc;
  font-weight: 700;
}

.topbar-item:hover {
  color: #60a5fa;
}

.topbar-item svg {
  width: 14px;
  height: 14px;
  color: #60a5fa;
  flex-shrink: 0;
}

.topbar-divider {
  width: 1px;
  height: 13px;
  background: rgba(255, 255, 255, 0.14);
}

.topbar-whatsapp {
  color: #4ade80 !important;
  font-weight: 600;
}

.topbar-whatsapp svg {
  color: #22c55e !important;
}

.topbar-whatsapp:hover {
  color: #86efac !important;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  animation: pulseGlow 1.8s infinite;
}

/* Main Navigation Header */
header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  transition: all var(--transition-normal);
}

header.scrolled {
  height: 70px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.07);
  border-bottom-color: #cbd5e1;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

/* Modern Logo */
.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 50%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  flex-shrink: 0;
}

.logo-wrapper:hover .logo-icon {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.03em;
}

.logo-name span {
  color: var(--accent-primary);
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-tagline {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #64748b;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1;
}

/* Navigation Links */
nav {
  display: flex;
  align-items: center;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

nav ul li {
  position: relative;
}

nav ul li a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-family: var(--font-heading);
  font-size: 0.91rem;
  font-weight: 600;
  color: #334155;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap !important;
  position: relative;
  text-decoration: none;
}

nav ul li a:hover {
  color: var(--accent-primary);
  background-color: rgba(37, 99, 235, 0.05);
}

/* Modern Clean Active Indicator */
nav ul li a.active {
  color: var(--accent-primary);
  font-weight: 700;
  background-color: rgba(37, 99, 235, 0.08);
}

nav ul li a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 2.5px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

nav ul li a svg.nav-chevron {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
  transition: transform var(--transition-fast);
  opacity: 0.7;
}

/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border-light);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition-normal);
  z-index: 100;
}

.dropdown-menu.wide-menu {
  width: 580px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown:hover a svg.nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.dropdown-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  background: transparent !important;
  transition: all var(--transition-fast) !important;
}

.dropdown-item:hover {
  background: var(--bg-accent-subtle) !important;
}

.dropdown-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-top: 2px;
}

.dropdown-icon svg {
  width: 18px;
  height: 18px;
}

.dropdown-content {
  display: flex;
  flex-direction: column;
}

.dropdown-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dropdown-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.35;
  margin-top: 2px;
}

/* Header Action Buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: #f8fafc;
  border: 1px solid var(--border-light);
  white-space: nowrap !important;
  transition: all var(--transition-fast);
  text-decoration: none;
  flex-shrink: 0;
}

.header-phone-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.header-phone-icon svg {
  width: 13px;
  height: 13px;
}

.header-phone-link:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent-gradient);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  white-space: nowrap !important;
  transition: all var(--transition-fast);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.header-cta-btn:hover {
  background: var(--accent-gradient-hover);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
  color: #ffffff;
}

.header-cta-btn svg {
  width: 15px;
  height: 15px;
  transition: transform var(--transition-fast);
}

.header-cta-btn:hover svg {
  transform: translateX(3px);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 38px;
  height: 38px;
  padding: 10px 9px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}


.cta-text-full {
  display: inline;
}

.cta-text-mobile {
  display: none;
}

.mobile-drawer-header {
  display: none;
}

.mobile-drawer-phone svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  flex-shrink: 0;
}

.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 998;
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}


/* ==========================================================================
   CARDS & COMMON COMPONENTS (CLEAN WHITE THEME)
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--bg-accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 20px;
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Stat Box */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* CTA Banner Box */
.cta-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid #334155;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45) 0%, rgba(124, 58, 237, 0.1) 60%, transparent 80%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-banner-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.cta-banner h2 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 16px;
}

.cta-banner p {
  color: #cbd5e1;
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.cta-banner-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==========================================================================
   FOOTER (CLEAN WHITE THEME WITH HIGH-CONTRAST ACCENTS)
   ========================================================================== */
footer {
  background-color: #f8fafc;
  border-top: 1px solid var(--border-light);
  padding-top: 80px;
  padding-bottom: 30px;
  color: var(--text-secondary);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 1.4fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer-brand p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.footer-contact-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-primary);
  font-weight: 500;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.footer-column h4 {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 700;
  position: relative;
  padding-bottom: 8px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links li a:hover {
  color: var(--accent-primary);
  transform: translateX(3px);
}

.newsletter-box p {
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.newsletter-form input {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.newsletter-form input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
   SCROLL ANIMATIONS (INTERSECTION OBSERVER)
   ========================================================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.appear {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 1280px) {
  .nav-container {
    padding: 0 20px;
    gap: 12px;
  }
  nav ul li a {
    padding: 7px 9px;
    font-size: 0.88rem;
  }
  .header-phone-link {
    padding: 7px 12px;
    font-size: 0.85rem;
  }
  .header-cta-btn {
    padding: 9px 16px;
    font-size: 0.86rem;
  }
}

@media (max-width: 1140px) {
  .header-phone-link {
    display: none;
  }
  nav ul li a {
    padding: 7px 8px;
    font-size: 0.86rem;
  }
}

@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-brand {
    grid-column: span 3;
  }
}

@media (max-width: 992px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .topbar-right .topbar-item:not(.topbar-phone) {
    display: none;
  }
  
  /* Header Tablet/Mobile Adjustments */
  header {
    height: 72px;
  }
  .nav-container {
    padding: 0 20px;
    gap: 12px;
    width: 100%;
  }
  .header-phone-link {
    display: none;
  }
  .header-cta-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }
  .cta-text-full {
    display: none;
  }
  .cta-text-mobile {
    display: inline;
  }
  .mobile-toggle {
    display: flex;
  }

  /* Full-width slide-in mobile navigation drawer */
  nav {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - 72px);
    background: #ffffff;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.18);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 20px 60px 20px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    display: flex !important;
    flex-direction: column !important;
  }

  nav.active {
    transform: translateX(0);
  }

  /* Mobile Drawer Action Header */
  .mobile-drawer-header {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
  }

  .mobile-drawer-cta {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
  }

  .mobile-drawer-phone {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: #0f172a;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
  }

  .mobile-drawer-phone svg {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    color: var(--accent-primary);
    flex-shrink: 0;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  nav ul li {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li a {
    width: 100%;
    padding: 13px 12px;
    font-size: 1.02rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-sm);
  }

  nav ul li a:hover,
  nav ul li a.active {
    background-color: var(--bg-accent-subtle);
    color: var(--accent-primary);
  }

  nav ul li a.active::after {
    display: none;
  }

  /* Disable desktop hover on mobile/tablets completely */
  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:hover .dropdown-menu.wide-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
  }

  /* Dropdown on mobile expands inside the list as an accordion */
  .dropdown-menu,
  .dropdown-menu.wide-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    display: none !important;
    grid-template-columns: 1fr !important;
    box-shadow: none !important;
    border: 1px solid var(--border-light) !important;
    background: #f8fafc !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px !important;
    margin: 6px 0 10px 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    gap: 4px !important;
  }

  .nav-dropdown.open > .dropdown-menu,
  .nav-dropdown.open > .dropdown-menu.wide-menu {
    display: flex !important;
    flex-direction: column !important;
  }

  .dropdown-item {
    width: 100% !important;
    padding: 9px 12px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin-bottom: 4px !important;
  }

  .dropdown-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    flex-shrink: 0;
  }

  .dropdown-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .dropdown-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
  }

  .dropdown-desc {
    display: none !important;
  }

  .nav-dropdown.open > a svg.nav-chevron {
    transform: rotate(180deg);
  }
}

@media (max-width: 640px) {
  .section {
    padding: 60px 0;
  }
  .section-header h2 {
    font-size: 2rem;
  }
  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    grid-column: span 1;
  }
  .cta-banner {
    padding: 40px 24px;
  }
  .cta-banner h2 {
    font-size: 1.85rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .topbar {
    display: none;
  }

  /* Mobile Header Scaling */
  header {
    height: 66px;
  }
  .nav-container {
    padding: 0 16px;
    gap: 8px;
  }
  .logo-wrapper {
    gap: 9px;
  }
  .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .logo-icon svg {
    width: 18px;
    height: 18px;
  }
  .logo-name {
    font-size: 1.25rem;
  }
  .logo-tagline {
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    margin-top: 2px;
  }
  .header-cta-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
    gap: 4px;
  }
  .header-cta-btn svg {
    width: 12px;
    height: 12px;
  }
  .mobile-toggle {
    width: 36px;
    height: 36px;
    padding: 9px 8px;
  }
  nav {
    top: 66px;
    height: calc(100vh - 66px);
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 16px 50px 16px;
  }
}

@media (max-width: 400px) {
  /* On compact smartphones, hide the mini audit button from the header bar so it NEVER overflows */
  .header-cta-btn {
    display: none !important;
  }
  .logo-name {
    font-size: 1.18rem;
  }
}
