/* Sand & Coastal Blue Palette */
:root {
  --c-sand: #cfb489;
  --c-blue: #4894a2;
  --c-charcoal: #2f2f2f;
  --c-cream: #f7f4ef;
  --c-softblue: #d4e5e9;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, var(--c-blue) 0%, var(--c-softblue) 100%);
  color: var(--c-charcoal);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: transparent;
  color: white;
  padding: 30px 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.dashboard-login-container {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.header-text {
  flex: 1 1 auto;
  text-align: left;
}

.logo-container {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

.logo-link {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-link:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.logo {
  max-width: 150px;
  height: auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
  display: block;
}

.main-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--c-sand);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.subtitle {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--c-cream);
  font-style: italic;
}

/* Dashboard Login Button */
.btn-dashboard-login {
  background: var(--c-sand);
  color: var(--c-charcoal);
  border: 2px solid var(--c-cream);
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-dashboard-login:hover {
  background: var(--c-cream);
  border-color: var(--c-sand);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-dashboard-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Dashboard Popover */
.dashboard-popover {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.dashboard-popover.active {
  display: flex;
}

.dashboard-popover-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  text-align: center;
}

.dashboard-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--c-charcoal);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.dashboard-close:hover {
  background: var(--c-softblue);
  color: var(--c-blue);
}

.dashboard-message h3 {
  color: var(--c-blue);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.dashboard-message p {
  color: var(--c-charcoal);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Main Content */
main {
  padding: 60px 20px;
}

.main-content {
  display: flex;
  gap: 40px;
  margin-bottom: 60px;
  align-items: flex-start;
}

.text-column {
  flex: 0 0 45%;
}

.carousel-column {
  flex: 0 0 55%;
  display: flex;
}

.carousel-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  min-height: 760px;
}

.text-area {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 760px;
}

.text-area h2 {
  color: var(--c-blue);
  font-size: 1.8rem;
  margin-bottom: 20px;
  border-bottom: 3px solid var(--c-sand);
  padding-bottom: 10px;
}

.text-area p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--c-charcoal);
}

.cta-buttons {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--c-blue);
  color: white;
}

.btn-primary:hover {
  background-color: #3a7a87;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(72, 148, 162, 0.3);
}

.btn-secondary {
  background-color: var(--c-sand);
  color: var(--c-charcoal);
}

.btn-secondary:hover {
  background-color: #b89e73;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(207, 180, 137, 0.3);
}

/* Carousel */
.carousel {
  position: relative;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.carousel-container {
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 2;
  width: 100%;
  background: #f0f0f0;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  height: 100%;
}

.carousel-slide.active {
  opacity: 1;
}

.placeholder-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Actual Image Slides */
.slide-image-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slide-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(47, 47, 47, 0.9) 0%, rgba(47, 47, 47, 0.7) 50%, transparent 100%);
  padding: 30px 20px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.slide-image-overlay span {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(72, 148, 162, 0.8);
  color: white;
  border: none;
  font-size: 2.5rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
  border-radius: 4px;
}

.carousel-btn:hover {
  background-color: rgba(72, 148, 162, 1);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  background-color: var(--c-softblue);
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--c-cream);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--c-blue);
}

.indicator.active {
  background-color: var(--c-sand);
  transform: scale(1.2);
}

/* Slide Info Card */
.slide-info-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.5s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.slide-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  border-bottom: 3px solid var(--c-sand);
  padding-bottom: 12px;
}

.slide-info-title-group {
  flex: 1;
}

.slide-info-title {
  color: var(--c-blue);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 5px 0;
}

.slide-info-scientific-name {
  font-size: 1rem;
  font-style: italic;
  color: var(--c-charcoal);
  opacity: 0.8;
  margin: 0;
}

.slide-info-icons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  margin-left: 15px;
}

.slide-info-status-icon,
.slide-info-feral-icon {
  font-size: 2rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.slide-info-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: var(--c-charcoal);
  flex-wrap: wrap;
}

.slide-info-site,
.slide-info-date,
.slide-info-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--c-blue);
}

.slide-info-site img,
.slide-info-date img,
.slide-info-time img {
  width: 1rem;
  height: 1rem;
}

.slide-info-status-icon img {
  width: 3rem;
  height: 3rem;
}

/* IUCN Icon Link and Custom Tooltip */
.iucn-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.iucn-icon-link:hover {
  transform: scale(1.05);
}

.iucn-icon-link:active {
  transform: scale(0.98);
}

/* Custom Tooltip */
.iucn-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--c-blue);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

/* Tooltip arrow */
.iucn-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--c-blue);
}

/* Show tooltip on hover */
.iucn-icon-link:hover .iucn-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Tooltip icon */
.iucn-tooltip .tooltip-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

/* Tooltip text */
.iucn-tooltip .tooltip-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.iucn-tooltip .tooltip-text strong {
  color: var(--c-charcoal);
  font-size: 0.95rem;
  font-weight: 600;
}

.iucn-tooltip .tooltip-hint {
  color: var(--c-blue);
  font-size: 0.8rem;
  font-style: italic;
}

/* Feral/Native Icon Link and Custom Tooltip */
.feral-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.feral-icon-link:hover {
  transform: scale(1.05);
}

.feral-icon-link:active {
  transform: scale(0.98);
}

/* Feral Icon needs explicit sizing */
.feral-icon-link > img {
  width: 3rem;
  height: 3rem;
}

/* Feral Custom Tooltip */
.feral-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 2px solid var(--c-blue);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 200px;
}

/* Feral Tooltip arrow */
.feral-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--c-blue);
}

/* Show feral tooltip on hover */
.feral-icon-link:hover .feral-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-5px);
}

/* Feral Tooltip icon */
.feral-tooltip .tooltip-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

/* Feral Tooltip text */
.feral-tooltip .tooltip-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feral-tooltip .tooltip-text strong {
  color: var(--c-charcoal);
  font-size: 0.95rem;
  font-weight: 600;
}

.feral-tooltip .tooltip-hint {
  color: var(--c-blue);
  font-size: 0.8rem;
  font-style: italic;
}

.slide-info-description {
  color: var(--c-charcoal);
  line-height: 1.5;
  font-size: 0.95rem;
  margin: 0;
}

/* Footer */
footer {
  background-color: var(--c-charcoal);
  color: var(--c-cream);
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
}

footer p {
  margin: 5px 0;
}

/* Responsive Design */
@media (max-width: 968px) {
  .header-content {
    gap: 30px;
  }

  .header-text {
    flex: 1 1 auto;
  }

  .logo-container {
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  main {
    padding: 40px 20px;
  }

  .main-content {
    flex-direction: column;
    gap: 30px;
    align-items: center;
  }

  .text-column,
  .carousel-column {
    flex: 1 1 100%;
    max-width: 100%;
    width: 100%;
  }

  .text-area,
  .carousel-wrapper {
    height: auto;
    width: 100%;
  }

  .carousel {
    min-height: 350px;
  }

  .slide-info-card {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .dashboard-login-container {
    order: 1;
    width: 100%;
    justify-content: center;
  }

  .btn-dashboard-login {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .header-text {
    flex: 1 1 100%;
    text-align: center;
    order: 2;
  }

  .logo-container {
    flex: 1 1 100%;
    justify-content: center;
    order: 3;
  }

  .logo {
    max-width: 150px;
  }

  .main-title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }

  main {
    padding: 40px 20px;
  }

  .main-content {
    gap: 25px;
    margin-bottom: 40px;
  }

  .text-area {
    padding: 25px;
    margin: 0 auto;
  }

  .text-area h2 {
    font-size: 1.5rem;
  }

  .carousel-wrapper {
    margin: 0 auto;
  }

  .carousel {
    min-height: 300px;
  }

  .slide-info-card {
    margin: 0 auto;
  }

  .placeholder-image {
    font-size: 1.5rem;
  }

  .slide-image-overlay span {
    font-size: 1.5rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .carousel-btn {
    font-size: 1.5rem;
    padding: 8px 15px;
  }

  /* IUCN Tooltip adjustments for mobile */
  .iucn-tooltip {
    min-width: 180px;
    padding: 10px 12px;
    font-size: 0.85rem;
    left: auto;
    right: 0;
    transform: translateX(0);
  }

  .iucn-tooltip::after {
    left: auto;
    right: 20px;
    transform: translateX(0);
  }

  .iucn-icon-link:hover .iucn-tooltip {
    transform: translateX(0) translateY(-5px);
  }

  .iucn-tooltip .tooltip-icon {
    width: 2rem;
    height: 2rem;
  }

  .iucn-tooltip .tooltip-text strong {
    font-size: 0.85rem;
  }

  .iucn-tooltip .tooltip-hint {
    font-size: 0.75rem;
  }

  /* Feral Tooltip adjustments for mobile */
  .feral-tooltip {
    min-width: 180px;
    padding: 10px 12px;
    font-size: 0.85rem;
    left: auto;
    right: 0;
    transform: translateX(0);
  }

  .feral-tooltip::after {
    left: auto;
    right: 20px;
    transform: translateX(0);
  }

  .feral-icon-link:hover .feral-tooltip {
    transform: translateX(0) translateY(-5px);
  }

  .feral-tooltip .tooltip-icon {
    width: 2rem;
    height: 2rem;
  }

  .feral-tooltip .tooltip-text strong {
    font-size: 0.85rem;
  }

  .feral-tooltip .tooltip-hint {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  header {
    padding: 15px;
  }

  .logo {
    max-width: 120px;
  }

  .main-title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  main {
    padding: 30px 15px;
  }

  .main-content {
    gap: 20px;
    margin-bottom: 30px;
  }

  .text-area {
    padding: 20px;
    margin: 0 auto;
    width: 100%;
  }

  .text-area h2 {
    font-size: 1.3rem;
  }

  .text-area p {
    font-size: 1rem;
  }

  .carousel-wrapper {
    margin: 0 auto;
    width: 100%;
  }

  .carousel {
    min-height: 200px;
  }

  .placeholder-image {
    font-size: 1.2rem;
  }

  .slide-image-overlay span {
    font-size: 1.2rem;
    padding: 0 10px;
  }

  .slide-image-overlay {
    padding: 20px 15px 15px;
  }

  .slide-info-card {
    padding: 20px;
    margin: 0 auto;
    width: 100%;
  }

  .slide-info-title {
    font-size: 1.3rem;
  }

  .slide-info-scientific-name {
    font-size: 0.85rem;
  }

  .slide-info-feral-icon {
    font-size: 1.5rem;
  }

  .btn-dashboard-login {
    font-size: 0.8rem;
    padding: 7px 14px;
  }
}
