/* ==========================================================================
   CONFIGURACIÓN INICIAL Y FUENTES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

:root {
  --black: #1c1c1c;
  --gray: #7E7E7E;
  --gray-light: #E4E4E4;
  --gray-medium: #4a7a8f;
  --red: #c0392b;
  --primary: #1a7aa0;
  --primary-dark: #1a5c7a;
  --primary-light: #3aabcc;
  --primary-pale: #a8ddf0;
  --primary-mist: #c8eaf5;
  --primary-blue: #1a7aa0;
  --accent-warm: #1a7aa0;
  --accent-soft: #3aabcc;
  --dark-blue: #0f2d3d;
  --font-size-base: 1rem;
  --font-size-md: clamp(1.25rem, 0.61vw + 1.1rem, 1.58rem);
  --font-size-lg: clamp(1.56rem, 1vw + 1.31rem, 2.11rem);
  --font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
  --border-radius: 10px;
  --transition-standard: all 0.3s ease;
  --shadow-base: 0 4px 12px rgba(26, 122, 160, 0.12);
  --shadow-hover: 0 8px 24px rgba(26, 122, 160, 0.2);
  --bg-soft: #f0f8fc;
  --card-shadow: 0 4px 20px rgba(26, 122, 160, 0.07);
  --border-radius-lg: 16px;
}

html {
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--dark-blue);
  line-height: 1.6;
  padding: 0;
  font-size: var(--font-size-base);
  background-color: #f4f9fc;
  background-image: none;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { 
  color: var(--black); 
  text-decoration: none;
  transition: var(--transition-standard);
}

h1 { font-size: var(--font-size-xl); margin: 0; }
h2 { font-size: var(--font-size-lg); margin: 0; }
h3 { font-size: var(--font-size-md); margin: 0; }

/* ==========================================================================
   CLASES DE UTILIDAD
   ========================================================================== */
.text-center { text-align: center; }
.flex { display: flex; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }
.gap-05 { gap: 0.5rem; }

.hover-lift {
  transition: var(--transition-standard);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* ==========================================================================
   INPUTS Y FORMULARIOS
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 0.7rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  background-color: white;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-warm);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* ==========================================================================
   ESTILOS DE BOTONES
   ========================================================================== */
.btn {
  background-color: var(--black);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-standard);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background-color: #333;
  transform: translateY(-2px);
  box-shadow: var(--shadow-base);
}

.btn--full-width { width: 100%; }
.btn--flex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn--bold { font-weight: 600; }

.btn-delete {
  padding: 10px 16px;
  background-color: var(--red);
  color: white;
  border-radius: var(--border-radius);
}

.btn-delete:hover {
  background-color: #800000;
}

.btn--primary {
  background-color: var(--primary);
  color: #ffffff !important;
}

.btn--primary:hover {
  background-color: var(--primary-dark);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-base);
}

.btn--secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--secondary:hover {
  background-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* ==========================================================================
   IMÁGENES Y TARJETAS BASE
   ========================================================================== */
img {
  width: 100%;
  height: auto;
  display: block;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-base);
  transition: var(--transition-standard);
  overflow: hidden;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
  max-width: 982px;
  margin: 0 auto;
  padding: 0 1rem;
}

.main {
  padding: 20px 0;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  background-color: white;
  padding: 3rem 0;
  border-radius: var(--border-radius-lg);
  margin: 2rem auto;
  max-width: 1000px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
}

.hero__image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.hero__text {
  text-align: center;
  max-width: 700px;
}

.hero__text h2 {
  font-size: 2.2rem;
  color: var(--dark-blue);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero__text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--gray-medium);
  margin-bottom: 1rem;
}

/* ==========================================================================
   HEADER PRINCIPAL
   ========================================================================== */
/* --- Header shell --- */
.header {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(26, 122, 160, 0.1);
  z-index: 1000;
  border-bottom: 2px solid var(--primary-pale);
}

.header.scrolled {
  box-shadow: 0 4px 15px rgba(26, 122, 160, 0.15);
  background-color: rgba(255, 255, 255, 0.98);
}

/* --- Fila 1: logo centrado --- */
.header__top {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 20px 0;
  position: relative;
}

.header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header__logo-image {
  height: 240px;
  width: auto;
  min-width: 240px;
  object-fit: contain;
  display: block;
  transition: all 0.3s ease;
}

/* --- Fila 2: nav + acciones --- */
.header__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 20px 6px;
  border-top: 1px solid var(--primary-pale);
  position: relative;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* --- Navegación de temas --- */
.header__nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header__nav li {
  position: relative;
}

.header__nav a {
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 10px;
  border-radius: 5px;
  transition: var(--transition-standard);
  white-space: nowrap;
}

.header__nav a:hover,
.header__nav a.active {
  background-color: var(--primary-mist);
  color: var(--primary);
}

.header__nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  background-color: var(--primary);
  border-radius: 50%;
}

/* --- Acciones (búsqueda + cita) --- */
.header__actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-left: 1.2rem;
}

.searchBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--primary);
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.searchBtn:hover {
  background-color: var(--primary-mist);
}

.btn-pedir-cita {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 8px 20px;
  background-color: var(--primary);
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 30px;
  text-decoration: none;
  transition: background-color 0.25s ease, transform 0.2s ease;
  white-space: nowrap;
}

.btn-pedir-cita:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

/* --- Hamburger (mobile only) --- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 1.5rem;
  color: var(--primary-dark);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1;
}

.menu-toggle:hover {
  background: var(--primary-mist);
  color: var(--primary);
}

.menu-toggle.open {
  color: var(--primary);
}

/* ==========================================================================
   AUTHOR - HOME PAGE
   ========================================================================== */
.author {
  text-align: center;
  margin-bottom: 20px;
}

.author__heading {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-top: 2rem;
  color: var(--dark-blue);
  margin-bottom: 5px;
}

.author__body {
  font-size: var(--font-size-md);
  margin: 5px 0 40px 0;
}

/* ==========================================================================
   CATEGORIES SECTION
   ========================================================================== */
.categories-section {
  max-width: 1000px;
  margin: 3rem auto;
  padding: 0 2rem;
  text-align: center;
}

.categories-heading {
  font-size: 2.5rem;
  color: var(--dark-blue);
  margin-bottom: 2rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  padding: 0 20px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 1rem;
}

.category-name {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--dark-blue);
  text-align: center;
  flex: 0 0 auto;
}

.category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 50%; /* Sugerencia integrada: Forma circular para psicología */
  display: block;
  flex: 1 1 auto;
  border: 3px solid var(--gray-light);
  transition: var(--transition-standard);
}

.category-card:hover .category-image {
  border-color: var(--accent-warm);
}

/* ==========================================================================
   ARTICLES SECTION
   ========================================================================== */
.articles {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 2rem;
}

.articles__heading {
  font-size: 2.5rem;
  color: var(--dark-blue);
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 15px;
  font-weight: 600;
}

.articles__heading:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0; /* Cambiado a izquierda por recomendación visual */
  width: 80px;
  height: 4px;
  background: var(--accent-warm);
  border-radius: 2px;
}

/* ==========================================================================
   SECCIÓN DE ARTÍCULOS
   ========================================================================== */
.articles-section {
  min-height: 60vh;
}

.articles-hero {
  background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary) 100%);
  color: #ffffff;
  text-align: center;
  padding: 3.5rem 1rem 3rem;
  margin-bottom: 3rem;
}

.articles-hero__title {
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.articles-hero__sub {
  font-size: 1.1rem;
  color: var(--primary-mist);
  max-width: 560px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* --- Tarjeta de artículo --- */
.article-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(26, 122, 160, 0.1);
  opacity: 0;
  transform: translateY(18px);
  animation: fadeInUp 0.5s ease forwards;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.article-card:hover {
  box-shadow: 0 8px 28px rgba(26, 122, 160, 0.2);
  transform: translateY(-4px);
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.article-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.article-image {
  height: 210px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #e8f4fd 0%, #f3f0fb 100%);
  flex-shrink: 0;
}

.article-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-img {
  transform: scale(1.06);
}

.category-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-badge {
  background: var(--primary);
  color: #ffffff;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  text-decoration: none;
}

.category-badge--outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.article-content {
  padding: 22px 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-blue);
  line-height: 1.35;
  margin-bottom: 10px;
}

.article-excerpt {
  font-size: 0.92rem;
  color: var(--gray-medium);
  line-height: 1.65;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--primary-mist);
  font-size: 0.82rem;
  margin-top: auto;
}

.article-date {
  color: var(--gray-medium);
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-read-more {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}

.article-card:hover .article-read-more {
  gap: 8px;
}

/* --- Sin resultados --- */
.no-articles {
  text-align: center;
  padding: 5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gray-medium);
}

/* ==========================================================================
   PAGINACIÓN
   ========================================================================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  font-size: 1.3rem;
  color: var(--gray);
  text-decoration: none;
}

.pagination-link {
  padding: 0.8rem 1.5rem;
  background: white;
  border: 2px solid var(--accent-warm);
  color: var(--accent-warm);
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-standard);
  display: inline-flex;
  align-items: center;
}

.pagination-link:hover {
  background: var(--accent-warm);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(211, 84, 0, 0.3);
}

.pagination .current {
  background-color: var(--black);
  color: white;
  border-color: var(--black);
}

.no-articles {
  text-align: center;
  font-size: 1.2rem;
  color: var(--gray-medium);
  padding: 2rem;
  background-color: #f9f9f9;
  border-radius: var(--border-radius);
  margin: 2rem 0;
}

/* ==========================================================================
   ESPECÍFICOS DE PÁGINAS DE ARTÍCULOS
   ========================================================================== */
.page {
  padding: 2rem 0;
  background-color: white;
  border-radius: var(--border-radius);
  margin: 2rem auto;
  max-width: 1200px;
}

.articles-header h1 {
  font-size: var(--font-size-xl);
  color: var(--black);
  margin-bottom: 1rem;
}

.articles-header p {
  font-size: var(--font-size-md);
  color: var(--gray);
  max-width: 800px;
  margin: 0 auto;
}

/* ==========================================================================
   OTRAS SECCIONES (ENTREVISTAS, BIBLIOGRAFÍA)
   ========================================================================== */
.interviews-section {
  margin-bottom: 40px;
}

.interview {
  margin-bottom: 30px;
}

.interview h3 {
  color: var(--black);
  margin-bottom: 10px;
}

.interview p {
  font-size: 1rem;
  line-height: 1.6;
}

.bibliography {
  font-size: 0.9rem;
  color: var(--gray);
  margin-top: 10px;
}

/* ==========================================================================
   CUESTIONARIOS
   ========================================================================== */
.question-section {
  margin-bottom: 30px;
}

.question {
  margin-bottom: 20px;
}

.question p {
  font-weight: bold;
  margin-bottom: 10px;
}

.question label {
  display: block;
  margin: 5px 0;
}

.result {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background-color: #e9f5e9;
  border-radius: var(--border-radius);
}

.result h2 {
  color: #2e7d32;
  margin-bottom: 10px;
}

.result p {
  color: var(--black);
  line-height: 1.6;
}

/* ==========================================================================
   ESTILOS DE POST (1 AL 10)
   ========================================================================== */
.post-style-1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  color: var(--black);
  line-height: 1.7;
}

.post-style-2 h1 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: 1rem;
}

.post-style-2 p {
  font-size: 1.1rem;
  color: var(--gray);
}

.post-style-3 blockquote {
  background-color: var(--gray-light);
  padding: 1rem;
  border-left: 5px solid var(--accent-warm);
  font-style: italic;
  margin: 1rem 0;
}

.post-style-4 ul,
.post-style-4 ol {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.post-style-4 li {
  margin-bottom: 0.5rem;
}

.post-style-5 pre {
  background-color: #f4f4f4;
  padding: 1rem;
  overflow-x: auto;
  border-radius: var(--border-radius);
}

.post-style-5 code {
  font-family: monospace;
  font-size: 0.9rem;
}

.post-style-6 p.important {
  background-color: #f9f9f9;
  padding: 1rem;
  border-left: 3px solid var(--black);
  font-weight: 600;
}

.post-style-7 {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-base);
}

.post-style-8 h2,
.post-style-8 h3 {
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.post-style-9 {
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-style-10 p,
.post-style-10 ul,
.post-style-10 ol {
  margin-bottom: 1.5rem;
}

.post-style-10 ul,
.post-style-10 ol {
  padding-left: 1.5rem;
}

/* ==========================================================================
   SERVICIOS PSICOLÓGICOS
   ========================================================================== */
.servicios-psicologicos {
  padding: 2rem 0;
}

.servicios-psicologicos__heading {
  font-size: var(--font-size-lg);
  margin-bottom: 1rem;
  text-align: center;
  color: var(--black);
}

.servicios-psicologicos__description {
  font-size: var(--font-size-base);
  margin-bottom: 2rem;
  text-align: center;
  color: var(--gray);
}

.servicios-psicologicos__services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding: 0 10px;
}

.servicios-psicologicos__service {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--black);
  overflow: hidden;
  transition: var(--transition-standard);
}

.servicios-psicologicos__service:hover {
  transform: translateY(-5px);
  border-color: var(--accent-warm);
}

.servicios-psicologicos__service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.servicios-psicologicos__service-title {
  font-size: var(--font-size-md);
  margin: 1rem;
}

.servicios-psicologicos__service-description {
  font-size: var(--font-size-base);
  margin: 0 1rem 1rem;
  color: var(--gray);
}

/* ==========================================================================
   PÁGINA DE CONTACTO
   ========================================================================== */
.contacto-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.contacto-hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
  background-color: white;
  border-radius: var(--border-radius);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.actions-container {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.5rem;
  align-items: center;
}

.delete-form-inline {
  margin: 0;
}

/* ==========================================================================
   FORMULARIOS DE ADMINISTRACIÓN / CONTACTO
   ========================================================================== */
.form-container {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-base);
}

.form-container h2 {
  color: var(--black);
  margin-bottom: 1.5rem;
  font-size: var(--font-size-md);
  text-align: center;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* INFO CARDS */
.info-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-base);
}

.info-card h3 {
  color: var(--black);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contacto-list {
  list-style: none;
  padding: 0;
}

.contacto-list li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* MAPA */
.mapa-container {
  height: 200px;
  margin: 1rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--gray-light);
}

/* FORM FEEDBACK */
.form-feedback {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 600;
}

.form-feedback.success {
  background: #d4edda;
  color: #155724;
}

.form-feedback.error {
  background: #f8d7da;
  color: #721c24;
}

/* EMERGENCY CARD */
.emergency-card {
  background: #fff8f8;
  border-left: 4px solid var(--red);
  padding: 1.5rem;
  border-radius: var(--border-radius);
}

.emergency-card h3 {
  color: var(--red);
}

.emergency-list {
  list-style: none;
  padding: 0;
}

.emergency-list a {
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}

.emergency-list a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   ALERTAS
   ========================================================================== */
.alert {
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: var(--border-radius);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-base);
  border: 1px solid transparent;
  transition: var(--transition-standard);
}

.alert-success {
  background-color: #f0f9f0;
  color: #0a5c0a;
  border-color: #c1e5c1;
}

.alert-danger {
  background-color: #fdf0f0;
  color: #b91c1c;
  border-color: #f5c2c7;
}

.alert-info {
  background-color: #f0f7ff;
  color: #1a56a5;
  border-color: #b8daff;
}

.alert:before {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.alert-success:before { content: "\f058"; }
.alert-danger:before { content: "\f06a"; }
.alert-info:before { content: "\f05a"; }

.alert .close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
  margin-left: 1rem;
}

/* ==========================================================================
   ENLACES EXTERNOS
   ========================================================================== */
.enlaces-container {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.enlaces-title {
  font-size: var(--font-size-lg);
  color: var(--black);
  text-align: center;
  margin-bottom: 1rem;
}

.enlaces-description {
  text-align: center;
  color: var(--gray);
  margin-bottom: 2rem;
  font-size: var(--font-size-md);
}

.enlaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.enlace-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

/* Animaciones secuenciales mantenidas */
.enlace-card:nth-child(1) { animation-delay: 0.1s; }
.enlace-card:nth-child(2) { animation-delay: 0.2s; }
.enlace-card:nth-child(3) { animation-delay: 0.3s; }
.enlace-card:nth-child(4) { animation-delay: 0.4s; }
.enlace-card:nth-child(5) { animation-delay: 0.5s; }
.enlace-card:nth-child(6) { animation-delay: 0.6s; }
.enlace-card:nth-child(7) { animation-delay: 0.7s; }
.enlace-card:nth-child(8) { animation-delay: 0.8s; }
.enlace-card:nth-child(9) { animation-delay: 0.9s; }
.enlace-card:nth-child(10) { animation-delay: 1s; }

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

.enlace-titulo {
  font-size: 1.25rem;
  color: var(--black);
  margin-bottom: 0.75rem;
}

.enlace-descripcion {
  color: var(--gray);
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

/* CATEGORY FILTERS */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0 2rem;
}

.category-filter {
  padding: 0.5rem 1rem;
  background: #f0f0f0;
  border-radius: 20px;
  text-decoration: none;
  color: #333;
  transition: var(--transition-standard);
}

.category-filter:hover,
.category-filter.active {
  background: var(--accent-warm);
  color: white;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: var(--dark-blue);
  color: var(--primary-mist);
  padding: 40px 20px;
  margin-top: 5rem;
  position: relative;
  width: 100%;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 982px;
  margin: 0 auto;
  padding: 0 10px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin: 10px 20px;
}

.footer-logo {
  max-width: 180px;
  width: 100%;
  height: auto;
  filter: brightness(2.5) saturate(0.7);
  margin-bottom: 12px;
  display: block;
}

.footer-section .footer-title {
  color: var(--primary-pale);
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: center;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ecf0f1;
  font-size: 1.25rem;
  transition: var(--transition-standard);
}

.footer-social a:hover {
  background-color: var(--accent-warm);
  transform: scale(1.1);
}

.footer a,
.footer-links a,
.footer-links li a {
  color: #a8ddf0 !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer a:hover,
.footer-links a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

.footer-links,
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links li,
.footer-contact li {
  color: #a8ddf0;
  font-size: 0.9rem;
}

.footer-contact li a {
  color: #a8ddf0 !important;
}

.footer p,
.footer-description {
  color: #c8eaf5 !important;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(168, 221, 240, 0.2);
  font-size: 14px;
  color: var(--primary-mist);
}

.footer-bottom p { color: var(--primary-mist) !important; }

.footer-bottom a {
  color: var(--primary-pale) !important;
  text-decoration: none;
  margin: 0 6px;
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media only screen and (min-width: 769px) {
  .header__nav {
    display: block;
  }
  .header__nav ul {
    flex-wrap: nowrap;
    gap: 0.1rem;
  }
  .contacto-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media only screen and (max-width: 768px) {
  /* ── Logo mobile ───────────────────────────────── */
  .header__logo-image {
    height: 140px;
    min-width: 140px;
  }

  /* ── Show hamburger ────────────────────────────── */
  .menu-toggle {
    display: block;
  }

  /* ── Mobile nav: slide-down via max-height ─────── */
  .header__bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
    gap: 0;
    transition: max-height 0.32s ease, padding 0.2s ease;
  }

  .header__bottom.active {
    max-height: 600px;
    padding-top: 10px;
    padding-bottom: 14px;
    border-top: 1px solid var(--primary-pale);
    gap: 0.4rem;
  }

  /* ── Nav links stacked ─────────────────────────── */
  .header__nav ul {
    flex-direction: column;
    gap: 2px;
    width: 100%;
  }

  .header__nav a {
    display: block;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 8px;
  }

  /* ── Actions row ───────────────────────────────── */
  .header__actions {
    margin-left: 0;
    margin-top: 6px;
    width: 100%;
    justify-content: flex-start;
    padding: 4px 0;
    border-top: 1px solid var(--primary-mist);
  }

  /* ── Content responsive ────────────────────────── */
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .articles-hero__title { font-size: 1.8rem; }

  .hero__content {
    flex-direction: column;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .pagination {
    flex-direction: column;
    align-items: center;
  }

  /* ── iOS input zoom prevention ────────────────────── */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  select,
  textarea {
    font-size: 16px;
  }

  /* ── Container padding ─────────────────────────────── */
  .container {
    padding: 0 1rem;
  }

  /* ── Hero heading ──────────────────────────────────── */
  .hero__text h2 {
    font-size: 1.4rem;
  }

  /* ── Author heading ────────────────────────────────── */
  .author__heading {
    font-size: 1.6rem;
  }

  /* ── Servicios grid → single column ───────────────── */
  .servicios-psicologicos__services {
    grid-template-columns: 1fr;
  }

  /* ── Enlaces grid → single column ─────────────────── */
  .enlaces-grid {
    grid-template-columns: 1fr;
  }

  /* ── Footer mobile ─────────────────────────────────── */
  .footer-container {
    flex-direction: column;
    gap: 0;
  }

  .footer-section {
    margin: 8px 12px;
  }
}
.searchBar {
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    padding-top: 20px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Cuando se añade la clase .open mediante JS */
.searchBar.open {
    visibility: visible;
    opacity: 1;
}

/* El container desliza hacia abajo cuando se abre */
.searchBar.open .container {
    transform: translateY(0);
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 800px; /* Para que no sea tan ancha en PC */
    margin: 0 auto;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    z-index: 10;
}

#searchInput {
    width: 100%;
    padding: 12px 20px 12px 45px;
    padding-left: 45px !important; /* Espacio para el icono de la lupa */
    border-radius: 25px;
    border: none; /* Quitamos el borde para un look más limpio */
    font-size: 1.1rem;
    margin-bottom: 0; /* Quitamos el margen que tienen tus otros inputs */
    background: white;
}

#searchClose {
    cursor: pointer;
    font-size: 1.8rem;
    color: white;
    margin-left: 20px;
    transition: var(--transition-standard);
}

#searchClose:hover {
    color: var(--accent-warm);
    transform: rotate(90deg);
}
/* El contenedor interno que sí tiene el fondo negro sólido */
.searchBar .container {
    background-color: var(--black);
    width: 100%;
    padding: 20px;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}


.input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Esto asegura que la lupa quede fija a la izquierda dentro del input */
.input-wrapper .search-icon {
    position: absolute;
    left: 15px;
    color: var(--gray);
     /* Para que no interfiera al hacer clic */
}
/* ==========================================================================
   ADICIONALES DE LECTURA (POST CONTAINER)
   ========================================================================== */
p {
  color: var(--dark-blue);
  font-weight: 300; 
}

/* ==========================================================================
   POST INDIVIDUAL
   ========================================================================== */
.post-wrapper {
  background: var(--bg-soft);
  min-height: 60vh;
  padding: 2rem 1rem 5rem;
}

.post-container {
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 2.8rem 3.2rem;
  box-shadow: 0 4px 24px rgba(26, 122, 160, 0.1);
}

.post-breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-medium);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.post-breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.post-breadcrumb a:hover { text-decoration: underline; }

.post-breadcrumb__sep { color: var(--gray); }

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.2rem;
}

.post-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--dark-blue);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--gray-medium);
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 2px solid var(--primary-mist);
}

.post-meta__date,
.post-meta__read {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta i { color: var(--primary-light); }

.post-featured-image {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 2.2rem;
  max-height: 440px;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #2c2c2c;
}

.post-body p { margin-bottom: 1.6rem; }
.post-body h2 { font-size: 1.5rem; color: var(--dark-blue); margin: 2.2rem 0 0.8rem; }
.post-body h3 { font-size: 1.2rem; color: var(--primary-dark); margin: 1.8rem 0 0.6rem; }
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.post-body li { margin-bottom: 0.5rem; }
.post-body blockquote {
  border-left: 4px solid var(--primary-light);
  padding: 0.8rem 1.4rem;
  background: var(--bg-soft);
  border-radius: 0 10px 10px 0;
  margin: 1.8rem 0;
  font-style: italic;
  color: var(--primary-dark);
}
.post-body img { max-width: 100%; border-radius: 10px; margin: 1rem 0; }
.post-body a { color: var(--primary); text-decoration: underline; }

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 2px solid var(--primary-mist);
}

.post-back-btn {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.post-back-btn:hover { gap: 10px; }

.post-footer__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 768px) {
  .post-container {
    padding: 1.6rem 1.4rem;
    border-radius: 14px;
  }
  .post-title { font-size: 1.5rem; }
  .post-body { font-size: 1rem; }
}
/* ==========================================================================
   ESCALA DE EVALUACIÓN DEL COMPORTAMIENTO
   Adaptado de N. Owens y B. Owens
   — Integrado al sistema de diseño de Mente Abierta —
   ========================================================================== */

/* ── WRAPPER PRINCIPAL ────────────────────────────────────────────────────── */
.evaluacion-wrapper {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem 4rem;
}

/* ── ENCABEZADO DE LA EVALUACIÓN ─────────────────────────────────────────── */
.eval-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2.5rem 2rem;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  border-top: 5px solid var(--accent-warm);
}

.eval-titulo {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.eval-subtitulo {
  color: var(--gray);
  font-weight: 300;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.eval-instrucciones {
  background-color: var(--bg-soft);
  border-left: 4px solid var(--accent-warm);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  padding: 1rem 1.5rem;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.eval-instrucciones p {
  font-size: 0.92rem;
  color: var(--gray-medium);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.eval-instrucciones ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.eval-instrucciones ul li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--gray-medium);
  font-weight: 400;
}

/* Badges de escala 1-2-3 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.8rem;
  color: white;
  flex-shrink: 0;
}

.badge-1 { background-color: #27ae60; }
.badge-2 { background-color: #f39c12; }
.badge-3 { background-color: var(--accent-warm); }

/* ── SECCIÓN DE DATOS DEL ESTUDIANTE ─────────────────────────────────────── */
.eval-datos {
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius-lg);
}

.eval-datos h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-light);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 1.5rem;
}

/* ── SECCIONES DE CADA ESCALA ────────────────────────────────────────────── */
.escala-seccion {
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius-lg);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--gray-light);
  transition: var(--transition-standard);
}

.escala-seccion:hover {
  box-shadow: var(--shadow-hover);
}

.escala-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.5rem;
  background-color: var(--bg-soft);
  border-bottom: 1px solid var(--gray-light);
}

.escala-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.escala-nombre {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-blue);
  flex: 1;
}

.escala-puntaje-live {
  font-size: 0.82rem;
  color: var(--gray-medium);
  font-weight: 400;
  background: white;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--gray-light);
  white-space: nowrap;
}

.escala-puntaje-live strong {
  color: var(--accent-warm);
  font-weight: 700;
}

/* ── LISTA DE ÍTEMS ──────────────────────────────────────────────────────── */
.items-lista {
  padding: 0.5rem 0;
}

.item-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-bottom: 1px solid #f4f4f4;
  transition: background-color 0.2s ease;
}

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

.item-row:hover {
  background-color: #fafafa;
}

.item-row.respondido {
  background-color: #f9fdf9;
}

.item-numero {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--gray-light);
  color: var(--gray-medium);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: var(--transition-standard);
}

.item-row.respondido .item-numero {
  background-color: var(--accent-warm);
  color: white;
}

.item-texto p {
  font-size: 0.88rem;
  color: var(--gray-medium);
  line-height: 1.55;
  margin: 0;
  font-weight: 300;
}

/* ── GRUPO LIKERT (BOTONES 1, 2, 3) ──────────────────────────────────────── */
.likert-group {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.likert-opcion {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

/* Ocultar el radio nativo */
.likert-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.likert-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-height: 52px;
  border-radius: var(--border-radius);
  border: 2px solid var(--gray-light);
  background: white;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-medium);
  cursor: pointer;
  transition: var(--transition-standard);
  line-height: 1;
  gap: 3px;
  font-family: 'Poppins', sans-serif;
}

.likert-btn small {
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--gray);
  text-align: center;
  line-height: 1.1;
}

.likert-btn:hover {
  border-color: var(--accent-soft);
  background-color: #fef9f5;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(211, 84, 0, 0.12);
}

/* Colores por valor */
.likert-btn-1:hover,
.likert-btn-1.activo {
  border-color: #27ae60;
  background-color: #27ae60;
  color: white;
  box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.likert-btn-1.activo small { color: rgba(255,255,255,0.85); }

.likert-btn-2:hover,
.likert-btn-2.activo {
  border-color: #f39c12;
  background-color: #f39c12;
  color: white;
  box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}

.likert-btn-2.activo small { color: rgba(255,255,255,0.85); }

.likert-btn-3:hover,
.likert-btn-3.activo {
  border-color: var(--accent-warm);
  background-color: var(--accent-warm);
  color: white;
  box-shadow: 0 3px 10px rgba(211, 84, 0, 0.3);
}

.likert-btn-3.activo small { color: rgba(255,255,255,0.85); }

/* ── FOOTER DEL FORMULARIO / PROGRESO ────────────────────────────────────── */
.eval-footer {
  position: sticky;
  bottom: 0;
  background: white;
  border-top: 1px solid var(--gray-light);
  padding: 1rem 1.5rem;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  z-index: 100;
}

#progreso-wrapper {
  flex: 1;
  min-width: 200px;
}

#progreso-wrapper label {
  display: block;
  font-size: 0.82rem;
  color: var(--gray-medium);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

#progreso-num {
  color: var(--accent-warm);
  font-weight: 700;
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background-color: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-warm), var(--accent-soft));
  border-radius: 4px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── BOTÓN CALCULAR ──────────────────────────────────────────────────────── */
.btn-calcular {
  background: linear-gradient(135deg, var(--accent-warm), var(--accent-soft));
  color: white;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-standard);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(211, 84, 0, 0.25);
}

.btn-calcular:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(211, 84, 0, 0.4);
}

.btn-calcular:disabled {
  background: var(--gray-light);
  color: var(--gray);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ── SECCIÓN DE RESULTADOS ───────────────────────────────────────────────── */
.resultados-wrapper {
  margin-top: 2.5rem;
  animation: fadeInUp 0.5s ease forwards;
}

.resultados-titulo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-light);
}

.resultados-sub {
  font-size: 0.88rem;
  color: var(--gray-medium);
  margin-bottom: 2rem;
  font-weight: 400;
}

.resultados-wrapper .card {
  padding: 2rem;
  border-radius: var(--border-radius-lg);
}

/* ── CONTENEDORES DE GRÁFICAS ────────────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.chart-bar {
  max-width: 100%;
}

/* ── TABLA DE RESULTADOS ─────────────────────────────────────────────────── */
.tabla-wrapper {
  margin: 1.5rem 0;
  overflow-x: auto;
  border-radius: var(--border-radius);
  border: 1px solid var(--gray-light);
}

.tabla-resultados {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tabla-resultados thead {
  background-color: var(--dark-blue);
  color: white;
}

.tabla-resultados thead th {
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tabla-resultados tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.15s ease;
}

.tabla-resultados tbody tr:last-child {
  border-bottom: none;
}

.tabla-resultados tbody tr:hover {
  background-color: var(--bg-soft);
}

.tabla-resultados td {
  padding: 0.8rem 1rem;
  color: var(--dark-blue);
  font-weight: 400;
  vertical-align: middle;
}

.td-center {
  text-align: center;
}

.color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Mini barra de progreso en la tabla */
.mini-bar-track {
  width: 100px;
  height: 8px;
  background-color: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Badges de nivel */
.nivel-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.nivel-bajo {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.nivel-moderado {
  background-color: #fff8e1;
  color: #f57f17;
  border: 1px solid #ffe082;
}

.nivel-alto {
  background-color: #fdecea;
  color: var(--red);
  border: 1px solid #ffcdd2;
}

.tabla-nota {
  font-size: 0.78rem;
  color: var(--gray);
  margin: 0.75rem 1rem 0;
  font-style: italic;
  font-weight: 300;
}

/* ── ACCIONES DE RESULTADO ───────────────────────────────────────────────── */
.resultados-acciones {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-secundario {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--dark-blue);
  border: 2px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-standard);
}

.btn-secundario:hover {
  border-color: var(--accent-warm);
  color: var(--accent-warm);
  transform: translateY(-2px);
  box-shadow: var(--shadow-base);
}

/* ── ESTILOS DE IMPRESIÓN ────────────────────────────────────────────────── */
@media print {
  .eval-footer,
  .btn-calcular,
  .resultados-acciones,
  .header,
  .footer {
    display: none !important;
  }

  .evaluacion-wrapper {
    max-width: 100%;
    padding: 0;
  }

  .escala-seccion,
  .resultados-wrapper .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .chart-container {
    max-width: 100%;
  }
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .evaluacion-wrapper {
    padding: 0 0.5rem 5rem;
  }

  .eval-header {
    padding: 1.5rem 1rem;
  }

  .eval-datos {
    padding: 1.25rem;
  }

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

  .item-row {
    grid-template-columns: 32px 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem;
    padding: 1rem;
  }

  .likert-group {
    grid-column: 1 / -1;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--gray-light);
  }

  .likert-btn {
    width: 60px;
    min-height: 56px;
    font-size: 1.1rem;
  }

  .escala-header {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .escala-nombre {
    font-size: 0.92rem;
  }

  .eval-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
  }

  .btn-calcular {
    width: 100%;
    text-align: center;
  }

  .resultados-acciones {
    flex-direction: column;
  }

  .btn-secundario {
    width: 100%;
  }

  .mini-bar-track {
    width: 70px;
  }
}

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */
.admin-main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.admin-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.admin-title h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-blue);
}
