/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Inter, sans-serif;
  background-color: #f4f4f4;
}

/* Header container with logo */
.header-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  padding: 3rem 4rem 3rem 6rem;
  min-height: 160px;
  border-radius: 15px;
  overflow: hidden;
}

/* Header background pattern */
.header-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

.header-wave-pattern {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transform: scale(1.1);
}

/* Main heading */
h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  margin: 0;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.8);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  backdrop-filter: blur(5px);
  display: inline-block;
  width: fit-content;
}



/* Pacific Dataviz specific styling */
.pacific-dataviz {
  color: white;
}

/* Challenge specific styling */
.challenge {
  color: #F5B79E;
}

/* Regional Quote Section */
.regional-quote-section {
  padding: 30px 20px;
  background-color: #f9f9f9;
  margin: 20px 0;
  border-radius: 12px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.regional-quote {
  margin: 0;
  padding: 0;
  font-style: italic;
  border-left: 4px solid #1F98BF;
  padding-left: 20px;
}

.regional-quote p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  margin-bottom: 15px;
  font-weight: 400;
}

.regional-quote footer {
  font-style: normal;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4;
}

.regional-quote cite {
  font-weight: 600;
  color: #1F98BF;
  font-style: normal;
}

.regional-quote strong {
  color: #333;
  font-weight: 700;
}

/* Strategy section */
.strategy-section {
  padding: 0px 0 10px 0 !important;
  margin-top: -10px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background-color: #f4f4f4;
  overflow: hidden;
}

.strategy-logo {
  height: auto;
  width: auto;
  max-height: 180px;
  animation: slideInFromRight 1.8s ease-out forwards;
  transform: translateX(100vw);
}

.strategy-section h2 {
  font-family: Inter, sans-serif;
  font-size: 3em;
  font-weight: 700;
  color: #444;
  margin: 0;
  animation: slideInFromRight 1.8s ease-out forwards;
  transform: translateX(100vw);
}



/* Slide in animation */
@keyframes slideInFromRight {
  from {
    transform: translateX(100vw);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}



/* Slide up from map animation */
@keyframes slideUpFromMap {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile responsive styles */
@media screen and (max-width: 768px) {
  /* Header adjustments */
  .header-container {
    min-height: 140px;
    padding: 2.5rem 1rem;
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    margin: 1rem;
  }
  
  .header-background {
    transform: scale(1.2);
  }
  
  .header-wave-pattern {
    transform: scale(1.3);
  }
  
  h1 {
    font-size: 1.8rem;
    text-align: center;
    line-height: 1.3;
    word-spacing: 0.1em;
    letter-spacing: 0.02em;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
  }
  
  .pacific-dataviz {
    color: white;
  }
  
  .challenge {
    color: #F5B79E;
  }
  
  .header-logo {
    height: 60px;
    align-self: center;
  }
  
  /* Strategy section mobile */
  .strategy-section {
    flex-direction: column;
    gap: 15px;
    padding: 5px 1rem;
    margin-top: -10px;
  }
  
  .strategy-logo {
    max-height: 160px;
  }
  
  .strategy-section h2 {
    font-size: 1.8rem;
    text-align: center;
    line-height: 1.3;
    word-spacing: 0.05em;
    letter-spacing: 0.01em;
    padding: 0 0.5rem;
  }
  
  /* Thematic area mobile */
  .thematic-area {
    padding: 0px 1rem 25px 1rem;
    margin-top: 1%;
  }
  
  .thematic-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .thematic-area h2 {
    font-size: 1.1rem;
    line-height: 1.4;
    word-spacing: 0.05em;
    letter-spacing: 0.01em;
    padding: 0 0.5rem;
  }
  
  .thematic-icon {
    height: 30px;
    transform: translateY(-12%);
  }
  
  /* Leaders section mobile */
  .leaders-section {
    padding: 15px 1rem 10px 1rem;
  }
  
  .leaders-section h3 {
    font-size: 0.875rem;
    line-height: 1.4;
    padding-bottom: 15px;
  }
  
  /* Map section mobile - match card sizing */
  .map-section {
    padding: 0 1rem;
    margin: 10px 0;
  }
  
  .pacific-map {
    width: 100%;
    height: auto;
    max-width: 450px;
    object-fit: contain;
    border-radius: 5px;
    margin: 0 auto;
    display: block;
    transform: scale(1.2);
  }
  
  .distribution-map {
    padding: 20px;
    width: 100%;
    max-width: 450px;
    overflow: visible;
    position: relative;
    margin: 0 auto;
    transform: scale(1.2);
    transform-origin: center;
  }
  
  .distribution-map > img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
  }
  
  /* Country markers mobile - scaled size */
  .map-point {
    width: 18px !important;
    height: 18px !important;
    border-radius: 9px !important;
    border-width: 2px !important;
  }
  
  /* Force mobile marker size with higher specificity */
  .distribution-map .map-point {
    width: 18px !important;
    height: 18px !important;
    border-radius: 9px !important;
    border-width: 2px !important;
  }
  

  
  .map-point:hover,
  .map-point:active,
  .map-point:focus,
  .map-point.active {
    width: 320px;
    max-width: 95vw;
    min-height: 200px;
    max-height: 350px;
    left: 50% !important;
    transform: translateX(-50%) translateY(-50%);
    margin-left: 0;
  }
  
  .map-point .content {
    padding: 8px;
    font-size: 10px;
  }
  
  .map-point .content h3 {
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.2;
  }
  
  .map-point .content p {
    font-size: 10px;
    line-height: 1.3;
  }
  
  /* Row divider mobile spacing */
  .row-divider {
    margin: 5px 0 60px 0 !important;
  }
  
  /* Cards section mobile */
  .cards-container {
    padding: 1rem;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 0 !important;
  }
  
  .card {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    height: 200px;
  }
  
  .card-content {
    padding: 15px;
  }
  
  .card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .card p {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .card .flag {
    width: 35px;
    height: 19px;
  }
  
  /* Mobile carousel adjustments - show one card at a time */
  .card-group {
    gap: 0;
    justify-content: center;
  }
  
  .col {
    width: 90%;
    max-width: 300px;
    display: none; /* Hide all cards by default */
  }
  
  /* Show only the first card in each group on mobile */
  .card-group .col:first-child {
    display: block;
  }
  
  /* Adjust carousel scrollbar for mobile - show individual cards (16 total) */
  .carousel-scrollbar {
    width: 280px;
  }
  
  .carousel-scrollbar-thumb {
    width: 17.5px; /* 1/16th of track width for 16 individual cards */
  }
}

@media screen and (max-width: 480px) {
  /* Extra small mobile adjustments */
  .strategy-logo {
    max-height: 180px;
  }
  
  .row-divider {
    margin: 5px 0 60px 0 !important;
  }
  
  .cards-container {
    margin-top: 0 !important;
  }
  
  h1 {
    font-size: 1.4rem;
    line-height: 1.4;
    word-spacing: 0.08em;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    border-radius: 6px;
  }
  
  .pacific-dataviz {
    color: white;
  }
  
  .challenge {
    color: #F5B79E;
  }
  
  .strategy-section h2 {
    font-size: 1.5rem;
    line-height: 1.4;
    word-spacing: 0.04em;
    padding: 0 1rem;
  }
  
  .thematic-area h2 {
    font-size: 1.2rem;
    line-height: 1.5;
    word-spacing: 0.04em;
    padding: 0 1rem;
  }
  
  .regional-quote-section {
    padding: 20px 15px;
    margin: 15px 10px;
    border-radius: 8px;
  }
  
  .regional-quote p {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .regional-quote footer {
    font-size: 0.85rem;
  }
  
  .map-point:focus,
  .map-point.active {
    width: 300px !important;
    max-width: 95vw !important;
    min-height: 180px !important;
    z-index: 999 !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-50%) !important;
    margin-left: 0 !important;
  }
  
  .map-point:focus .content,
  .map-point.active .content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 12px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }
  
  .map-point:focus .content h3,
  .map-point.active .content h3 {
    font-size: 13px !important;
    margin-bottom: 6px !important;
    font-weight: bold !important;
  }
  
  .map-point:focus .content p,
  .map-point.active .content p {
    font-size: 10px !important;
    line-height: 1.4 !important;
  }
  
  .card {
    height: 180px;
  }
  
  .card-content {
    padding: 12px;
  }
  
  .card h3 {
    font-size: 15px;
  }
  
  .card p {
    font-size: 12px;
  }
}

/* Thematic area section */
.thematic-area {
  padding: 0px 0 20px 0 !important;
  text-align: center;
  background-color: #f4f4f4;
  margin-top: 1% !important;
}

.thematic-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: slideUpFromMap 0.8s ease-out 2.2s forwards;
  transform: translateY(100px);
  opacity: 0;
}

.thematic-area h2 {
  font-family: Inter, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #1F98BF;
  margin: 0;
  padding-bottom: 20px;
}

.thematic-icon {
  height: 55px;
  width: auto;
  object-fit: contain;
  transform: translateY(-8%);
}

.thematic-area p {
  margin-top: 0px;
}

.leaders-section {
  padding: 20px 0 10px 0;
  text-align: center;
  background-color: #f4f4f4;
  transform: translateY(5%);
}

.leaders-section h3 {
  font-family: Inter, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F98BF;
  margin: 0;
  padding-bottom: 10px;
}

/* Header logo */
.header-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: invert(1);
  background: transparent;
  position: relative;
  z-index: 2;
}

/* Main wrapper container */
.wrapper {
  width: 90%;
  margin: 0 auto;
  max-width: 80rem;
}

/* Carousel container */
.carousel-container {
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding-bottom: 25px;
}

/* Animation area between cards and scrollbar */
.carousel-animation-area {
  position: absolute;
  bottom: 120px;
  left: 0;
  right: 0;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
  z-index: 998;
}

/* Animation area for birds above cards */
.carousel-bird-area {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 180px;
  overflow: hidden;
  pointer-events: none;
  z-index: 998;
}

/* Fish animations (swimming left) */
.fish {
  position: absolute;
  width: 80px;
  height: 60px;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 9999;
}

.fish.active {
  opacity: 1;
  animation: fishSwimLeft 3s linear infinite;
}

.fish.fish-1 {
  background-image: url('fish1.png');
}

.fish.fish-2 {
  background-image: url('fish2.png');
}

.fish.fish-3 {
  background-image: url('fish3.png');
}

.fish.fish-4 {
  background-image: url('fish4.png');
}

@keyframes fishSwimLeft {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100px); }
}

/* Bird animations (flying right) - positioned above cards */
.turtle {
  position: absolute;
  width: 100px;
  height: 75px;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 9999;
}

.turtle.active {
  opacity: 1;
  animation: turtleSwimRight 4s linear infinite;
}

.turtle.turtle-small {
  background-image: url('turtle1.png');
}

.turtle.turtle-medium {
  background-image: url('turtle2.png');
}

.turtle.turtle-large {
  background-image: url('turtle3.png');
}

.turtle.turtle-medium2 {
  background-image: url('turtle4.png');
}

@keyframes turtleSwimRight {
  0% { transform: translateX(-100px); }
  100% { transform: translateX(calc(100vw + 100px)); }
}

/* Custom horizontal scroll bar */
.carousel-scrollbar {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 8px;
  background-color: #2EC5CB;
  border-radius: 4px;
  cursor: pointer;
}

.carousel-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 75px; /* 25% of track width for 4 groups */
  height: 100%;
  background-color: #20888C;
  border-radius: 4px;
  transition: left 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: grab;
}

.carousel-scrollbar-thumb:active {
  cursor: grabbing;
}

.carousel-track {
  position: relative;
  height: 780px;
  background: url('./solomon_waters_v2_background.png');
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  padding: 80px 20px 40px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin: 20px 0;
}

.card-group {
  position: absolute;
  top: 110px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  transform: translateX(100%);
  transition: all 2.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}

.card-group.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.card-group.prev {
  opacity: 0;
  transform: translateX(-100%);
}

.card-group.next {
  opacity: 0;
  transform: translateX(100%);
}

/* Individual card column */
.col {
  width: calc(25% - 1.5rem);
  max-width: 250px;
  margin: 0;
  cursor: pointer;
}

/* Grid container for cards (legacy support) */
.cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Cards container */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 10px auto 20px auto;
}

/* Horizontal divider line removed */

/* Pacific Ocean Map Section */
.map-section {
  width: 100%;
  text-align: center;
  margin: 5px 0 15px 0;
  padding: 0 2rem;
}

.pacific-map {
  max-width: calc(100% + 5px);
  width: calc(100% + 5px);
  height: auto;
  transform: scale(1.01);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Interactive Map Points Styling */
.distribution-map {
  position: relative;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1200px;
}

.distribution-map > img {
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
  height: auto;
  max-width: 100%;
}

.map-point {
  cursor: pointer;
  outline: none;
  z-index: 100;
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  opacity: 0.8;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease-in-out 0.25s, width 0.25s ease-in-out 0.25s, height 0.25s ease-in-out 0.25s, z-index 0.25s ease-in-out 0.25s;
  background: rgba(26, 26, 26, 0.85);
  border: 5px solid rgb(139, 201, 226);
}

.map-point .content {
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  width: 100%;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  position: absolute;
  top: 0;
  padding: 10px;
  box-sizing: border-box;
  color: white;
  font-size: 12px;
  text-align: left;
}

.map-point:hover,
.map-point:active,
.map-point:focus,
.map-point.active {
  margin: 0;
  padding: 0;
  opacity: 1;
  width: 350px;
  height: auto;
  min-height: 240px;
  max-height: 400px;
  color: white;
  z-index: 1000;
  transition: opacity 0.25s ease-in-out, width 0.25s ease-in-out, height 0.25s ease-in-out;
  background: rgba(26, 26, 26, 0.95);
  border-radius: 10px;
}

.map-point:hover .content,
.map-point:active .content,
.map-point:focus .content,
.map-point.active .content {
  opacity: 1;
  transition: opacity 0.25s ease-in-out 0.25s;
  overflow: visible;
  height: auto;
}

.map-point .content h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: rgb(175, 225, 250);
  font-weight: bold;
}

.map-point .content p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.map-point .content p br {
  display: block;
  content: "";
  margin-top: 12px;
  margin-bottom: 12px;
}

/* 3D container for flip effect */
.container {
  transform-style: preserve-3d;
  perspective: 1000px;
  position: relative;
  background: transparent !important;
}

.col {
  background: transparent !important;
}

.card-group {
  background: transparent !important;
}

.cards-wrapper {
  background: transparent !important;
}

/* Common styles for front and back of cards */
.front,
.back {
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  text-align: center;
  min-height: 575px;
  color: #fff;
  font-size: 1.5rem;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  backface-visibility: hidden;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  opacity: 0.95;
}

/* Front card styling */
.front {
  background: rgba(255, 255, 255, 0.05) !important; /* subtle white transparency */
  z-index: 2;
}

/* Remove dark overlay to allow transparency to show */
.front::after {
  display: none;
}

/* Inner content positioning */
.inner {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  padding: 2rem;
  transform: translateY(-50%) translateZ(60px) scale(0.94);
  z-index: 2;
}

/* Back card styling */
.back {
  background: rgba(0, 0, 0, 0.5) !important; /* 50% black transparency */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotateY(180deg);
  z-index: 1;
}

/* Default front card position */
.container .front {
  transform: rotateY(0deg);
}

/* Hover effects for flipping animation */
.container:hover .front,
.container.hover .front {
  transform: rotateY(-180deg);
}

.container:hover .back,
.container.hover .back {
  transform: rotateY(0deg);
}

/* Front card title styling */
.front .inner p {
  font-size: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

/* Decorative line under front card title */
.front .inner p::after {
  content: '';
  width: 4rem;
  height: 2px;
  background: #C6D4DF;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  bottom: -0.75rem;
}

/* Front card subtitle styling */
.front .inner span {
  color: rgba(255,255,255,0.7);
  font-weight: 300;
}

/* Responsive breakpoints */

/* Tablet and smaller desktop screens */
@media screen and (max-width: 64rem) {
  .col {
    width: calc(33.333% - 2rem);
  }
}

/* Mobile landscape and small tablets */
@media screen and (max-width: 48rem) {
  .col {
    width: calc(50% - 2rem);
  }
  
  /* Tablet-friendly carousel container height */
  .carousel-track {
    height: 700px;
    padding-bottom: 50px;
  }
  
  /* Adjust positioning for tablets */
  .card-group {
    top: 95px;
  }
  
  .carousel-bird-area {
    height: 160px;
    top: -30px;
  }
  
  .carousel-animation-area {
    bottom: 20px;
    height: 70px;
  }
}

/* Mobile portrait */
@media screen and (max-width: 32rem) {
  .col {
    width: 100%;
    margin: 0 0 2rem 0;
  }
  
  h1 {
    font-size: 2rem;
    margin: 1.5rem 0;
  }
  
  .wrapper {
    width: 95%;
  }
  
  /* Mobile-friendly carousel container height */
  .carousel-track {
    height: 675px;
    padding-bottom: 60px;
  }
  
  /* Adjust card positioning for mobile */
  .card-group {
    top: 80px;
  }
  
  /* Adjust bird area for mobile - raise higher than cards */
  .carousel-bird-area {
    height: 140px;
    top: -50px;
  }
  
  /* Adjust fish area for mobile - 3px below cards */
  .carousel-animation-area {
    bottom: 67px;
    height: 50px;
  }
  
  /* Mobile text size increase to 15.4px */
  .country-info-card {
    font-size: 15.4px;
  }
  
  .country-info-card .population,
  .country-info-card .employed-row {
    font-size: 18px;
  }

  .country-info-card .rural-urban,
  .country-info-card .connectivity-row,
  .country-info-card .broadband-row,
  .country-info-card .stat-item,
  .country-info-card .stat-group {
    font-size: 15.4px;
  }
  
  /* Increase font size for connectivity metrics to match other elements */
  .country-info-card .internet-usage,
  .country-info-card .coverage-4g,
  .country-info-card .mobile-broadband,
  .country-info-card .fixed-broadband {
    font-size: 15.4px;
  }
}

/* Touch device enhancements */
@media (hover: none) and (pointer: coarse) {
  /* For touch devices, add visual feedback */
  .col:active {
    transform: scale(0.98);
  }
  
  /* Ensure touch events work properly */
  .col {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Additional hover effects for enhanced interactivity */
.col:not(:hover) .container {
  transition: transform 0.3s ease;
}

.col:hover .container {
  transform: translateY(-5px);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .front,
  .back,
  .container {
    transition: none;
  }
}

/* Flag styling for better display */
.flag-icon {
  display: inline-block;
  margin-left: 8px;
  font-size: 1.5em;
  vertical-align: middle;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
  line-height: 1;
}

/* Flag image styling */
.flag-image {
  width: 44px;
  height: 24px;
  margin-left: 8px;
  vertical-align: middle;
  border-radius: 2px;
  object-fit: cover;
}





/* External flag styling */
.external-flag {
  width: 48px;
  height: 32px;
  border-radius: 2px;
  object-fit: fill;
  z-index: 10;
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Individual country flags using Unicode flag symbols with better fallbacks */
.map-point h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Country Info Card Styles */
.country-info-card {
  padding: 20px;
  color: white;
  font-size: 14px;
  line-height: 1.4;
  height: 575px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #1F98BF, #4AC8E8);
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: relative;
  z-index: 10;
}

/* Row 1: Country Name */
.country-name {
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Row 2: Weather and Time */
.weather-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

.weather-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.weather-condition {
  font-weight: 600;
  font-size: 16px;
}

.local-time {
  font-size: 14px;
  opacity: 0.9;
}

.weather-icon {
  font-size: 24px;
}

.weather-emoji {
  animation: weatherPulse 2s ease-in-out infinite;
}

@keyframes weatherPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Row 3: Population and Employment */
.population-employment {
  margin-bottom: 12px;
}

.stat-item {
  margin-bottom: 6px;
  font-size: 15.4px;
}

/* Row 4: Rural and Urban */
.rural-urban {
  margin-bottom: 12px;
}

.stat-group {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 15.4px;
}

.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.rural-bar {
  background: #4CAF50;
  height: 100%;
  transition: width 0.3s ease;
}

.urban-bar {
  background: #FF9800;
  height: 100%;
  transition: width 0.3s ease;
}

/* Row 5: Internet Usage and Mobile Towers */
.internet-mobile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.pie-chart {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: conic-gradient(#2196F3 0deg calc(var(--percentage) * 3.6deg), rgba(255,255,255,0.3) calc(var(--percentage) * 3.6deg) 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie-center {
  background: rgba(31, 152, 191, 0.9);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  text-align: center;
}

.pie-label {
  font-weight: bold;
  font-size: 12px;
}

.mobile-towers {
  font-size: 15px;
  text-align: right;
}

/* Row 6: EGDI */
.egdi-section {
  margin-top: auto;
}

.egdi-box {
  background: rgba(255,255,255,0.25);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 16px;
  backdrop-filter: blur(5px);
}

.egdi-value {
  font-weight: bold;
  font-size: 18px;
}

/* EGDI Color ranges - Higher specificity */
.country-info-card .egdi-value.egdi-low {
  color: #D72638 !important; /* Red for 0-0.3 */
}

.country-info-card .egdi-value.egdi-medium {
  color: #E37123 !important; /* Updated orange for better readability (0.31-0.60) */
}

.country-info-card .egdi-value.egdi-high {
  color: #3CB371 !important; /* Green for 0.61-0.99 */
}

/* Individual country EGDI colors */
.country-info-card .egdi-value.solomon-islands-egdi {
  color: #F49B0B !important; /* Orange for Solomon Islands */
}

.solomon-islands-egdi {
  color: #F49B0B !important; /* Orange for Solomon Islands */
}

/* Override any dynamic coloring for Solomon Islands specifically */
.country-info-card .solomon-islands-egdi.egdi-low,
.country-info-card .solomon-islands-egdi.egdi-medium,
.country-info-card .solomon-islands-egdi.egdi-high {
  color: #F49B0B !important; /* Force orange for Solomon Islands */
}

/* Style the card insights section */
.card-insights {
  margin-top: 15px;
  padding: 10px 0;
  text-align: left;
}

/* Back card flag styling */
.back-flag-image {
  width: 24px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Front card flag styling */
.front-flag-image {
  width: 24px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block;
}

.card-insights h4 {
  font-size: 19px;
  font-weight: bold;
  margin: 8px 0 8px 0;
  color: #FFE4E1;
}

.card-insights p {
  font-size: 16px;
  line-height: 1.2;
  margin: 0 0 8px 0;
  color: #F0F8FF;
  text-align: center;
}

/* Mobile responsive adjustments for country cards */
@media screen and (max-width: 768px) {
  .country-info-card {
    padding: 15px;
    font-size: 12px;
  }
  
  .country-name {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .weather-time-row {
    padding: 8px;
    margin-bottom: 10px;
  }
  
  .pie-chart {
    width: 50px;
    height: 50px;
  }
  
  .pie-center {
    width: 38px;
    height: 38px;
    font-size: 9px;
  }
  
  .pie-label {
    font-size: 10px;
  }
  
  .egdi-section {
    margin-top: -3%;
  }
  
  .egdi-box {
    padding: 0px;
  }
  
  .country-info-card {
    height: 525px;
  }
  
  .front,
  .back {
    min-height: 525px;
  }
}

/* New connectivity and broadband layout styles */
.population {
  font-size: 18px;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}

.rural-urban {
  margin: 8px 0;
  font-size: 14px;
  padding-bottom: 30px;
  position: relative;
}

/* Specific color styling for rural and urban spans */
.rural-urban span[style*="color: #2ecc71"] {
  color: #2ecc71 !important;
}

.rural-urban span[style*="color: #f39c12"] {
  color: #f39c12 !important;
}

.bar-container {
  display: flex !important;
  width: 100% !important;
  height: 20px !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  margin: 8px 0 !important;
  border: 2px solid white !important;
}

.bar-green {
  background-color: #2ecc71 !important; /* Green */
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: bold !important;
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

.bar-orange {
  background-color: #f39c12 !important; /* Orange */
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 11px !important;
  font-weight: bold !important;
  color: white !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8) !important;
}

/* Micro-interactions for data exploration */
.data-detail-popup {
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 0;
  border-radius: 8px;
  font-size: 12px;
  animation: popupFadeIn 0.3s ease-out;
  pointer-events: auto;
}

.popup-content {
  padding: 10px;
  position: relative;
}

.popup-content h4 {
  margin: 0 0 5px 0;
  font-size: 13px;
  color: #4fc3f7;
}

.popup-content p {
  margin: 0;
  font-size: 11px;
  opacity: 0.8;
}

.popup-content button {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
}

.popup-content button:hover {
  opacity: 1;
}

.data-tooltip {
  background: rgba(31, 152, 191, 0.95);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  animation: tooltipFadeIn 0.2s ease-out;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced data element interactions */
.connectivity-row > div,
.broadband-row > div,
.egdi-value {
  transition: all 0.2s ease;
  border-radius: 4px;
}

.connectivity-row > div:hover,
.broadband-row > div:hover {
  box-shadow: 0 2px 8px rgba(255,255,255,0.3);
}

.egdi-value {
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.egdi-value:hover {
  background-color: rgba(31, 152, 191, 0.3) !important;
  cursor: pointer;
}

.bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  font-size: 0.7em;
  color: rgba(255,255,255,0.8);
}

/* Employed row styling */
.employed-row {
  font-size: 18px;
  margin-bottom: 2px;
  color: rgba(255,255,255,0.9);
}

.connectivity-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.internet-usage, .coverage-4g {
  font-size: 15.4px;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.1);
  padding: 3px 6px;
  border-radius: 4px;
}

.broadband-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.mobile-broadband, .fixed-broadband {
  font-size: 15.4px;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.05);
  padding: 3px 6px;
  border-radius: 4px;
}

/* Mobile responsive adjustments for new layout */
@media screen and (max-width: 768px) {
  .connectivity-row, .broadband-row {
    gap: 2px;
    margin-bottom: 8px;
  }
  
  .internet-usage, .coverage-4g,
  .mobile-broadband, .fixed-broadband {
    font-size: 0.75em;
    padding: 2px 4px;
  }
  
  .rural-urban-bar {
    height: 14px;
  }
  
  .bar-labels {
    font-size: 0.6em;
  }
}

/* Rural/Urban Pie Chart Styles */
.rural-urban-pie-chart {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: conic-gradient(
    #4CAF50 0deg var(--rural-angle),
    #FF9800 var(--rural-angle) 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.rural-urban-pie-center {
  background: rgba(31, 152, 191, 0.9);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  text-align: center;
  color: white;
  font-weight: bold;
}

.rural-urban-pie-label {
  font-size: 7px;
  opacity: 0.8;
}

/* Mobile pie chart adjustments */
@media screen and (max-width: 768px) {
  .rural-urban-pie-chart {
    width: 40px;
    height: 40px;
    bottom: -40px;
  }
  
  .rural-urban-pie-center {
    width: 28px;
    height: 28px;
    font-size: 7px;
  }
  
  .rural-urban-pie-label {
    font-size: 6px;
  }
}
