﻿/* =========================================
   MATERCAT - Estilos principales
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Open+Sans:wght@300;400;600&display=swap');

:root {
  --gold:       #C9A84C;
  --gold-light: #E8D48B;
  --blue-deep:  #1A2A4A;
  --blue-mid:   #2C4A7A;
  --cream:      #F8F4ED;
  --white:      #FFFFFF;
  --red-church: #8B1A1A;
  --gray-soft:  #E8E4DC;
  --text-dark:  #2A2A2A;
  --shadow:     0 4px 24px rgba(0,0,0,0.18);
}

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

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--blue-deep);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ---- HEADER ---- */
header {
  background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-mid) 100%);
  border-bottom: 3px solid var(--gold);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-icon {
  font-size: 2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.logo-text h1 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.3rem;
  letter-spacing: 2px;
  line-height: 1.2;
}

.logo-text span {
  color: var(--gold-light);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: 'Open Sans', sans-serif;
  font-weight: 300;
}

nav {
  display: flex;
  gap: 8px;
}

nav a {
  color: var(--gold-light);
  text-decoration: none;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.2s;
}

nav a:hover, nav a.active {
  border-color: var(--gold);
  background: rgba(201,168,76,0.15);
  color: var(--gold);
}

/* ---- HERO ---- */
.hero {
  background:
    linear-gradient(to bottom, rgba(26,42,74,0.85) 0%, rgba(26,42,74,0.95) 100%),
    url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg/1280px-The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg') center/cover;
  text-align: center;
  padding: 80px 24px 60px;
  border-bottom: 3px solid var(--gold);
}

.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 auto 22px;
}

.hero-logo {
  display: block;
  width: auto;
  object-fit: contain;
  background: rgba(255,255,255,0.96);
  border: 2px solid rgba(232,212,139,0.75);
  border-radius: 10px;
  padding: 10px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.45));
}

.hero-logo-mater {
  height: 205px;
  max-width: min(800px, 90vw);
}

.hero-logo-mons {
  height: 216px;
}

.hero-ornament {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.hero h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 2.8rem;
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 8px;
}

.hero h3 {
  font-family: 'EB Garamond', serif;
  color: var(--gold-light);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 24px;
}

.hero-quote {
  max-width: 680px;
  margin: 0 auto 32px;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--cream);
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  text-align: left;
}

.hero-quote cite {
  display: block;
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-top: 6px;
  font-style: normal;
}

.hero-info {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.hero-badge {
  background: rgba(201,168,76,0.15);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 10px 20px;
  color: var(--cream);
  font-size: 0.9rem;
}

.hero-badge strong {
  color: var(--gold);
  display: block;
  font-size: 1rem;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 52px;
  }

  .hero-logos {
    gap: 18px;
    margin-bottom: 18px;
  }

  .hero-logo-mater {
    height: auto;
    width: min(95vw, 470px);
  }

  .hero-logo-mons {
    height: 160px;
  }
}

/* ---- MAIN CONTAINER ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ---- SECTION TITLES ---- */
.section-title {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.6rem;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--gold-light);
  font-size: 0.9rem;
  margin-bottom: 32px;
  font-style: italic;
}

.divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 12px auto 28px;
}

/* ---- CALENDAR GRID ---- */
.search-section {
  background: #efe9dc;
  border-bottom: 3px solid var(--gold);
  padding: 42px 24px;
}

.search-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.search-section .section-title {
  color: var(--blue-deep);
}

.search-section .section-subtitle {
  color: #5f5748;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: var(--white);
  border: 2px solid rgba(201,168,76,0.75);
  border-radius: 8px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.search-box input {
  min-width: 0;
  border: none;
  outline: none;
  color: var(--blue-deep);
  font-size: 1rem;
  font-family: 'Open Sans', sans-serif;
  padding: 10px 12px;
}

.search-box button,
.search-hints button {
  border: 1px solid var(--gold);
  background: var(--blue-deep);
  color: var(--gold-light);
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.search-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 8px;
}

.search-hints button {
  background: transparent;
  color: var(--blue-deep);
}

.search-hints button:hover,
.search-box button:hover {
  background: var(--gold);
  color: var(--blue-deep);
}

.search-status {
  color: #625848;
  font-size: 0.86rem;
  margin: 12px 0;
  text-align: center;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.search-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100%;
  background: var(--white);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text-dark);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-result:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #71644f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.search-result-badge {
  background: var(--blue-deep);
  color: var(--gold);
  border-radius: 4px;
  padding: 3px 7px;
}

.search-result h3 {
  color: var(--blue-deep);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  line-height: 1.25;
}

.search-result p {
  color: #4f4a40;
  font-size: 0.84rem;
  line-height: 1.45;
}

.search-result mark {
  background: rgba(201,168,76,0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

@media (max-width: 640px) {
  .search-box {
    grid-template-columns: 1fr;
  }
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.encounter-card {
  background: var(--cream);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: block;
  border: 1px solid #ddd;
}

.encounter-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.encounter-card:hover .card-header {
  background: var(--blue-mid);
}

.card-header {
  background: var(--blue-deep);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.card-number {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 1.5rem;
  font-weight: 700;
}

.card-date {
  color: var(--gold-light);
  font-size: 0.8rem;
  text-align: right;
}

.card-date strong {
  display: block;
  font-size: 0.95rem;
  color: var(--white);
}

.card-body {
  padding: 16px 20px;
}

.card-part {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-church);
  margin-bottom: 8px;
}

.topic-list {
  list-style: none;
}

.topic-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed #ddd;
  font-size: 0.88rem;
  color: var(--text-dark);
  line-height: 1.4;
}

.topic-list li:last-child { border-bottom: none; }

.topic-num {
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.card-footer {
  padding: 10px 20px;
  background: var(--gray-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-ccc {
  font-size: 0.75rem;
  color: #777;
}

.btn-ver {
  background: var(--blue-deep);
  color: var(--gold);
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-ver:hover { background: var(--blue-mid); }

.card-disabled .card-header { background: #555; }
.card-disabled .card-number { color: #aaa; }
.card-disabled .card-date { color: #bbb; }
.card-disabled .card-date strong { color: #ccc; }
.card-disabled { opacity: 0.6; pointer-events: none; }

/* ---- YEAR TABS ---- */
.year-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  justify-content: center;
}

.year-tab {
  padding: 10px 32px;
  border: 2px solid var(--gold);
  border-radius: 30px;
  background: transparent;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.year-tab.active, .year-tab:hover {
  background: var(--gold);
  color: var(--blue-deep);
}

.year-panel { display: none; }
.year-panel.active { display: block; }

/* ---- IMAGE GALLERY ---- */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.image-card {
  background: var(--cream);
  border: 1px solid rgba(201,168,76,0.45);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.image-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.image-card figure {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--blue-deep);
  display: block;
}

.image-card figcaption {
  padding: 10px 12px;
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

/* ---- FOOTER ---- */
footer {
  background: var(--blue-deep);
  border-top: 3px solid var(--gold);
  padding: 28px 24px;
  text-align: center;
  color: var(--gold-light);
  font-size: 0.85rem;
}

footer .footer-cross { font-size: 1.5rem; display: block; margin-bottom: 8px; }
footer p { color: #aaa; margin-top: 6px; }

/* ---- CONTROL DE ACCESO ---- */
.search-result-locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.encounter-card.encounter-locked {
  filter: grayscale(0.2);
  opacity: 0.72;
}

.encounter-card.encounter-locked:hover {
  box-shadow: var(--shadow);
  transform: none;
}

.access-badge {
  align-items: center;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 999px;
  color: var(--cream);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-left: auto;
  padding: 3px 9px;
  text-transform: uppercase;
}

.encounter-card.encounter-locked .access-badge {
  background: rgba(139,26,26,0.9);
}

.encounter-card[data-access="released"] .access-badge {
  background: rgba(28,102,72,0.9);
}

.admin-page,
.access-page {
  background: var(--cream);
}

.admin-shell,
.access-message {
  margin: 0 auto;
  max-width: 1080px;
  padding: 42px 24px 64px;
}

.admin-hero,
.admin-panel,
.access-message {
  background: var(--white);
  border: 1px solid rgba(201,168,76,0.55);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-hero {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 24px;
}

.admin-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-eyebrow {
  color: var(--red-church);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.admin-hero h2,
.admin-panel h3,
.access-message h1 {
  color: var(--blue-deep);
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}

.admin-hero p,
.admin-help,
.admin-status,
.access-message p {
  color: #5f5748;
  line-height: 1.55;
}

.admin-panel {
  margin-top: 18px;
  padding: 22px;
}

.admin-login-form,
.admin-settings-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  max-width: 520px;
}

.admin-login-form label,
.admin-settings-form label {
  color: var(--blue-deep);
  display: grid;
  font-weight: 800;
  gap: 6px;
}

.admin-login-form input,
.admin-settings-form input {
  border: 1px solid rgba(26,42,74,0.25);
  border-radius: 6px;
  font: inherit;
  padding: 11px 12px;
}

.password-control {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-control input {
  min-width: 0;
}

.password-control button {
  background: rgba(201,168,76,0.16);
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--blue-deep);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
}

.using-supabase .local-login-field,
.admin-page:not(.using-supabase) .supabase-login-field {
  display: none;
}

.admin-btn,
.release-toggle {
  background: var(--blue-deep);
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold-light);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  padding: 10px 14px;
  text-decoration: none;
}

.admin-btn.secondary {
  background: transparent;
  color: var(--blue-deep);
}

.admin-panel-head,
.release-row,
.pdf-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.release-list,
.pdf-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.admin-user-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.admin-user-search input {
  border: 1px solid rgba(26,42,74,0.25);
  border-radius: 6px;
  color: var(--blue-deep);
  font: inherit;
  min-width: 0;
  padding: 11px 12px;
}

.admin-user-search input:focus {
  border-color: var(--gold);
  outline: 2px solid rgba(201,168,76,0.28);
}

.admin-user-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.release-row,
.pdf-row,
.admin-user-row {
  border: 1px solid var(--gray-soft);
  border-radius: 8px;
  padding: 13px 14px;
}

.release-row strong,
.release-row span,
.pdf-row strong,
.pdf-row span {
  display: block;
}

.release-row strong,
.pdf-row strong {
  color: var(--blue-deep);
}

.release-row span,
.pdf-row span {
  color: #6b6254;
  font-size: 0.86rem;
  margin-top: 2px;
}

.admin-user-row strong,
.admin-user-row span {
  display: block;
}

.admin-user-row strong {
  color: var(--blue-deep);
}

.admin-user-row span {
  color: #6b6254;
  font-size: 0.86rem;
  margin-top: 2px;
}

.pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.release-toggle.is-released {
  background: var(--red-church);
  color: var(--cream);
}

.release-mode-badge {
  background: rgba(201,168,76,0.18);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 10px;
}

.access-message {
  margin-top: 80px;
  max-width: 620px;
  text-align: center;
}

.access-lock {
  border: 2px solid var(--gold);
  border-radius: 999px;
  color: var(--red-church);
  display: inline-flex;
  font-size: 0;
  height: 54px;
  margin-bottom: 14px;
  position: relative;
  width: 54px;
}

.access-lock::before {
  border: 4px solid var(--red-church);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  content: "";
  height: 18px;
  left: 14px;
  position: absolute;
  top: 8px;
  width: 20px;
}

.access-lock::after {
  background: var(--red-church);
  border-radius: 4px;
  content: "";
  height: 20px;
  left: 13px;
  position: absolute;
  top: 26px;
  width: 24px;
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

@media (max-width: 720px) {
  .admin-hero,
  .admin-panel-head,
  .release-row,
  .pdf-row {
    align-items: stretch;
    flex-direction: column;
  }

  .pdf-actions {
    justify-content: stretch;
  }

  .pdf-actions .admin-btn {
    width: 100%;
  }

  .admin-user-search {
    grid-template-columns: 1fr;
  }
}

/* ---- MODO PROYECCION CLARA PARA PANTALLA DE INICIO ---- */
body {
  background: #ffffff;
  color: #111827;
}

header {
  background: #ffffff;
  border-bottom: 3px solid #12345A;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.logo-text h1,
.section-title {
  color: #12345A;
  text-shadow: none;
}

.logo-text span,
.section-subtitle,
footer,
footer p {
  color: #374151;
}

nav a {
  color: #12345A;
  border-color: transparent;
}

nav a:hover,
nav a.active {
  background: #FFF3BF;
  border-color: #A56A00;
  color: #111827;
}

.hero {
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.92), rgba(255,255,255,0.96)),
    url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg/1280px-The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg') center/contain no-repeat;
  border-bottom-color: #A56A00;
  color: #111827;
}

.hero-logo {
  background: #ffffff;
  border-color: #A56A00;
  filter: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.16);
}

.hero-ornament,
.hero h2 {
  color: #12345A;
  text-shadow: none;
}

.hero h3 {
  color: #6E4A00;
}

.hero-quote {
  background: rgba(255,255,255,0.94);
  border: 2px solid #D6B25E;
  border-left: 6px solid #A56A00;
  border-radius: 8px;
  color: #111827;
  padding: 14px 18px;
  text-shadow: none;
}

.hero-quote cite {
  color: #12345A;
  font-weight: 700;
}

.hero-badge {
  background: #ffffff;
  border-color: #D6B25E;
  color: #111827;
  box-shadow: 0 3px 12px rgba(0,0,0,0.10);
}

.hero-badge strong {
  color: #12345A;
}

#countdown,
.year-panel > div[style*="var(--gold-light)"] {
  color: #6E4A00 !important;
}

.container,
.search-section {
  background: #ffffff;
}

.search-section {
  border-bottom-color: #D6B25E;
}

.search-box,
.search-result,
.encounter-card,
.image-card {
  background: #ffffff;
  border-color: #D6B25E;
  box-shadow: 0 3px 12px rgba(0,0,0,0.10);
}

.search-box button,
.btn-ver {
  background: #12345A;
  color: #ffffff;
}

.search-hints button,
.year-tab {
  background: #ffffff;
  color: #12345A;
  border-color: #A56A00;
}

.search-hints button:hover,
.search-box button:hover,
.year-tab.active,
.year-tab:hover,
.btn-ver:hover {
  background: #FFF3BF;
  color: #111827;
}

.card-header,
.encounter-card:hover .card-header {
  background: #12345A;
}

.card-number {
  color: #FFF3BF;
}

.card-date,
.card-date strong {
  color: #ffffff;
}

.card-part,
.card-ccc,
.search-status,
.search-result-meta,
.search-result p {
  color: #374151;
}

.topic-list li {
  color: #111827;
  border-bottom-color: #D1D5DB;
}

.topic-num {
  background: #A56A00;
  color: #ffffff;
}

.card-footer {
  background: #F1F5F9;
  border-top: 1px solid #D1D5DB;
}

footer {
  background: #F8FAFC;
  border-top-color: #12345A;
}

/* ---- PROPUESTA HOME PROFESIONAL 2026-07-26 ---- */
body {
  background: #F7F9FC;
}

header {
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1320px;
  padding: 10px 28px;
  gap: 18px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(165,106,0,0.35);
  border-radius: 50%;
  background: #ffffff url("../img/logo-mater-misericordiae.webp") center/82% auto no-repeat;
}

nav {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  border-radius: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.7px;
}

.hero {
  padding: 44px 24px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.94) 54%, rgba(246,241,228,0.90) 100%),
    url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg/1280px-The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg') center/cover no-repeat;
}

.hero-shell {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.hero-brand-panel {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(165,106,0,0.28);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 18px 42px rgba(18,52,90,0.12);
}

.hero-logos {
  gap: 16px;
  margin: 0;
}

.hero-logo {
  border-radius: 8px;
  padding: 8px;
  box-shadow: none;
}

.hero-logo-mons {
  height: 148px;
}

.hero-logo-mater {
  height: auto;
  width: min(100%, 300px);
  max-width: 300px;
}

.hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.hero-mini-stats span {
  border: 1px solid rgba(165,106,0,0.25);
  border-radius: 6px;
  background: #FFF8E1;
  color: #12345A;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  padding: 9px 8px;
}

.hero-content {
  text-align: left;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(165,106,0,0.35);
  border-radius: 999px;
  background: #FFF8E1;
  color: #6E4A00;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 8px 14px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero h2 {
  max-width: 820px;
  font-size: clamp(2.1rem, 4.8vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.hero h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.hero-quote {
  max-width: 850px;
  margin: 0 0 24px;
  font-size: 1.02rem;
  line-height: 1.48;
}

.hero-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  justify-content: stretch;
  margin-top: 0;
}

.hero-badge {
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 2px solid #12345A;
  border-radius: 6px;
  padding: 9px 18px;
  text-decoration: none;
  color: #ffffff;
  background: #12345A;
  font-weight: 800;
  letter-spacing: 0.7px;
}

.hero-actions a + a {
  background: #ffffff;
  color: #12345A;
  border-color: #A56A00;
}

.hero-actions a.hero-action-tools {
  background: #FFF3C4;
  border-color: #C69214;
  color: #12345A;
}

.hero-actions a.hero-action-tools:hover {
  background: #F3C95E;
}

#countdown {
  color: #6E4A00;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 800;
}

.search-section {
  padding: 36px 24px;
  background: #F1F5F9;
}

.search-inner {
  max-width: 1120px;
  background: #ffffff;
  border: 1px solid rgba(18,52,90,0.14);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(18,52,90,0.08);
}

.container {
  max-width: 1320px;
  padding: 46px 28px;
}

.section-title {
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  letter-spacing: 1.5px;
}

.section-subtitle {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.year-tabs {
  position: sticky;
  top: 73px;
  z-index: 30;
  background: rgba(247,249,252,0.92);
  border: 1px solid rgba(18,52,90,0.10);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(18,52,90,0.08);
}

.year-tab {
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 0.9rem;
}

.calendar-grid {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 22px;
}

.encounter-card {
  display: flex;
  flex-direction: column;
  min-height: 304px;
  border-radius: 8px;
  border: 1px solid rgba(165,106,0,0.34);
  box-shadow: 0 10px 24px rgba(18,52,90,0.09);
}

.encounter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(18,52,90,0.14);
}

.card-header {
  min-height: 78px;
  padding: 18px 20px;
}

.card-number {
  font-size: 1.42rem;
  line-height: 1.08;
}

.card-body {
  flex: 1;
  padding: 17px 20px 14px;
}

.card-part {
  min-height: 28px;
  color: #12345A;
  font-weight: 800;
}

.topic-list li {
  gap: 10px;
  padding: 7px 0;
  font-size: 0.9rem;
}

.topic-num {
  width: 21px;
  height: 21px;
  font-size: 0.7rem;
}

.card-footer {
  min-height: 52px;
  padding: 11px 18px;
}

.card-ccc {
  color: #12345A;
  font-weight: 700;
}

.btn-ver {
  border-radius: 6px;
  padding: 7px 15px;
  font-weight: 800;
}

@media (max-width: 980px) {
  .header-inner,
  nav {
    justify-content: center;
  }

  .header-inner {
    flex-direction: column;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-content {
    text-align: center;
  }

  .hero-quote {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .hero-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions {
    justify-content: center;
  }

  .year-tabs {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 28px 14px;
  }

  .hero-brand-panel,
  .search-inner {
    padding: 18px;
  }

  .hero-mini-stats,
  .hero-info {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 34px 14px;
  }
}

/* ---- HOME 2026-08-17: PORTADA MAS MODERNA Y LIMPIA ---- */
body.home-page {
  background:
    linear-gradient(180deg, #F7FAFD 0%, #EEF4F8 42%, #FFFFFF 100%);
  color: #102033;
}

body.home-page header {
  background: rgba(255,255,255,0.96);
  border-bottom: 2px solid #12345A;
  box-shadow: 0 8px 24px rgba(18,52,90,0.08);
}

body.home-page .header-inner {
  max-width: 1440px;
  padding: 10px 34px;
}

body.home-page nav {
  gap: 10px;
}

body.home-page nav a {
  border-radius: 7px;
  color: #12345A;
  font-size: 0.84rem;
  letter-spacing: 0.9px;
  padding: 9px 14px;
}

body.home-page nav a:hover,
body.home-page nav a.active {
  background: #FFF1C2;
  border-color: #B97800;
  color: #111827;
}

body.home-page .hero {
  min-height: calc(100vh - 72px);
  padding: 54px 32px 46px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 58%, rgba(244,238,222,0.88) 100%),
    url('https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg/1280px-The_Last_Supper_-_Leonardo_Da_Vinci_-_High_Resolution_32x16.jpg') center/cover no-repeat;
  border-bottom: 2px solid #B97800;
}

body.home-page .hero-shell {
  max-width: 1380px;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 52px;
}

body.home-page .hero-brand-panel {
  align-self: stretch;
  display: grid;
  align-content: center;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(185,120,0,0.28);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(18,52,90,0.10);
  padding: 26px;
}

body.home-page .hero-logos {
  gap: 18px;
}

body.home-page .hero-logo {
  background: #FFFFFF;
  border: 1px solid rgba(185,120,0,0.45);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(18,52,90,0.08);
  padding: 8px;
}

body.home-page .hero-logo-mons {
  height: 132px;
}

body.home-page .hero-logo-mater {
  max-width: 285px;
  width: min(100%, 285px);
}

body.home-page .hero-mini-stats {
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 22px;
}

body.home-page .hero-mini-stats span {
  background: #F8FAFC;
  border: 1px solid rgba(18,52,90,0.12);
  color: #12345A;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  padding: 12px 14px;
  text-align: left;
}

body.home-page .hero-content {
  max-width: 930px;
}

body.home-page .hero-eyebrow {
  background: #FFF7D6;
  border-color: rgba(185,120,0,0.42);
  color: #765000;
  margin-bottom: 16px;
}

body.home-page .hero h2 {
  color: #12345A;
  font-size: clamp(2.7rem, 5.8vw, 5.6rem);
  letter-spacing: 0.8px;
  line-height: 0.92;
  max-width: 940px;
}

body.home-page .hero h3 {
  color: #765000;
  font-size: 1.28rem;
  margin-bottom: 22px;
}

body.home-page .hero-quote {
  background: rgba(255,255,255,0.9);
  border: 1px solid #D7B254;
  border-left: 7px solid #B97800;
  box-shadow: 0 10px 24px rgba(18,52,90,0.08);
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.5;
  max-width: 900px;
  padding: 17px 20px;
}

body.home-page .hero-info {
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.home-page .hero-badge {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(18,52,90,0.14);
  border-top: 4px solid #D7B254;
  box-shadow: 0 8px 20px rgba(18,52,90,0.07);
  color: #102033;
  min-height: 92px;
  padding: 14px;
}

body.home-page .hero-badge strong {
  color: #12345A;
  font-size: 1.02rem;
}

body.home-page .hero-actions {
  gap: 12px;
  margin-top: 24px;
}

body.home-page .hero-actions a {
  border-radius: 7px;
  min-height: 48px;
  padding: 11px 22px;
}

body.home-page .hero-actions a:first-child {
  background: #12345A;
  border-color: #12345A;
  color: #FFFFFF;
}

body.home-page .hero-actions a:nth-child(2) {
  background: #FFFFFF;
  border-color: #B97800;
  color: #12345A;
}

body.home-page .hero-actions a:nth-child(3) {
  background: #FFF1C2;
  border-color: #B97800;
  color: #12345A;
}

body.home-page .home-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

body.home-page .home-tools-row a {
  align-items: center;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(18,52,90,0.2);
  border-radius: 7px;
  color: #12345A;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.45px;
  min-height: 38px;
  padding: 8px 13px;
  text-decoration: none;
}

body.home-page .home-tools-row a:hover {
  background: #FFFFFF;
  border-color: #B97800;
}

body.home-page #countdown {
  color: #765000;
  margin-top: 16px;
}

body.home-page .search-section {
  background: #EEF4F8;
  border-bottom: 1px solid rgba(18,52,90,0.14);
  padding: 38px 28px;
}

body.home-page .search-inner {
  border: 1px solid rgba(18,52,90,0.12);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(18,52,90,0.08);
}

body.home-page .container {
  background: transparent;
}

body.home-page .encounter-card {
  border-color: rgba(185,120,0,0.28);
  box-shadow: 0 12px 26px rgba(18,52,90,0.08);
}

body.home-page .role-topbar {
  display: none !important;
}

body.home-page.home-hero-active .home-course-index,
body.home-page.home-hero-active .home-annex-index {
  display: none !important;
}

@media (max-width: 760px) {
  body.home-page .projection-toggle {
    display: none !important;
  }

  body.home-page .theme-toggle {
    display: none !important;
  }

  body.home-page .header-inner {
    padding-right: 16px;
  }
}

@media (max-width: 1100px) {
  body.home-page .hero-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.home-page .header-inner {
    padding: 10px 16px;
  }

  body.home-page .hero {
    min-height: auto;
    padding: 30px 16px;
  }

  body.home-page .hero-shell {
    gap: 22px;
    grid-template-columns: 1fr;
  }

  body.home-page .hero-brand-panel {
    padding: 18px;
  }

  body.home-page .hero-mini-stats,
  body.home-page .hero-info {
    grid-template-columns: 1fr;
  }

  body.home-page .hero-content {
    order: -1;
    text-align: center;
  }

  body.home-page .hero-brand-panel {
    order: 2;
  }

  body.home-page .hero h2 {
    font-size: clamp(2.25rem, 13vw, 3.7rem);
  }

  body.home-page .hero-logo-mons {
    height: 96px;
  }

  body.home-page .hero-logo-mater {
    width: min(100%, 245px);
  }

  body.home-page .hero-quote {
    text-align: left;
  }

  body.home-page .hero-actions,
  body.home-page .home-tools-row {
    justify-content: center;
  }

  body.home-page .home-tools-row a,
  body.home-page .hero-actions a {
    flex: 1 1 180px;
  }
}

/* ---- AYUDA MOVIL: VER EN HORIZONTAL ---- */
.home-page .mobile-landscape-assist {
  display: none;
}

.home-page .mobile-landscape-assist[hidden] {
  display: none !important;
}

@media (max-width: 820px) and (orientation: portrait) {
  body.home-page.mobile-portrait-view {
    padding-bottom: 112px;
  }

  .home-page .mobile-landscape-assist:not([hidden]) {
    align-items: center;
    background: #ffffff;
    border: 2px solid #12345A;
    border-left: 8px solid #C9A84C;
    border-radius: 10px;
    bottom: 14px;
    box-shadow: 0 16px 36px rgba(18, 52, 90, 0.2);
    color: #12345A;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    left: 12px;
    padding: 12px;
    position: fixed;
    right: 12px;
    z-index: 100000;
  }

  .home-page .mobile-landscape-assist strong,
  .home-page .mobile-landscape-assist span {
    display: block;
  }

  .home-page .mobile-landscape-assist strong {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
  }

  .home-page .mobile-landscape-assist span {
    font-size: 0.82rem;
    line-height: 1.3;
    margin-top: 3px;
  }

  .home-page .mobile-landscape-assist button {
    background: #12345A;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    cursor: pointer;
    flex: 0 0 auto;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 10px 13px;
    text-transform: uppercase;
  }
}

@media (max-width: 820px) and (orientation: landscape) {
  body.home-page header {
    position: sticky;
    top: 0;
  }

  body.home-page .header-inner {
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
    padding: 8px 14px;
  }

  body.home-page .logo-icon {
    height: 42px;
    width: 42px;
  }

  body.home-page .logo-text h1 {
    font-size: 1.2rem;
  }

  body.home-page .logo-text span {
    font-size: 0.56rem;
  }

  body.home-page nav {
    gap: 6px;
    justify-content: flex-end;
  }

  body.home-page nav a {
    font-size: 0.76rem;
    padding: 7px 10px;
  }

  body.home-page .hero {
    min-height: auto;
    padding: 18px 12px 22px;
  }

  body.home-page .hero-shell {
    align-items: center;
    gap: 14px;
    grid-template-columns: 0.78fr 1.22fr;
  }

  body.home-page .hero-brand-panel {
    padding: 14px;
  }

  body.home-page .hero-logo-mons {
    height: 82px;
  }

  body.home-page .hero-logo-mater {
    width: min(35vw, 240px);
  }

  body.home-page .hero-content {
    text-align: left;
  }

  body.home-page .hero-content h2 {
    font-size: clamp(2rem, 6vw, 3.6rem);
    line-height: 0.94;
  }

  body.home-page .hero-quote {
    font-size: 0.86rem;
    margin: 12px 0;
    padding: 12px 16px;
  }

  body.home-page .hero-info {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  body.home-page .hero-badge {
    padding: 9px 12px;
  }

  body.home-page .hero-actions {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .home-page .mobile-landscape-assist {
    display: none !important;
  }
}
