/* ============================================ */

/* PAGE HERO */

/* ============================================ */

.page-hero {
  background: linear-gradient(135deg, rgba(27, 94, 32, 0.95), rgba(46, 125, 50, 0.95)), url('https://images.unsplash.com/photo-1497633762265-9d179a990aa6?w=1200&q=80');
  background-size: cover;
  background-position: center;
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.page-title {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.page-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  position: relative;
  z-index: 2;
}

/* ============================================ */

/* SEARCH & FILTER SECTION */

/* ============================================ */

.search-section {
  padding: 2rem 0;
  margin-top: -3rem;
  position: relative;
  z-index: 10;
}

.search-filter-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 10px 40px var(--shadow-hover);
  border: 1px solid var(--border-color);
}

.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.search-input {
  padding-left: 3rem;
  height: 50px;
  font-size: 1rem;
}

.filter-select {
  height: 50px;
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sort-label {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.view-toggle {
  display: inline-flex;
  gap: 0.5rem;
  background: var(--accent);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}

.view-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.view-btn:hover {
  color: var(--primary-solid);
}

.view-btn.active {
  background: var(--primary-color);
  color: #fff;
}

/* ============================================ */

/* RESULTS INFO */

/* ============================================ */

.results-info {
  padding: 1.5rem 0;
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-text {
  font-size: 1rem;
  color: var(--text-secondary);
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--primary-solid);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
}

.filter-tag button {
  background: none;
  border: none;
  color: var(--primary-solid);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

/* ============================================ */

/* CHILDREN GRID */

/* ============================================ */

.children-section {
  padding: 2rem 0 4rem;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.children-grid.list-view {
  grid-template-columns: 1fr;
}

.children-grid.list-view .child-card-inner {
  flex-direction: row;
  align-items: flex-start;
}

.children-grid.list-view .child-card-image {
  width: 250px;
  height: 250px;
  flex-shrink: 0;
}

.children-grid.list-view .child-card-content {
  flex: 1;
}

/* ============================================ */

/* CHILD CARD */

/* ============================================ */

.child-card-item {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.child-card-item.hidden {
  display: none;
}

.child-card-inner {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.child-card-inner:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 45px var(--shadow-hover);
}

.child-card-image {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

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

.child-card-inner:hover .child-card-image img {
  transform: scale(1.1);
}

.card-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.badge-funding,
.badge-new,
.badge-urgent {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge-funding {
  background: rgba(46, 125, 50, 0.95);
  color: #fff;
}

.badge-funding.warning {
  background: rgba(255, 193, 7, 0.95);
  color: #333;
}

.badge-funding.urgent {
  background: rgba(229, 57, 53, 0.95);
  color: #fff;
}

.badge-funding.success {
  background: rgba(76, 175, 80, 0.95);
  color: #fff;
}

.badge-new {
  background: rgba(33, 150, 243, 0.95);
  color: #fff;
}

.badge-urgent {
  background: rgba(229, 57, 53, 0.95);
  color: #fff;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.btn-favorite {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 45px;
  height: 45px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 2;
}

.btn-favorite:hover {
  background: #fff;
  color: #E53935;
  transform: scale(1.1);
}

.btn-favorite.active {
  color: #E53935;
}

.btn-favorite.active i::before {
  content: "\f5a5";
}

.child-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.child-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.child-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.meta-item i {
  color: var(--primary-solid);
}

.child-location,
.child-school,
.child-class {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.child-location i,
.child-school i,
.child-class i {
  color: var(--primary-solid);
  font-size: 1rem;
}

.funding-info {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.funding-progress {
  margin-bottom: 0.75rem;
}

.funding-amounts {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.amount-raised {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-solid);
}

.amount-total {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ============================================ */

/* LOAD MORE */

/* ============================================ */

.load-more-section {
  text-align: center;
  padding: 2rem 0;
}

/* ============================================ */

/* EMPTY STATE */

/* ============================================ */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-icon {
  font-size: 5rem;
  color: var(--text-secondary);
  opacity: 0.3;
  margin-bottom: 1.5rem;
}

.empty-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.empty-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ============================================ */

/* CTA MINI */

/* ============================================ */

.cta-mini {
  background: linear-gradient(135deg, #1B5E20, #2E7D32);
  padding: 3rem 0;
  margin-top: 3rem;
}

.cta-mini-content {
  text-align: center;
  color: #fff;
}

.cta-mini-content h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-mini-content p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 2rem;
}

/* ============================================ */

/* RESPONSIVE */

/* ============================================ */

@media (max-width: 991.98px) {
  .page-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 991.98px) {
  .children-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 991.98px) {
  .search-filter-card {
    padding: 1.5rem;
  }
}

@media (max-width: 991.98px) {
  .children-grid.list-view .child-card-inner {
    flex-direction: column;
  }
}

@media (max-width: 991.98px) {
  .children-grid.list-view .child-card-image {
    width: 100%;
    height: 280px;
  }
}

@media (max-width: 575.98px) {
  .page-hero {
    padding: 3rem 0 2rem;
  }
}

@media (max-width: 575.98px) {
  .page-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 575.98px) {
  .page-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .search-section {
    margin-top: -2rem;
  }
}

@media (max-width: 575.98px) {
  .search-filter-card {
    padding: 1rem;
  }
}

@media (max-width: 575.98px) {
  .children-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .sort-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .results-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 575.98px) {
  .view-toggle {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .cta-mini-content h3 {
    font-size: 1.5rem;
  }
}