:root {
  --bg: #fffbf7;
  --paper: #ffffff;
  --text: #2c221e;
  --muted: #6e5e55;
  --orange: #c85a17;
  --orange-dark: #9e4410;
  --gold: #d49a37;
  --line: #ecdcd0;
  --cream: #faefe4;
  --shadow: 0 16px 48px rgba(96, 52, 24, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

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

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

/* =========================
   NAVIGATION
========================= */
.navbar {
  min-height: 76px;
  padding: 12px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 251, 247, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--gold));
  color: white;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(200, 90, 23, 0.25);
}

.brand strong {
  display: block;
  font-size: 17px;
  font-family: Georgia, serif;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

nav a {
  color: #4e3d34;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--orange);
}

.admin-btn {
  border: 1px solid var(--gold);
  background: var(--cream);
  color: var(--orange-dark);
  border-radius: 30px;
  padding: 9px 18px;
  font-weight: 600;
  transition: 0.2s ease;
}

.admin-btn:hover {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* =========================
   HERO SECTION
========================= */
.hero {
  min-height: 540px;
  padding: 70px 8vw;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
  background: radial-gradient(circle at 85% 20%, #fdebd0 0, transparent 35%), linear-gradient(135deg, #fffbf7, #f6e3d0);
}

.hero-content {
  max-width: 680px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: bold;
  color: var(--orange);
  margin-bottom: 12px;
}

.hero-content .eyebrow {
  padding: 8px 18px;
  font-family: Georgia, "Noto Serif Devanagari", serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 2px;
  background: linear-gradient(120deg, #9e4410 0%, #c85a17 30%, #d49a37 60%, #8e3609 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-bottom: 2px solid var(--gold);
  filter: drop-shadow(0 2px 4px rgba(158, 68, 16, 0.15));
}

.hero h1 {
  font: clamp(38px, 5.5vw, 64px) / 1.08 Georgia, serif;
  margin: 15px 0 20px;
  color: #2b1d16;
}

.hero p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 25px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-block;
  border: 0;
  border-radius: 9px;
  padding: 12px 20px;
  font-weight: bold;
  text-align: center;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 14px rgba(200, 90, 23, 0.3);
}

.primary:hover {
  background: var(--orange-dark);
}

.secondary {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.secondary:hover {
  background: var(--cream);
  border-color: var(--gold);
}

/* =========================
   HERO ART & MANTRA
========================= */
.hero-art {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(212, 154, 55, 0.3);
  border-radius: 28px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.hero-art .ganinath-mantra {
  font-family: serif !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  font-weight: normal !important;
  color: var(--orange-dark);
  text-align: center;
  margin: 0 0 12px;
  padding: 0;
}

.Ganinath-image {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 18px;
}

.Ganinath-img {
  display: block;
  width: 100%;
  max-width: 280px;
  max-height: 300px;
  object-fit: contain;
  border-radius: 16px;
}

/* =========================
   GENERAL SECTIONS & FILTERS
========================= */
.section {
  padding: 70px 8vw;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 25px;
}

.section h2 {
  font: 36px Georgia, serif;
  margin: 6px 0;
}

.badge {
  background: #fae2cc;
  color: var(--orange-dark);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: bold;
}

.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 30px;
}

.filters input, .filters select, .form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.filters input:focus, .filters select:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: 2px solid rgba(212, 154, 55, 0.4);
  border-color: var(--gold);
}

/* =========================
   PROFILE CARDS
========================= */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(76, 45, 23, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

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

.profile-photo {
  height: 290px;
  background: #f4e5d8;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder {
  font: 70px Georgia, serif;
  color: #b8866b;
}

.favorite-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.85);
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  color: #b8b8b8;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.favorite-btn.active {
  color: #e74c3c;
  background: #fff;
}

.profile-body {
  padding: 20px;
}

.profile-body h3 {
  font: 24px Georgia, serif;
  margin: 0 0 6px;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.chip {
  background: var(--cream);
  color: var(--orange-dark);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
}

.view {
  width: 100%;
  margin-top: 10px;
}

.empty {
  text-align: center;
  padding: 60px;
  color: var(--muted);
  grid-column: 1 / -1;
  background: white;
  border-radius: 16px;
  border: 1px dashed var(--line);
}

.hidden {
  display: none !important;
}

/* =========================
   ABOUT SECTION
========================= */
.about {
  background: #2b1d16;
  color: white;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 50px;
}

.about h2 {
  color: #ffecd9;
}

.about p {
  color: #d1bfae;
  line-height: 1.8;
}

/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

/* =========================
   MODALS
========================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 15, 0.65);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
}

.modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: 94vh;
  overflow: auto;
  background: var(--bg);
  border-radius: 24px;
  padding: 35px;
  box-shadow: var(--shadow);
}

.close {
  position: absolute;
  right: 18px;
  top: 15px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* =========================
   PROFILE DETAILS
========================= */
.profile-detail {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
}

.detail-photo {
  height: 390px;
  background: #f4e5d8;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

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

.detail-photo span {
  font: 80px Georgia, serif;
  color: #b8866b;
}

.detail-info h2 {
  font: 36px Georgia, serif;
  margin: 6px 0 16px;
}

.detail-row {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-row b {
  display: block;
  color: var(--orange);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

/* =========================
   FORMS & ADMIN
========================= */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid label {
  font-size: 12px;
  font-weight: bold;
  color: #5c4c43;
}

.form-grid label input, .form-grid label select, .form-grid label textarea {
  display: block;
  margin-top: 6px;
  font-weight: normal;
}

.form-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.error {
  color: #b32424;
  font-size: 13px;
  margin-top: 8px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}

.dashboard-head h2 {
  font: 30px Georgia, serif;
  margin: 4px 0;
}

.admin-profiles {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 20px;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.admin-actions {
  display: flex;
  gap: 6px;
}

.edit-btn, .delete-btn {
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
}

.edit-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.delete-btn {
  border: 1px solid #f2d2cd;
  background: #fdf2f0;
  color: #a82020;
}

/* =========================
   RESPONSIVENESS
========================= */
@media (max-width: 950px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters input {
    grid-column: 1 / -1;
  }
  .about {
    grid-template-columns: 1fr;
  }
  .profile-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .navbar {
    padding: 10px 4vw;
  }
  nav a {
    display: none;
  }
  .hero, .section {
    padding: 50px 5vw;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .filters, .form-grid {
    grid-template-columns: 1fr;
  }
}