/* Family-friendly warm color palette */
:root {
  --primary-color: #e67e22;       /* Warm orange */
  --secondary-color: #27ae60;     /* Fresh green */
  --accent-color: #3498db;        /* Friendly blue */
  --warm-bg: #fff8f0;             /* Warm cream background */
  --card-bg: #ffffff;
  --text-primary: #2c3e50;
  --text-muted: #7f8c8d;
  --border-color: #ecf0f1;
  --success-color: #27ae60;
  --danger-color: #e74c3c;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--warm-bg);
  color: var(--text-primary);
}

/* Navbar styling */
.navbar {
  background-color: white !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color) !important;
}

.navbar-brand .brand-text {
  color: var(--primary-color);
  margin-left: 8px;
}

.navbar-brand i {
  font-size: 1.8rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

.nav-link i {
  margin-right: 5px;
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  background-color: var(--card-bg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-header {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border-radius: 12px 12px 0 0 !important;
  padding: 1rem 1.5rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #d35400;
  border-color: #d35400;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(230, 126, 34, 0.3);
}

.btn-success {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  border-radius: 8px;
}

.btn-info {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  border-radius: 8px;
}

/* Profile photo styling */
.profile-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  border: 4px solid var(--border-color);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.profile-photo-sm {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}

.profile-photo-md {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid var(--border-color);
}

/* Person card */
.person-card {
  text-align: center;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: white;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.person-card img {
  margin-bottom: 1rem;
}

.person-card h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.person-card .text-muted {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
}

/* Hero section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 4rem 0;
  margin: -1rem -1rem 2rem -1rem;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-section p {
  font-size: 1.2rem;
  opacity: 0.95;
}

/* Footer */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
  background-color: white;
  border-top: 1px solid var(--border-color);
}

/* Language specific hiding */
.lang-te.d-none {
  display: none !important;
}

.lang-en.d-none {
  display: none !important;
}

/* Form styling */
.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 2px solid var(--border-color);
  padding: 0.6rem 1rem;
  transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

/* Alert styling */
.alert {
  border-radius: 10px;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

/* Badge styling */
.badge {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.badge-alive {
  background-color: var(--success-color);
}

.badge-deceased {
  background-color: var(--text-muted);
}

/* Tree visualization */
.tree-container {
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow-x: auto;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: var(--text-muted);
}

/* Stats card */
.stats-card {
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.stats-card h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stats-card p {
  margin: 0;
  opacity: 0.9;
}

/* Loading spinner */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  .profile-photo {
    width: 150px;
    height: 150px;
  }
}
