/* ================================================
   DETALLE DE NÚCLEO TRINITARIO — ESTILOS ESPECÍFICOS
   detalle_nucleo/detalle-nucleo.css

   Loads after ../styles.css.
   Namespaced under .nucleus-* to preserve global hygiene.
   Inherits design tokens: --navy, --gold, --cream, etc.
   ================================================ */

/* ── Active navigation item indicator ── */
.nucleus-nav-active {
  color: var(--navy) !important;
  font-weight: 600 !important;
}

.nucleus-nav-active::after {
  transform: scaleX(1) !important;
}

/* ── Base Page Layout ── */
.nucleus-detail-body {
  background-color: #faf8f5;
  color: #1f2937;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nucleus-detail-main {
  position: relative;
  flex: 1;
  padding-bottom: 0;
  overflow-x: hidden;
}

/* Subtle floral watermark in the top-right corner from fondo_white.png */
.nucleus-bg-watermark {
  position: absolute;
  top: 0;
  right: 0;
  width: 55vw;
  max-width: 820px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

.nucleus-bg-img {
  width: 100%;
  height: auto;
  display: block;
}

.nucleus-inner-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================================
   1. BREADCRUMBS
   ================================================ */
.nucleus-detail-breadcrumb {
  margin-top: 22px;
  margin-bottom: 18px;
}

.nucleus-breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
}

.nucleus-breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.nucleus-breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nucleus-breadcrumb-link:hover {
  color: var(--gold-dark);
}

.nucleus-home-icon {
  color: var(--navy);
  margin-right: 2px;
}

.nucleus-breadcrumb-sep {
  color: var(--gold);
  font-weight: 600;
  font-size: 12px;
  user-select: none;
}

.nucleus-breadcrumb-current {
  color: #64748b;
  font-weight: 600;
}

/* ================================================
   2. DETAIL PAGE TITLE & SUBTITLE
   ================================================ */
.nucleus-detail-header {
  margin-bottom: 26px;
}

.nucleus-detail-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.8vw, 44px);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 6px 0;
}

.nucleus-detail-location {
  font-family: var(--font-serif);
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--navy);
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ================================================
   3. MAIN TWO-COLUMN AREA
   ================================================ */
.nucleus-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.nucleus-col-left {
  display: flex;
  flex-direction: column;
}

.nucleus-col-right {
  display: flex;
  flex-direction: column;
}

/* ================================================
   4. PHOTO GALLERY
   ================================================ */
.nucleus-gallery {
  width: 100%;
}

.nucleus-gallery-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 440px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(0, 36, 71, 0.1);
  background-color: #f1ede4;
  position: relative;
}

.nucleus-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: opacity 0.25s ease;
}

/* Thumbnails carousel */
.nucleus-thumbnails-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.nucleus-gallery-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 59, 114, 0.16);
  background: #ffffff;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.nucleus-gallery-arrow:hover:not(:disabled) {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  transform: scale(1.06);
}

.nucleus-gallery-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nucleus-thumbnails-track {
  display: flex;
  gap: 10px;
  flex: 1;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px;
}

.nucleus-thumbnails-track::-webkit-scrollbar {
  display: none;
}

.nucleus-thumb-btn {
  width: 82px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2.5px solid transparent;
  padding: 0;
  background: #eae5d9;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nucleus-thumb-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(196, 138, 49, 0.5);
}

.nucleus-thumb-btn.active {
  border-color: #C48A31;
  box-shadow: 0 0 0 2px rgba(196, 138, 49, 0.28);
}

.nucleus-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================================
   7. ABOUT THIS NÚCLEO
   ================================================ */
.nucleus-about {
  margin-top: 36px;
}

.nucleus-about-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 14px 0;
  letter-spacing: -0.01em;
}

.nucleus-about-content p {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.68;
  color: #2c3444;
  margin: 0 0 14px 0;
}

.nucleus-about-content p:last-child {
  margin-bottom: 0;
}

/* ================================================
   8. SPIRITUAL QUOTE
   ================================================ */
.nucleus-quote-section {
  margin-top: 28px;
}

.nucleus-quote-card {
  background: #fbf8f2;
  border: 1px solid rgba(196, 138, 49, 0.24);
  border-radius: 12px;
  padding: 22px 28px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 16px rgba(196, 138, 49, 0.05);
}

.nucleus-quote-mark {
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.nucleus-quote-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.nucleus-quote-line {
  flex: 1;
  height: 1px;
  background: rgba(196, 138, 49, 0.4);
  max-width: 60px;
}

.nucleus-quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 19.5px);
  line-height: 1.35;
  color: var(--navy);
  margin: 0;
}

.nucleus-quote-author {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin: 10px 0 0 0;
  letter-spacing: 0.02em;
}

/* ================================================
   5. NÚCLEO INFORMATION CARD
   ================================================ */
.nucleus-info-card {
  background: #ffffff;
  border: 1px solid rgba(0, 59, 114, 0.12);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 36, 71, 0.06);
  padding: 24px 26px;
}

.nucleus-info-list {
  display: flex;
  flex-direction: column;
}

.nucleus-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(0, 59, 114, 0.07);
}

.nucleus-info-row:last-child {
  border-bottom: none;
}

.nucleus-info-icon-cell {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nucleus-info-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.nucleus-info-data {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nucleus-info-label {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: #5a6578;
}

.nucleus-info-val {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  word-break: break-word;
}

.nucleus-info-link {
  text-decoration: none;
  transition: color 0.2s ease;
}

.nucleus-info-link:hover {
  color: var(--gold-dark);
}

/* 6. GOOGLE MAPS BUTTON */
.nucleus-maps-action {
  margin-top: 18px;
}

.nucleus-btn-maps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 43, 84, 0.22);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.nucleus-btn-maps:hover {
  background: var(--navy-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 43, 84, 0.32);
  color: #ffffff;
}

.nucleus-maps-pin-icon {
  flex-shrink: 0;
}

/* ================================================
   9. PRÓXIMAS ACTIVIDADES
   ================================================ */
.nucleus-events-section {
  margin-top: 36px;
}

.nucleus-events-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 16px 0;
  letter-spacing: -0.01em;
}

.nucleus-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nucleus-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #ffffff;
  border: 1px solid rgba(0, 59, 114, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0, 36, 71, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nucleus-event-row:hover {
  transform: translateX(3px);
  border-color: rgba(196, 138, 49, 0.5);
  box-shadow: 0 4px 14px rgba(0, 36, 71, 0.08);
}

.nucleus-event-date-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding-right: 12px;
  border-right: 1.5px solid rgba(0, 59, 114, 0.08);
  text-align: center;
  flex-shrink: 0;
}

.nucleus-event-day {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}

.nucleus-event-month {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.nucleus-event-info {
  flex: 1;
  min-width: 0;
}

.nucleus-event-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  margin: 0 0 2px 0;
}

.nucleus-event-modalidad {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}

.nucleus-event-chevron {
  color: var(--gold);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Empty state for activities */
.nucleus-events-empty {
  padding: 22px 18px;
  background: #ffffff;
  border: 1px dashed rgba(0, 59, 114, 0.16);
  border-radius: 10px;
  text-align: center;
  color: #64748b;
  font-family: var(--font-sans);
  font-size: 14px;
}

.nucleus-events-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.nucleus-events-more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nucleus-events-more-link:hover {
  color: var(--gold-dark);
  transform: translateX(3px);
}

/* ================================================
   10. BOTTOM JOIN CTA
   ================================================ */
.nucleus-join-cta {
  position: relative;
  overflow: hidden;
  margin-top: 65px;
  min-height: 145px;
  display: flex;
  align-items: center;
  background-color: #0d1e30;
}

.nucleus-join-cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.nucleus-join-cta-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

/* Atmospheric gradient ensures contrast on the left without obscuring the divine hand on the right */
.nucleus-join-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(10, 24, 40, 0.88) 0%,
    rgba(10, 24, 40, 0.72) 45%,
    rgba(10, 24, 40, 0.2) 75%,
    rgba(10, 24, 40, 0.5) 100%
  );
}

.nucleus-join-cta-container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.nucleus-join-cta-text {
  max-width: 520px;
}

.nucleus-join-cta-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.7vw, 32px);
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.nucleus-join-cta-motto {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
  margin: 0 0 4px 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.nucleus-join-cta-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.nucleus-btn-contactar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 34px;
  border-radius: 9999px;
  text-decoration: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  border: 2px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nucleus-btn-contactar-cta:hover {
  background: #fbf7ee;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.32);
  border-color: var(--gold);
  color: var(--navy-deep);
}

/* ================================================
   NOT FOUND STATE
   ================================================ */
.nucleus-not-found-container {
  padding: 80px 24px;
  text-align: center;
}

.nucleus-not-found-card {
  max-width: 500px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid rgba(0, 59, 114, 0.12);
  border-radius: 14px;
  padding: 44px 32px;
  box-shadow: 0 8px 30px rgba(0, 36, 71, 0.06);
}

.nucleus-not-found-icon {
  color: var(--gold);
  margin-bottom: 16px;
}

.nucleus-not-found-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 10px 0;
}

.nucleus-not-found-desc {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
  margin: 0 0 24px 0;
}

.nucleus-btn-volver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nucleus-btn-volver:hover {
  background: var(--navy-deep);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablet (<= 1024px) */
@media (max-width: 1024px) {
  .nucleus-detail-grid {
    grid-template-columns: 1.25fr 1fr;
    gap: 30px;
  }

  .nucleus-info-card {
    padding: 20px 20px;
  }
}

/* Mobile & Small Tablet (<= 768px) */
@media (max-width: 768px) {
  .nucleus-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  /* Specific mobile section order specified in requirements:
     1. Breadcrumbs
     2. Title
     3. Location
     4. Main photo
     5. Gallery thumbnails
     6. Information card
     7. Sobre este Núcleo
     8. Spiritual quote
     9. Próximas actividades
     10. Join CTA
     11. Footer */
  .nucleus-col-left {
    display: contents;
  }

  .nucleus-col-right {
    display: contents;
  }

  .nucleus-gallery {
    order: 1;
  }

  .nucleus-info-card {
    order: 2;
    width: 100%;
  }

  .nucleus-about {
    order: 3;
    margin-top: 8px;
  }

  .nucleus-quote-section {
    order: 4;
    margin-top: 8px;
  }

  .nucleus-events-section {
    order: 5;
    width: 100%;
    margin-top: 8px;
  }

  .nucleus-gallery-main {
    max-height: 280px;
  }

  .nucleus-thumbnails-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nucleus-thumb-btn {
    width: 72px;
    height: 52px;
  }

  .nucleus-quote-card {
    padding: 18px 20px;
  }

  .nucleus-join-cta {
    min-height: auto;
    padding: 24px 0;
  }

  .nucleus-join-cta-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nucleus-join-cta-text {
    max-width: 100%;
  }

  .nucleus-btn-contactar-cta {
    width: 100%;
    max-width: 280px;
  }
}
