/* EcoSmanda Design System - CSS Stylesheet */

/* --- Custom Variables & Theme --- */
:root {
  --primary-color: #1b4332;       /* Deep Forest Green */
  --primary-light: #2d6a4f;       /* Medium Forest Green */
  --primary-hover: #40916c;       /* Light Forest Green */
  --accent-color: #d4a373;        /* Warm Gold / Amber */
  --accent-light: #fefae0;        /* Light Cream */
  --bg-color: #f7f9f6;            /* Soft Sage White */
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-dark: #202b25;           /* Charcoal Green */
  --text-muted: #5e6b63;          /* Slate Green */
  --white: #ffffff;
  --border-color: rgba(45, 106, 79, 0.12);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(27, 67, 50, 0.08), 0 4px 6px -2px rgba(27, 67, 50, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(27, 67, 50, 0.12), 0 10px 10px -5px rgba(27, 67, 50, 0.06);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* --- Base & Reset --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.25;
}

i {
  font-style: italic;
}

/* --- Buttons & UI Elements --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  width: auto;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(27, 67, 50, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-hover));
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(27, 67, 50, 0.3);
}

.btn-secondary {
  background-color: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.btn-back:hover {
  transform: translateX(-4px);
}

/* --- Header Styling --- */
.app-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.school-logo {
  height: 52px;
  width: 52px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo-link:hover .school-logo {
  transform: rotate(5deg) scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.app-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.school-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.adiwiyata-badge {
  background: linear-gradient(135deg, #e0f2fe, #fefae0);
  border: 1px solid rgba(212, 163, 115, 0.4);
  color: var(--primary-color);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: badge-pulse 2s infinite ease-in-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

@keyframes badge-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); box-shadow: 0 4px 12px rgba(27, 67, 50, 0.15); }
  100% { transform: scale(1); }
}

/* --- Layout Main --- */
.main-content-area {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

/* --- Catalog / Index Page --- */
.catalog-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: var(--border-radius-md);
  padding: 48px 32px;
  color: var(--white);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(212, 163, 115, 0.2) 0%, transparent 60%);
}

.catalog-hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.catalog-hero-content h1 {
  color: var(--white);
  font-size: 2.2rem;
  margin-bottom: 8px;
  font-weight: 800;
}

.catalog-hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.catalog-controls-section {
  margin-bottom: 32px;
}

.controls-container {
  background: var(--white);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.filter-form {
  display: grid;
  grid-template-columns: 2fr 1.2fr auto;
  gap: 16px;
  align-items: center;
}

.search-input-wrap, .filter-select-wrap {
  position: relative;
}

.search-icon, .filter-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 12px 12px 42px;
  border: 1.5px solid rgba(45, 106, 79, 0.15);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background-color: var(--bg-color);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary-light);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%231b4332' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 36px;
}

.btn-submit-filter {
  padding: 12px 28px;
}

.plants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.plant-card {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.plant-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
  border-color: rgba(45, 106, 79, 0.3);
}

.card-image-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.plant-card:hover .card-image {
  transform: scale(1.08);
}

.card-zone-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background-color: rgba(27, 67, 50, 0.85);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--primary-color);
}

.card-scientific-name {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.card-regional-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: var(--bg-color);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-bottom: 8px;
}

.card-family {
  font-size: 0.85rem;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.btn-card-details {
  margin-top: auto;
  width: 100%;
}

.no-results {
  text-align: center;
  padding: 64px 24px;
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  border: 1px dashed var(--border-color);
}

.no-results-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.no-results h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.no-results p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn-reset {
  display: inline-flex;
}

/* --- Plant Detail Landing Page --- */
.plant-detail-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.back-navigation {
  margin-bottom: 8px;
}

.plant-hero {
  position: relative;
  height: 350px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.plant-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.plant-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(27, 67, 50, 0.9) 0%, rgba(27, 67, 50, 0.4) 50%, transparent 100%);
}

.plant-hero-title-wrap {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  color: var(--white);
}

.plant-hero-badge {
  background-color: var(--accent-color);
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.plant-hero-name {
  color: var(--white);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 4px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.plant-hero-scientific {
  font-size: 1.2rem;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.detail-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 28px;
  align-items: start;
}

/* Glass Cards UI */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.info-card-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(45, 106, 79, 0.06);
  padding-bottom: 10px;
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.info-value {
  font-size: 1rem;
  color: var(--text-dark);
}

.info-value.text-highlight {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
}

.font-semibold {
  font-weight: 600;
}

.zone-badge {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 4px;
}

/* QR Sign Card Utility */
.qr-card {
  text-align: center;
}

.qr-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qr-display-wrap {
  background-color: var(--white);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 8px auto 18px;
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  width: 172px;
  height: 172px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.qr-spinner {
  font-size: 1.5rem;
  color: var(--primary-light);
}

/* Accordion Education Blocks */
.education-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background-color: var(--white);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.accordion-item:hover {
  border-color: rgba(45, 106, 79, 0.25);
  box-shadow: var(--shadow-md);
}

.accordion-item.active {
  border-color: var(--primary-light);
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  outline: none;
}

.acc-title-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-acc {
  font-size: 1.4rem;
  color: var(--primary-light);
}

.acc-arrow {
  font-size: 1.1rem;
  color: var(--primary-light);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .acc-arrow {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-content {
  max-height: 1000px; /* High enough value to accommodate all text content */
}

.accordion-content-inner {
  padding: 0 24px 24px 24px;
  border-top: 1px solid rgba(45, 106, 79, 0.06);
  padding-top: 20px;
}

.paragraph-text {
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.7;
}

.trivia-quote {
  position: relative;
  background-color: var(--accent-light);
  border-left: 4px solid var(--accent-color);
  padding: 20px;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  overflow: hidden;
}

.quote-icon-bg {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 3.5rem;
  color: rgba(212, 163, 115, 0.08);
  pointer-events: none;
}

/* --- Footer Styling --- */
.app-footer {
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 32px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cta-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.btn-cta {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: 50px;
}

.footer-info {
  text-align: center;
}

.copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.verification-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* --- Media Queries (Responsiveness) --- */

/* Mobile view optimizations (P0 screen limits) */
@media (max-width: 992px) {
  .detail-grid {
    grid-template-columns: 1fr; /* Sidebar stacks under hero */
  }
  
  .info-card-sidebar {
    order: 2; /* Sidebar after accordions on mobile */
  }
  
  .education-section {
    order: 1;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .logo-link {
    justify-content: center;
  }
  
  .filter-form {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .btn-submit-filter {
    width: 100%;
  }
  
  .plant-hero {
    height: 250px;
  }
  
  .plant-hero-name {
    font-size: 1.8rem;
  }
  
  .plant-hero-scientific {
    font-size: 1rem;
  }
  
  .catalog-hero {
    padding: 32px 20px;
  }
  
  .catalog-hero-content h1 {
    font-size: 1.75rem;
  }
  
  .catalog-hero-content p {
    font-size: 0.95rem;
  }
}
