/*
Theme Name:   Coro Parroquial
Theme URI:    https://coro.uachatec.com/
Description:  Tema para repertorio litúrgico del coro parroquial. Paleta dorado y pergamino con navegación mejorada.
Author:       Coro Parroquial UACHATEC
Version:      1.0.0
Template:     twentytwentyfour
Text Domain:  coro-parroquial
*/

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --gold:            #C9A84C;
  --gold-light:      #F0D080;
  --gold-dark:       #8B6914;
  --gold-xdark:      #5A430A;
  --cream:           #FAF6EE;
  --parchment:       #F2EAD8;
  --parchment-dark:  #E8DEC8;
  --ink:             #2C2416;
  --ink-soft:        #4A3F2F;
  --ink-muted:       #7A6E5E;
  --border-gold:     rgba(201, 168, 76, 0.30);
  --border-gold-md:  rgba(201, 168, 76, 0.55);
  --border-gold-str: rgba(201, 168, 76, 0.85);
  --shadow-warm:     0 2px 16px rgba(100, 60, 10, 0.08);
  --shadow-card:     0 1px 6px rgba(100, 60, 10, 0.06);
  --radius-sm:       5px;
  --radius-md:       8px;
  --radius-lg:       12px;
  --font-serif:      'Georgia', 'Times New Roman', serif;
  --font-sans:       -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:       'Courier New', Courier, monospace;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--parchment);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

a {
  color: var(--gold-dark);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.site {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  border-left:  0.5px solid var(--border-gold);
  border-right: 0.5px solid var(--border-gold);
  box-shadow: var(--shadow-warm);
}

.site-content {
  padding: 2rem 2.5rem 4rem;
}

@media (max-width: 640px) {
  .site-content {
    padding: 1.5rem 1.25rem 3rem;
  }
}

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
  background: var(--ink);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(201,168,76,0.04) 39px,
      rgba(201,168,76,0.04) 40px
    );
  pointer-events: none;
}

.site-header-inner {
  position: relative;
  z-index: 1;
  padding: 2.25rem 2.5rem 1.75rem;
  text-align: center;
}

.header-ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(240,208,128,0.4), transparent);
}

.ornament-text {
  font-size: 12px;
  letter-spacing: 8px;
  color: rgba(240,208,128,0.5);
  font-family: var(--font-serif);
}

.site-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: normal;
  color: #ffffff;
  letter-spacing: 3px;
  margin: 0 0 0.3rem;
  line-height: 1.2;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-description {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin: 0;
  font-family: var(--font-sans);
}

@media (max-width: 640px) {
  .site-header-inner { padding: 1.75rem 1.25rem 1.5rem; }
  .site-title { font-size: 26px; }
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-navigation {
  background: var(--parchment);
  border-bottom: 1px solid var(--border-gold-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-navigation .nav-inner {
  display: flex;
  align-items: center;
  padding: 0 2rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.main-navigation .nav-inner::-webkit-scrollbar {
  display: none;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0;
}

.main-navigation ul li a {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.1rem;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item a,
.main-navigation ul li.current_page_item a {
  color: var(--gold-dark);
  border-bottom-color: var(--gold);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  margin-left: auto;
  color: var(--ink-soft);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  margin: 4px 0;
  transition: all 0.2s;
}

@media (max-width: 600px) {
  .nav-toggle { display: flex; flex-direction: column; align-items: center; }
  .main-navigation ul { display: none; flex-direction: column; width: 100%; }
  .main-navigation ul.open { display: flex; }
  .main-navigation .nav-inner { flex-wrap: wrap; padding: 0 1rem; }
  .main-navigation ul li a { padding: 0.75rem 0.5rem; border-bottom: none; border-left: 2px solid transparent; }
  .main-navigation ul li a:hover,
  .main-navigation ul li.current-menu-item a { border-left-color: var(--gold); border-bottom-color: transparent; }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  padding: 0.75rem 2.5rem;
  background: var(--cream);
  border-bottom: 0.5px solid var(--border-gold);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--gold-dark);
}

.breadcrumbs .sep {
  opacity: 0.4;
  font-size: 10px;
}

.breadcrumbs .current {
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .breadcrumbs { padding: 0.6rem 1.25rem; }
}

/* ============================================================
   PAGE / POST HEADER
   ============================================================ */
.entry-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 0.5px solid var(--border-gold);
}

.section-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: var(--parchment);
  border: 0.5px solid var(--border-gold-md);
  border-radius: var(--radius-sm);
  padding: 3px 12px;
  margin-bottom: 0.75rem;
}

.entry-title,
h1.page-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: normal;
  color: var(--ink);
  letter-spacing: 1px;
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 640px) {
  .entry-title, h1.page-title { font-size: 24px; }
}

/* ============================================================
   SECTION DIVIDERS
   ============================================================ */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1.5rem 0 1.25rem;
}

.section-divider-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  white-space: nowrap;
  font-family: var(--font-sans);
}

.section-divider-line {
  flex: 1;
  height: 0.5px;
  background: var(--border-gold);
}

/* ============================================================
   INDEX GRID (categorías)
   ============================================================ */
.repertoire-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 2.5rem;
}

.category-card {
  background: var(--cream);
  border: 0.5px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
}

.category-card:hover {
  background: #fff;
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  color: var(--ink);
}

.category-card-icon {
  font-size: 18px;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 2px;
}

.category-card-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  line-height: 1.3;
}

.category-card-count {
  font-size: 11px;
  color: var(--gold-dark);
  letter-spacing: 0.5px;
}

@media (max-width: 480px) {
  .repertoire-index {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* ============================================================
   SONG LIST (dentro de categorías)
   ============================================================ */
.song-list {
  border: 0.5px solid var(--border-gold);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2rem;
}

.song-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0.85rem 1.25rem;
  background: #fff;
  border-bottom: 0.5px solid var(--border-gold);
  transition: background 0.12s;
  text-decoration: none;
  color: var(--ink-soft);
}

.song-list-item:last-child {
  border-bottom: none;
}

.song-list-item:hover {
  background: var(--cream);
  color: var(--ink);
}

.song-list-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}

.song-list-name {
  flex: 1;
  font-size: 15px;
  font-family: var(--font-sans);
}

.song-list-arrow {
  font-size: 18px;
  color: var(--border-gold-str);
  line-height: 1;
  flex-shrink: 0;
}

/* ============================================================
   SONG / CANTO PAGE
   ============================================================ */
.song-header {
  margin-bottom: 1.5rem;
}

.song-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: normal;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.song-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.song-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  background: var(--parchment);
  border: 0.5px solid var(--border-gold-md);
  border-radius: 4px;
  padding: 3px 12px;
  font-family: var(--font-sans);
}

/* Chord sheet */
.chord-sheet {
  background: var(--cream);
  border: 0.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  font-family: var(--font-mono);
  line-height: 1.95;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.chord-sheet p,
.chord-sheet .wp-block-paragraph {
  margin: 0 0 0.15em;
  font-size: 14px;
  color: var(--ink-soft);
}

/* Chords rendered as bold in the song = gold color */
.chord-sheet strong,
.chord-sheet b {
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 13px;
}

/* Chorus / stanza markers (h4 in Gutenberg) */
.chord-sheet h4 {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 1.25rem 0 0.5rem;
  border: none;
  padding: 0;
}

/* ============================================================
   FONT SIZE CONTROLS (accesibilidad)
   ============================================================ */
.font-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.25rem;
}

.font-controls-label {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-family: var(--font-sans);
  margin-right: 4px;
}

.font-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0.5px solid var(--border-gold-md);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  font-family: var(--font-sans);
}

.font-btn:hover {
  background: var(--ink);
  color: var(--gold-light);
  border-color: var(--ink);
}

/* ============================================================
   SEARCH BAR (en páginas de archivo)
   ============================================================ */
.coro-search {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--cream);
  border: 0.5px solid var(--border-gold-md);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.75rem 0.6rem 1rem;
}

.coro-search-icon {
  color: var(--ink-muted);
  flex-shrink: 0;
  font-size: 14px;
}

.coro-search input[type="search"],
.coro-search input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  font-family: var(--font-sans);
  min-width: 0;
}

.coro-search input::placeholder {
  color: var(--ink-muted);
}

.coro-search button[type="submit"] {
  padding: 6px 16px;
  background: var(--ink);
  color: var(--gold-light);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.15s;
  flex-shrink: 0;
}

.coro-search button[type="submit"]:hover {
  background: var(--ink-soft);
}

/* ============================================================
   MISA BUILDER PAGE  (page-misas.php)
   ============================================================ */
.misa-builder {
  margin-bottom: 2rem;
}

.misa-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0.85rem 1.25rem;
  background: var(--cream);
  border: 0.5px solid var(--border-gold);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: border-color 0.15s;
}

.misa-row:focus-within {
  border-color: var(--gold);
  background: #fff;
}

.misa-row-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  min-width: 130px;
  font-family: var(--font-sans);
  flex-shrink: 0;
}

.misa-row select {
  flex: 1;
  border: 0.5px solid var(--border-gold-md);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 14px;
  font-family: var(--font-sans);
  background: #fff;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  min-width: 0;
}

.misa-row select:focus {
  border-color: var(--gold);
}

@media (max-width: 500px) {
  .misa-row { flex-wrap: wrap; gap: 8px; }
  .misa-row-label { min-width: auto; }
  .misa-row select { width: 100%; }
}

/* ============================================================
   ACTION BAR / BUTTONS
   ============================================================ */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 1.5rem;
  border-top: 0.5px solid var(--border-gold);
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font-sans);
  cursor: pointer;
  border: 0.5px solid var(--border-gold-md);
  background: transparent;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
}

.btn:hover {
  background: var(--parchment);
  border-color: var(--gold);
  color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: var(--gold-light);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--ink-soft);
  color: var(--gold-light);
}

/* ============================================================
   PDF LIST (page-pdfs.php)
   ============================================================ */
.pdf-list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border: 0.5px solid var(--border-gold);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  transition: background 0.12s, border-color 0.12s;
}

.pdf-list-item:hover {
  background: #fff;
  border-color: var(--gold);
  color: var(--ink);
}

.pdf-icon {
  width: 36px;
  height: 36px;
  background: var(--parchment-dark);
  border: 0.5px solid var(--border-gold-md);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gold-dark);
  font-family: var(--font-sans);
  flex-shrink: 0;
}

.pdf-name {
  flex: 1;
  font-size: 15px;
}

.pdf-arrow {
  color: var(--border-gold-str);
  font-size: 16px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  padding: 2rem 2.5rem;
  text-align: center;
}

.site-footer-ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.site-footer-ornament .ornament-line {
  background: linear-gradient(to right, transparent, rgba(201,168,76,0.25), transparent);
}

.site-footer-ornament .ornament-text {
  font-size: 11px;
  letter-spacing: 5px;
  color: rgba(201,168,76,0.3);
}

.site-footer p {
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
  margin: 0;
  font-family: var(--font-sans);
}

.site-footer a {
  color: rgba(240,208,128,0.5);
}

.site-footer a:hover {
  color: var(--gold-light);
}

/* ============================================================
   WIDGETS / SIDEBAR
   ============================================================ */
.widget-area {
  padding: 1.5rem;
  border-top: 1px solid var(--border-gold);
  background: var(--cream);
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid var(--border-gold);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 0.5px solid var(--border-gold);
  font-size: 14px;
}

.widget ul li:last-child {
  border-bottom: none;
}

/* ============================================================
   CUADERNO / POSTS
   ============================================================ */
.post-card {
  background: #fff;
  border: 0.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.post-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
}

.post-card-date {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-family: var(--font-sans);
  margin-bottom: 0.5rem;
}

.post-card h2,
.post-card .post-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: normal;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.post-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 1rem;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .main-navigation,
  .breadcrumbs,
  .action-bar,
  .font-controls,
  .site-footer {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .site {
    max-width: 100%;
    border: none;
    box-shadow: none;
  }

  .chord-sheet {
    border: 1px solid #ccc;
    background: #fff;
    padding: 1cm;
  }

  .chord-sheet strong,
  .chord-sheet b {
    color: #000;
    font-weight: bold;
  }

  .site-header {
    background: #fff !important;
    border-bottom: 2px solid #000;
  }

  .site-title { color: #000 !important; font-size: 18pt; }
  .site-description { color: #444 !important; }
  .ornament-line, .ornament-text { display: none; }
}
