* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
}

/* Estilos para páginas internas */
body.internal-page {
  font-family: Arial, sans-serif;
  background: white;
  color: #333;
  overflow: auto;
}

.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Info cards - usado en varias páginas */
.info-card {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #333;
}

.info-card h3 {
  margin-bottom: 10px;
  color: #333;
}

.info-card p {
  line-height: 1.6;
  color: #666;
}

.info-card ul {
  list-style: none;
  padding: 0;
}

.info-card li {
  padding: 5px 0;
  color: #666;
}

.info-card li:before {
  content: "• ";
  color: #333;
  font-weight: bold;
  margin-right: 8px;
}

/* Main section layout */
.main-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.main-image {
  position: relative;
}

.main-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.main-image img:hover {
  transform: scale(1.02);
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Thumbnails */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.thumbnail:hover {
  border-color: #333;
  transform: scale(1.05);
}

.thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 40px;
  cursor: pointer;
  background: none;
  border: none;
  transition: transform 0.3s ease;
}

.lightbox-close:hover {
  transform: scale(1.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 50px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 20px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 16px;
}

.container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

/* Overlay para mostrar áreas clicables */
#areas-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /*background-color: rgba(0, 0, 0, 0.4);*/
}

.area-highlight {
  position: absolute;
  border: 0px solid rgba(255, 255, 255, 0.7);
  background-color: rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  pointer-events: auto;
  cursor: pointer;
  border-radius: 0;
}

.area-highlight:hover {
  /*border-color: rgba(255, 255, 255, 1);*/
  /* Centro claro */
  background-color: rgba(255, 255, 255, 0.3);
  /* Marco oscuro difuminado desde los bordes hacia el centro */
  box-shadow: inset 0 0 40px 20px rgba(0, 0, 0, 0.5);
  /*border-radius: 10px 10px 10px 10px;*/
}

.area-highlight.circle {
  border-radius: 50%;
}

.area-label {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.area-highlight:hover .area-label {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .area-label {
    font-size: 12px;
    padding: 6px 12px;
  }

  .main-section {
    grid-template-columns: 1fr;
  }

  .thumbnail-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .lightbox-nav {
    font-size: 30px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .area-label {
    font-size: 10px;
    padding: 4px 8px;
  }

  .thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Loading state */
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  color: #333;
}

/* Header styles for internal pages */
header {
  height: 200px;
  background-color: #222;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 40px;
}

header .header-top {
  display: flex;
  align-items: center;
}

header .back-link {
  color: white;
  text-decoration: none;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 5px;
  transition: background 0.3s ease;
}

header .back-link:hover {
  background: rgba(0, 0, 0, 0.7);
}

header nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

header nav a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

header nav a:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

header nav a.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
  header {
    height: auto;
    padding: 15px 20px;
  }

  header nav {
    gap: 10px;
  }

  header nav a {
    font-size: 14px;
    padding: 8px 15px;
  }
}

@media (max-width: 480px) {
  header nav a {
    font-size: 12px;
    padding: 6px 12px;
  }
}
