/**
 * CAS WATER PARK MINI ZOO - MAIN CSS (MOBILE FIRST)
 * Konsep: Tropical Wildlife Explorer
 * Warna: Rainforest Green, Sage, Cream Warm Stone, White
 */

:root {
  --primary: #1b4332;
  --primary-light: #2d6a4f;
  --accent: #40916c;
  --accent-soft: #52b788;
  --accent-warm: #d88c51;
  --bg-sand: #f8f9fa;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(27,67,50,0.08);
  --shadow-lg: 0 10px 25px rgba(27,67,50,0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bottom-nav-height: 64px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-sand);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-nav-height) + 20px);
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Top App Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 24px;
  height: 24px;
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

/* Desktop Navigation */
.desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.2s;
    padding: 6px 0;
  }

  .nav-link:hover, .nav-link.active {
    color: var(--primary-light);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--text-main);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-icon:hover {
  background: #e2e8f0;
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
  color: #ffffff;
  padding: 32px 0 48px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  opacity: 0.1;
  background-image: radial-gradient(#fff 2px, transparent 2px);
  background-size: 20px 20px;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 38px;
  }
}

.hero-subtitle {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 24px;
  padding: 0 8px;
}

/* Search Bar */
.search-box-wrapper {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  margin-top: 16px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 10px 14px;
  color: var(--text-main);
  background: transparent;
}

.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--primary-light);
}

/* Category Filter Pills */
.category-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 16px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-scroller::-webkit-scrollbar {
  display: none;
}

.category-pill {
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.category-pill:hover, .category-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Animal Grid Cards */
.animal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

@media (min-width: 640px) {
  .animal-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .animal-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
}

.animal-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.animal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.animal-card-media {
  position: relative;
  aspect-ratio: 4/3;
  background: #e2e8f0;
  overflow: hidden;
}

.animal-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.animal-card:hover .animal-card-media img {
  transform: scale(1.05);
}

.badge-status {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(27, 67, 50, 0.85);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.fav-toggle-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s;
}

.fav-toggle-btn.is-active, .fav-toggle-btn:hover {
  color: #ef4444;
}

.animal-card-body {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.animal-category-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.animal-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.animal-card-scientific {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.animal-card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11px;
  color: var(--text-muted);
}

/* Detail Page Styles */
.detail-hero-gallery {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  position: relative;
}

.detail-main-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  cursor: pointer;
}

.detail-thumb-strip {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(0,0,0,0.6);
  overflow-x: auto;
}

.detail-thumb-item {
  width: 68px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}

.detail-thumb-item.active, .detail-thumb-item:hover {
  opacity: 1;
  border-color: #52b788;
}

.detail-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

@media (min-width: 768px) {
  .info-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.info-card {
  background: #fff;
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.info-card-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.info-card-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  margin-bottom: 18px;
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Mobile Bottom Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px;
  width: 20%;
  transition: color 0.2s;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.bottom-nav-item.active {
  color: var(--primary-light);
}

/* Footer */
.site-footer {
  background: #11281e;
  color: #d1fae5;
  padding: 40px 0 30px;
  margin-top: 48px;
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}
