/* ─── Custom NextJS Header ─── */

.somoscmi-nextjs-header {
  width: 100%;
  border-bottom: 1px solid #e4e4e7; /* zinc-200 */
  background-color: #ffffff;
  position: relative;
  z-index: 9999;
}

.somoscmi-nextjs-header-inner {
  max-width: 1024px; /* max-w-5xl ≈ 64rem */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px; /* py-4 px-6 */
}

.somoscmi-nextjs-logo {
  font-size: 1.25rem; /* text-xl */
  font-weight: 700;
  color: #18181b; /* zinc-900 */
  text-decoration: none;
}

/* Desktop Navigation */
.somoscmi-nextjs-desktop-nav {
  display: none; /* hidden on mobile */
  gap: 24px; /* gap-6 */
  align-items: center;
}

@media (min-width: 1024px) {
  /* lg breakpoint */
  .somoscmi-nextjs-desktop-nav {
    display: flex;
  }
}

.somoscmi-nextjs-link {
  font-size: 1.125rem; /* text-lg */
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  color: #52525b; /* zinc-600 */
}

.somoscmi-nextjs-link:hover {
  color: #18181b; /* zinc-900 */
}

.somoscmi-nextjs-link-blue {
  color: #2563eb; /* blue-600 */
}

.somoscmi-nextjs-link-blue:hover {
  color: #1e40af; /* blue-800 */
}

.somoscmi-nextjs-link-rose {
  color: #e11d48; /* rose-600 */
}

.somoscmi-nextjs-link-rose:hover {
  color: #9f1239; /* rose-800 */
}

.somoscmi-nextjs-link-emerald {
  color: #059669; /* emerald-600 */
}

.somoscmi-nextjs-link-emerald:hover {
  color: #065f46; /* emerald-800 */
}

/* Mobile Toggle Button */
.somoscmi-nextjs-mobile-toggle {
  display: flex;
  padding: 8px;
  border-radius: 6px;
  color: #52525b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.somoscmi-nextjs-mobile-toggle:hover {
  color: #18181b;
  background-color: #f4f4f5; /* zinc-100 */
}

@media (min-width: 1024px) {
  .somoscmi-nextjs-mobile-toggle {
    display: none;
  }
}

.somoscmi-nextjs-icon {
  width: 24px;
  height: 24px;
}

/* ─── Mobile Modal ─── */

.somoscmi-nextjs-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
}

.somoscmi-nextjs-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.somoscmi-nextjs-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5); /* bg-black/50 */
  backdrop-filter: blur(4px); /* backdrop-blur-sm */
}

.somoscmi-nextjs-modal-content {
  position: relative;
  background-color: #ffffff;
  border-radius: 1rem; /* rounded-2xl */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
  width: 100%;
  max-width: 24rem; /* max-w-sm ≈ 24rem */
  padding: 32px; /* p-8 */
  transform: scale(0.95) translateY(-16px); /* scale-95 -translate-y-4 */
  transition: transform 0.3s ease-in-out;
}

.somoscmi-nextjs-modal.is-open .somoscmi-nextjs-modal-content {
  transform: scale(1) translateY(0); /* scale-100 translate-y-0 */
}

.somoscmi-nextjs-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px;
  border-radius: 9999px;
  color: #a1a1aa; /* zinc-400 */
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.somoscmi-nextjs-modal-close:hover {
  color: #52525b; /* zinc-600 */
  background-color: #f4f4f5; /* zinc-100 */
}

.somoscmi-nextjs-modal-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px; /* gap-6 */
  margin-top: 8px; /* mt-2 */
}

@media (min-width: 1024px) {
  .somoscmi-nextjs-modal {
    display: none !important;
  }
}

/* Prevent body scroll when modal is open */
body.somoscmi-nextjs-modal-open {
  overflow: hidden;
}

/* Offset Elementor's fixed mobile header so it sits below the custom header */
@media (max-width: 1023px) {
  .elementor-location-header > div:nth-child(2) {
    top: 72px !important;
  }
}
