/* --- CONTENEDOR PRINCIPAL --- */
.anahuac-profile-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 60px 80px;
  font-family: 'Roboto', sans-serif;
  background-color: #fff;
  /* FIX STICKY: Asegura que el contenedor permita el scroll */
  overflow: visible !important; 
}

/* DEBUG MSG */
.hubdb-debug-msg {
    text-align: center;
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
}

/* --- TABS NAVEGACIÓN --- */
.profile-tabs-nav {
  display: flex;
  justify-content: center;
  border-bottom: 2px solid #f3f4f6;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}

.profile-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 15px 15px;
  font-family: 'Sharp Slab', serif;
  font-size: 18px;
  font-weight: 700;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: -2px;
}

.profile-tab-btn:hover { color: #FF5900; }

.profile-tab-btn.active {
  color: #FF5900;
  border-bottom-color: #FF5900;
  font-family: 'Sharp Slab', serif; 
  font-size: 20px;
}

/* --- GRID LAYOUT MEJORADO --- */
.profile-panel { display: none; animation: fadeIn 0.6s ease-out; }
.profile-panel.active { display: block; }

.profile-grid {
  display: grid;
  grid-template-columns: 3fr 2fr; /* Texto más ancho */
  gap: 100px;
  /* FIX STICKY: Alineamos al inicio para que la columna imagen no se estire */
  align-items: center; 
  padding-top: 20px;
}

/* --- IMAGEN Y PLACEHOLDER (STICKY FIX) --- */
.profile-col-img {
    /* Soporte para Safari y Chrome */
    position: -webkit-sticky; 
    position: sticky;
    
    /* Aumenté a 100px para que no choque con el menú de arriba si bajas */
    top: 100px; 
    
    /* Crucial: le dice a la columna que ocupe solo su espacio necesario */
    align-self: start; 
    height: auto;
    z-index: 10;
}

.profile-col-img .img-wrapper {
  width: 100%;
  height: 450px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.10);
}

.profile-col-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.profile-col-img:hover img { transform: scale(1.03); }

/* Placeholder */
.img-placeholder {
  width: 100%;
  height: 450px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.img-placeholder::after {
    content: "Anáhuac";
    font-family: 'Sharp Slab', serif;
    font-size: 30px;
    color: #9ca3af;
    opacity: 0.4;
    letter-spacing: 1px;
}

/* --- TEXTO Y TIPOGRAFÍA --- */

/* Ocultar redundancias */
.profile-heading { display: none !important; }
.profile-rich-text h1:first-child,
.profile-rich-text h2:first-child {
    display: none !important;
}

/* Texto General */
.profile-rich-text {
  font-size: 16px;
  line-height: 1.8;
  color: #4b5563; 
}

.profile-rich-text p {
  margin-bottom: 24px !important;
  color: #374151; 
}

/* TÍTULOS CON LÍNEA HORIZONTAL */
.profile-rich-text h2,
.profile-rich-text h3, 
.profile-rich-text h4,
.profile-rich-text h5 {
    font-family: 'Sharp Slab', serif !important;
    font-size: 24px !important;
    color: #111827 !important;
    margin-top: 45px !important;
    margin-bottom: 15px !important;
    line-height: 1.2 !important;
    position: relative;
    display: inline-block;
}

.profile-rich-text h2::after,
.profile-rich-text h3::after,
.profile-rich-text h4::after,
.profile-rich-text h5::after {
    content: '';
    display: block;
    width: 40px;            
    height: 3px;            
    background-color: #FF5900;
    margin-top: 8px;        
    border-radius: 2px;
}

/* Eliminar margen superior del primer elemento */
.profile-rich-text > *:first-child {
    margin-top: 0 !important;
}

/* LISTAS CON CHECKS (✓) */
.profile-rich-text ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-top: 25px !important;
}

.profile-rich-text li {
    position: relative;
    padding-left: 32px; 
    margin-bottom: 16px !important;
    color: #374151;
    line-height: 1.6;
}

.profile-rich-text li::before {
    content: "✓" !important;
    color: #FF5900; !important;
    font-weight: 900;
    font-size: 20px;
    position: absolute;
    left: 0;
    top: 0px; 
    line-height: 1.6; 
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; gap: 40px; }
   
  /* En móvil bajamos el margen a 20px */
  .anahuac-profile-wrapper {
      padding: 40px 20px !important; 
  }
  
  .profile-col-img { 
      order: -1; 
      position: static; /* En móvil quitamos el sticky para que no estorbe */ 
  }
  .profile-col-img .img-wrapper, .img-placeholder { height: 300px; }
  .profile-tabs-nav { gap: 10px; }
  .profile-tab-btn { font-size: 16px; padding: 10px; }
  
  .profile-rich-text h2,
  .profile-rich-text h3, 
  .profile-rich-text h4 { 
      font-size: 22px !important; 
      margin-top: 35px !important; 
  }
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; gap: 40px; }
  
  /* Ajuste Móvil: Reducimos el padding y forzamos con !important para ganar al de escritorio */
  .anahuac-profile-wrapper {
      padding: 40px 20px !important; 
  }
  
  /* ... resto del responsive (igual que antes) ... */
  .profile-col-img { 
      order: -1; 
      position: static; 
  }
  .profile-col-img .img-wrapper, .img-placeholder { height: 300px; }
  .profile-tabs-nav { gap: 10px; }
  .profile-tab-btn { font-size: 16px; padding: 10px; }
  
  .profile-rich-text h2,
  .profile-rich-text h3, 
  .profile-rich-text h4 { 
      font-size: 22px !important; 
      margin-top: 35px !important; 
  }
}