* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
  flex: 1;
  overflow-y: auto;
}

/* Site Header */
.site-header {
  background: white;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #333;
}

.site-header-left img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
}

.site-header-left span {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.site-header h1 {
  font-size: 20px;
  color: #333;
  text-align: right;
}

.site-header-instagram {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #c13584;
  text-decoration: none;
  white-space: nowrap;
}

.site-header-instagram img {
  height: 24px;
  width: 24px;
}

.site-header-instagram:hover {
  text-decoration: underline;
}

/* Site Footer */
.site-footer {
  background: white;
  padding: 6px 24px;
  text-align: center;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.site-footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.site-footer-logos a {
  display: inline-block;
  transition: opacity 0.3s;
}

.site-footer-logos a:hover {
  opacity: 0.7;
}

.site-footer-logos img {
  height: 37px;
  width: auto;
}

.site-footer-logos img.logo-urv {
  height: 56px;
}

.site-footer-logos img.logo-sm {
  height: 25px;
}

.site-footer-logos img.logo-lg {
  height: 50px;
}

.site-footer p {
  color: #666;
  font-size: 10px;
}

.site-footer p a {
  color: #667eea;
  text-decoration: none;
}

.site-footer p a:hover {
  text-decoration: underline;
}


/* Gallery */
.gallery-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.card-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s;
}

.card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-info {
  padding: 15px;
}

.card-scientific {
  color: #667eea;
  font-weight: 700;
  font-size: 14px;
  font-style: italic;
  margin-bottom: 4px;
}

.card-common {
  color: #333;
  font-size: 13px;
}

/* Landing page (QR entry) */
.landing-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px;
  padding-top: 60px;
}

.landing-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/Expo00015.JPG') center / cover no-repeat;
  opacity: 0.34;
  z-index: 0;
}

.landing-container > * {
  position: relative;
  z-index: 1;
}

.landing-box {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 40px;
  width: 100%;
  max-width: 1000px;
  text-align: center;
}


.landing-description {
  background: #e8f4f8;
  border-left: 4px solid #667eea;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 6px;
  color: #2c3e50;
  line-height: 1.6;
  font-size: 14px;
  text-align: left;
}

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
  display: inline-block;
  padding: 10px 20px;
  background: #e0e0e0;
  color: #333;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  margin-top: 15px;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

/* Card detail */
.detail-container {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.detail-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  margin-bottom: 30px;
}

.detail-card img {
  width: 100%;
  height: auto;
  display: block;
}

.detail-body {
  padding: 30px;
}

.detail-common-name {
  font-size: 26px;
  color: #333;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-scientific-name {
  font-size: 18px;
  color: #667eea;
  font-style: italic;
  margin-bottom: 20px;
}

.detail-comment {
  color: #444;
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
  white-space: pre-line;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 2px solid #f0f0f0;
  padding-top: 20px;
}

.detail-meta-item label {
  display: block;
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.detail-meta-item span {
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.detail-actions {
  text-align: center;
  padding: 20px 0;
}

/* Special card (Estela) */
.card-item--special {
  border: 2px solid #c8a96e;
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.25);
}

.card-item--special:hover {
  box-shadow: 0 8px 24px rgba(200, 169, 110, 0.4);
}

.card-special-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c8a96e;
  font-weight: 700;
  margin-bottom: 4px;
}

/* Estela Section View */
.estela-container {
  padding: 30px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.estela-header {
  text-align: center;
  margin-bottom: 30px;
  background: white;
  border-radius: 12px;
  padding: 30px 40px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.estela-subtitle {
  font-size: 11px;
  letter-spacing: 2px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.estela-title {
  font-size: 32px;
  font-style: italic;
  font-weight: 400;
  color: #444;
  margin-bottom: 8px;
}

.estela-artist {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
}

.estela-instagram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #c13584;
  text-decoration: none;
  margin-bottom: 12px;
}

.estela-instagram img {
  height: 20px;
  width: 20px;
}

.estela-instagram:hover {
  text-decoration: underline;
}

.estela-tagline {
  font-style: italic;
  color: #888;
  font-size: 14px;
}

.estela-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.estela-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s;
}

.estela-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.estela-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.estela-item-title {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #444;
  text-align: center;
}

.estela-actions {
  text-align: center;
  padding: 10px 0 20px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}

.lightbox-inner img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.lightbox-caption {
  color: white;
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .estela-grid {
    grid-template-columns: 1fr;
  }

  .estela-item img {
    height: 220px;
  }

  .estela-title {
    font-size: 24px;
  }
}

/* Not found */
.not-found {
  text-align: center;
  color: white;
  padding: 60px 20px;
}

.not-found h2 {
  font-size: 24px;
  margin-bottom: 15px;
}

.not-found p {
  font-size: 16px;
  margin-bottom: 25px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .landing-box {
    padding: 25px;
  }

  .landing-box h1 {
    font-size: 22px;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 6px 12px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .site-header-left img {
    height: 32px;
    width: 32px;
  }

  .site-header-left span {
    font-size: 13px;
  }

  .site-header h1 {
    font-size: 14px;
    flex: 1 1 100%;
    text-align: center;
    order: 3;
  }

  .site-header-instagram {
    font-size: 11px;
  }

  .site-header-instagram img {
    height: 18px;
    width: 18px;
  }

  .site-footer {
    padding: 4px 12px;
  }

  .site-footer-logos {
    gap: 10px;
    margin-bottom: 4px;
  }

  .site-footer-logos img {
    height: 17px;
  }

  .site-footer-logos img.logo-urv {
    height: 25px;
  }

  .site-footer-logos img.logo-sm {
    height: 11px;
  }

  .site-footer-logos img.logo-lg {
    height: 22px;
  }

  .site-footer p {
    font-size: 8px;
  }
}
