:root {
  --quinto-primary: #7a3e1d;
  --quinto-secondary: #a66a43;
  --quinto-light: #f7f3ef;
  --quinto-dark: #2d2a26;
  --quinto-accent: #d9c3a3;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--quinto-dark);
  background-color: #fff;
}

/* Navbar */
.navbar {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.navbar-brand {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-weight: 700;
  color: var(--quinto-primary) !important;
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.nav-link {
  font-weight: 600;
  color: var(--quinto-dark) !important;
}

.nav-link:hover {
  color: var(--quinto-primary) !important;
}

/* Botones */
.btn-quinto {
  background-color: var(--quinto-primary);
  border-color: var(--quinto-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0.8rem;
  padding: 0.8rem 1.4rem;
}

.btn-quinto:hover {
  background-color: #623116;
  border-color: #623116;
  color: #fff;
}

.btn-outline-quinto {
  border: 2px solid var(--quinto-primary);
  color: var(--quinto-primary);
  font-weight: 600;
  border-radius: 0.8rem;
  padding: 0.75rem 1.3rem;
}

.btn-outline-quinto:hover {
  background-color: var(--quinto-primary);
  color: #fff;
}

/* Hero genérico */
.hero-page {
  min-height: 65vh;
  color: #fff;
  display: flex;
  align-items: center;
  padding-top: 90px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-page h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 700;
}

.hero-page .lead {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.2rem;
}

/* Variante home */
.hero {
  min-height: 78vh;
  color: #fff;
  display: flex;
  align-items: center;
  padding-top: 90px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 700;
}

.hero .lead {
  font-size: 1.2rem;
  max-width: 780px;
  margin: 0 auto 1.5rem auto;
}

/* Secciones */
.section-block,
section {
  padding: 5rem 0;
}

.bg-soft,
.section-soft {
  background-color: var(--quinto-light);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--quinto-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: #6c757d;
  max-width: 780px;
  margin: 0 auto 2.5rem auto;
}

.text-justify {
  text-align: justify;
}

/* Paneles */
.content-panel {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.content-panel p:last-child {
  margin-bottom: 0;
}

/* Tarjetas */
.card-theme,
.feature-card {
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  background: #fff;
}

.card-theme:hover,
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.12);
}

.card-theme img,
.feature-card img {
  height: 230px;
  width: 100%;
  object-fit: cover;
}

.card-title {
  color: var(--quinto-primary);
  font-weight: 700;
}

/* Imágenes sueltas */
.image-frame img,
.arc-images img,
.gallery-item img,
.person-block img {
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}

.image-frame img,
.arc-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.image-caption,
.arc-caption {
  font-size: 0.95rem;
  color: #6c757d;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Bloques especiales */
.timeline-box {
  background: #fff;
  border-left: 5px solid var(--quinto-secondary);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.05);
}

.person-block {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  height: 100%;
}

.person-block h4 {
  color: var(--quinto-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* Galería */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.14);
}

.gallery-item figcaption {
  font-size: 0.95rem;
  color: #6c757d;
  margin-top: 0.75rem;
  text-align: center;
}

/* Bibliografía */
.bibliography-list {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.bibliography-list li {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.bibliography-list li:last-child {
  margin-bottom: 0;
}

/* Listas de enlaces */
.list-links li {
  margin-bottom: 0.75rem;
}

.list-links a {
  color: var(--quinto-primary);
  font-weight: 600;
  text-decoration: none;
}

.list-links a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: var(--quinto-dark);
  color: #fff;
  padding: 4rem 0;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.social-link {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--quinto-primary);
  border-radius: 50%;
  font-size: 1.2rem;
  margin: 0 0.4rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  background: var(--quinto-secondary);
}

/* Responsive */
@media (max-width: 991.98px) {
  .brand-logo {
    height: 44px;
  }

  .hero,
  .hero-page {
    min-height: 55vh;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575.98px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 220px;
  }
}