:root {
  --green:     #0a7a52;
  --green-d:   #065438;
  --gold:      #c99a0d;
  --ink:       #0f1c11;
  --muted:     #60706a;
  --white:     #ffffff;
  --off:       #f3f6f2;
  --border:    rgba(0,0,0,.09);
  --r:         12px;
  --tr:        .28s ease;
  --serif:     "Playfair Display", Georgia, serif;
  --sans:      "Inter", system-ui, sans-serif;
  --shadow:    0 4px 20px rgba(0,0,0,.07);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.13);
}

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.page-hero {
  background: linear-gradient(140deg, #051c0f 0%, #0d5e3c 100%);
  padding: 56px 24px;
  text-align: center;
  color: #fff;
}

.ph-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.ph-label::before { content: ""; width: 22px; height: 2px; background: currentColor; flex-shrink: 0; }

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.05;
  margin: 0;
}

.page-hero > p:not(.ph-label) {
  max-width: 520px;
  margin: 10px auto 0;
  color: rgba(255,255,255,.74);
  font-size: 1rem;
  line-height: 1.72;
}

.cat-heading {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 900;
  color: var(--ink);
  width: fit-content;
  margin: 0 auto 32px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.dances-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

#danceContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 320px));
  gap: 22px;
  justify-content: center;
}

.dance {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform var(--tr), box-shadow var(--tr);
}

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

.dance-img-wrap {
  order: -1;
  width: 100%;
  height: 210px;
  min-height: 210px;
  max-height: 210px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--off);
}

.dance-img-wrap > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.dance[data-dance-id="1"] .dance-img-wrap > img,
.dance-page[data-dance-id="1"] .dp-hero-img {
  object-position: center 25%;
}

.dance-no-img {
  order: -1;
  width: 100%;
  height: 210px;
  background: var(--off);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,.14);
  font-size: 2.6rem;
  flex-shrink: 0;
}

.danceName {
  order: 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--ink);
  padding: 16px 18px 0;
  margin: 0;
}

.danceDescription {
  order: 1;
  font-size: .87rem;
  line-height: 1.62;
  color: var(--muted);
  padding: 8px 18px 0;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.danceRegion {
  order: 2;
  font-size: .78rem;
  color: var(--muted);
  padding: 10px 18px 0;
  margin: 0;
}

.danceCategory {
  order: 3;
  font-size: .78rem;
  color: var(--muted);
  padding: 4px 18px 16px;
  margin: 0;
}

.danceRegion strong,
.danceCategory strong { color: var(--ink); }

#danceContainer.dp-single-view {
  display: block;
}

.dance-page {
  max-width: 920px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.dp-hero {
  width: 100%;
  height: 380px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(140deg, #051c0f 0%, #0d5e3c 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
}

.dp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.32) 0%, transparent 55%);
  pointer-events: none;
}

.dp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.dp-hero-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.22);
  font-size: 5.5rem;
}

.dp-content {
  padding: 0 4px;
}

.dp-content-title {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
  margin: 34px 0 26px;
}

.dance-details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.dp-meta-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.dp-meta-strip p {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  background: var(--off);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: .84rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1;
}

.dp-meta-strip p i {
  color: var(--green);
  font-size: .78rem;
}

.dp-meta-strip p strong {
  color: var(--ink);
  font-weight: 700;
}

.dp-desc-label {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 14px;
}

.dance-details .danceDescription {
  display: block !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  font-size: 1.04rem;
  line-height: 1.84;
  color: #384540;
  padding: 0;
  margin: 0;
}

.dp-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.dp-btn {
  height: 42px;
  padding: 0 26px;
  border-radius: 10px;
  border: none;
  font-family: var(--sans);
  font-size: .87rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--tr), transform var(--tr);
}

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

.dp-btn--update { background: var(--green); color: #fff; }
.dp-btn--update:hover { background: var(--green-d); }
.dp-btn--delete { background: #fef2f2; color: #b91c1c; border: 1px solid rgba(185,28,28,.15); }
.dp-btn--delete:hover { background: #fee2e2; }

.dance-details .form-control,
.dance-details .form-select {
  font-family: var(--sans);
  font-size: .9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
}
.dance-details .form-control:focus,
.dance-details .form-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10,122,82,.1);
  outline: none;
}

@media (max-width: 768px) {
  .dances-section { padding: 40px 20px 60px; }
  #danceContainer { grid-template-columns: repeat(auto-fit, minmax(220px, 300px)); gap: 16px; justify-content: center; }
  .dance-page { margin: 20px auto 60px; }
  .dp-hero { height: 280px; border-radius: 12px; }
  .dp-content-title { font-size: 1.9rem; margin: 24px 0 20px; }
  .dance-details { padding: 24px; }
  .dp-meta-strip { gap: 8px; }
}
