@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800&display=swap');

/* Reset básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Header */
.header {
  position: fixed;
  width: 100%;
  backdrop-filter: blur(8px);
  box-shadow: 0px 4px 10px 0px rgba(32, 61, 124, 0.26);
  z-index: 1000;
  background-color: rgba(218, 218, 218, 0.2);
  top: 0;
  left: 0;
}

/* Navigation */
.nav {
  margin: 0 auto;
  display: flex;
  max-width: 1130px;
  align-items: center;
  justify-content: space-between;
  height: 65px;
  padding: 0 40px;
}

@media (min-width: 1024px) {
  .nav {
    height: 70px;
    padding: 0 4px;
  }
  .header {
    background-color: rgba(218, 218, 218, 0.2);
  }
}

@media (max-width: 1023px) {
  .header {
    background-color: white;
  }
}

/* Logo */
.logo-container {
  display: flex;
  flex: 1;
}

.logo {
  height: 42px;
  width: 100px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .logo {
    height: 50px;
    width: 140px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile buttons */
.mobile-buttons {
  display: flex;
  gap: 16px;
}

@media (min-width: 1024px) {
  .mobile-buttons {
    display: none;
  }
}

.mobile-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.icon {
  width: fit-content;
  height: fit-content;
}

.mobile-btn .icon {
    font-size: 18px;
    color: #203D7C;
}

.mobile-btn:hover .icon {
    color: #666;
}

/* Desktop Menu */
.desktop-menu {
  display: none;
  gap: 48px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

@media (min-width: 1024px) {
  .desktop-menu {
    display: flex;
    gap: 48px;
  }
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-btn {
  font-family: 'Encode Sans', sans-serif;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px !important;
  font-weight: 600;
  padding: 8px 0px;
  color: #333;
}

.dropdown-btn:hover {
  color: #666;
}

.dropdown-content {
  position: absolute;
  top: 54px;
  background: #203D7C;
  min-width: 400px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  border-radius: 0 0 16px 16px;
  padding: 0;
  margin-top: 0;
  display: flex;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.dropdown-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-arrow {
  position: absolute;
  bottom: -18px;
  left: 35%;
  width: 24px;
  height: 18px;
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.dropdown-arrow.active {
  opacity: 1;
  visibility: visible;
}

.dropdown-arrow svg {
  width: 100%;
  height: 100%;
}

/* Secciones como columnas */
.dropdown-section {
  padding: 20px 40px;
  margin-bottom: 0;
  flex: 1;
}

.dropdown-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 8px 6px;
  color: white;
  padding-bottom: 8px;
}

.dropdown-item {
  display: block;
  padding: 6px 6px;
  text-decoration: none;
  color: #c9c9c9;
  font-size: 14px;
  border-radius: 4px;
}

.dropdown-item:hover {
  color: white;
  background-color: #203D7C;
  text-decoration: none;
}

/* Posicionamiento específico para cada dropdown */
.cotizadores-dropdown {
  left: -172px;
}

.portales-dropdown {
  left: -68px;
  min-width: 250px;
}

.seguros-dropdown {
  left: -224px;
  min-width: 500px;
}

/* Mobile Menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1002;
}

.mobile-menu-overlay.active {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-menu-overlay {
    display: none !important;
  }
}

.mobile-menu {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  background: #203d7c;
  color: white;
  border-radius: 0 0 16px 16px;
  max-height: calc(100vh - 80px);
}

.mobile-menu-content {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 128px);
}

.mobile-item {
  margin: 0;
  margin-bottom: 1px;
  background: none;
}

.mobile-link {
  font-family: 'Encode Sans', sans-serif;
  font-weight: 500;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  padding: 12px 14px 12px 12px;
  font-size: 16px;
  line-height: 1.75;
  color: white;
  text-decoration: none;
}

.mobile-link:hover {
  background: #4a5568;
  color: white;
  text-decoration: none;
}

.mobile-dropdown {
  margin: 0px;
  margin-bottom: 1px;
}

.mobile-dropdown-btn {
  font-family: 'Encode Sans', sans-serif;
  font-weight: 500;
  display: flex;
  width: 100%;
  align-items: center;
  border-radius: 8px;
  padding: 12px 14px 12px 12px;
  font-size: 16px;
  line-height: 1.75;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  justify-content: space-between;
}

.mobile-dropdown-btn:hover {
  background: #4a5568;
}

.chevron {
  margin: 0 8px;
  transition: transform 0.2s ease;
}

.chevron.rotated {
  transform: rotate(180deg);
}

.mobile-dropdown-content {
  margin-top: 8px;
  padding-left: 8px;
  display: none;
}

.mobile-dropdown-content.active {
  display: block;
}

.mobile-section-title {
  margin: 0 24px;
  font-size: 14px;
  color: #e2e8f0;
}

.mobile-divider {
  margin: 8px 24px;
  border: none;
  border-top: 1px solid #4a5568;
}

.mobile-dropdown-item {
  display: block;
  margin: 0 10px;
  padding: 8px 24px;
  color: white;
  font-size: 14px;
  text-decoration: none;
}

.mobile-dropdown-item:hover {
  background: #4a5568;
  color: white;
  text-decoration: none;
}

/* Ocultar elementos por defecto */
.hidden {
  display: none;
}

/* Espaciado para el body para que el contenido no quede detrás del header fijo */
body {
  padding-top: 65px;
}

@media (min-width: 1024px) {
  body {
    padding-top: 70px;
  }
}