html, body {
  margin: 0;
  padding: 0;
}

#map {
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
  min-height: 350px;
}

#selectContainer {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 11px 0;
}

#countrySelect {
  width: 200px;
  margin: 0 auto;
}

/*News*/

.news-card {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  background: white;
  border-radius: 1.25rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
  overflow: hidden;
  
}

.news-card:hover {
  transform: translate(-2px);
}

.news-image {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 1rem;
  flex-shrink: 0;
}

.news-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.news-title {
  font-size: 1rem;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  line-height: 1.25;
  max-width: 600px;
  margin-bottom: 1rem;

  word-break: break-word;
  overflow-wrap: break-word;
  display: block;
}

.news-title:hover {
  color: #dc3545;
  text-decoration: underline;
}

.news-source {
  font-weight: 500;
  font-size: 1rem;
  color: #333;
}

/*Markers*/
.poi-marker {
  width:38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #444;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.poi-marker:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.poi-marker img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.poi-pin {
  background: white;
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  border: 2px solid #ddd;
}

.poi-pin img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.landmark-pin img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.custom-tooltip {
  text-align: center;
}

/*Country info*/
.info-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px 18px;
  border-bottom: 1px solid #ddd;
  font-size: 1.1rem;
}

.info-row:nth-child(odd) {
  background: #f1f1f1;
}

.info-icon {
  color: #198754;
  font-size: 1.7rem;
  text-align: center;
}

.info-row strong {
  text-align: right;
  font-weight: 500;
  word-break: break-word;
}

/*Weather*/
#weatherModal .modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: 70vh;
}

.modal-header {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}


.weather-today {
  border: 1px solid #ddd;
  display: grid;
  grid-template-columns: 1fr 140px 1fr;
  align-items: center;
  text-align: center;
  padding: 26px 18px;
  margin-bottom: 22px;
}

.weather-condition {
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: capitalize;
}

.weather-main-icon {
  width: 95px;
  margin: auto;
}

.weather-temps {
  text-align: center;
}

.weather-max {
  font-size: 2.2rem;
  font-weight: 800;
}

.weather-min {
  font-size: 1.7rem;
  color: #6c757d;
}

.weather-next-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.weather-small-card {
  border: 1px solid #ddd;
  text-align: center;
  padding: 24px 12px;
}

.weather-small-card h4 {
  font-size: 1.4rem;
  font-weight: 700;
}

.weather-small-icon {
  width: 70px;
}

.weather-small-temp {
  font-size: 2rem;
  font-weight: 800;
}

.weather-footer {
  position: fixed;
  bottom: 0;
}

#weatherModal .modal-content {
  max-height: 90vh;
}

#weatherModal .modal-body {
  max-height: calc(90vh - 150px);
  overflow-y: auto;
  padding: 24px;
}




/*Time zone*/
.timezone-clock-card {
  text-align: center;
  padding: 28px;
  background: #111827;
  color: #fff;
  border-radius: 14px;
  margin-bottom: 20px;
}

.timezone-label {
  font-size: 0.9rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.digital-clock {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-top: 8px;
}

.timezone-day {
  font-size: 1.2rem;
  color: #d1d5db;
}

.timezone-details {
  font-size: 1.1rem;
  line-height: 1.8;
}

/*Wikipedia*/
#wikiModal .modal-content {
  border-radius: 24px;
  overflow: hidden;
  height: auto;
}

#wikiModal .modal-body {
  padding: 3rem 2rem;
  min-height: unset;
  height: auto;
}

#wikiModal #modalWikipediaLinks {
  display: flex;
  justify-content: center;
  align-items: center;
}

#wikiModal .btn-primary {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: block;

  font-size: 1.4rem;
  padding: 1rem 1.5rem;

  border-radius: 1rem;
}

.header-flag {
  width: 48px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
}


@media (max-width: 768px) {
  #map {
    height: 55vh;
    min-height: 300px;
  }

  #countrySelect {
    width: 90%;
    max-width: 280px;
  }

  

  .card-body {
    padding: 1rem !important;
  }

  

  h5 {
    font-size: 1.1rem;
  }

  #modalFlag {
    width: 56px !important;
  }

  /*News Modal*/
  .news-card {
    flex-direction: column;
    align-items: stretch;
  }

  .news-image {
    width: 100%;
    height: 200px;
  }

  .news-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.75rem;
  }

  

  /*Country info modal*/
  .info-row {
    grid-template-columns: 45px 1fr;
  }

  .info-row strong {
    grid-column: 2;
    text-align: left;
  }


  /*News modal*/
  .news-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-image {
    width: 100%;
    height: 180px;
  }

  .news.title {
    font-size: 1.05rem;
  }

  .news-source {
    margin-top: 12px;
    font-size: 0.9rem;
  }

  /*Weather modal*/
  .weather-today {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .weather-next-grid {
    grid-template-columns: 1fr;
  }

  /*Wikipedia modal*/
  #wikiModal .modal-body {
    padding: 1.5rem;
  }

  #wikiModal .btn-primary {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }
}

#preloader {
  position: fixed;
  inset: 0;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#preloader::after {
  content: "";
  width: 48px;
  height: 48px;
  border: 5px solid #ddd;
  border-top-color: #198754;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#preload {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  overflow: hidden;
  background: #fff;
}

#pre-load:before {
  content: "";
  position: fixed;
  width: 60px;
  height: 60px;
  top: calc(50% - 30px);
  left: calc(50% - 30px);
  border: 6px solid #f2f2f2;
  border-top: 6px solid #56829e;
  border-radius: 50%;
}

.modal-body {
  position: relative;
  min-height: 260px;
}

.weather-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.weather-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.weather-spinner {
  width: 54px;
  height: 54px;
  border: 5px solid #ddd;
  border-top-color: #198754;
  border-radius: 50%;
  animation: weatherSpin 0.8s linear infinite;
}

@keyframes weatherSpin {
  to {
    transform: rotate(360deg);
  }
}
