/* ============================================================
   LCE – Lopes e Caldas Engenharia
   Interactive World Map Styles (Light Mode) – mapa.css
   ============================================================ */

/* Page Custom Base styling */
.map-page-body {
  background-color: var(--light);
}

.map-hero {
  padding: 120px 0 100px 0;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, var(--light) 100%);
  position: relative;
  overflow: hidden;
}

.map-hero-2 {
  padding: 60px 0 0px 0;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, var(--light) 100%);
  position: relative;
  overflow: hidden;
}


/* Layout Grid */
.map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}

@media (min-width: 1025px) {
  .map-grid {
    grid-template-columns: 2.3fr 1.4fr;
  }
}

/* Map Card Wrapper (Borderless & Transparent) */
.map-view-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

/* Map Legend Badges */
.map-legend-badges {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

@media (min-width: 768px) {
  .map-legend-badges {
    flex-direction: row;
  }
}

.map-legend-badges .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  color: var(--dark);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.map-legend-badges .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  animation: hq-pulse 1.8s infinite;
}

.map-legend-badges .active-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary);
  border-radius: 50%;
}

@keyframes hq-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* SVG Map styling */
.map-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 350px;
  margin-top: 30px;
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .map-wrapper {
    min-height: 480px;
    margin-top: 40px;
    margin-bottom: 60px;
  }
}

.map-wrapper svg {
  width: 100%;
  height: auto;
  max-height: 550px;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.06));
  transform: scale(2.20);
  transform-origin: 38% 67%;
}

/* Map Path details */
.map-wrapper svg path {
  fill: rgba(0, 0, 0, 0.035);
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 0.8px;
  transition: fill 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    stroke 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    filter 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Inactive countries hovered feedback */
.map-wrapper svg path:not(.active-country):not(.hq-country):hover {
  fill: rgba(0, 0, 0, 0.08);
}

/* Active Countries */
.map-wrapper svg path.active-country {
  fill: rgba(237, 110, 4, 0.3);
  stroke: rgba(237, 110, 4, 0.7);
  stroke-width: 0.9px;
  cursor: pointer;
}

.map-wrapper svg path.active-country:hover,
.map-wrapper svg path.active-country.highlight-map,
.map-wrapper svg path.active-country.selected-map {
  fill: rgba(237, 110, 4, 0.85);
  stroke-width: 1.2px;
  filter: drop-shadow(0 0 10px rgba(237, 110, 4, 0.4));
}

/* HQ Country (Portugal) */
.map-wrapper svg path.hq-country {
  fill: rgba(59, 130, 246, 0.32);
  stroke: rgba(59, 130, 246, 0.55);
  stroke-width: 1px;
  cursor: pointer;
}

.map-wrapper svg path.hq-country:hover,
.map-wrapper svg path.hq-country.highlight-map,
.map-wrapper svg path.hq-country.selected-map {
  fill: rgba(59, 130, 246, 0.85);
  stroke: #ffffff;
  stroke-width: 1.5px;
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.4));
}

/* Tooltip */
.map-tooltip {
  position: fixed;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 10px 15px;
  color: var(--dark);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.map-tooltip .tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 5px;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
  color: var(--dark);
}

.map-tooltip .tooltip-header .fi {
  width: 18px;
  height: 13.5px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  display: inline-block;
  background-size: cover;
  background-position: center;
}

.map-tooltip .tooltip-status {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
}

.map-tooltip .tooltip-status.hq {
  color: #3b82f6;
}

/* Sidebar Boxes (Glassmorphism Light) */
.map-sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-box {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
  color: var(--dark);
}

.sidebar-box h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 10px;
  letter-spacing: 0.3px;
  color: var(--dark);
}

/* Selector Dropdown */
.countries-select {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ed6e04' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.countries-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(237, 110, 4, 0.15);
}

.countries-select option {
  padding: 10px;
  background-color: #ffffff;
  color: var(--dark);
}

/* Country Details Card */
.country-details-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.country-details-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  border-radius: 16px 0 0 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.country-details-card.has-data::before {
  opacity: 1;
}

.country-details-card.hq-card::before {
  background: #3b82f6;
}

.card-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
  color: rgba(0, 0, 0, 0.4);
}

.card-empty-state svg {
  stroke: rgba(0, 0, 0, 0.25);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0px);
  }
}

.card-empty-state p {
  font-size: 13px;
  line-height: 1.5;
  max-width: 220px;
}

/* Card Content Details */
.card-content {
  opacity: 1;
  transition: opacity 0.2s ease;
}

.hidden {
  display: none !important;
}

.country-details-card .card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.country-details-card .country-flag {
  width: 48px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: block;
  background-size: cover;
  background-position: center;
}

.country-details-card .country-name {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--dark);
}

.country-details-card .country-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.8px;
}

.country-details-card.hq-card .country-status {
  color: #2563eb;
}

.country-details-card .card-body h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.sectors-section {
  margin-bottom: 20px;
}

.sectors-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sector-tag {
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 4px 10px;
  border-radius: 15px;
  color: rgba(0, 0, 0, 0.7);
}

.desc-section p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
  margin: 0;
}

.country-details-card .card-footer {
  margin-top: 25px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 15px;
}

.country-details-card .btn-link-arrow {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.country-details-card .btn-link-arrow:hover {
  color: var(--primary-light);
  gap: 10px;
}

.country-details-card.hq-card .btn-link-arrow {
  color: #2563eb;
}

.country-details-card.hq-card .btn-link-arrow:hover {
  color: #3b82f6;
}

/* Layout modifications for main header when on light page */
.map-page-body .site-header {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
  .countries-list-box {
    display: none !important;
  }
}