/* =================================================================
   WordPress block overrides — maps WP core block markup to the
   prototype's component styles. Loaded last so it can override
   anything from earlier layers + theme.json defaults.
   ================================================================= */

/* -------- starfield + template-part scaffolding -------- */

/* Lift WP content above the body::before starfield from base.css */
.wp-site-blocks {
  position: relative;
  z-index: 1;
}

/* Template parts shouldn't add their own margins; site-header / site-footer handle spacing */
.wp-block-template-part {
  margin: 0;
}

/* -------- site title + logo -------- */
.wp-block-site-title a {
  font-family: var(--f-display) !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase;
  color: var(--gold) !important;
  text-decoration: none;
  font-weight: 500;
}
.wp-block-site-title a:hover {
  color: var(--cream) !important;
}

.wp-block-site-logo { flex-shrink: 0; }
/* Generic fallback only — the header badge sizing/clipping lives in header.css
   (.brand__mark img), which wins on specificity. Don't hard-code 48px here. */
.wp-block-site-logo img,
.wp-block-site-logo a img {
  border-radius: 50%;
}

/* Logo + title side-by-side in header */
header .wp-block-group:has(> .wp-block-site-logo) {
  align-items: center;
  gap: 0.75rem;
}

/* -------- navigation block — map to .primary-nav look -------- */
.wp-block-navigation {
  font-family: var(--f-display);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
.wp-block-navigation a {
  color: var(--parchment) !important;
  transition: color 0.3s var(--ease);
}
.wp-block-navigation a:hover {
  color: var(--gold) !important;
}

/* -------- button block — map to .btn look -------- */
.wp-block-button__link {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 0;
  padding: 1rem 2.5rem;
  font-family: var(--f-display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  text-decoration: none;
}
.wp-block-button__link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease);
}
.wp-block-button__link:hover {
  color: var(--void);
  background: var(--gold);
  box-shadow: var(--glow-gold-strong);
}
.wp-block-button__link:hover::before {
  transform: translateX(100%);
}

/* -------- YouTube embed — same frame as .video-frame -------- */
.wp-block-embed-youtube {
  position: relative;
  border: 1px solid rgba(201, 169, 110, 0.3);
  padding: 4px;
  background: var(--obsidian);
  box-shadow:
    0 0 0 1px rgba(201, 169, 110, 0.1),
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(74, 53, 99, 0.2);
}
.wp-block-embed-youtube iframe { display: block; }

/* -------- block styles registered in the editor -------- */

/* ornamental h2 (is-style-ornamental) */
.is-style-ornamental {
  position: relative;
  padding-top: 2.5rem;
}
.is-style-ornamental::before {
  content: "✦";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 1rem;
  opacity: 0.7;
}

/* full-bleed mystical cover */
.wp-block-cover.is-style-mystical {
  min-height: 100vh;
  position: relative;
}
.wp-block-cover.is-style-mystical::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--void) 100%);
  pointer-events: none;
}

/* mystical card group */
.is-style-mystical-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  padding: 2rem;
  transition: all 0.4s var(--ease);
}
.is-style-mystical-card:hover {
  border-color: var(--card-border-hover);
  background: rgba(31, 34, 56, 0.7);
  transform: translateY(-2px);
}

/* -------- drop caps for editorial content -------- */
.entry-content > p:first-of-type::first-letter,
.has-drop-cap:not(:focus)::first-letter {
  font-family: var(--f-display);
  color: var(--gold);
  font-size: 4rem;
  line-height: 1;
  float: left;
  margin: 0.1em 0.15em 0 0;
  font-weight: 500;
}

/* -------- gentle pulse for highlighted gold text -------- */
@keyframes mystical-glow {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.has-text-color.has-gold-color {
  animation: mystical-glow 4s ease-in-out infinite;
}
.sparkle {
  display: inline-block;
  color: var(--gold);
  animation: mystical-glow 3s ease-in-out infinite;
}

/* -------- Contact Form 7 — match .field + .btn.solid -------- */
.wpcf7-form label {
  display: block;
  font-family: var(--f-display);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 0.6rem;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  background: rgba(7, 8, 17, 0.65);
  border: 1px solid rgba(201, 169, 110, 0.28);
  color: var(--cream);
  padding: 0.95rem 1.05rem;
  font-family: var(--f-body);
  font-size: 1.05rem;
  margin-bottom: 1rem;
  border-radius: 0;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: var(--muted);
  font-style: italic;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.3), 0 0 30px rgba(201, 169, 110, 0.15);
}
.wpcf7-form input[type="submit"] {
  background: var(--gold);
  color: var(--void);
  border: 1px solid var(--gold);
  border-radius: 0;
  padding: 0.95rem 2.4rem;
  font-family: var(--f-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.wpcf7-form input[type="submit"]:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--void);
  box-shadow: var(--glow-gold-strong);
}

/* -------- Polylang language switcher -------- */
.lang-item {
  font-family: var(--f-display);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* -------- Reusable utility for video grid layouts in core columns -------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* -------- Mobile: center CF7 form labels/submit (inputs stay full-width) -------- */
@media (max-width: 768px) {
  .wpcf7-form label { text-align: center; }
  .wpcf7-form p { text-align: center; }       /* CF7 wraps each field in <p> */
  .wpcf7-form input[type="submit"] { display: inline-block; }
}
@media (max-width: 540px) {
  .wpcf7-form label { letter-spacing: 0.16em; }
}
