/* ====== BASE GENERAL ====== */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f8fafc;
  color: #0f172a;
}

/* ====== HEADER ====== */
.pkp_structure_head {
  background: #0a0a0f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-bottom: 2px solid #38bdf8;
}

/* Menú */
.pkp_navigation_primary > li > a {
  color: #ffffff !important;
  font-weight: 500;
  transition: 0.3s;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  position: relative;
}

.pkp_navigation_primary > li > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  transition: width 0.3s ease;
}

.pkp_navigation_primary > li > a:hover::before {
  width: 100%;
}

.pkp_navigation_primary > li > a:hover {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

.pkp_navigation_primary > li.active > a {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8 !important;
}

/* ====== CONTENIDO ====== */
.pkp_structure_content {
  background: #ffffff;
  padding-top: 20px;
}

/* ====== TARJETAS (LIBROS) ====== */
.obj_monograph_summary,
.obj_monograph_full {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: 18px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.obj_monograph_summary::before,
.obj_monograph_full::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.obj_monograph_summary:hover::before,
.obj_monograph_full:hover::before {
  transform: scaleX(1);
}

.obj_monograph_summary:hover,
.obj_monograph_full:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  border-color: #38bdf8;
}

/* ====== IMÁGENES ====== */
.obj_monograph_summary .cover,
.obj_monograph_summary figure {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.obj_monograph_summary .cover img,
.obj_monograph_summary figure img {
  border-radius: 10px;
  transition: 0.3s;
  width: 100%;
  height: auto;
}

.obj_monograph_summary:hover .cover img,
.obj_monograph_summary:hover figure img {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(0.95);
}

.obj_monograph_summary .cover::after,
.obj_monograph_summary figure::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(56, 189, 248, 0.15);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.obj_monograph_summary:hover .cover::after,
.obj_monograph_summary:hover figure::after {
  opacity: 1;
}

/* ====== TÍTULOS ====== */
.obj_monograph_summary .title a {
  font-size: 18px;
  font-weight: 600;
  color: #0a0a0f;
  transition: all 0.3s ease;
  display: block;
  line-height: 1.4;
}

.obj_monograph_summary .title a:hover {
  color: #0ea5e9;
  text-decoration: underline;
  text-decoration-color: #38bdf8;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Autor */
.obj_monograph_summary .author {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Descripción */
.obj_monograph_summary .description {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta información */
.obj_monograph_summary .details {
  font-size: 0.8rem;
  color: #38bdf8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* ====== BOTONES ====== */
button,
a.button,
.cmp_button,
input[type="submit"],
input[type="button"] {
  background: linear-gradient(135deg, #0a0a0f 0%, #111118 100%);
  color: #ffffff !important;
  border-radius: 8px;
  padding: 8px 14px;
  border: 1px solid #38bdf8;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

button::before,
a.button::before,
.cmp_button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before,
a.button:hover::before,
.cmp_button:hover::before {
  width: 300px;
  height: 300px;
}

button:hover,
a.button:hover,
.cmp_button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  border-color: #38bdf8;
  color: #0a0a0f !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

button:active,
a.button:active,
.cmp_button:active {
  transform: translateY(-1px);
}

/* ====== SIDEBAR ====== */
.pkp_structure_sidebar {
  background: transparent;
}

.pkp_block {
  background: #ffffff;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-left: 4px solid #38bdf8;
  transition: all 0.3s ease;
}

.pkp_block:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  transform: translateX(4px);
}

.pkp_block h3 {
  color: #0a0a0f;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pkp_block ul {
  list-style: none;
}

.pkp_block li {
  margin-bottom: 0.75rem;
}

.pkp_block a {
  color: #64748b;
  transition: all 0.3s ease;
  padding-left: 0.75rem;
  border-left: 2px solid transparent;
  display: block;
  padding: 0.5rem 0 0.5rem 0.75rem;
  font-weight: 500;
}

.pkp_block a:hover {
  color: #38bdf8;
  border-left-color: #38bdf8;
  transform: translateX(4px);
}

/* ====== BUSCADOR ====== */
.pkp_search input[type="text"] {
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  padding: 6px 10px;
  transition: all 0.3s ease;
}

.pkp_search input[type="text"]:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(56, 189, 248, 0.05);
}

/* ====== FOOTER ====== */
.pkp_structure_footer_wrapper {
  background: #0a0a0f;
  color: #ffffff !important;
  padding: 30px;
  margin-top: 40px;
  border-top: 3px solid #38bdf8;
  position: relative;
}

.pkp_structure_footer_wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #38bdf8, transparent);
}

/* TODO el texto en blanco */
.pkp_structure_footer_wrapper,
.pkp_structure_footer_wrapper p,
.pkp_structure_footer_wrapper span,
.pkp_structure_footer_wrapper div,
.pkp_structure_footer_wrapper li {
  color: #ffffff !important;
}

/* Links */
.pkp_structure_footer_wrapper a {
  color: #38bdf8 !important;
  transition: 0.3s;
  font-weight: 500;
}

.pkp_structure_footer_wrapper a:hover {
  color: #7dd3fc !important;
  text-decoration: underline;
  transform: translateX(2px);
  display: inline-block;
}

/* Línea */
.pkp_structure_footer_wrapper hr {
  border-color: rgba(255,255,255,0.2);
}

/* Grid del footer */
.footer-content,
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section h3 {
  color: #38bdf8;
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ====== EFECTOS GLOBALES ====== */
* {
  transition: all 0.2s ease-in-out;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Scroll suave */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #38bdf8;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0ea5e9;
}

/* ====== FIX TEXTO DATA CITE ====== */
.item.citation,
.item.citation * {
  color: #0f172a !important;
}

/* ====== TÍTULOS ====== */
h1, h2, h3, h4, h5, h6 {
  color: #0a0a0f;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

/* ====== TABLAS ====== */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: #ffffff;
  margin: 1.5rem 0;
}

thead {
  background: linear-gradient(135deg, #0a0a0f 0%, #111118 100%);
  color: #ffffff;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  border-bottom: 2px solid #38bdf8;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

tbody tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ====== FORMULARIOS ====== */
.pkp_form,
form {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pkp_form_group,
.form-group {
  margin-bottom: 1.5rem;
}

.pkp_form_group label,
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #0a0a0f;
  font-size: 0.95rem;
}

.pkp_form_group input,
.pkp_form_group textarea,
.pkp_form_group select,
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.pkp_form_group input:focus,
.pkp_form_group textarea:focus,
.pkp_form_group select:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(56, 189, 248, 0.05);
}

/* ====== NOTIFICACIONES ====== */
.alert,
.notification,
.message {
  border-radius: 10px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  transition: all 0.3s ease;
}

.alert-success,
.notification-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}

.alert-error,
.alert-danger,
.notification-error {
  background: rgba(56, 189, 248, 0.1);
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.alert-warning,
.notification-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: #f59e0b;
}

.alert-info,
.notification-info {
  background: rgba(56, 189, 248, 0.1);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .pkp_structure_head {
    padding: 1rem;
  }

  .pkp_navigation_primary {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .pkp_navigation_primary > li > a {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  .footer-content,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pkp_form,
  form {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  button,
  a.button,
  .cmp_button {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .obj_monograph_summary,
  .obj_monograph_full {
    padding: 1rem;
  }

  table {
    font-size: 0.85rem;
  }

  th, td {
    padding: 0.5rem;
  }
}

/* ====== ANIMACIONES ====== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
  }
}

.animate-fadeIn {
  animation: fadeIn 400ms ease-out;
}

.animate-slideUp {
  animation: slideUp 500ms ease-out;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

/* ====== UTILIDADES ====== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: #0a0a0f;
}

.text-accent {
  color: #38bdf8;
}

.text-white {
  color: #ffffff;
}

.bg-primary {
  background: #0a0a0f;
}

.bg-accent {
  background: #38bdf8;
}

.bg-light {
  background: #f8fafc;
}

.bg-white {
  background: #ffffff;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.rounded-xl { border-radius: 16px; }

.shadow { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.shadow-lg { box-shadow: 0 10px 25px rgba(0,0,0,0.12); }
.shadow-xl { box-shadow: 0 20px 40px rgba(0,0,0,0.15); }

.cursor-pointer { cursor: pointer; }
.no-select { user-select: none; }

/* ====== CAMBIO DE LÍNEAS CYAN A #0f172a ====== */
/* Líneas verticales a los lados de la página */
.pkp_structure_page,
.pkp_structure_content {
  border-left-color: #0f172a !important;
  border-right-color: #0f172a !important;
}

/* Indicador de paginación del carrusel (línea cyan debajo del libro) */
.pkp_block .carousel-indicators .active,
.pkp_block .carousel-indicators li,
.carousel-indicators .active,
.carousel-indicators li.active,
ol.carousel-indicators li {
  background-color: #0f172a !important;
  border-color: #0f172a !important;
}

/* Borde superior del header y del footer (si eran cyan) */
.pkp_structure_head {
  border-bottom-color: #0f172a !important;
}

.pkp_structure_footer_wrapper {
  border-top-color: #0f172a !important;
}

/* Línea decorativa superior del footer */
.pkp_structure_footer_wrapper::before {
  background: linear-gradient(90deg, transparent, #0f172a, transparent) !important;
}

/* Borde izquierdo de los bloques sidebar (si era cyan) */
.pkp_block {
  border-left-color: #0f172a !important;
}

/* ====== OCULTAR LOGO / BRANDING DE OMP ====== */
.pkp_brand_footer,
#pkp_brand,
.pkp_brand,
.pkp_powered,
footer .pkp_brand_footer,
a[href*="pkp.sfu.ca"],
a[href*="openmonographpress"],
a[href*="public-knowledge"],
a[href*="monograph.sfu"],
footer img[alt*="OMP"],
footer img[alt*="PKP"],
footer img[alt*="Public Knowledge"],
footer img[alt*="Open Monograph"],
img[src*="pkp_brand"],
img[src*="omp_brand"],
.pkp_footer_content > p:last-child {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}
