/* =================================================================
   1. GLOBAL & IPHONE (SCROLL FIXED)
   ================================================================= */
html, body {
	height: 100% !important;
	overflow-y: scroll !important;
	-webkit-overflow-scrolling: touch !important;
}

.sin-titulo h1, .sin-titulo .inline-title, .sin-titulo .page-header,
.link-tree-page h1, .link-tree-page .inline-title, .link-tree-page .page-header {
	display: none !important;
}

.markdown-rendered img {
	display: block !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Ocultar iconos nativos */
.internal-link .share-link-icon, svg.share-link-icon, .external-link-icon, a[target="_blank"] svg { display: none !important; }
a.internal-link, a.external-link, a[target="_blank"] { padding-right: 0 !important; background-image: none !important; }

/* =================================================================
   2. ESTRUCTURA HOME (Link Tree)
   ================================================================= */
.link-tree-page {
	display: block !important;
	width: 100% !important;
	min-height: 100% !important;
	padding-bottom: 30vh !important;
	margin: 0 !important;
	padding-top: 2rem !important;
}

.link-tree-page .markdown-preview-sizer,
.link-tree-page .markdown-rendered {
	width: 100% !important;
	max-width: 600px !important; 
	margin: 0 auto !important;   
	text-align: center !important; 
	padding-left: 1.5rem !important;
	padding-right: 1.5rem !important;
}

/* Alineación forzosa de textos SOLO en el cuerpo principal del Link Tree */
.link-tree-page > .markdown-rendered > ul, 
.link-tree-page > .markdown-rendered > ol, 
.link-tree-page > .markdown-rendered > p {
	text-align: center !important;
	text-indent: 0 !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

/* Botones Centrados */
.link-tree-page a {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 12px !important;
	width: fit-content !important; 
	max-width: 90% !important;
	margin: 0.6rem auto !important;
	text-indent: 0 !important;
	padding: 12px 25px !important;
	text-align: center !important;
}

/* =================================================================
   3. ESTILO SUPER LIMPIO (Audiolibro + Enlaces)
   ================================================================= */

/* A. AUDIOLIBRO (Minimalista Izquierda) */
.custom-collapse {
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	margin: 1.5rem auto;
	max-width: 550px;
}
.custom-collapse summary {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: flex-start !important; /* Alineado a la izquierda */
	padding: 0.5rem 0; /* Sin padding lateral exagerado */
	cursor: pointer;
	font-weight: bold;
	color: var(--text-normal);
	border: none !important; /* Sin línea */
}
/* Flecha */
.custom-collapse summary::-webkit-details-marker { display: none; }
.custom-collapse summary::before {
	content: "▶";
	margin-right: 10px;
	font-size: 0.7rem;
	color: var(--text-muted);
	transition: transform 0.2s;
}
.custom-collapse[open] summary::before { transform: rotate(90deg); }


/* B. ENLACES RELACIONADOS (Igual de Minimalista) */
.callout[data-callout="enlaces"] {
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	margin: 1.5rem auto !important;
	width: 100%;
	max-width: 550px;
	padding: 0 !important;
}

/* Título: Izquierda, sin borde, sin fondo */
.callout[data-callout="enlaces"] .callout-title {
	background-color: transparent !important; 
	border: none !important;
	padding: 0.5rem 0;
	justify-content: flex-start !important; /* ALINEACIÓN IZQUIERDA */
	cursor: pointer;
	font-weight: 600;
	color: var(--text-normal) !important;
}
.callout[data-callout="enlaces"] .callout-icon { display: none !important; }

/* Contenido: Izquierda */
.callout[data-callout="enlaces"] .callout-content {
	background-color: transparent;
	padding: 0.5rem 0 0 1rem !important; /* Pequeña sangría para los links */
	text-align: left !important;
	border: none !important;
}

/* Links */
.callout[data-callout="enlaces"] a {
	display: inline-block !important;
	width: auto !important;
	margin: 0.2rem 0 !important;
	padding: 0 !important;
	border: none !important;
	text-decoration: none;
	color: var(--text-accent);
}

/* =================================================================
   4. TARJETAS DE CITA (RESTAURADAS: Tarjeta Flotante)
   ================================================================= */
.callout[data-callout="cita"] {
	display: block !important;
	background-color: var(--background-secondary-alt) !important; /* Fondo visible */
	border: 1px solid var(--divider-color) !important;
	border-radius: 12px !important;
	padding: 1.5rem !important;
	margin: 2rem auto !important;
	max-width: 90%;
	box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important; /* Sombra visible */
	text-align: left !important; /* Texto alineado a la izquierda siempre */
	position: relative;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.callout[data-callout="cita"]:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
	border-color: var(--text-muted) !important;
}

/* Ocultar adornos de Obsidian en las citas (Título, Icono) */
.callout[data-callout="cita"] .callout-title,
.callout[data-callout="cita"] .callout-icon,
.callout[data-callout="cita"] .markdown-embed-link,
.callout[data-callout="cita"] .callout-fold { 
	display: none !important; 
}

/* Limpieza de contenido interno */
.callout[data-callout="cita"] .callout-content { 
	padding: 0 !important; 
	margin: 0 !important; 
	background: transparent !important;
	border: none !important;
}
.callout[data-callout="cita"] .markdown-embed, 
.callout[data-callout="cita"] blockquote { 
	border: none !important; 
	padding: 0 !important; 
	margin: 0 !important; 
	background: transparent !important;
}
.callout[data-callout="cita"] p { 
	margin: 0 !important; 
	line-height: 1.6; 
}

/* LÓGICA CALENDARIO */
.nota-calendario .callout[data-callout="cita"] { display: none !important; }
.nota-calendario .callout[data-callout="cita"].activa { display: block !important; }

/* Tipografía */
.publish-renderer h1 { font-size: 1.8rem !important; margin-bottom: 1rem !important; }
.markdown-rendered { font-size: 18px !important; line-height: 1.6 !important; }

/* =================================================================
	ESTRELLA IA (Target: "Int IA")
	================================================================= */
	
/* Detectamos "Int" seguido de cualquier cosa, o la frase completa codificada */
a[href*="Int"],
a[href*="Int%20IA"], /* Para cuando el navegador codifica el espacio */
a[href*="Int-IA"],   /* Por si usas guiones */
a[data-href*="Int"] {
	
	/* 1. ANULACIÓN TOTAL DEL ESTILO BOTÓN */
	display: inline-block !important; /* Necesario para que funcione el zoom */
	width: auto !important;
	margin: 0 0 0 2px !important;
	padding: 0 !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	text-indent: 0 !important;
	text-align: left !important;
	
	/* 2. ESTILO DE ESTRELLA (Nota al pie) */
	color: var(--text-muted) !important;
	font-size: 0.8em !important;      /* Tamaño ajustado */
	vertical-align: super !important; /* Elevado */
	text-decoration: none !important;
	opacity: 0.7;
	line-height: 1 !important;
}

/* Efecto Hover (Al pasar el mouse) */
a[href*="Int"]:hover,
a[href*="Int%20IA"]:hover,
a[data-href*="Int"]:hover {
	color: var(--text-accent) !important;
	opacity: 1;
	transform: scale(1.2); /* Pequeño zoom */
	cursor: help;
	background: none !important;
}

/* =================================================================
	ARREGLO DEFINITIVO V2: TEXTO LIMPIO + CLIP
	Integra el texto, quita bordes/títulos, pero MANTIENE el clip.
	================================================================= */
	
/* 1. ELIMINAR LÍNEA, BORDES Y FONDO (El contenedor) */
.markdown-embed:not(.callout .markdown-embed) {
	border: none !important;          
	padding: 0 !important;            
	margin: 1rem 0 !important;        
	background: transparent !important;
	box-shadow: none !important;
}

/* 2. ALINEAR TEXTO (Sin sangría) */
.markdown-embed:not(.callout .markdown-embed) .markdown-embed-content {
	padding: 0 !important;            
	margin: 0 !important;
	border: none !important;
	min-height: 0 !important;
}

/* 3. OCULTAR SOLO EL TÍTULO (Para que no haga ruido) */
.markdown-embed:not(.callout .markdown-embed) .markdown-embed-title {
	display: none !important;
}

/* 4. RECUPERAR Y ESTILIZAR EL CLIP (El enlace) */
.markdown-embed:not(.callout .markdown-embed) .markdown-embed-link {
	display: block !important;       /* ¡AQUÍ ESTÁ LA CLAVE! Lo hacemos visible */
	background: transparent !important; /* Sin caja gris detrás */
	top: 0 !important;               /* Alineado arriba */
	right: 0 !important;             /* Alineado a la derecha */
	color: var(--text-muted) !important; /* Color gris suave */
	opacity: 0.6;                    /* Un poco transparente para no distraer */
}

/* Efecto al pasar el mouse por el clip */
.markdown-embed:not(.callout .markdown-embed) .markdown-embed-link:hover {
	color: var(--text-accent) !important;
	opacity: 1;
}